From dcc4fcf8aeae1f77d81e63241e0d753c2dffc8cd Mon Sep 17 00:00:00 2001 From: mikaeladev Date: Sun, 28 Jun 2026 04:11:56 +0100 Subject: [PATCH] openlinkhub: install binary to `$out/opt/OpenLinkHub` makes openlinkhub work out of the box, provided that `$out/opt/OpenLinkHub` is copied to a mutable directory and run from there. --- pkgs/by-name/op/openlinkhub/package.nix | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/pkgs/by-name/op/openlinkhub/package.nix b/pkgs/by-name/op/openlinkhub/package.nix index 7d15eadd40a4..067c2d28ddfc 100644 --- a/pkgs/by-name/op/openlinkhub/package.nix +++ b/pkgs/by-name/op/openlinkhub/package.nix @@ -37,10 +37,12 @@ buildGoModule (finalAttrs: { runHook preInstall install -Dm 644 -t $out/etc/udev/rules.d 99-openlinkhub.rules - install -Dm 755 -t $out/bin $GOPATH/bin/OpenLinkHub + install -Dm 755 -t $out/opt/OpenLinkHub $GOPATH/bin/OpenLinkHub - mkdir -p $out/opt/OpenLinkHub - cp -r {database,static,web} $out/opt/OpenLinkHub + cp -rt $out/opt/OpenLinkHub database static web + + mkdir -p $out/bin + ln -st $out/bin $out/opt/OpenLinkHub/OpenLinkHub runHook postInstall '';