1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
|
{ lib
, symlinkJoin
, callPackage
, fetchFromGitHub
, fetchurl
, buildGoModule
, makeWrapper
, breakpointHook
, jq
, curl
, kubectl
, eksctl
, kind
, k3sup
, coreutils
}:
let
branch = "3.0.0";
version = "3.0.1-beta.2405292059";
pname = "nuv";
in
buildGoModule {
inherit pname version;
src = fetchFromGitHub {
owner = "nuvolaris";
repo = "nuv";
rev = version;
hash = "sha256-MdnBvlA4S2Mi/bcbE+O02x+wvlIrsK1Zc0dySz4FB/w=";
};
subPackages = [ "." ];
vendorHash = "sha256-JkQbQ2NEaumXbAfsv0fNiQf/EwMs3SDLHvu7c/bU7fU=";
nativeBuildInputs = [ makeWrapper jq curl breakpointHook ];
ldflags = [
"-s"
"-w"
"-X main.NuvVersion=${version}"
"-X main.NuvBranch=${branch}"
];
# false because tests require some modifications inside nix-env
doCheck = false;
postInstall = let
nuv-bin = symlinkJoin {
name = "nuv-bin";
paths = [
coreutils
kubectl
eksctl
kind
k3sup
];
};
in ''
wrapProgram $out/bin/nuv --set NUV_BIN "${nuv-bin}/bin"
'';
passthru.tests = {
simple = callPackage ./tests.nix { inherit version; };
};
meta = {
homepage = "https://nuvolaris.io/";
description = "A CLI tool for running tasks using the Nuvolaris serverless engine";
license = lib.licenses.asl20;
mainProgram = "nuv";
maintainers = with lib.maintainers; [ msciabarra d4rkstar ];
};
}
|