mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-26 17:03:01 +00:00
hwinfo: use finalAttrs instead of rec
This commit is contained in:
parent
47e31d291d
commit
f22479cdcc
@ -10,14 +10,14 @@
|
||||
systemdMinimal,
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
stdenv.mkDerivation (finalAttrs: {
|
||||
pname = "hwinfo";
|
||||
version = "23.2";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "opensuse";
|
||||
repo = "hwinfo";
|
||||
rev = version;
|
||||
rev = finalAttrs.version;
|
||||
hash = "sha256-YAhsnE1DJ5UlYAuhDxS/5IpfIJB6DrhCT3E0YiKENjU=";
|
||||
};
|
||||
|
||||
@ -32,7 +32,7 @@ stdenv.mkDerivation rec {
|
||||
postPatch = ''
|
||||
# VERSION and changelog are usually generated using Git
|
||||
# unless HWINFO_VERSION is defined (see Makefile)
|
||||
export HWINFO_VERSION="${version}"
|
||||
export HWINFO_VERSION="${finalAttrs.version}"
|
||||
sed -i 's|^\(TARGETS\s*=.*\)\<changelog\>\(.*\)$|\1\2|g' Makefile
|
||||
|
||||
substituteInPlace Makefile --replace "/sbin" "/bin" --replace "/usr/" "/"
|
||||
@ -65,4 +65,4 @@ stdenv.mkDerivation rec {
|
||||
maintainers = with maintainers; [ bobvanderlinden ];
|
||||
platforms = platforms.linux;
|
||||
};
|
||||
}
|
||||
})
|
||||
|
Loading…
Reference in New Issue
Block a user