From 017422ed4c6b8ffe269a5919c716bfe28ac5df14 Mon Sep 17 00:00:00 2001 From: Rien Maertens Date: Sun, 31 Jan 2021 22:31:36 +0100 Subject: [PATCH] Conditionally build rage if version is below 0.5.0 --- pkgs/agenix.nix | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pkgs/agenix.nix b/pkgs/agenix.nix index bdc4942..a566073 100644 --- a/pkgs/agenix.nix +++ b/pkgs/agenix.nix @@ -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" ''