Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

immich-go: 0.22.1 -> 0.25.0 #392288

Merged
merged 1 commit into from
Mar 27, 2025
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
25 changes: 15 additions & 10 deletions pkgs/by-name/im/immich-go/package.nix
Original file line number Diff line number Diff line change
@@ -5,16 +5,17 @@
nix-update-script,
testers,
immich-go,
writableTmpDirAsHomeHook,
}:
buildGoModule rec {
pname = "immich-go";
version = "0.22.1";
version = "0.25.0";

src = fetchFromGitHub {
owner = "simulot";
repo = "immich-go";
rev = "${version}";
hash = "sha256-6bLjHKkEghbY+UQFrgbfeHwOjtks1HjXbDXEr7DuJbU=";
tag = "v${version}";
hash = "sha256-C7QfuCJNraOan6N67k7k30hKwJUDzRCNvWpJM3N328s=";

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

vendorHash = "sha256-jED1K2zHv60zxMY4P7Z739uzf7PtlsnvZyStOSLKi4M=";
vendorHash = "sha256-J8vqii0X6GGmOCJ6L9lILz9NQEPa7Idg/ULrdRqBS9U=";

# options used by upstream:
# https://github.com/simulot/immich-go/blob/0.13.2/.goreleaser.yaml
# https://github.com/simulot/immich-go/blob/v0.25.0/.goreleaser.yaml
ldflags = [
"-s"
"-w"
"-extldflags=-static"
"-X main.version=${version}"
"-X github.com/simulot/immich-go/app.Version=${version}"
];

preBuild = ''
ldflags+=" -X main.commit=$(cat COMMIT)"
ldflags+=" -X main.date=$(cat SOURCE_DATE)"
ldflags+=" -X github.com/simulot/immich-go/Commit=$(cat COMMIT)"
ldflags+=" -X github.com/simulot/immich-go/Date=$(cat SOURCE_DATE)"
'';

nativeCheckInputs = [
writableTmpDirAsHomeHook
];

passthru = {
updateScript = nix-update-script { };
tests.versionTest = testers.testVersion {
package = immich-go;
command = "immich-go -version";
command = "immich-go --version";
version = version;
};
};
@@ -66,6 +71,6 @@ buildGoModule rec {
mainProgram = "immich-go";
license = lib.licenses.agpl3Only;
maintainers = with lib.maintainers; [ kai-tub ];
changelog = "https://github.com/simulot/immich-go/releases/tag/${version}";
changelog = "https://github.com/simulot/immich-go/releases/tag/${src.tag}";
};
}