From 31c82b62ff71115d93e5d71279229235d8f6099f Mon Sep 17 00:00:00 2001 From: Josh Robson Chase Date: Mon, 23 May 2022 11:00:41 -0400 Subject: [PATCH 1/2] innernet: package systemd units --- pkgs/tools/networking/innernet/default.nix | 2 ++ 1 file changed, 2 insertions(+) diff --git a/pkgs/tools/networking/innernet/default.nix b/pkgs/tools/networking/innernet/default.nix index 6f7669ff6f7f..9c0ed203af40 100644 --- a/pkgs/tools/networking/innernet/default.nix +++ b/pkgs/tools/networking/innernet/default.nix @@ -37,6 +37,8 @@ rustPlatform.buildRustPackage rec { installManPage doc/innernet.8.gz installShellCompletion doc/innernet.completions.{bash,fish,zsh} installShellCompletion doc/innernet-server.completions.{bash,fish,zsh} + 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 = { From 6b9080d336945a00344b1ec20ce8bc6e1122d28b Mon Sep 17 00:00:00 2001 From: Josh Robson Chase Date: Mon, 23 May 2022 11:16:50 -0400 Subject: [PATCH 2/2] 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"; };