mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-11-20 00:53:12 +03:00
d351cd9f69
Closes #35097
25 lines
648 B
Nix
25 lines
648 B
Nix
{ stdenv, systemd, cryptsetup }:
|
|
|
|
assert stdenv.isLinux;
|
|
|
|
stdenv.lib.overrideDerivation systemd (p: {
|
|
version = p.version;
|
|
name = "systemd-cryptsetup-generator";
|
|
|
|
nativeBuildInputs = p.nativeBuildInputs ++ [ cryptsetup ];
|
|
outputs = [ "out" ];
|
|
|
|
buildPhase = ''
|
|
ninja systemd-cryptsetup systemd-cryptsetup-generator
|
|
'';
|
|
|
|
installPhase = ''
|
|
mkdir -p $out/lib/systemd/
|
|
cp systemd-cryptsetup $out/lib/systemd/systemd-cryptsetup
|
|
cp src/shared/*.so $out/lib/systemd/
|
|
|
|
mkdir -p $out/lib/systemd/system-generators/
|
|
cp systemd-cryptsetup-generator $out/lib/systemd/system-generators/systemd-cryptsetup-generator
|
|
'';
|
|
})
|