File tree Expand file tree Collapse file tree 1 file changed +60
-0
lines changed Expand file tree Collapse file tree 1 file changed +60
-0
lines changed Original file line number Diff line number Diff line change 1+ {
2+ lib ,
3+ stdenv ,
4+ # Need macOS 15+ for nested virtualization.
5+ apple-sdk_15 ,
6+ buildGoModule ,
7+ fetchFromGitLab ,
8+ nix-update-script ,
9+ versionCheckHook ,
10+ } :
11+
12+ buildGoModule rec {
13+ pname = "nesting" ;
14+ version = "0.3.0" ;
15+
16+ src = fetchFromGitLab {
17+ group = "gitlab-org" ;
18+ owner = "fleeting" ;
19+ repo = "nesting" ;
20+ tag = "v${ version } " ;
21+ hash = "sha256-ejoLld1TmwaqTlSyuzyEVEqLyEehu6g7yc0H0Cvkqp4=" ;
22+ } ;
23+
24+ vendorHash = "sha256-CyXlK/0VWMFlwSfisoaNCRdknasp8faN/K/zdyRhAQQ=" ;
25+
26+ subPackages = [ "cmd/nesting" ] ;
27+
28+ # See https://gitlab.com/gitlab-org/fleeting/nesting/-/blob/v0.3.0/Makefile?ref_type=tags#L22-24.
29+ #
30+ # Needed for "nesting version" to not show "dev".
31+ ldflags = [
32+ "-X gitlab.com/gitlab-org/fleeting/nesting.NAME=nesting"
33+ "-X gitlab.com/gitlab-org/fleeting/nesting.VERSION=v${ version } "
34+ "-X gitlab.com/gitlab-org/fleeting/nesting.REVISION=${ src . rev } "
35+ ] ;
36+
37+ buildInputs = lib . optionals stdenv . hostPlatform . isDarwin [ apple-sdk_15 ] ;
38+
39+ doInstallCheck = true ;
40+
41+ nativeInstallCheckInputs = [ versionCheckHook ] ;
42+
43+ versionCheckProgramArg = "version" ;
44+
45+ passthru = {
46+ updateScript = nix-update-script { } ;
47+ } ;
48+
49+ meta = {
50+ description = "Basic and opinionated daemon that sits in front of virtualization platforms" ;
51+ homepage = "https://gitlab.com/gitlab-org/fleeting/nesting" ;
52+ license = lib . licenses . mit ;
53+ mainProgram = "nesting" ;
54+ maintainers = with lib . maintainers ; [ commiterate ] ;
55+ badPlatforms = [
56+ # Only supports AArch64 for Darwin.
57+ "x86_64-darwin"
58+ ] ;
59+ } ;
60+ }
You can’t perform that action at this time.
0 commit comments