2016-03-24 11:42:27 +00: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 = ''
|
|
|
|
make $makeFlags built-sources
|
2016-03-24 12:30:29 +00:00
|
|
|
make $makeFlags systemd-cryptsetup
|
2016-03-24 11:42:27 +00:00
|
|
|
make $makeFlags systemd-cryptsetup-generator
|
|
|
|
'';
|
|
|
|
|
|
|
|
installPhase = ''
|
2016-03-24 12:30:29 +00:00
|
|
|
mkdir -p $out/lib/systemd/
|
|
|
|
cp systemd-cryptsetup $out/lib/systemd/systemd-cryptsetup
|
2016-03-24 14:50:39 +00:00
|
|
|
|
|
|
|
mkdir -p $out/lib/systemd/system-generators/
|
|
|
|
cp systemd-cryptsetup-generator $out/lib/systemd/system-generators/systemd-cryptsetup-generator
|
2016-03-24 11:42:27 +00:00
|
|
|
'';
|
|
|
|
})
|