diff options
author | Alyssa Ross <hi@alyssa.is> | 2024-01-20 12:31:50 +0100 |
---|---|---|
committer | Alyssa Ross <hi@alyssa.is> | 2024-01-20 12:32:25 +0100 |
commit | b7baf40e099b4215181fe7b0c63083b12ef2c7fb (patch) | |
tree | a6efabd31d05b6d0a36624729e80377bbbfb0149 /nixpkgs/pkgs/by-name/ls/lshw/package.nix | |
parent | 710028664e26e85cb831a869b3da9f6993902255 (diff) | |
parent | 0799f514b1cd74878174939df79ac60ca5036673 (diff) | |
download | nixlib-b7baf40e099b4215181fe7b0c63083b12ef2c7fb.tar nixlib-b7baf40e099b4215181fe7b0c63083b12ef2c7fb.tar.gz nixlib-b7baf40e099b4215181fe7b0c63083b12ef2c7fb.tar.bz2 nixlib-b7baf40e099b4215181fe7b0c63083b12ef2c7fb.tar.lz nixlib-b7baf40e099b4215181fe7b0c63083b12ef2c7fb.tar.xz nixlib-b7baf40e099b4215181fe7b0c63083b12ef2c7fb.tar.zst nixlib-b7baf40e099b4215181fe7b0c63083b12ef2c7fb.zip |
Merge branch 'nixos-unstable-small' of https://github.com/NixOS/nixpkgs
Conflicts: nixpkgs/pkgs/build-support/rust/build-rust-package/default.nix
Diffstat (limited to 'nixpkgs/pkgs/by-name/ls/lshw/package.nix')
-rw-r--r-- | nixpkgs/pkgs/by-name/ls/lshw/package.nix | 52 |
1 files changed, 52 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/by-name/ls/lshw/package.nix b/nixpkgs/pkgs/by-name/ls/lshw/package.nix new file mode 100644 index 000000000000..4f0cb5ce3c6b --- /dev/null +++ b/nixpkgs/pkgs/by-name/ls/lshw/package.nix @@ -0,0 +1,52 @@ +{ stdenv +, lib +, fetchFromGitHub +, hwdata +, gtk3 +, pkg-config +, gettext +, sqlite # compile GUI +, withGUI ? false +}: + +stdenv.mkDerivation rec { + pname = "lshw"; + # 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.20"; + + src = fetchFromGitHub { + owner = "lyonel"; + repo = pname; + rev = "B.${version}"; + hash = "sha256-4etC7ymMgn1Q4f98DNASv8vn0AT55dYPdacZo6GRDw0="; + }; + + nativeBuildInputs = [ pkg-config gettext ]; + + buildInputs = [ hwdata ] + ++ lib.optionals withGUI [ gtk3 sqlite ]; + + makeFlags = [ + "PREFIX=$(out)" + "VERSION=${src.rev}" + ]; + + buildFlags = [ "all" ] ++ lib.optional withGUI "gui"; + + hardeningDisable = lib.optionals stdenv.hostPlatform.isStatic [ "fortify" ]; + + installTargets = [ "install" ] ++ lib.optional withGUI "install-gui"; + + enableParallelBuilding = true; + + meta = with lib; { + description = "Provide detailed information on the hardware configuration of the machine"; + homepage = "https://ezix.org/project/wiki/HardwareLiSter"; + license = licenses.gpl2; + mainProgram = "lshw"; + maintainers = with maintainers; [ thiagokokada ]; + platforms = platforms.linux; + }; +} |