summary refs log tree commit diff
path: root/pkgs/tools/system
diff options
context:
space:
mode:
authorlethalman <lucabru@src.gnome.org>2015-06-01 17:09:00 +0200
committerlethalman <lucabru@src.gnome.org>2015-06-01 17:09:00 +0200
commit80dd602c48c5f152b8c348d8b337f9b0d9461971 (patch)
treeb7dd76c03ccf6d8fa3440a3a6e0a5f186070220f /pkgs/tools/system
parent3b6dbb19170cd54536ff37ab46d2a06b0aac0c1f (diff)
parent2f4dc083d5d294392b9aaef59808466b4dad55c2 (diff)
downloadnixlib-80dd602c48c5f152b8c348d8b337f9b0d9461971.tar
nixlib-80dd602c48c5f152b8c348d8b337f9b0d9461971.tar.gz
nixlib-80dd602c48c5f152b8c348d8b337f9b0d9461971.tar.bz2
nixlib-80dd602c48c5f152b8c348d8b337f9b0d9461971.tar.lz
nixlib-80dd602c48c5f152b8c348d8b337f9b0d9461971.tar.xz
nixlib-80dd602c48c5f152b8c348d8b337f9b0d9461971.tar.zst
nixlib-80dd602c48c5f152b8c348d8b337f9b0d9461971.zip
Merge pull request #7479 from bobvanderlinden/hwinfo
added hwinfo
Diffstat (limited to 'pkgs/tools/system')
-rw-r--r--pkgs/tools/system/hwinfo/default.nix35
1 files changed, 35 insertions, 0 deletions
diff --git a/pkgs/tools/system/hwinfo/default.nix b/pkgs/tools/system/hwinfo/default.nix
new file mode 100644
index 000000000000..6ecbbb98a546
--- /dev/null
+++ b/pkgs/tools/system/hwinfo/default.nix
@@ -0,0 +1,35 @@
+{ stdenv, fetchurl, libx86emu, flex, perl }:
+
+stdenv.mkDerivation rec {
+  name = "hwinfo-${version}";
+  version = "21.12";
+
+  src = fetchurl {
+    url = "https://github.com/opensuse/hwinfo/archive/${version}.tar.gz";
+    sha256 = "01y5jk2jns0a3mgsgmvmpvi5yyc0df7b3yqsg32hn5r2nv17i47p";
+  };
+
+  patchPhase = ''
+    # VERSION and changelog is usually generated using Git
+    echo "${version}" > VERSION
+    sed -i 's|^\(TARGETS\s*=.*\)\<changelog\>\(.*\)$|\1\2|g' Makefile
+
+    sed -i 's|lex isdn_cdb.lex|${flex}/bin/flex isdn_cdb.lex|g' src/isdn/cdb/Makefile
+    sed -i 's|/sbin|/bin|g' Makefile
+    sed -i 's|/usr/|/|g' Makefile
+  '';
+
+  installPhase = ''
+    make install DESTDIR=$out
+  '';
+
+  buildInputs = [ libx86emu flex perl ];
+
+  meta = with stdenv.lib; {
+    description = "Hardware detection tool from openSUSE";
+    license = licenses.gpl2;
+    homepage = https://github.com/openSUSE/hwinfo;
+    maintainers = with maintainers; [ bobvanderlinden ];
+    platforms = platforms.unix;
+  };
+}