netbird-ui: fix build failure

This commit is contained in:
misuzu 2024-02-28 10:13:42 +02:00
parent 072090b624
commit 32f9f4626c

View file

@ -73,9 +73,9 @@ buildGoModule rec {
postPatch = ''
# make it compatible with systemd's RuntimeDirectory
substituteInPlace client/cmd/root.go \
--replace 'unix:///var/run/netbird.sock' 'unix:///var/run/netbird/sock'
--replace-fail 'unix:///var/run/netbird.sock' 'unix:///var/run/netbird/sock'
substituteInPlace client/ui/client_ui.go \
--replace 'unix:///var/run/netbird.sock' 'unix:///var/run/netbird/sock'
--replace-fail 'unix:///var/run/netbird.sock' 'unix:///var/run/netbird/sock'
'';
postInstall = lib.concatStringsSep "\n"
@ -90,13 +90,13 @@ buildGoModule rec {
'')
modules) + lib.optionalString (stdenv.isLinux && ui) ''
mkdir -p $out/share/pixmaps
cp $src/client/ui/netbird-systemtray-default.png $out/share/pixmaps/netbird.png
cp $src/client/ui/netbird-systemtray-connected.png $out/share/pixmaps/netbird.png
mkdir -p $out/share/applications
cp $src/client/ui/netbird.desktop $out/share/applications/netbird.desktop
substituteInPlace $out/share/applications/netbird.desktop \
--replace "Exec=/usr/bin/netbird-ui" "Exec=$out/bin/netbird-ui"
--replace-fail "Exec=/usr/bin/netbird-ui" "Exec=$out/bin/netbird-ui"
'';
passthru = {