From 2850d877720f97ef1ac6a760043bce4ac2b0af1b Mon Sep 17 00:00:00 2001 From: Efraim Flashner Date: Mon, 4 Mar 2019 21:52:38 +0200 Subject: [PATCH] gnu: dehydrated: Don't use unstable tarball. * gnu/packages/tls.scm (dehydrated)[source]: Use release tarball. [native-inputs]: Add gzip, tar. [arguments]: Unzip tarball before installing. Install license file. --- gnu/packages/tls.scm | 29 ++++++++++++++++++----------- 1 file changed, 18 insertions(+), 11 deletions(-) diff --git a/gnu/packages/tls.scm b/gnu/packages/tls.scm index 6b131657f9..26a2eaa2a7 100644 --- a/gnu/packages/tls.scm +++ b/gnu/packages/tls.scm @@ -5,7 +5,7 @@ ;;; Copyright © 2013, 2015 Andreas Enge ;;; Copyright © 2015 David Thompson ;;; Copyright © 2015, 2016, 2017, 2018 Leo Famulari -;;; Copyright © 2016, 2017 Efraim Flashner +;;; Copyright © 2016, 2017, 2019 Efraim Flashner ;;; Copyright © 2016, 2017, 2018 Nils Gillmann ;;; Copyright © 2016 Hartmut Goebel ;;; Copyright © 2017 Ricardo Wurmus @@ -929,14 +929,13 @@ (define-public dehydrated (name "dehydrated") (version "0.6.2") (source (origin - (method url-fetch/tarbomb) + (method url-fetch) (uri (string-append - "https://github.com/lukas2511/dehydrated/archive/v" - version ".tar.gz")) + "https://github.com/lukas2511/dehydrated/releases/download/" + "v" version "/dehydrated-" version ".tar.gz")) (sha256 (base32 - "03p80yj6bnzjc6dkp5hb9wpplmlrla8n5src71cnzw4rj53q8cqn")) - (file-name (string-append name "-" version ".tar.gz")))) + "03p80yj6bnzjc6dkp5hb9wpplmlrla8n5src71cnzw4rj53q8cqn")))) (build-system trivial-build-system) (arguments `(#:modules ((guix build utils)) @@ -944,15 +943,20 @@ (define-public dehydrated (begin (use-modules (guix build utils)) (let* ((source (assoc-ref %build-inputs "source")) + (tar (assoc-ref %build-inputs "tar")) + (gz (assoc-ref %build-inputs "gzip")) (out (assoc-ref %outputs "out")) (bin (string-append out "/bin")) + (doc (string-append out "/share/doc/")) (bash (in-vicinity (assoc-ref %build-inputs "bash") "bin"))) - (mkdir-p bin) + + (setenv "PATH" (string-append gz "/bin")) + (invoke (string-append tar "/bin/tar") "xvf" source) + (chdir (string-append ,name "-" ,version)) + + (install-file "dehydrated" bin) + (install-file "LICENSE" (string-append doc ,name "-" ,version)) (with-directory-excursion bin - (copy-file - (in-vicinity source (string-append "/dehydrated-" ,version - "/dehydrated")) - (in-vicinity bin "dehydrated")) (patch-shebang "dehydrated" (list bash)) ;; Do not try to write in the store. @@ -983,6 +987,9 @@ (define-public dehydrated ("grep" ,grep) ("openssl" ,openssl) ("sed" ,sed))) + (native-inputs + `(("gzip" ,gzip) + ("tar" ,tar))) (home-page "https://dehydrated.io/") (synopsis "Let's Encrypt/ACME client implemented as a shell script") (description "Dehydrated is a client for signing certificates with an