about summary refs log tree commit diff
diff options
context:
space:
mode:
authorpjotrp2026-05-18 12:55:05 +0200
committerpjotrp2026-05-18 12:55:05 +0200
commit3a63c0058766dc025770e7533446d6f5943e874a (patch)
tree9b187a77e661676866b230d45da6f7c16cfe314c
parentc9b6168de3c660afb78293fe799d7ab2946044ff (diff)
downloadguix-bioinformatics-3a63c0058766dc025770e7533446d6f5943e874a.tar.gz
Move headscale package out
-rw-r--r--gn/packages/network.scm92
1 files changed, 0 insertions, 92 deletions
diff --git a/gn/packages/network.scm b/gn/packages/network.scm
deleted file mode 100644
index 939d2a1..0000000
--- a/gn/packages/network.scm
+++ /dev/null
@@ -1,92 +0,0 @@
-;; Network packages
-
-(define-module (gn packages network)
-  #:use-module ((guix licenses) #:prefix license:)
-  #:use-module (guix packages)
-  #:use-module (guix download)
-  #:use-module (guix git-download)
-  #:use-module (guix build-system go)
-  #:use-module (guix gexp)
-  #:use-module (gnu packages base)
-  #:use-module (gnu packages compression)
-  #:use-module (gnu packages golang))
-
-(define-public headscale
-  (package
-    (name "headscale")
-    (version "0.28.0")
-    (source (origin
-              (method git-fetch)
-              (uri (git-reference
-                    (url "https://github.com/juanfont/headscale")
-                    (commit (string-append "v" version))))
-              (file-name (git-file-name name version))
-              (sha256
-               (base32
-                "1lmyz618qcvdlich110qpjb5kj04lcvn4k78k0xyzzzqbcw687l1"))))
-    (build-system go-build-system)
-    (arguments
-     (list
-      #:go go-1.26
-      #:import-path "github.com/juanfont/headscale/cmd/headscale"
-      #:unpack-path "github.com/juanfont/headscale"
-      #:install-source? #f
-      #:phases
-      #~(modify-phases %standard-phases
-          (add-after 'setup-go-environment 'enable-modules
-            (lambda _
-              ;; Override GO111MODULE=off set by go-build-system
-              (setenv "GO111MODULE" "on")
-              ;; Use the available Go toolchain, don't download another
-              (setenv "GOTOOLCHAIN" "local")))
-          (add-after 'unpack 'install-vendor
-            (lambda* (#:key inputs #:allow-other-keys)
-              (let ((vendor-tar (assoc-ref inputs "vendor-tar")))
-                (with-directory-excursion
-                  "src/github.com/juanfont/headscale"
-                  (invoke "tar" "xzf" vendor-tar)))))
-          (add-after 'install-vendor 'patch-version
-            (lambda _
-              (substitute*
-                "src/github.com/juanfont/headscale/hscontrol/types/version.go"
-                (("Version:   \"dev\"")
-                 (string-append "Version:   \"" #$version "\""))
-                (("Commit:    \"unknown\"")
-                 (string-append "Commit:    \"v" #$version "\"")))))
-          (replace 'build
-            (lambda* (#:key import-path #:allow-other-keys)
-              (with-directory-excursion
-                "src/github.com/juanfont/headscale"
-                (invoke "go" "build" "-mod=vendor"
-                        "-ldflags=-s -w" "-trimpath"
-                        "-o" (string-append (getenv "GOBIN") "/headscale")
-                        "./cmd/headscale"))))
-          (delete 'install)
-          (replace 'check
-            (lambda* (#:key tests? #:allow-other-keys)
-              (when tests?
-                (with-directory-excursion
-                  "src/github.com/juanfont/headscale"
-                  ;; Skip Postgres and Constraints tests: need embedded PostgreSQL
-                  (invoke "go" "test" "-mod=vendor" "-short"
-                          "-skip" "(?i)postgres|Constraints"
-                          "./..."))))))))
-    (native-inputs
-     `(("vendor-tar"
-        ,(origin
-           (method url-fetch)
-           ;; TODO: host this tarball properly
-           (uri (string-append
-                 "file:///tmp/headscale-vendor.tar.gz"))
-           (sha256
-            (base32
-             "1w03g2lp1wwz3g2ka9g1kp83yrhqsv47gsbyjmrrm2najj5nrh8s"))))
-       ("tar" ,tar)
-       ("gzip" ,gzip)))
-    (home-page "https://github.com/juanfont/headscale")
-    (synopsis "Self-hosted implementation of the Tailscale control server")
-    (description
-     "Headscale is an open source, self-hosted implementation of the Tailscale
-control server.  It implements the coordination server that exchanges WireGuard
-public keys between nodes, assigns IP addresses, and manages the network.")
-    (license license:bsd-3)))