From 5230745b9a7660eb037c5ea12a3eced985b6317f Mon Sep 17 00:00:00 2001 From: David Thompson Date: Sat, 12 Nov 2022 19:44:55 -0500 Subject: guix: Modernize package definition. --- guix.scm | 36 +++++++++++++++--------------------- 1 file changed, 15 insertions(+), 21 deletions(-) diff --git a/guix.scm b/guix.scm index 557a6a1..b73a83a 100644 --- a/guix.scm +++ b/guix.scm @@ -30,43 +30,37 @@ ;; ;; To use as the basis for a development environment, run: ;; -;; guix environment -l guix.scm +;; guix shell ;; ;;; Code: -(use-modules (guix packages) - (guix licenses) +(use-modules (guix build-system gnu) + (guix gexp) (guix git-download) - (guix build-system gnu) + (guix licenses) + (guix packages) (gnu packages) (gnu packages autotools) - (gnu packages pkg-config) - (gnu packages guile)) + (gnu packages guile) + (gnu packages pkg-config)) + +(define %source-dir (dirname (current-filename))) (package (name "guile-websocket") (version "0.1") - (source (origin - (method git-fetch) - (uri (git-reference - (url "git://dthompson.us/guile-websocket.git") - (commit "d58d696"))) - (sha256 - (base32 - "10r8384frlyrljjdyzilrh8hzi60v9hisx4fxjs7rmg9g01cs77k")))) + (source (local-file %source-dir + #:recursive? #t + #:select? (git-predicate %source-dir))) (build-system gnu-build-system) (arguments '(#:make-flags '("GUILE_AUTO_COMPILE=0") #:phases (modify-phases %standard-phases (add-after 'unpack 'bootstrap - (lambda _ (zero? (system* "sh" "bootstrap"))))))) - (native-inputs - `(("autoconf" ,autoconf) - ("automake" ,automake) - ("pkg-config" ,pkg-config))) - (inputs - `(("guile" ,guile-2.0))) + (lambda _ (invoke "sh" "bootstrap")))))) + (native-inputs (list autoconf automake pkg-config)) + (inputs (list guile-3.0)) (synopsis "Websocket server/client for Guile") (description "Guile-websocket provides an implementation of the WebSocket protocol as defined by RFC 6455.") -- cgit v1.2.3