Merge pull request #174135 from jrobsonchase/innernet-unit-files

innernet: package systemd units
This commit is contained in:
tomberek 2022-07-10 15:18:39 -04:00 committed by GitHub
commit b8c549e1c3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

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