blob: 2b35ac4837ec57c9f92904369dd1d36cd708b4c3 (
plain) (
blame)
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
|
{ lib, stdenv, buildGoModule, fetchFromGitHub, installShellFiles, testers, dagger }:
buildGoModule rec {
pname = "dagger";
version = "0.8.8";
src = fetchFromGitHub {
owner = "dagger";
repo = "dagger";
rev = "v${version}";
hash = "sha256-EHAQRmBgQEM0ypfUwuaoPnoKsQb1S+tarO1nHdmY5RI=";
};
vendorHash = "sha256-fUNet9P6twEJP4eYooiHZ6qaJ3jEkJUwQ2zPzk3+eIs=";
proxyVendor = true;
subPackages = [
"cmd/dagger"
];
ldflags = [ "-s" "-w" "-X github.com/dagger/dagger/engine.Version=${version}" ];
nativeBuildInputs = [ installShellFiles ];
postInstall = lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) ''
installShellCompletion --cmd dagger \
--bash <($out/bin/dagger completion bash) \
--fish <($out/bin/dagger completion fish) \
--zsh <($out/bin/dagger completion zsh)
'';
passthru.tests.version = testers.testVersion {
package = dagger;
command = "dagger version";
version = "v${version}";
};
meta = with lib; {
description = "A portable devkit for CICD pipelines";
homepage = "https://dagger.io";
license = licenses.asl20;
maintainers = with maintainers; [ jfroche sagikazarmark ];
};
}
|