From b0c86d64f9ede7d60129a0ffb1f0b2d28a19ee45 Mon Sep 17 00:00:00 2001 From: SqrtMinusOne Date: Sun, 22 Aug 2021 12:16:06 +0300 Subject: [PATCH] feat(hugo): add --- README.org | 1 + hugo-extended.scm | 59 +++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 60 insertions(+) create mode 100644 hugo-extended.scm diff --git a/README.org b/README.org index ac3bf85..de34665 100644 --- a/README.org +++ b/README.org @@ -14,6 +14,7 @@ I'll probably push what I can upstream when I figure Guix out. | [[https://github.com/alfredopalhares/openvpn-update-resolv-conf][openvpn-update-resolv-conf]] | OK | Just watch out for $PATH if launched from OpenVPN | | [[https://github.com/deajan/osync][osync]] | Works | Requires shell commands as propagated-inputs | | [[https://github.com/latex-lsp/texlab/][texlab]] | Works | Installation from binaries | +| [[https://gohugo.io/][hugo]] | Works | Installation from binaries | | [[https://www.nushell.sh/][nushell]] | Works | Installation from binaries (Guix version is outdated) | | [[https://github.com/tmux-python/tmuxp][tmuxp]] | Works | Tests fail | | [[https://github.com/hroptatyr/dateutils][dateutils]] | Works | Tests fail | diff --git a/hugo-extended.scm b/hugo-extended.scm new file mode 100644 index 0000000..d3b12ba --- /dev/null +++ b/hugo-extended.scm @@ -0,0 +1,59 @@ +(define-module (hugo-extended) + #:use-module (gnu packages compression) + #:use-module (gnu packages gcc) + #:use-module (guix download) + #:use-module (guix packages) + #:use-module ((guix licenses) #:prefix license:) + #:use-module (nonguix build-system binary)) + +(define-public hugo-extended + (package + (name "hugo-extended") + (version "0.87.0") + (source + (origin + (method url-fetch) + (uri (string-append + "https://github.com/gohugoio/hugo/releases/download/v" + version + "/hugo_extended_" + version + "_Linux-64bit.tar.gz")) + (sha256 + (base32 + "0q52b5kllbc0zzxgvjfk2l3njgadwly52vr9h4ww02b8q29ay5pj")))) + (inputs + `(("gcc:lib" ,gcc "lib"))) + (build-system binary-build-system) + (arguments + `(#:validate-runpath? #f + #:strip-binaries? #f + #:install-plan + `(("hugo" "/bin/")) + #:patchelf-plan + `(("hugo" ("gcc:lib"))) + #:phases + (modify-phases %standard-phases + (replace 'unpack + (lambda* (#:key inputs #:allow-other-keys) + (invoke "tar" "-xvzf" (assoc-ref inputs "source"))))))) + (native-inputs + `(("gzip" ,gzip))) + (synopsis "The world’s fastest framework for building websites.") + (description "Hugo is a static HTML and CSS website generator +written in Go. It is optimized for speed, ease of use, and +configurability. Hugo takes a directory with content and templates and +renders them into a full HTML website. + +Hugo relies on Markdown files with front matter for metadata, and you +can run Hugo from any directory. This works well for shared hosts and +other systems where you don’t have a privileged account. + +Hugo renders a typical website of moderate size in a fraction of a +second. A good rule of thumb is that each piece of content renders in +around 1 millisecond. + +Hugo is designed to work well for any kind of website including blogs, +tumbles, and docs.") + (home-page "https://gohugo.io") + (license license:asl2.0)))