From c55af95e8fe70e14833cfb1e34310db1b91cc887 Mon Sep 17 00:00:00 2001 From: Maximilian Bosch Date: Mon, 30 Nov 2020 22:16:14 +0100 Subject: [PATCH] gotify-server: fix UI delivery After bisecting `nixpkgs-master` I realized that the usage of `-trimpath`[0] by default for Go modules[1] is responsible for breaking UI delivery of `gotify-server`[2]. This behavior can only be turned off by setting `allowGoReference` to `true`. We may want to find a better long-term fix, but given that this only affects a leaf-package and actually fixes the problem, this is good enough for now. Fixes #105472 [0] https://golang.org/doc/go1.13#go-command [1] 4e9f7bbf8573d07f7b0c87d97c026cd4aad5a758 [2] https://hydra.nixos.org/build/131660876 --- pkgs/servers/gotify/default.nix | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/pkgs/servers/gotify/default.nix b/pkgs/servers/gotify/default.nix index 924625ebd783..a7fb1d0e7e57 100644 --- a/pkgs/servers/gotify/default.nix +++ b/pkgs/servers/gotify/default.nix @@ -20,6 +20,12 @@ buildGoModule rec { sha256 = import ./source-sha.nix; }; + # With `allowGoReference = true;`, `buildGoModule` adds the `-trimpath` + # argument for Go builds which apparently breaks the UI like this: + # + # server[780]: stat /var/lib/private/ui/build/index.html: no such file or directory + allowGoReference = true; + vendorSha256 = import ./vendor-sha.nix; doCheck = false;