From 6b9080d336945a00344b1ec20ce8bc6e1122d28b Mon Sep 17 00:00:00 2001 From: Josh Robson Chase Date: Mon, 23 May 2022 11:16:50 -0400 Subject: [PATCH] innernet: only package systemd units for linux --- pkgs/tools/networking/innernet/default.nix | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pkgs/tools/networking/innernet/default.nix b/pkgs/tools/networking/innernet/default.nix index 9c0ed203af40..de6dc0fe215d 100644 --- a/pkgs/tools/networking/innernet/default.nix +++ b/pkgs/tools/networking/innernet/default.nix @@ -37,9 +37,10 @@ rustPlatform.buildRustPackage rec { installManPage doc/innernet.8.gz installShellCompletion doc/innernet.completions.{bash,fish,zsh} installShellCompletion doc/innernet-server.completions.{bash,fish,zsh} + '' + (lib.optionalString stdenv.isLinux '' find . -regex '.*\.\(target\|service\)' | xargs install -Dt $out/lib/systemd/system find $out/lib/systemd/system -type f | xargs sed -i "s|/usr/bin/innernet|$out/bin/innernet|" - ''; + ''); passthru.tests = { serverVersion = testers.testVersion { package = innernet; command = "innernet-server --version"; };