|
|
@ -15,11 +15,14 @@
|
|
|
|
, withLvm ? false
|
|
|
|
, withLvm ? false
|
|
|
|
, withCryptsetup ? false
|
|
|
|
, withCryptsetup ? false
|
|
|
|
, withKexec ? false
|
|
|
|
, withKexec ? false
|
|
|
|
|
|
|
|
, withNvramTool ? false # nixpkgsOnBuildForHost.stdenv.hostPlatform.isx86
|
|
|
|
}:
|
|
|
|
}:
|
|
|
|
|
|
|
|
|
|
|
|
let
|
|
|
|
let
|
|
|
|
inherit (nixpkgsOnBuildForHost.pkgsStatic) stdenv busybox signify lvm2 cryptsetup kexec-tools findutils cpio;
|
|
|
|
inherit (nixpkgsOnBuildForHost.pkgsStatic) stdenv busybox signify lvm2 cryptsetup kexec-tools findutils cpio;
|
|
|
|
|
|
|
|
nvramtool = nixpkgsOnBuildForHost.pkgsStatic.nvramtool.overrideAttrs(a: {
|
|
|
|
|
|
|
|
NIX_CFLAGS_COMPILE = "-D__GLIBC__";
|
|
|
|
|
|
|
|
});
|
|
|
|
in stdenv.mkDerivation {
|
|
|
|
in stdenv.mkDerivation {
|
|
|
|
name = "ownerboot-initramfs-userspace";
|
|
|
|
name = "ownerboot-initramfs-userspace";
|
|
|
|
dontUnpack = true;
|
|
|
|
dontUnpack = true;
|
|
|
@ -48,6 +51,8 @@ in stdenv.mkDerivation {
|
|
|
|
cp ${cryptsetup}/bin/cryptsetup $out/bin/
|
|
|
|
cp ${cryptsetup}/bin/cryptsetup $out/bin/
|
|
|
|
'' + lib.optionalString withKexec ''
|
|
|
|
'' + lib.optionalString withKexec ''
|
|
|
|
cp ${kexec-tools}/bin/kexec $out/bin/
|
|
|
|
cp ${kexec-tools}/bin/kexec $out/bin/
|
|
|
|
|
|
|
|
'' + lib.optionalString withNvramTool ''
|
|
|
|
|
|
|
|
cp ${nvramtool}/bin/nvramtool $out/bin/
|
|
|
|
'' + ''
|
|
|
|
'' + ''
|
|
|
|
runHook postInstall
|
|
|
|
runHook postInstall
|
|
|
|
'';
|
|
|
|
'';
|
|
|
|