Conditionally build rage if version is below 0.5.0

This commit is contained in:
Rien Maertens 2021-01-31 22:31:36 +01:00
parent a678a8748c
commit 017422ed4c
No known key found for this signature in database
GPG Key ID: AE66CE42F1AF9DEF
1 changed files with 4 additions and 1 deletions

View File

@ -1,6 +1,9 @@
{writeShellScriptBin, runtimeShell, pkgs} :
let
rage = pkgs.callPackage ./rage.nix {};
# we need at least rage 0.5.0 to support ssh keys
rage = if pkgs.rage.version < "0.5.0"
then pkgs.callPackage ./rage.nix {}
else pkgs.rage;
ageBin = "${rage}/bin/rage";
in
writeShellScriptBin "agenix" ''