From 20968a2d000d35f9acdfc3f6bdfd424982f2dc8e Mon Sep 17 00:00:00 2001 From: EuAndreh Date: Thu, 18 Feb 2021 18:56:04 -0300 Subject: mv euandreh.scm -> packages.scm --- src/xyz/euandreh/packages.scm | 55 ++++++++++++++++++++++++++++++ src/xyz/euandreh/packages/euandreh.scm | 61 ---------------------------------- 2 files changed, 55 insertions(+), 61 deletions(-) create mode 100644 src/xyz/euandreh/packages.scm delete mode 100644 src/xyz/euandreh/packages/euandreh.scm (limited to 'src') diff --git a/src/xyz/euandreh/packages.scm b/src/xyz/euandreh/packages.scm new file mode 100644 index 0000000..2ee6f64 --- /dev/null +++ b/src/xyz/euandreh/packages.scm @@ -0,0 +1,55 @@ +(define-module (xyz euandreh packages) + #:use-module (json) + #:use-module ((ice-9 textual-ports) #:prefix textual-ports:) + #:use-module ((guix licenses) #:prefix license:) + #:use-module (gnu packages) + #:use-module (guix transformations) + #:use-module (guix gexp) + #:use-module (guix packages) + #:use-module (guix download) + #:use-module (guix git-download) + #:use-module (guix utils) + #:use-module (guix store) + #:use-module (guix build-system gnu)) + +(define (euandreh-package name version-prefix version check-inputs hash) + (package + (name name) + (version version) + (source (origin + (method url-fetch) + (uri (string-append + "https://git.euandreh.xyz/" + name + "/snapshot/" + name + "-" + version-prefix + version + ".tar.gz")) + (hash hash))) + (inputs + (map (lambda (name) + (list name (specification->package name))) + (vector->list check-inputs))) + (build-system gnu-build-system) + ;; This shouldn't be necessary, but + ;; the `gnu-build-system' doesn't provide a c99 variable + (arguments `(#:make-flags (list (string-append "CC=" ,(cc-for-target))))) + (synopsis (file-append source "/description")) + (description (file-append source "/long-description")) + (home-page (string-append "https://" name ".euandreh.xyz")) + (license license:agpl3+))) + +(let* ((json-file (canonicalize-path + (string-append (current-source-directory) + "/../../../paku.json"))) + (packages (call-with-input-file json-file json->scm))) + (map (lambda (package) + (euandreh-package + (assoc-ref package "name") + (assoc-ref package "version-prefix") + (assoc-ref package "version") + (assoc-ref package "check-inputs") + (content-hash (assoc-ref package "tarbal-sha256")))) + (vector->list (assoc-ref packages "packages")))) diff --git a/src/xyz/euandreh/packages/euandreh.scm b/src/xyz/euandreh/packages/euandreh.scm deleted file mode 100644 index f959db1..0000000 --- a/src/xyz/euandreh/packages/euandreh.scm +++ /dev/null @@ -1,61 +0,0 @@ -(define-module (xyz euandreh packages euandreh) - #:use-module (json) - #:use-module ((ice-9 textual-ports) #:prefix textual-ports:) - #:use-module ((guix licenses) #:prefix license:) - #:use-module (gnu packages) - #:use-module (guix transformations) - #:use-module (guix gexp) - #:use-module (guix packages) - #:use-module (guix download) - #:use-module (guix git-download) - #:use-module (guix utils) - #:use-module (guix store) - #:use-module (guix build-system gnu)) - -(define (euandreh-package name version-prefix version check-inputs hash) - (package - (name name) - (version version) - (source (origin - (method url-fetch) - (uri (string-append - "https://git.euandreh.xyz/" - name - "/snapshot/" - name - "-" - version-prefix - version - ".tar.gz")) - (hash hash))) - (inputs - (map (lambda (name) - (list name (specification->package name))) - (vector->list check-inputs))) - (build-system gnu-build-system) - ;; This shouldn't be necessary, but - ;; the `gnu-build-system' doesn't provide a c99 variable - (arguments `(#:make-flags (list (string-append "CC=" ,(cc-for-target))))) - (synopsis (file-append source "/description")) - (description (file-append source "/long-description")) - (home-page (string-append "https://" name ".euandreh.xyz")) - (license license:agpl3+))) - -(let* ((json-file (canonicalize-path - (string-append (current-source-directory) - "/../../../../packages.json"))) - (packages (call-with-input-file json-file json->scm))) - (map (lambda (package) - (euandreh-package - (assoc-ref package "name") - (assoc-ref package "version-prefix") - (assoc-ref package "version") - (assoc-ref package "check-inputs") - (content-hash (assoc-ref package "tarbal-sha256")))) ; FIXME - (vector->list (assoc-ref packages "packages")))) - -;; FIXME: the define-public isn't being created -(define-public fallible - (euandreh-package "fallible" "" "4498c9f46de83f9bdbd053a27e855f37a2df0dd2" #("valgrind") (content-hash #f))) - -fallible -- cgit v1.2.3