-
-
Notifications
You must be signed in to change notification settings - Fork 12.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Display information about your hardware and operating system. (cherry picked from commit 3e5022c)
- Loading branch information
Showing
2 changed files
with
47 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
{ stdenv, fetchurl, which, pkgconfig, gtk2, pcre, glib, libxml2 | ||
, libsoup ? null | ||
}: | ||
|
||
stdenv.mkDerivation rec { | ||
name = "hardinfo-${version}"; | ||
version = "0.5.1"; | ||
|
||
src = fetchurl { | ||
url = "mirror://sourceforge/project/hardinfo.berlios/hardinfo-${version}.tar.bz2"; | ||
sha256 = "0yhvfc5icam3i4mphlz0m9d9d2irjw8mbsxq203x59wjgh6nrpx0"; | ||
}; | ||
|
||
# Not adding 'hostname' command, the build shouldn't depend on what the build | ||
# host is called. | ||
buildInputs = [ which pkgconfig gtk2 pcre glib libxml2 libsoup ]; | ||
|
||
# Fixes '#error You must compile this program without "-O"' | ||
hardeningDisable = [ "all" ]; | ||
|
||
preConfigure = '' | ||
patchShebangs configure | ||
# -std=gnu89 fixes build error, copied from | ||
# https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=757525 | ||
sed -i -e "s/^CFLAGS = \(.*\)/CFLAGS = \1 -std=gnu89/" Makefile.in | ||
substituteInPlace ./arch/linux/common/modules.h --replace /sbin/modinfo modinfo | ||
''; | ||
|
||
# Makefile supports DESTDIR but not PREFIX (it hardcodes $DESTDIR/usr/). | ||
installFlags = [ "DESTDIR=$(out)" ]; | ||
postInstall = '' | ||
mv "$out/usr/"* "$out" | ||
rmdir "$out/usr" | ||
''; | ||
|
||
meta = with stdenv.lib; { | ||
homepage = http://hardinfo.org/; | ||
description = "Display information about your hardware and operating system"; | ||
license = licenses.gpl2; | ||
maintainers = with maintainers; [ bjornfor ]; | ||
platforms = platforms.linux; | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters