os-prober: fix dependencies
busybox seems to have never been needed systemd was meant to provide udevadm; use libudev instead devicemapper is now uneeded, replaced by grub-mount and grub-info dmraid does not appear in the current code
This commit is contained in:
@@ -1,13 +1,11 @@
|
|||||||
{ stdenv, fetchurl, makeWrapper,
|
{ stdenv, fetchurl, makeWrapper,
|
||||||
systemd, # udevadm
|
# optional dependencies, the command(s) they provide
|
||||||
busybox,
|
coreutils, # mktemp
|
||||||
coreutils, # os-prober desn't seem to work with pure busybox
|
grub2, # grub-mount and grub-probe
|
||||||
devicemapper, # lvs
|
cryptsetup, # cryptsetup
|
||||||
# optional dependencies
|
libuuid, # blkid and blockdev
|
||||||
cryptsetup ? null,
|
libudev, # udevadm udevinfo
|
||||||
libuuid ? null, # blkid and blockdev
|
ntfs3g # ntfs3g
|
||||||
dmraid ? null,
|
|
||||||
ntfs3g ? null
|
|
||||||
}:
|
}:
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
@@ -21,12 +19,9 @@ stdenv.mkDerivation rec {
|
|||||||
buildInputs = [ makeWrapper ];
|
buildInputs = [ makeWrapper ];
|
||||||
installPhase = ''
|
installPhase = ''
|
||||||
# executables
|
# executables
|
||||||
mkdir -p $out/bin
|
install -Dt $out/bin os-prober linux-boot-prober
|
||||||
mkdir -p $out/lib
|
install -Dt $out/lib newns
|
||||||
mkdir -p $out/share
|
install -Dt $out/share common.sh
|
||||||
cp os-prober linux-boot-prober $out/bin
|
|
||||||
cp newns $out/lib
|
|
||||||
cp common.sh $out/share
|
|
||||||
|
|
||||||
# probes
|
# probes
|
||||||
case "${stdenv.system}" in
|
case "${stdenv.system}" in
|
||||||
@@ -36,8 +31,7 @@ stdenv.mkDerivation rec {
|
|||||||
*) ARCH=other;;
|
*) ARCH=other;;
|
||||||
esac;
|
esac;
|
||||||
for probes in os-probes os-probes/mounted os-probes/init linux-boot-probes linux-boot-probes/mounted; do
|
for probes in os-probes os-probes/mounted os-probes/init linux-boot-probes linux-boot-probes/mounted; do
|
||||||
mkdir -p $out/lib/$probes;
|
install -Dt $out/lib/$probes $probes/common/*;
|
||||||
cp $probes/common/* $out/lib/$probes;
|
|
||||||
if [ -e "$probes/$ARCH" ]; then
|
if [ -e "$probes/$ARCH" ]; then
|
||||||
mkdir -p $out/lib/$probes
|
mkdir -p $out/lib/$probes
|
||||||
cp -r $probes/$ARCH/* $out/lib/$probes;
|
cp -r $probes/$ARCH/* $out/lib/$probes;
|
||||||
@@ -57,14 +51,7 @@ stdenv.mkDerivation rec {
|
|||||||
done;
|
done;
|
||||||
for file in $out/bin/*; do
|
for file in $out/bin/*; do
|
||||||
wrapProgram $file \
|
wrapProgram $file \
|
||||||
--set LVM_SYSTEM_DIR ${devicemapper} \
|
--suffix PATH : ${stdenv.lib.makeBinPath [ grub2 libudev coreutils cryptsetup libuuid ntfs3g ]} \
|
||||||
--suffix PATH : "$out/bin${builtins.foldl' (x: y: x + ":" + y) "" (
|
|
||||||
map (x: (toString x) + "/bin") (
|
|
||||||
builtins.filter (x: x!=null)
|
|
||||||
[ devicemapper systemd coreutils cryptsetup libuuid dmraid ntfs3g busybox ]
|
|
||||||
)
|
|
||||||
)
|
|
||||||
}" \
|
|
||||||
--run "[ -d /var/lib/os-prober ] || mkdir /var/lib/os-prober"
|
--run "[ -d /var/lib/os-prober ] || mkdir /var/lib/os-prober"
|
||||||
done;
|
done;
|
||||||
'';
|
'';
|
||||||
|
|||||||
Reference in New Issue
Block a user