forked from grafana/loki
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdefault.nix
50 lines (44 loc) · 1.38 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
44
45
46
47
48
49
50
{ self }:
{
overlay = final: prev:
let
# self.rev is only set on a clean git tree
gitRevision = if (self ? rev) then self.rev else "dirty";
shortGitRevsion = with prev.lib;
if (self ? rev) then
(strings.concatStrings
(lists.take 8 (strings.stringToCharacters gitRevision)))
else
"dirty";
# the image tag script is hard coded to take only 7 characters
imageTagVersion = with prev.lib;
if (self ? rev) then
(strings.concatStrings
(lists.take 8 (strings.stringToCharacters gitRevision)))
else
"dirty";
imageTag =
if (self ? rev) then
"${imageTagVersion}"
else
"${imageTagVersion}-WIP";
loki-helm-test = prev.callPackage ../production/helm/loki/src/helm-test {
inherit (prev) pkgs lib buildGoModule dockerTools;
rev = gitRevision;
};
in
{
inherit (loki-helm-test) loki-helm-test loki-helm-test-docker;
loki = prev.callPackage ./loki.nix {
inherit imageTag;
version = shortGitRevsion;
pkgs = prev;
};
faillint = prev.callPackage ./faillint.nix {
inherit (prev) lib buildGoModule fetchFromGitHub;
};
chart-releaser = prev.callPackage ./chart-releaser.nix {
inherit (prev) pkgs lib buildGoModule fetchFromGitHub;
};
};
}