tangled
alpha
login
or
join now
pyrox.dev
/
nixpkgs
lol
0
fork
atom
overview
issues
pulls
pipelines
minio: set CopyrightYear for cli ui
Enno Richter
2 years ago
d51db98b
c585eaf8
+12
-1
1 changed file
expand all
collapse all
unified
split
pkgs
servers
minio
default.nix
+12
-1
pkgs/servers/minio/default.nix
···
12
12
splitTS = builtins.elemAt (builtins.split "(.*)(T.*)" version) 1;
13
13
in
14
14
builtins.concatStringsSep "" [ (builtins.elemAt splitTS 0) (builtins.replaceStrings [ "-" ] [ ":" ] (builtins.elemAt splitTS 1)) ];
15
15
+
16
16
+
# CopyrightYear will be printed to the CLI UI.
17
17
+
# Example:
18
18
+
# versionToYear "2021-04-22T15-44-28Z"
19
19
+
# => "2021"
20
20
+
versionToYear = version: builtins.elemAt (lib.splitString "-" version) 0;
15
21
in
16
22
buildGoModule rec {
17
23
pname = "minio";
···
35
41
tags = [ "kqueue" ];
36
42
37
43
ldflags = let t = "github.com/minio/minio/cmd"; in [
38
38
-
"-s" "-w" "-X ${t}.Version=${versionToTimestamp version}" "-X ${t}.ReleaseTag=RELEASE.${version}" "-X ${t}.CommitID=${src.rev}"
44
44
+
"-s"
45
45
+
"-w"
46
46
+
"-X ${t}.Version=${versionToTimestamp version}"
47
47
+
"-X ${t}.CopyrightYear=${versionToYear version}"
48
48
+
"-X ${t}.ReleaseTag=RELEASE.${version}"
49
49
+
"-X ${t}.CommitID=${src.rev}"
39
50
];
40
51
41
52
passthru.tests.minio = nixosTests.minio;