11 pname = "gotify-server";
14 src = fetchFromGitHub {
18 hash = "sha256-Na/bxETIgVm1mxMOXWTgYIFFuB6XG1jGvbW6q/n5LRw=";
21 # With `allowGoReference = true;`, `buildGoModule` adds the `-trimpath`
22 # argument for Go builds which apparently breaks the UI like this:
24 # server[780]: stat /var/lib/private/ui/build/index.html: no such file or directory
25 allowGoReference = true;
27 vendorHash = "sha256-Vnk/c2dzxIXDChobFSP++9uyiFD+SKyxJC9ZwaQ2pVw=";
35 ui = callPackage ./ui.nix { };
38 if [ -n "$ui" ] # to make the preBuild a no-op inside the goModules fixed-output derivation, where it would fail
45 # For nix-update to detect the location of this attribute from this
47 inherit (ui) offlineCache;
48 updateScript = nix-update-script { };
50 nixos = nixosTests.gotify-server;
54 # Otherwise, all other subpackages are built as well and from some reason,
55 # produce binaries which panic when executed and are not interesting at all
56 subPackages = [ "." ];
59 "-X main.Version=${version}" "-X main.Mode=prod"
63 description = "Simple server for sending and receiving messages in real-time per WebSocket";
64 homepage = "https://gotify.net";
65 license = licenses.mit;
66 maintainers = with maintainers; [ doronbehar ];
67 mainProgram = "server";