3
0
Fork 0
forked from mirrors/nixpkgs

lshw: B.02.18 -> B.02.19

- Bump version
- Switch to `fetchFromGitHub` to get updates from @r-ryantm bot
- Remove patches (they're merged upstream)
- Update dependencies
- Fix version workaround (not necessary anymore)
- Add myself as maintainer
This commit is contained in:
Thiago Kenji Okada 2022-04-21 13:12:16 +01:00
parent df8dec70bb
commit a02643d6a5

View file

@ -1,40 +1,33 @@
{ stdenv, lib, fetchurl, fetchpatch
, withGUI ? false, gtk2, pkg-config, sqlite # compile GUI
{ stdenv
, lib
, fetchFromGitHub
, hwdata
, gtk2
, pkg-config
, sqlite # compile GUI
, withGUI ? false
}:
stdenv.mkDerivation rec {
pname = "lshw";
version = "B.02.18";
version = "B.02.19";
src = fetchurl {
url = "https://ezix.org/software/files/lshw-${version}.tar.gz";
sha256 = "0brwra4jld0d53d7jsgca415ljglmmx1l2iazpj4ndilr48yy8mf";
src = fetchFromGitHub {
owner = "lyonel";
repo = pname;
rev = version;
sha256 = "sha256-PzbNGc1pPiPLWWgTeWoNfAo+SsXgi1HcjnXfYXA9S0I=";
};
patches = [
(fetchpatch {
# fix crash in scan_dmi_sysfs() when run as non-root
url = "https://github.com/lyonel/lshw/commit/fbdc6ab15f7eea0ddcd63da355356ef156dd0d96.patch";
sha256 = "147wyr5m185f8swsmb4q1ahs9r1rycapbpa2548aqbv298bbish3";
})
(fetchpatch {
# support cross-compilation
url = "https://github.com/lyonel/lshw/commit/8486d25cea9b68794504fbd9e5c6e294bac6cb07.patch";
sha256 = "08f0wnxsq0agvsc66bhc7lxvk564ir0pp8pg3cym6a621prb9lm0";
})
];
nativeBuildInputs = [ pkg-config ];
buildInputs = lib.optionals withGUI [ gtk2 sqlite ];
buildInputs = [ hwdata ]
++ lib.optionals withGUI [ gtk2 sqlite ];
# Fix version info.
preConfigure = ''
sed -e "s/return \"unknown\"/return \"${version}\"/" \
-i src/core/version.cc
'';
makeFlags = [ "PREFIX=$(out)" ];
makeFlags = [
"PREFIX=$(out)"
"VERSION=${version}"
];
buildFlags = [ "all" ] ++ lib.optional withGUI "gui";
@ -46,7 +39,7 @@ stdenv.mkDerivation rec {
homepage = "https://ezix.org/project/wiki/HardwareLiSter";
description = "Provide detailed information on the hardware configuration of the machine";
license = licenses.gpl2;
maintainers = with maintainers; [ ];
maintainers = with maintainers; [ thiagokokada ];
platforms = platforms.linux;
};
}