Merge pull request #41133 from symphorien/os-prober
os-prober: fix dependencies for version >= 1.75
This commit is contained in:
commit
f7a96aea20
@ -1,5 +1,6 @@
|
|||||||
{ stdenv, fetchurl, fetchFromSavannah, autogen, flex, bison, python, autoconf, automake
|
{ stdenv, fetchurl, fetchFromSavannah, autogen, flex, bison, python, autoconf, automake
|
||||||
, gettext, ncurses, libusb, freetype, qemu, devicemapper, unifont, pkgconfig
|
, gettext, ncurses, libusb, freetype, qemu, devicemapper, unifont, pkgconfig
|
||||||
|
, fuse # only needed for grub-mount
|
||||||
, zfs ? null
|
, zfs ? null
|
||||||
, efiSupport ? false
|
, efiSupport ? false
|
||||||
, zfsSupport ? true
|
, zfsSupport ? true
|
||||||
@ -47,7 +48,7 @@ stdenv.mkDerivation rec {
|
|||||||
};
|
};
|
||||||
|
|
||||||
nativeBuildInputs = [ bison flex python pkgconfig ];
|
nativeBuildInputs = [ bison flex python pkgconfig ];
|
||||||
buildInputs = [ ncurses libusb freetype gettext devicemapper ]
|
buildInputs = [ ncurses libusb freetype gettext devicemapper fuse ]
|
||||||
++ optional doCheck qemu
|
++ optional doCheck qemu
|
||||||
++ optional zfsSupport zfs;
|
++ optional zfsSupport zfs;
|
||||||
|
|
||||||
@ -83,7 +84,8 @@ stdenv.mkDerivation rec {
|
|||||||
|
|
||||||
patches = [ ./fix-bash-completion.patch ];
|
patches = [ ./fix-bash-completion.patch ];
|
||||||
|
|
||||||
configureFlags = optional zfsSupport "--enable-libzfs"
|
configureFlags = [ "--enable-grub-mount" ] # dep of os-prober
|
||||||
|
++ optional zfsSupport "--enable-libzfs"
|
||||||
++ optionals efiSupport [ "--with-platform=efi" "--target=${efiSystemsBuild.${stdenv.system}.target}" "--program-prefix=" ]
|
++ optionals efiSupport [ "--with-platform=efi" "--target=${efiSystemsBuild.${stdenv.system}.target}" "--program-prefix=" ]
|
||||||
++ optionals xenSupport [ "--with-platform=xen" "--target=${efiSystemsBuild.${stdenv.system}.target}"];
|
++ optionals xenSupport [ "--with-platform=xen" "--target=${efiSystemsBuild.${stdenv.system}.target}"];
|
||||||
|
|
||||||
|
@ -1,32 +1,27 @@
|
|||||||
{ 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 {
|
||||||
version = "1.76";
|
version = "1.76";
|
||||||
name = "os-prober-${version}";
|
name = "os-prober-${version}";
|
||||||
src = fetchurl {
|
src = fetchurl {
|
||||||
url = "mirror://debian/pool/main/o/os-prober/os-prober_${version}.tar.xz";
|
url = "https://salsa.debian.org/philh/os-prober/-/archive/${version}/os-prober-${version}.tar.bz2";
|
||||||
sha256 = "1vb45i76bqivlghrq7m3n07qfmmq4wxrkplqx8gywj011rhq19fk";
|
sha256 = "07rw3092pckh21vx6y4hzqcn3wn4cqmwxaaiq100lncnhmszg11g";
|
||||||
};
|
};
|
||||||
|
|
||||||
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,21 +51,15 @@ 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;
|
||||||
'';
|
'';
|
||||||
|
|
||||||
meta = {
|
meta = with stdenv.lib; {
|
||||||
description = "Utility to detect other OSs on a set of drives";
|
description = "Utility to detect other OSs on a set of drives";
|
||||||
homepage = http://packages.debian.org/source/sid/os-prober;
|
homepage = http://packages.debian.org/source/sid/os-prober;
|
||||||
license = stdenv.lib.licenses.gpl2Plus;
|
license = licenses.gpl2Plus;
|
||||||
|
maintainers = with maintainers; [ symphorien ];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user