You've already forked guix-tribes
This commit is contained in:
@@ -8,9 +8,7 @@ use File::Basename qw(dirname);
|
||||
use File::Spec;
|
||||
use File::Temp qw(tempdir tempfile);
|
||||
use Getopt::Long qw(GetOptionsFromArray);
|
||||
use IPC::Open3 qw(open3);
|
||||
use JSON::PP qw(decode_json encode_json);
|
||||
use Symbol qw(gensym);
|
||||
|
||||
sub usage {
|
||||
print <<'EOF';
|
||||
@@ -73,14 +71,28 @@ sub require_tool {
|
||||
|
||||
sub run_capture {
|
||||
my (@cmd) = @_;
|
||||
my $err = gensym();
|
||||
my $pid = open3(undef, my $out, $err, @cmd);
|
||||
local $/;
|
||||
my $stdout = <$out> // '';
|
||||
my $stderr = <$err> // '';
|
||||
my ($fh, $path) = tempfile('command-output.XXXXXX', TMPDIR => 1);
|
||||
|
||||
my $pid = fork();
|
||||
defined $pid or fail("Failed to fork for @cmd: $!");
|
||||
|
||||
if ($pid == 0) {
|
||||
open STDOUT, '>&', $fh or die "Failed to redirect stdout: $!\n";
|
||||
open STDERR, '>&', $fh or die "Failed to redirect stderr: $!\n";
|
||||
exec @cmd or die "Failed to exec $cmd[0]: $!\n";
|
||||
}
|
||||
|
||||
close $fh or fail("Failed to close $path: $!");
|
||||
waitpid($pid, 0);
|
||||
my $output = $stdout . $stderr;
|
||||
my $status = $? >> 8;
|
||||
my $wait_status = $?;
|
||||
my $status = $wait_status == -1 ? 255 : ($wait_status & 127 ? 128 + ($wait_status & 127) : $wait_status >> 8);
|
||||
|
||||
open my $out, '<', $path or fail("Failed to read $path: $!");
|
||||
local $/;
|
||||
my $output = <$out> // '';
|
||||
close $out or fail("Failed to close $path: $!");
|
||||
unlink $path;
|
||||
|
||||
return ($status, $output);
|
||||
}
|
||||
|
||||
|
||||
@@ -0,0 +1,78 @@
|
||||
(define-module (tribes packages cloud)
|
||||
#:use-module (gnu packages base)
|
||||
#:use-module (gnu packages compression)
|
||||
#:use-module (guix build-system trivial)
|
||||
#:use-module (guix download)
|
||||
#:use-module (guix gexp)
|
||||
#:use-module ((guix licenses) #:prefix license:)
|
||||
#:use-module (guix packages)
|
||||
#:export (ovhcloud-cli
|
||||
scaleway-cli))
|
||||
|
||||
(define-public scaleway-cli
|
||||
(package
|
||||
(name "scaleway-cli")
|
||||
(version "2.56.1")
|
||||
(source
|
||||
(origin
|
||||
(method url-fetch)
|
||||
(uri (string-append
|
||||
"https://github.com/scaleway/scaleway-cli/releases/download/v"
|
||||
version "/scaleway-cli_" version "_linux_amd64"))
|
||||
(sha256
|
||||
(base32 "0282hhpz524fvs7h89f4x07nhm7xkhqc53fd3zr47fk8yz8519fy"))))
|
||||
(build-system trivial-build-system)
|
||||
(arguments
|
||||
(list
|
||||
#:modules '((guix build utils))
|
||||
#:builder
|
||||
#~(begin
|
||||
(use-modules (guix build utils))
|
||||
(let* ((bin (string-append #$output "/bin"))
|
||||
(scw (string-append bin "/scw")))
|
||||
(mkdir-p bin)
|
||||
(copy-file #$source scw)
|
||||
(chmod scw #o555)
|
||||
(symlink "scw" (string-append bin "/scaleway-cli"))))))
|
||||
(home-page "https://github.com/scaleway/scaleway-cli")
|
||||
(synopsis "Command-line interface for Scaleway")
|
||||
(description
|
||||
"Scaleway CLI is a command-line interface for interacting with Scaleway
|
||||
cloud services. This package installs the @command{scw} binary.")
|
||||
(supported-systems '("x86_64-linux"))
|
||||
(license license:asl2.0)))
|
||||
|
||||
(define-public ovhcloud-cli
|
||||
(package
|
||||
(name "ovhcloud-cli")
|
||||
(version "0.12.0")
|
||||
(source
|
||||
(origin
|
||||
(method url-fetch)
|
||||
(uri (string-append
|
||||
"https://github.com/ovh/ovhcloud-cli/releases/download/v"
|
||||
version "/ovhcloud-cli_Linux_x86_64.tar.gz"))
|
||||
(sha256
|
||||
(base32 "19jypxzzjlshqd0391b01a81d2wckfxi20sz7h29alm59j6j9jsm"))))
|
||||
(build-system trivial-build-system)
|
||||
(arguments
|
||||
(list
|
||||
#:modules '((guix build utils))
|
||||
#:builder
|
||||
#~(begin
|
||||
(use-modules (guix build utils))
|
||||
(let ((bin (string-append #$output "/bin")))
|
||||
(setenv "PATH" #$(file-append gzip "/bin"))
|
||||
(mkdir-p bin)
|
||||
(invoke #$(file-append tar "/bin/tar")
|
||||
"xzf" #$source "ovhcloud")
|
||||
(install-file "ovhcloud" bin)
|
||||
(chmod (string-append bin "/ovhcloud") #o555)))))
|
||||
(native-inputs (list gzip tar))
|
||||
(home-page "https://github.com/ovh/ovhcloud-cli")
|
||||
(synopsis "Command-line interface for OVHcloud")
|
||||
(description
|
||||
"OVHcloud CLI is a command-line interface for interacting with OVHcloud
|
||||
services. This package installs the @command{ovhcloud} binary.")
|
||||
(supported-systems '("x86_64-linux"))
|
||||
(license license:asl2.0)))
|
||||
@@ -2,6 +2,7 @@
|
||||
#:use-module (gnu packages compression)
|
||||
#:use-module (gnu packages libevent)
|
||||
#:use-module (gnu packages node)
|
||||
#:use-module (gnu packages tls)
|
||||
#:use-module (guix download)
|
||||
#:use-module (guix git-download)
|
||||
#:use-module (guix packages)
|
||||
@@ -86,9 +87,12 @@
|
||||
(native-inputs
|
||||
(modify-inputs (package-native-inputs node)
|
||||
(replace "libuv" libuv-for-node-24)
|
||||
(replace "brotli" brotli-for-node-24)))
|
||||
(replace "brotli" brotli-for-node-24)
|
||||
;; Node 24's Argon2 crypto APIs require OpenSSL with Argon2 support.
|
||||
(replace "openssl" openssl)))
|
||||
(inputs
|
||||
(modify-inputs (package-inputs node)
|
||||
(replace "libuv" libuv-for-node-24)
|
||||
(replace "brotli" brotli-for-node-24)
|
||||
(replace "openssl" openssl)
|
||||
(delete "llhttp")))))
|
||||
|
||||
@@ -54,7 +54,7 @@
|
||||
"https://git.teralink.net/tribes/tribes.git")
|
||||
|
||||
(define %tribes-commit
|
||||
"7f4fbea86a7d453a32f3f9893e1f04d50e516b3d")
|
||||
"d0dfb2862704b5d5c1c80e6df27e1c0d94a4faa7")
|
||||
|
||||
(define %tribes-revision "1")
|
||||
|
||||
@@ -62,7 +62,7 @@
|
||||
(git-version "0.2.0" %tribes-revision %tribes-commit))
|
||||
|
||||
(define %tribes-source-sha256
|
||||
"0zbq060dia79sjxp2nb6jdh7db888kc076cmcnbwknxypn20x2q9")
|
||||
"0k552spzbmi19dgafzp0dr93dzfsfkqkpj84114j0xm4yygshjj8")
|
||||
|
||||
(define %tribes-upstream-source
|
||||
(origin
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
%aether-home-page)
|
||||
|
||||
(define %aether-commit
|
||||
"34bec7225b8a2657d7b9bcc51aec3fc260117c2c")
|
||||
"d0ba98f382b2b0bf71f7bae4b47637421bbf35e5")
|
||||
|
||||
(define %aether-revision "1")
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
(git-version "0.2.0" %aether-revision %aether-commit))
|
||||
|
||||
(define %aether-source-sha256
|
||||
"108ks4j2prb11a16g10r0l16j6wxzx457jk0filk57s580j7i7j4")
|
||||
"02prmq991hkpdvlr5n99w3ij34nvgjgrb3ykqfyhsb4pdn9mc9gs")
|
||||
|
||||
(define %aether-mix-deps-sha256
|
||||
"1pk1qv8skbgzi0wg59zj9aiyxx2hxl2k6ngxqqbwvj7wsbiz95bb")
|
||||
|
||||
Reference in New Issue
Block a user