nix/package: add systemd units
This commit is contained in:
@@ -91,7 +91,7 @@
|
|||||||
root = ./.;
|
root = ./.;
|
||||||
fileset = lib.fileset.unions [
|
fileset = lib.fileset.unions [
|
||||||
(craneLib.fileset.commonCargoSources ./.)
|
(craneLib.fileset.commonCargoSources ./.)
|
||||||
# ./assets
|
./assets/systemd
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
+11
-1
@@ -83,7 +83,17 @@ buildFunction ({
|
|||||||
shell = [ "bash" "zsh" "fish" ];
|
shell = [ "bash" "zsh" "fish" ];
|
||||||
command = [ "rwho" "ruptime" "finger" "wall" "write" ];
|
command = [ "rwho" "ruptime" "finger" "wall" "write" ];
|
||||||
};
|
};
|
||||||
in lib.concatStringsSep "\n" installShellCompletions;
|
in ''
|
||||||
|
${lib.concatStringsSep "\n" installShellCompletions}
|
||||||
|
|
||||||
|
install -Dm444 assets/systemd/roowho2-audit.socket "$out/lib/systemd/system/roowho2-audit.socket"
|
||||||
|
install -Dm444 assets/systemd/roowho2-client.socket "$out/lib/systemd/system/roowho2-client.socket"
|
||||||
|
install -Dm444 assets/systemd/roowho2-rwhod.socket "$out/lib/systemd/system/roowho2-rwhod.socket"
|
||||||
|
|
||||||
|
install -Dm444 assets/systemd/roowho2.service "$out/lib/systemd/system/roowho2.service"
|
||||||
|
substituteInPlace "$out/lib/systemd/system/roowho2.service" \
|
||||||
|
--replace "/usr/bin/roowhod" "${placeholder "out"}/bin/${mainProgram}"
|
||||||
|
'';
|
||||||
|
|
||||||
meta = with lib; {
|
meta = with lib; {
|
||||||
license = licenses.bsdOriginalUC;
|
license = licenses.bsdOriginalUC;
|
||||||
|
|||||||
Reference in New Issue
Block a user