From e0c7597b1ce72a63f2745f98b61066301c4ff1b9 Mon Sep 17 00:00:00 2001 From: Peter Tillemans Date: Fri, 7 Jun 2024 11:21:23 +0200 Subject: [PATCH] add vault package --- snamellit/tools.scm | 57 +++++++++++++++++++++++++++++++++++---------- 1 file changed, 45 insertions(+), 12 deletions(-) diff --git a/snamellit/tools.scm b/snamellit/tools.scm index 9645c99..4f9b722 100644 --- a/snamellit/tools.scm +++ b/snamellit/tools.scm @@ -56,9 +56,6 @@ (system* (which "unzip") (assoc-ref inputs "source")) #t))))) - (inputs - `(("libstdc++" ,(make-libstdc++ gcc)) - ("zlib" ,zlib))) (native-inputs `(("unzip" ,unzip))) (synopsis "A tool to describe and deploy infrastructure as code") @@ -69,13 +66,49 @@ (define-public snam-terraform-1.6 (package - (inherit terraform) - (version "1.6.6") - (source (origin - (method url-fetch) - (uri (string-append "https://releases.hashicorp.com/terraform/" version "/terraform_" version "_linux_amd64.zip")) - (sha256 - (base32 - "002g0ypkkfqy5nf989jyk3m1l7l0455hsaq11xfhr5lbv4zqh5yi")))))) + (inherit terraform) + (version "1.6.6") + (source (origin + (method url-fetch) + (uri (string-append "https://releases.hashicorp.com/terraform/" version "/terraform_" version "_linux_amd64.zip")) + (sha256 + (base32 + "002g0ypkkfqy5nf989jyk3m1l7l0455hsaq11xfhr5lbv4zqh5yi")))))) -snam-terraform-1.6 + +(define-public vault + (package + (name "snam-vault") + (version "1.16.3") + (source (origin + (method url-fetch) + + (uri (string-append "https://releases.hashicorp.com/vault/" version "/vault_" version "_linux_amd64.zip")) + (sha256 + (base32 + "1n3147l5slzmw7svqdwbhzxybzl5597jb64i4hvsrhswqnnx8cya")))) + (build-system binary-build-system) + (supported-systems '("x86_64-linux")) + (arguments '( + #:install-plan + `(("." ("vault") "bin/")) + #:phases + (modify-phases %standard-phases + ;; this is required because standard unpack expects + ;; the archive to contain a directory with everything inside it, + ;; while babashka's release .tar.gz only contains the `bb` binary. + (replace 'unpack + (lambda* (#:key inputs #:allow-other-keys) + (system* (which "unzip") + (assoc-ref inputs "source")) + #t))))) + (native-inputs + `(("unzip" ,unzip))) + (synopsis "A tool to describe and deploy secrets.") + (description + "Vault allows you to store and distribute secrets securely.") + (home-page "https://hashicorp.com/vault") + (license #f))) + + +vault