1 { lib, buildGoModule, fetchFromGitHub, nix-update-script, testers, immich-go }:
6 src = fetchFromGitHub {
10 hash = "sha256-6bLjHKkEghbY+UQFrgbfeHwOjtks1HjXbDXEr7DuJbU=";
12 # Inspired by: https://github.com/NixOS/nixpkgs/blob/f2d7a289c5a5ece8521dd082b81ac7e4a57c2c5c/pkgs/applications/graphics/pdfcpu/default.nix#L20-L32
13 # The intention here is to write the information into files in the `src`'s
14 # `$out`, and use them later in other phases (in this case `preBuild`).
15 # In order to keep determinism, we also delete the `.git` directory
16 # afterwards, imitating the default behavior of `leaveDotGit = false`.
17 # More info about git log format can be found at `git-log(1)` manpage.
21 git log -1 --pretty=%H > "COMMIT"
22 git log -1 --pretty=%cd --date=format:'%Y-%m-%dT%H:%M:%SZ' > "SOURCE_DATE"
27 vendorHash = "sha256-jED1K2zHv60zxMY4P7Z739uzf7PtlsnvZyStOSLKi4M=";
29 # options used by upstream:
30 # https://github.com/simulot/immich-go/blob/0.13.2/.goreleaser.yaml
35 "-X main.version=${version}"
39 ldflags+=" -X main.commit=$(cat COMMIT)"
40 ldflags+=" -X main.date=$(cat SOURCE_DATE)"
44 updateScript = nix-update-script { };
45 tests.versionTest = testers.testVersion {
47 command = "immich-go -version";
53 description = "Immich client tool for bulk-uploads";
55 Immich-Go is an open-source tool designed to streamline uploading
56 large photo collections to your self-hosted Immich server.
58 homepage = "https://github.com/simulot/immich-go";
59 mainProgram = "immich-go";
60 license = lib.licenses.agpl3Only;
61 maintainers = with lib.maintainers; [ kai-tub ];
62 changelog = "https://github.com/simulot/immich-go/releases/tag/${version}";