nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 lib,
3 fetchFromGitHub,
4 pkg-config,
5 libsodium,
6 buildGoModule,
7 nix-update-script,
8}:
9
10buildGoModule rec {
11 pname = "museum";
12 version = "1.1.57";
13
14 src = fetchFromGitHub {
15 owner = "ente-io";
16 repo = "ente";
17 sparseCheckout = [ "server" ];
18 rev = "photos-v${version}";
19 hash = "sha256-801wTTxruhZc18+TAPSYrBRtCPNZXwSKs2Hkvc/6BjM=";
20 };
21
22 vendorHash = "sha256-px4pMqeH73Fe06va4+n6hklIUDMbPmAQNKKRIhwv6ec=";
23
24 sourceRoot = "${src.name}/server";
25
26 nativeBuildInputs = [
27 pkg-config
28 ];
29 buildInputs = [
30 libsodium
31 ];
32
33 # fatal: "Not running tests in non-test environment"
34 doCheck = false;
35
36 postInstall = ''
37 mkdir -p $out/share/museum
38 cp -R configurations \
39 migrations \
40 mail-templates \
41 web-templates \
42 $out/share/museum
43 '';
44
45 passthru.updateScript = nix-update-script {
46 extraArgs = [
47 "--version-regex"
48 "photos-v(.*)"
49 ];
50 };
51
52 meta = {
53 description = "API server for ente.io";
54 homepage = "https://github.com/ente-io/ente/tree/main/server";
55 license = lib.licenses.agpl3Only;
56 maintainers = with lib.maintainers; [
57 pinpox
58 ];
59 mainProgram = "museum";
60 platforms = lib.platforms.linux;
61 };
62}