lol

os-prober: init at 1.65 (#21409)

* os-prober: init at 1.65

* os-prober: fix source url

* os-prober: use sha256 instead of md5

authored by

symphorien and committed by
Jörg Thalheim
f49a23c2 7b2a37f5

+79
+77
pkgs/tools/misc/os-prober/default.nix
··· 1 + { stdenv, fetchurl, makeWrapper, 2 + systemd, # udevadm 3 + busybox, 4 + coreutils, # os-prober desn't seem to work with pure busybox 5 + devicemapper, # lvs 6 + # optional dependencies 7 + cryptsetup ? null, 8 + libuuid ? null, # blkid and blockdev 9 + dmraid ? null, 10 + ntfs3g ? null 11 + }: 12 + 13 + stdenv.mkDerivation rec { 14 + version = "1.65"; 15 + name = "os-prober-${version}"; 16 + src = fetchurl { 17 + url = "mirror://debian/pool/main/o/os-prober/os-prober_${version}.tar.xz"; 18 + sha256 = "c4a7661a52edae722f7e6bacb3f107cf7086cbe768275fadf5398d04360bfc84"; 19 + }; 20 + 21 + buildInputs = [ makeWrapper ]; 22 + installPhase = '' 23 + # executables 24 + mkdir -p $out/bin 25 + mkdir -p $out/lib 26 + mkdir -p $out/share 27 + cp os-prober linux-boot-prober $out/bin 28 + cp newns $out/lib 29 + cp common.sh $out/share 30 + 31 + # probes 32 + case "${stdenv.system}" in 33 + i686*|x86_64*) ARCH=x86;; 34 + powerpc*) ARCH=powerpc;; 35 + arm*) ARCH=arm;; 36 + *) ARCH=other;; 37 + esac; 38 + for probes in os-probes os-probes/mounted os-probes/init linux-boot-probes linux-boot-probes/mounted; do 39 + mkdir -p $out/lib/$probes; 40 + cp $probes/common/* $out/lib/$probes; 41 + if [ -e "$probes/$ARCH" ]; then 42 + mkdir -p $out/lib/$probes 43 + cp -r $probes/$ARCH/* $out/lib/$probes; 44 + fi; 45 + done 46 + if [ $ARCH = "x86" ]; then 47 + cp -r os-probes/mounted/powerpc/20macosx $out/lib/os-probes/mounted; 48 + fi; 49 + ''; 50 + postFixup = '' 51 + for file in $(find $out -type f ! -name newns) ; do 52 + substituteInPlace $file \ 53 + --replace /usr/share/os-prober/ $out/share/ \ 54 + --replace /usr/lib/os-probes/ $out/lib/os-probes/ \ 55 + --replace /usr/lib/linux-boot-probes/ $out/lib/linux-boot-probes/ \ 56 + --replace /usr/lib/os-prober/ $out/lib/ 57 + done; 58 + for file in $out/bin/*; do 59 + wrapProgram $file \ 60 + --set LVM_SYSTEM_DIR ${devicemapper} \ 61 + --suffix PATH : "$out/bin${builtins.foldl' (x: y: x + ":" + y) "" ( 62 + map (x: (toString x) + "/bin") ( 63 + builtins.filter (x: x!=null) 64 + [ devicemapper systemd coreutils cryptsetup libuuid dmraid ntfs3g busybox ] 65 + ) 66 + ) 67 + }" \ 68 + --run "[ -d /var/lib/os-prober ] || mkdir /var/lib/os-prober" 69 + done; 70 + ''; 71 + 72 + meta = { 73 + description = "Utility to detect other OSs on a set of drives"; 74 + homepage = http://packages.debian.org/source/sid/os-prober; 75 + license = stdenv.lib.licenses.gpl2Plus; 76 + }; 77 + }
+2
pkgs/top-level/all-packages.nix
··· 3133 3133 3134 3134 olsrd = callPackage ../tools/networking/olsrd { }; 3135 3135 3136 + os-prober = callPackage ../tools/misc/os-prober {}; 3137 + 3136 3138 ossec = callPackage ../tools/security/ossec {}; 3137 3139 3138 3140 ostree = callPackage ../tools/misc/ostree { };