nixpkgs/pkgs/tools/system/hwinfo/default.nix

38 lines
1016 B
Nix
Raw Normal View History

2017-03-01 02:38:22 +00:00
{ stdenv, fetchFromGitHub, libx86emu, flex, perl }:
2015-04-20 11:55:04 +00:00
stdenv.mkDerivation rec {
name = "hwinfo-${version}";
2017-03-01 02:38:22 +00:00
version = "21.38";
2015-04-20 11:55:04 +00:00
2017-03-01 02:38:22 +00:00
src = fetchFromGitHub {
owner = "opensuse";
repo = "hwinfo";
rev = "${version}";
sha256 = "17a1nx906gdl9br1wf6xmhjy195szaxxmyb119vayw4q112rjdql";
2015-04-20 11:55:04 +00:00
};
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;
2017-03-01 02:38:22 +00:00
maintainers = with maintainers; [ bobvanderlinden ndowens ];
2017-04-08 03:01:39 +00:00
platforms = platforms.linux;
2015-04-20 11:55:04 +00:00
};
}