From 1f6bef51accee156665cad2a1b5c60b26ed119e5 Mon Sep 17 00:00:00 2001 From: Thanos Apollo Date: Wed, 7 Aug 2024 16:08:41 +0300 Subject: packages: Add binaries with hugo. * Add binaries with hugo, same recipe as rosenthal. --- hecate/packages/binaries.scm | 52 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 52 insertions(+) create mode 100644 hecate/packages/binaries.scm diff --git a/hecate/packages/binaries.scm b/hecate/packages/binaries.scm new file mode 100644 index 0000000..e21a522 --- /dev/null +++ b/hecate/packages/binaries.scm @@ -0,0 +1,52 @@ +(define-module (hecate packages binaries) + #:use-module ((guix licenses) #:prefix license:) + #:use-module (guix gexp) + #:use-module (guix packages) + #:use-module (guix download) + #:use-module (guix build-system copy) + #:use-module (gnu packages base) + #:use-module (gnu packages bootstrap) + #:use-module (gnu packages compression) + #:use-module (gnu packages elf) + #:use-module (gnu packages gcc) + #:use-module (gnu packages glib)) + +(define-public hugo-bin + (package + (name "hugo-bin") + (version "0.128.2") + (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 + "1i8jqhw9rra3xjkxzzyj6liqrg52wdi5cdzf3dzijv6pap0m6cm8")))) + (build-system copy-build-system) + (arguments + (list #:install-plan #~'(("hugo" "bin/")) + #: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 (ungexp (this-package-input "gcc") + "lib") + "/lib") + hugo))))))) + (supported-systems '("x86_64-linux")) + (native-inputs (list patchelf)) + (inputs (list `(,gcc "lib") 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))) -- cgit v1.2.3