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

View file

@ -1,6 +1,9 @@
{writeShellScriptBin, runtimeShell, pkgs} : {writeShellScriptBin, runtimeShell, pkgs} :
let 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"; ageBin = "${rage}/bin/rage";
in in
writeShellScriptBin "agenix" '' writeShellScriptBin "agenix" ''