You've already forked guix-tribes
Pin Tribes packaging to upstream source
This commit is contained in:
@@ -16,20 +16,27 @@
|
|||||||
"neovim"
|
"neovim"
|
||||||
"btop"))
|
"btop"))
|
||||||
|
|
||||||
(define (make-tribes-node-manifest)
|
(define (getenv/default name default)
|
||||||
|
(or (getenv name) default))
|
||||||
|
|
||||||
|
(define (tribes-node-package)
|
||||||
(let ((source-directory (getenv "TRIBES_SOURCE_DIRECTORY")))
|
(let ((source-directory (getenv "TRIBES_SOURCE_DIRECTORY")))
|
||||||
(packages->manifest
|
(if source-directory
|
||||||
(append
|
(local-tribes-package
|
||||||
(map specification->package %tribes-node-specifications)
|
source-directory
|
||||||
(list erlang-28
|
#:version (getenv/default "TRIBES_RELEASE_VERSION" "dev")
|
||||||
elixir-otp28
|
#:mix-deps-sha256 (getenv "TRIBES_MIX_DEPS_SHA256")
|
||||||
elixir-hex-otp28
|
#:raw-mix-deps-sha256 (getenv "TRIBES_RAW_MIX_DEPS_SHA256"))
|
||||||
ghostty-terminfo)
|
tribes-package)))
|
||||||
(if source-directory
|
|
||||||
(list
|
(define (make-tribes-node-manifest)
|
||||||
(tribes-source-package
|
(packages->manifest
|
||||||
(tribes-source-directory->local-file source-directory)
|
(append
|
||||||
#:version (or (getenv "TRIBES_RELEASE_VERSION") "dev")))
|
(map specification->package %tribes-node-specifications)
|
||||||
'())))))
|
(list erlang-28
|
||||||
|
elixir-otp28
|
||||||
|
elixir-hex-otp28
|
||||||
|
ghostty-terminfo
|
||||||
|
(tribes-node-package)))))
|
||||||
|
|
||||||
(make-tribes-node-manifest)
|
(make-tribes-node-manifest)
|
||||||
|
|||||||
@@ -4,9 +4,18 @@
|
|||||||
#:use-module (gnu services desktop)
|
#:use-module (gnu services desktop)
|
||||||
#:use-module (gnu services networking)
|
#:use-module (gnu services networking)
|
||||||
#:use-module (gnu services ssh)
|
#:use-module (gnu services ssh)
|
||||||
|
#:use-module (guix gexp)
|
||||||
#:use-module (nbde system boot-store)
|
#:use-module (nbde system boot-store)
|
||||||
#:export (nbde-installed-operating-system))
|
#:export (nbde-installed-operating-system))
|
||||||
|
|
||||||
|
(define %tribe-one-guix-substitute-url
|
||||||
|
"https://guix.tribe-one.org")
|
||||||
|
|
||||||
|
(define %tribe-one-guix-signing-key
|
||||||
|
(plain-file
|
||||||
|
"guix.tribe-one.org-signing-key.pub"
|
||||||
|
"(public-key \n (ecc \n (curve Ed25519)\n (q #77082B3CAB885E20111604F2C0E36E56750A6FBB732E2B367DAE2B09BA3873DE#)\n )\n )\n"))
|
||||||
|
|
||||||
(define* (nbde-installed-operating-system #:key
|
(define* (nbde-installed-operating-system #:key
|
||||||
host-name
|
host-name
|
||||||
bootloader
|
bootloader
|
||||||
@@ -52,5 +61,11 @@ runtime-discovered boot and filesystem values from the installer."
|
|||||||
(permit-root-login 'prohibit-password)
|
(permit-root-login 'prohibit-password)
|
||||||
(authorized-keys
|
(authorized-keys
|
||||||
(list
|
(list
|
||||||
(list "root" authorized-keys-file))))))
|
(list "root" authorized-keys-file)))))
|
||||||
|
(simple-service
|
||||||
|
'tribe-one-guix-substitutes
|
||||||
|
guix-service-type
|
||||||
|
(guix-extension
|
||||||
|
(authorized-keys (list %tribe-one-guix-signing-key))
|
||||||
|
(substitute-urls (list %tribe-one-guix-substitute-url)))))
|
||||||
%base-services))))
|
%base-services))))
|
||||||
|
|||||||
@@ -7,6 +7,7 @@
|
|||||||
#:use-module (gnu packages admin)
|
#:use-module (gnu packages admin)
|
||||||
#:use-module (gnu packages bash)
|
#:use-module (gnu packages bash)
|
||||||
#:use-module (gnu packages base)
|
#:use-module (gnu packages base)
|
||||||
|
#:use-module (gnu packages compression)
|
||||||
#:use-module (gnu packages erlang)
|
#:use-module (gnu packages erlang)
|
||||||
#:use-module (gnu packages nss)
|
#:use-module (gnu packages nss)
|
||||||
#:use-module (gnu packages version-control)
|
#:use-module (gnu packages version-control)
|
||||||
@@ -46,6 +47,8 @@ SOURCE according to mix.lock."
|
|||||||
#$(file-append coreutils "/bin")
|
#$(file-append coreutils "/bin")
|
||||||
#$(file-append findutils "/bin")
|
#$(file-append findutils "/bin")
|
||||||
#$(file-append git-minimal "/bin")
|
#$(file-append git-minimal "/bin")
|
||||||
|
#$(file-append gzip "/bin")
|
||||||
|
#$(file-append tar "/bin")
|
||||||
(or (getenv "PATH") ""))
|
(or (getenv "PATH") ""))
|
||||||
":"))
|
":"))
|
||||||
|
|
||||||
@@ -178,6 +181,8 @@ MIX-FOD-DEPS as a pre-fetched dependency tree."
|
|||||||
#$(file-append coreutils "/bin")
|
#$(file-append coreutils "/bin")
|
||||||
#$(file-append findutils "/bin")
|
#$(file-append findutils "/bin")
|
||||||
#$(file-append git-minimal "/bin")
|
#$(file-append git-minimal "/bin")
|
||||||
|
#$(file-append gzip "/bin")
|
||||||
|
#$(file-append tar "/bin")
|
||||||
#$@extra-path-dirs
|
#$@extra-path-dirs
|
||||||
(or (getenv "PATH") ""))
|
(or (getenv "PATH") ""))
|
||||||
":"))
|
":"))
|
||||||
|
|||||||
@@ -17,6 +17,8 @@
|
|||||||
#:use-module (srfi srfi-1)
|
#:use-module (srfi srfi-1)
|
||||||
#:use-module (srfi srfi-13)
|
#:use-module (srfi srfi-13)
|
||||||
#:export (fetch-mix-deps
|
#:export (fetch-mix-deps
|
||||||
|
local-tribes-package
|
||||||
|
tribes-package
|
||||||
tribes-source-package
|
tribes-source-package
|
||||||
tribes-source-directory->local-file))
|
tribes-source-directory->local-file))
|
||||||
|
|
||||||
@@ -24,13 +26,37 @@
|
|||||||
;; from the current Tribes mix.lock, with git metadata stripped except for
|
;; from the current Tribes mix.lock, with git metadata stripped except for
|
||||||
;; .git/HEAD in SCM dependencies.
|
;; .git/HEAD in SCM dependencies.
|
||||||
(define %tribes-raw-mix-deps-sha256
|
(define %tribes-raw-mix-deps-sha256
|
||||||
"0mv4jva8zkx8cq1b84hn65bl913nnhkvf25g6fi93z3jm35jy0pc")
|
"12d4w772x09w0cgy6iq2ip33jinxqc1nvffmfprfb5dp7s9pq479")
|
||||||
|
|
||||||
;; Recursive sha256 of the Tribes-specific prepared deps tree, after injecting
|
;; Recursive sha256 of the Tribes-specific prepared deps tree, after injecting
|
||||||
;; the upstream secp256k1 source into the Hex package and patching its build
|
;; the upstream secp256k1 source into the Hex package and patching its build
|
||||||
;; recipe to avoid build-time network access.
|
;; recipe to avoid build-time network access.
|
||||||
(define %tribes-mix-deps-sha256
|
(define %tribes-mix-deps-sha256
|
||||||
"0ksjnc9gnjijp1nbz3jlvl9kz8w7hx1a0ssms1dvd15rr25gn0d4")
|
"0fdgflpc14mxdixfpxmnaa1x4d0hn649jcm9q6ar7byzfg0d99ca")
|
||||||
|
|
||||||
|
(define %tribes-home-page
|
||||||
|
"https://git.teralink.net/tribes/tribes.git")
|
||||||
|
|
||||||
|
(define %tribes-commit
|
||||||
|
"32c64bfba5bb3bf4741e37a3297b249c4cacc76e")
|
||||||
|
|
||||||
|
(define %tribes-revision "1")
|
||||||
|
|
||||||
|
(define %tribes-version
|
||||||
|
(git-version "0.2.0" %tribes-revision %tribes-commit))
|
||||||
|
|
||||||
|
(define %tribes-source-sha256
|
||||||
|
"08sx47qpis1h758iwmdnld9x8975wyp1fx96bmly0n723mhx3b60")
|
||||||
|
|
||||||
|
(define %tribes-upstream-source
|
||||||
|
(origin
|
||||||
|
(method git-fetch)
|
||||||
|
(uri (git-reference
|
||||||
|
(url %tribes-home-page)
|
||||||
|
(commit %tribes-commit)))
|
||||||
|
(file-name (git-file-name "tribes" %tribes-version))
|
||||||
|
(sha256
|
||||||
|
(base32 %tribes-source-sha256))))
|
||||||
|
|
||||||
(define %libsecp256k1-upstream-source
|
(define %libsecp256k1-upstream-source
|
||||||
(origin
|
(origin
|
||||||
@@ -164,9 +190,11 @@ resolution by injecting extra pre-fetched sources needed for offline builds."
|
|||||||
#:key
|
#:key
|
||||||
(mix-deps #f)
|
(mix-deps #f)
|
||||||
(mix-deps-sha256 %tribes-mix-deps-sha256)
|
(mix-deps-sha256 %tribes-mix-deps-sha256)
|
||||||
|
(raw-mix-deps-sha256
|
||||||
|
%tribes-raw-mix-deps-sha256)
|
||||||
(name "tribes")
|
(name "tribes")
|
||||||
(version "0.2.0")
|
(version %tribes-version)
|
||||||
(home-page "https://git.teralink.net/tribes/tribes.git")
|
(home-page %tribes-home-page)
|
||||||
(synopsis "Tribes social app")
|
(synopsis "Tribes social app")
|
||||||
(description
|
(description
|
||||||
"Tribes social application built from source as a
|
"Tribes social application built from source as a
|
||||||
@@ -178,7 +206,8 @@ using MIX-DEPS as the pre-fetched Mix dependency tree resolved from mix.lock."
|
|||||||
(tribes-mix-deps source
|
(tribes-mix-deps source
|
||||||
#:name (string-append name "-mix-deps")
|
#:name (string-append name "-mix-deps")
|
||||||
#:version version
|
#:version version
|
||||||
#:sha256 mix-deps-sha256))))
|
#:sha256 mix-deps-sha256
|
||||||
|
#:raw-sha256 raw-mix-deps-sha256))))
|
||||||
(mix:mix-release-package
|
(mix:mix-release-package
|
||||||
source
|
source
|
||||||
#:mix-fod-deps mix-deps-source
|
#:mix-fod-deps mix-deps-source
|
||||||
@@ -255,3 +284,22 @@ using MIX-DEPS as the pre-fetched Mix dependency tree resolved from mix.lock."
|
|||||||
(setenv "ERL_FLAGS" existing-erl-flags)
|
(setenv "ERL_FLAGS" existing-erl-flags)
|
||||||
(unsetenv "ERL_FLAGS")))
|
(unsetenv "ERL_FLAGS")))
|
||||||
(invoke "mix" "deps.compile")))))
|
(invoke "mix" "deps.compile")))))
|
||||||
|
|
||||||
|
(define* (local-tribes-package directory
|
||||||
|
#:key
|
||||||
|
(version "dev")
|
||||||
|
(mix-deps-sha256 #f)
|
||||||
|
(raw-mix-deps-sha256 #f))
|
||||||
|
"Return a Tribes package built from a local source checkout. Hash overrides
|
||||||
|
allow development against a changed mix.lock without changing the canonical
|
||||||
|
package pin."
|
||||||
|
(tribes-source-package
|
||||||
|
(tribes-source-directory->local-file directory)
|
||||||
|
#:version version
|
||||||
|
#:mix-deps-sha256 (or mix-deps-sha256 %tribes-mix-deps-sha256)
|
||||||
|
#:raw-mix-deps-sha256
|
||||||
|
(or raw-mix-deps-sha256 %tribes-raw-mix-deps-sha256)))
|
||||||
|
|
||||||
|
(define tribes-package
|
||||||
|
(tribes-source-package %tribes-upstream-source
|
||||||
|
#:version %tribes-version))
|
||||||
|
|||||||
@@ -26,6 +26,16 @@
|
|||||||
(filter (lambda (item) (not (string-null? item)))
|
(filter (lambda (item) (not (string-null? item)))
|
||||||
(string-split value #\,)))))
|
(string-split value #\,)))))
|
||||||
|
|
||||||
|
(define (tribes-installer-package)
|
||||||
|
(let ((source-directory (getenv "TRIBES_SOURCE_DIRECTORY")))
|
||||||
|
(if source-directory
|
||||||
|
(local-tribes-package
|
||||||
|
source-directory
|
||||||
|
#:version (getenv/default "TRIBES_RELEASE_VERSION" "dev")
|
||||||
|
#:mix-deps-sha256 (getenv "TRIBES_MIX_DEPS_SHA256")
|
||||||
|
#:raw-mix-deps-sha256 (getenv "TRIBES_RAW_MIX_DEPS_SHA256"))
|
||||||
|
tribes-package)))
|
||||||
|
|
||||||
(define* (tribes-installer-operating-system #:key
|
(define* (tribes-installer-operating-system #:key
|
||||||
host-name
|
host-name
|
||||||
bootloader
|
bootloader
|
||||||
@@ -35,17 +45,12 @@
|
|||||||
interface
|
interface
|
||||||
authorized-keys-file)
|
authorized-keys-file)
|
||||||
"Return an installed NBDE operating-system extended with PostgreSQL and the
|
"Return an installed NBDE operating-system extended with PostgreSQL and the
|
||||||
Tribes service. The package is built from TRIBES_SOURCE_DIRECTORY."
|
Tribes service. By default it uses the pinned upstream package; setting
|
||||||
(let* ((source-directory (getenv "TRIBES_SOURCE_DIRECTORY"))
|
TRIBES_SOURCE_DIRECTORY switches to a development source override."
|
||||||
(service-user (getenv/default "TRIBES_SERVICE_USER" "tribes"))
|
(let* ((service-user (getenv/default "TRIBES_SERVICE_USER" "tribes"))
|
||||||
(service-group (getenv/default "TRIBES_SERVICE_GROUP" service-user))
|
(service-group (getenv/default "TRIBES_SERVICE_GROUP" service-user))
|
||||||
(database-user (getenv/default "TRIBES_DATABASE_USER" service-user))
|
(database-user (getenv/default "TRIBES_DATABASE_USER" service-user))
|
||||||
(package
|
(package (tribes-installer-package))
|
||||||
(if source-directory
|
|
||||||
(tribes-source-package
|
|
||||||
(tribes-source-directory->local-file source-directory)
|
|
||||||
#:version (getenv/default "TRIBES_RELEASE_VERSION" "dev"))
|
|
||||||
(error "missing Tribes source input; set TRIBES_SOURCE_DIRECTORY")))
|
|
||||||
(tribes-config
|
(tribes-config
|
||||||
(tribes-configuration
|
(tribes-configuration
|
||||||
(package package)
|
(package package)
|
||||||
|
|||||||
Reference in New Issue
Block a user