2022-04-21 13:12:16 +01:00
|
|
|
{ stdenv
|
|
|
|
, lib
|
|
|
|
, fetchFromGitHub
|
|
|
|
, hwdata
|
|
|
|
, gtk2
|
|
|
|
, pkg-config
|
|
|
|
, sqlite # compile GUI
|
|
|
|
, withGUI ? false
|
2016-09-10 14:32:48 +01:00
|
|
|
}:
|
2010-11-15 09:52:57 +00:00
|
|
|
|
2016-09-10 14:32:48 +01:00
|
|
|
stdenv.mkDerivation rec {
|
2021-12-01 12:46:39 +00:00
|
|
|
pname = "lshw";
|
2022-04-21 13:34:34 +01:00
|
|
|
# Fix repology.org by not including the prefixed B, otherwise the `pname` attr
|
|
|
|
# gets filled as `lshw-B.XX.XX` in `nix-env --query --available --attr nixpkgs.lshw --meta`
|
|
|
|
# See https://github.com/NixOS/nix/pull/4463 for a definitive fix
|
|
|
|
version = "02.19";
|
2010-11-15 09:52:57 +00:00
|
|
|
|
2022-04-21 13:12:16 +01:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "lyonel";
|
|
|
|
repo = pname;
|
2022-04-21 13:34:34 +01:00
|
|
|
rev = "B.${version}";
|
2022-04-21 13:12:16 +01:00
|
|
|
sha256 = "sha256-PzbNGc1pPiPLWWgTeWoNfAo+SsXgi1HcjnXfYXA9S0I=";
|
2010-11-15 09:52:57 +00:00
|
|
|
};
|
|
|
|
|
2021-01-17 09:17:16 +00:00
|
|
|
nativeBuildInputs = [ pkg-config ];
|
2017-10-02 01:22:12 +01:00
|
|
|
|
2022-04-21 13:12:16 +01:00
|
|
|
buildInputs = [ hwdata ]
|
|
|
|
++ lib.optionals withGUI [ gtk2 sqlite ];
|
2016-09-10 14:32:48 +01:00
|
|
|
|
2022-04-21 13:12:16 +01:00
|
|
|
makeFlags = [
|
|
|
|
"PREFIX=$(out)"
|
2022-04-21 13:34:34 +01:00
|
|
|
"VERSION=${src.rev}"
|
2022-04-21 13:12:16 +01:00
|
|
|
];
|
2016-09-10 14:32:48 +01:00
|
|
|
|
|
|
|
buildFlags = [ "all" ] ++ lib.optional withGUI "gui";
|
2010-11-15 09:52:57 +00:00
|
|
|
|
2016-09-10 14:32:48 +01:00
|
|
|
installTargets = [ "install" ] ++ lib.optional withGUI "install-gui";
|
2010-11-15 09:52:57 +00:00
|
|
|
|
2016-09-10 14:32:48 +01:00
|
|
|
enableParallelBuilding = true;
|
2010-11-15 09:52:57 +00:00
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2020-04-01 02:11:51 +01:00
|
|
|
homepage = "https://ezix.org/project/wiki/HardwareLiSter";
|
2013-10-06 10:49:53 +01:00
|
|
|
description = "Provide detailed information on the hardware configuration of the machine";
|
2010-11-15 09:52:57 +00:00
|
|
|
license = licenses.gpl2;
|
2022-04-21 13:12:16 +01:00
|
|
|
maintainers = with maintainers; [ thiagokokada ];
|
2010-11-15 09:52:57 +00:00
|
|
|
platforms = platforms.linux;
|
|
|
|
};
|
2010-11-15 20:36:50 +00:00
|
|
|
}
|