-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathdefault.nix
43 lines (43 loc) · 1 KB
/
default.nix
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
{
pkgs ? (
let
inherit (builtins) fetchTree fromJSON readFile;
inherit ((fromJSON (readFile ./flake.lock)).nodes) nixpkgs gomod2nix;
in
import (fetchTree nixpkgs.locked) {
overlays = [ (import "${fetchTree gomod2nix.locked}/overlay.nix") ];
}
),
buildGoApplication ? pkgs.buildGoApplication,
}:
let
helmWrap =
with pkgs;
wrapHelm kubernetes-helm {
plugins = with kubernetes-helmPlugins; [
helm-diff
helm-git
];
};
helmfileWrap = pkgs.helmfile-wrapped.override { inherit (helmWrap) pluginsDir; };
in
buildGoApplication {
pname = "helmfile-nix";
version = "0.1";
pwd = ./.;
src = ./.;
nativeBuildInputs = with pkgs; [
nix
helmWrap
helmfileWrap
];
modules = ./gomod2nix.toml;
preCheck = ''
export HOME=$TMPDIR
go test -coverprofile=coverage.txt -v 2>&1 ./... | ${pkgs.go-junit-report}/bin/go-junit-report > report.xml
ls -l
mkdir -p $out
cp report.xml coverage.txt $out/
'';
postCheck = '''';
}