2016-03-24 12:42:27 +01:00
|
|
|
{ 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 = ''
|
2018-02-20 12:06:55 +01:00
|
|
|
ninja systemd-cryptsetup systemd-cryptsetup-generator
|
2016-03-24 12:42:27 +01:00
|
|
|
'';
|
|
|
|
|
|
|
|
installPhase = ''
|
2016-03-24 13:30:29 +01:00
|
|
|
mkdir -p $out/lib/systemd/
|
2018-02-20 12:06:55 +01:00
|
|
|
cp systemd-cryptsetup $out/lib/systemd/systemd-cryptsetup
|
|
|
|
cp src/shared/*.so $out/lib/systemd/
|
2016-03-24 15:50:39 +01:00
|
|
|
|
|
|
|
mkdir -p $out/lib/systemd/system-generators/
|
2018-02-20 12:06:55 +01:00
|
|
|
cp systemd-cryptsetup-generator $out/lib/systemd/system-generators/systemd-cryptsetup-generator
|
2016-03-24 12:42:27 +01:00
|
|
|
'';
|
|
|
|
})
|