3
0
Fork 0
forked from mirrors/nixpkgs

innernet: only package systemd units for linux

This commit is contained in:
Josh Robson Chase 2022-05-23 11:16:50 -04:00
parent 31c82b62ff
commit 6b9080d336
No known key found for this signature in database
GPG key ID: 32A347137755554F

View file

@ -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"; };