Skip to content

Commit a28fe7c

Browse files
author
Kai
committedMar 25, 2025
1 parent fa6ab1d commit a28fe7c

File tree

1 file changed

+14
-9
lines changed

1 file changed

+14
-9
lines changed
 

‎pkgs/by-name/im/immich-go/package.nix

+14-9
Original file line numberDiff line numberDiff line change
@@ -5,16 +5,17 @@
55
nix-update-script,
66
testers,
77
immich-go,
8+
writableTmpDirAsHomeHook,
89
}:
910
buildGoModule rec {
1011
pname = "immich-go";
11-
version = "0.22.1";
12+
version = "0.25.0";
1213

1314
src = fetchFromGitHub {
1415
owner = "simulot";
1516
repo = "immich-go";
16-
rev = "${version}";
17-
hash = "sha256-6bLjHKkEghbY+UQFrgbfeHwOjtks1HjXbDXEr7DuJbU=";
17+
tag = "v${version}";
18+
hash = "sha256-C7QfuCJNraOan6N67k7k30hKwJUDzRCNvWpJM3N328s=";
1819

1920
# Inspired by: https://github.com/NixOS/nixpkgs/blob/f2d7a289c5a5ece8521dd082b81ac7e4a57c2c5c/pkgs/applications/graphics/pdfcpu/default.nix#L20-L32
2021
# The intention here is to write the information into files in the `src`'s
@@ -31,22 +32,26 @@ buildGoModule rec {
3132
'';
3233
};
3334

34-
vendorHash = "sha256-jED1K2zHv60zxMY4P7Z739uzf7PtlsnvZyStOSLKi4M=";
35+
vendorHash = "sha256-J8vqii0X6GGmOCJ6L9lILz9NQEPa7Idg/ULrdRqBS9U=";
3536

3637
# 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
3839
ldflags = [
3940
"-s"
4041
"-w"
4142
"-extldflags=-static"
42-
"-X main.version=${version}"
43+
"-X github.com/simulot/immich-go/app.Version=${version}"
4344
];
4445

4546
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)"
4849
'';
4950

51+
nativeCheckInputs = [
52+
writableTmpDirAsHomeHook
53+
];
54+
5055
passthru = {
5156
updateScript = nix-update-script { };
5257
tests.versionTest = testers.testVersion {
@@ -66,6 +71,6 @@ buildGoModule rec {
6671
mainProgram = "immich-go";
6772
license = lib.licenses.agpl3Only;
6873
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}";
7075
};
7176
}

0 commit comments

Comments
 (0)
Failed to load comments.