feat(3p/nix): Template systemd unit files in build
Template the systemd unit file templates as part of the nix installPhase, putting them in the same place that the upstream nix derivation does. Change-Id: I3ceabfc0c837564e33b9ae7f9eeb7185d6fbe907 Reviewed-on: https://cl.tvl.fyi/c/depot/+/1429 Tested-by: BuildkiteCI Reviewed-by: isomer <isomer@tvl.fyi> Reviewed-by: tazjin <mail@tazj.in>
This commit is contained in:
parent
2ed0778103
commit
7c56fccdad
1 changed files with 13 additions and 0 deletions
13
third_party/nix/default.nix
vendored
13
third_party/nix/default.nix
vendored
|
@ -131,6 +131,19 @@ in lib.fix (self: pkgs.llvmPackages.libcxxStdenv.mkDerivation {
|
|||
|
||||
mkdir -p $out/libexec/nix
|
||||
ln -s $out/bin/nix $out/libexec/nix/build-remote
|
||||
|
||||
# configuration variables for templated files
|
||||
export storedir=/nix/store
|
||||
export localstatedir=/nix/var/nix
|
||||
export bindir=$out/bin
|
||||
|
||||
mkdir -p $out/lib/systemd/system
|
||||
substituteAll \
|
||||
${src}/misc/systemd/nix-daemon.service.in \
|
||||
$out/lib/systemd/system/nix-daemon.service
|
||||
substituteAll \
|
||||
${src}/misc/systemd/nix-daemon.socket.in \
|
||||
$out/lib/systemd/system/nix-daemon.socket
|
||||
'';
|
||||
|
||||
# TODO(tazjin): integration test setup?
|
||||
|
|
Loading…
Reference in a new issue