summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/guix/system.scm40
1 files changed, 10 insertions, 30 deletions
diff --git a/src/guix/system.scm b/src/guix/system.scm
index f6e6d1c..c27f602 100644
--- a/src/guix/system.scm
+++ b/src/guix/system.scm
@@ -7,6 +7,7 @@
(gnu)
(guix git-download)
(guix packages)
+ (guix transformations)
(guix utils))
(use-package-modules)
(use-service-modules
@@ -27,33 +28,12 @@
(pkg:slurp
(string-append "src/versions/" name "/" s))))
-(define (go-latest pkg)
+(define (latest pkg)
(let* ((name (package-name pkg))
(version (cat name "version"))
- (checksum (cat name "sha256")))
- (package
- (inherit pkg)
- (version version)
- (source
- (origin
- (inherit (package-source pkg))
- (uri
- (git-reference
- (url
- (pkg:str "git://papo.im/" name))
- (commit version)))
- (sha256
- (base32 checksum))
- (file-name
- (git-file-name name version))))
- (arguments
- (substitute-keyword-arguments (package-arguments pkg)
- ((#:make-flags _flags)
- #~(list
- "-e"
- (string-append "PREFIX=" #$output)
- (string-append "VERSION=" #$version)
- (string-append "CC=" #$(cc-for-target)))))))))
+ (trans-fn (options->transformation
+ `((with-commit . ,(pkg:fmt "~a=~a" name version))))))
+ (trans-fn pkg)))
@@ -130,11 +110,11 @@
(service ntp-service-type)
(service dhcp-client-service-type)
(service fail2ban-service-type)
- (service binder-service-type (pkg:binder-configuration (package (go-latest pkg:binder))))
- (service glaze-service-type (pkg:glaze-configuration (package (go-latest pkg:glaze))))
- (service untls-service-type (pkg:untls-configuration (package (go-latest pkg:untls))))
- (service pkg:wscat-service-type (pkg:wscat-configuration (package (go-latest pkg:wscat))))
- (service pkg:papod-service-type (pkg:papod-configuration (package (go-latest pkg:papod))))
+ (service binder-service-type (pkg:binder-configuration (package (latest pkg:binder))))
+ (service glaze-service-type (pkg:glaze-configuration (package (latest pkg:glaze))))
+ (service untls-service-type (pkg:untls-configuration (package (latest pkg:untls))))
+ (service pkg:wscat-service-type (pkg:wscat-configuration (package (latest pkg:wscat))))
+ (service pkg:papod-service-type (pkg:papod-configuration (package (latest pkg:papod))))
(service knot-service-type (q:knot-zones-configuration +tld+ +ipv4+ +ipv6+))
(service openssh-service-type (q:openssh-default-configuration (pkg:users->keys +users+)))
(service certbot-service-type (q:tld-certbot-configuration +tld+))