5
5
nix-update-script ,
6
6
testers ,
7
7
immich-go ,
8
+ writableTmpDirAsHomeHook ,
8
9
} :
9
10
buildGoModule rec {
10
11
pname = "immich-go" ;
11
- version = "0.22.1 " ;
12
+ version = "0.25.0 " ;
12
13
13
14
src = fetchFromGitHub {
14
15
owner = "simulot" ;
15
16
repo = "immich-go" ;
16
- rev = "${ version } " ;
17
- hash = "sha256-6bLjHKkEghbY+UQFrgbfeHwOjtks1HjXbDXEr7DuJbU =" ;
17
+ tag = "v ${ version } " ;
18
+ hash = "sha256-C7QfuCJNraOan6N67k7k30hKwJUDzRCNvWpJM3N328s =" ;
18
19
19
20
# Inspired by: https://github.com/NixOS/nixpkgs/blob/f2d7a289c5a5ece8521dd082b81ac7e4a57c2c5c/pkgs/applications/graphics/pdfcpu/default.nix#L20-L32
20
21
# The intention here is to write the information into files in the `src`'s
@@ -31,22 +32,26 @@ buildGoModule rec {
31
32
'' ;
32
33
} ;
33
34
34
- vendorHash = "sha256-jED1K2zHv60zxMY4P7Z739uzf7PtlsnvZyStOSLKi4M =" ;
35
+ vendorHash = "sha256-J8vqii0X6GGmOCJ6L9lILz9NQEPa7Idg/ULrdRqBS9U =" ;
35
36
36
37
# options used by upstream:
37
- # https://github.com/simulot/immich-go/blob/0.13.2 /.goreleaser.yaml
38
+ # https://github.com/simulot/immich-go/blob/v0.25.0 /.goreleaser.yaml
38
39
ldflags = [
39
40
"-s"
40
41
"-w"
41
42
"-extldflags=-static"
42
- "-X main.version =${ version } "
43
+ "-X github.com/simulot/immich-go/app.Version =${ version } "
43
44
] ;
44
45
45
46
preBuild = ''
46
- ldflags+=" -X main.commit =$(cat COMMIT)"
47
- ldflags+=" -X main.date =$(cat SOURCE_DATE)"
47
+ ldflags+=" -X github.com/simulot/immich-go/Commit =$(cat COMMIT)"
48
+ ldflags+=" -X github.com/simulot/immich-go/Date =$(cat SOURCE_DATE)"
48
49
'' ;
49
50
51
+ nativeCheckInputs = [
52
+ writableTmpDirAsHomeHook
53
+ ] ;
54
+
50
55
passthru = {
51
56
updateScript = nix-update-script { } ;
52
57
tests . versionTest = testers . testVersion {
@@ -66,6 +71,6 @@ buildGoModule rec {
66
71
mainProgram = "immich-go" ;
67
72
license = lib . licenses . agpl3Only ;
68
73
maintainers = with lib . maintainers ; [ kai-tub ] ;
69
- changelog = "https://github.com/simulot/immich-go/releases/tag/${ version } " ;
74
+ changelog = "https://github.com/simulot/immich-go/releases/tag/${ src . tag } " ;
70
75
} ;
71
76
}
0 commit comments