From b629fa832ce2bd7d9bea7eda19b68b56fbfc12c7 Mon Sep 17 00:00:00 2001 From: Hilton Chain Date: Sat, 15 Jul 2023 00:45:02 +0800 Subject: [PATCH] rosenthal: Add hugo-bin. * rosenthal/packages/binaries.scm (hugo-bin): New variable. --- rosenthal/packages/binaries.scm | 38 +++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) diff --git a/rosenthal/packages/binaries.scm b/rosenthal/packages/binaries.scm index 13c554d..d29ee96 100644 --- a/rosenthal/packages/binaries.scm +++ b/rosenthal/packages/binaries.scm @@ -106,3 +106,41 @@ different needs.") (license (license "Application Terms of Service" "https://www.cloudflare.com/application/terms/" "nonfree")))) + +(define-public hugo-bin + (package + (name "hugo-bin") + (version "0.115.3") + (source (origin + (method url-fetch) + (uri (string-append + "https://github.com/gohugoio/hugo" "/releases/download/v" + version "/hugo_extended_" version "_linux-amd64.tar.gz")) + (sha256 + (base32 + "0i56yy77h1d4f36c2b9vlmdr2x6wzq9q3l7sck80wkz9awdjfzhv")))) + (build-system copy-build-system) + (arguments + (list #:install-plan #~'(("hugo" "bin/hugo")) + #:phases + #~(modify-phases %standard-phases + (delete 'strip) + (add-after 'install 'patch-elf + (lambda _ + (let ((hugo (string-append #$output "/bin/hugo"))) + (invoke "patchelf" "--set-interpreter" + (string-append #$(this-package-input "glibc") + #$(glibc-dynamic-linker)) + hugo) + (invoke "patchelf" "--set-rpath" + (string-append #$gcc:lib "/lib") + hugo))))))) + (supported-systems '("x86_64-linux")) + (native-inputs (list patchelf)) + (inputs (list glibc)) + (home-page "https://gohugo.io/") + (synopsis "Static site generator") + (description + "Hugo is a static site generator written in Go, optimized for speed and +designed for flexibility.") + (license license:asl2.0)))