tlmi-auth: improve overridability
Use a recursive set instead of a let in before calling stdenv.mkDerivation. This allows to properly override the derivation with overrideAttrs. Do not re-use the pname in the fetcher function. Otherwise you cannot override the pname of a derivation while still fetching the same sources. However, this is something you sometimes want to do.
This commit is contained in:
parent
241fca1ece
commit
9ec3d89500
@ -6,18 +6,15 @@
|
|||||||
, ninja
|
, ninja
|
||||||
, openssl
|
, openssl
|
||||||
}:
|
}:
|
||||||
let
|
|
||||||
name = "tlmi-auth";
|
stdenv.mkDerivation (finalAttrs: {
|
||||||
|
pname = "tlmi-auth";
|
||||||
version = "1.0.1";
|
version = "1.0.1";
|
||||||
in
|
|
||||||
stdenv.mkDerivation {
|
|
||||||
pname = name;
|
|
||||||
version = version;
|
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "lenovo";
|
owner = "lenovo";
|
||||||
repo = name;
|
repo = "tlmi-auth";
|
||||||
rev = "v${version}";
|
rev = "v${finalAttrs.version}";
|
||||||
hash = "sha256-/juXQrb3MsQ6FxmrAa7E1f0vIMu1397tZ1pzLfr56M4=";
|
hash = "sha256-/juXQrb3MsQ6FxmrAa7E1f0vIMu1397tZ1pzLfr56M4=";
|
||||||
};
|
};
|
||||||
|
|
||||||
@ -32,8 +29,8 @@ stdenv.mkDerivation {
|
|||||||
homepage = "https://github.com/lenovo/tlmi-auth";
|
homepage = "https://github.com/lenovo/tlmi-auth";
|
||||||
maintainers = with maintainers; [ snpschaaf ];
|
maintainers = with maintainers; [ snpschaaf ];
|
||||||
description = "Utility for creating signature strings needed for thinklmi certificate based authentication";
|
description = "Utility for creating signature strings needed for thinklmi certificate based authentication";
|
||||||
mainProgram = name;
|
mainProgram = "tlmi-auth";
|
||||||
license = licenses.gpl2;
|
license = licenses.gpl2;
|
||||||
platforms = platforms.linux;
|
platforms = platforms.linux;
|
||||||
};
|
};
|
||||||
}
|
})
|
||||||
|
Loading…
Reference in New Issue
Block a user