From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:57476) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dmlrr-0002YZ-8y for guix-patches@gnu.org; Tue, 29 Aug 2017 15:08:08 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dmlrm-0000mk-Nd for guix-patches@gnu.org; Tue, 29 Aug 2017 15:08:07 -0400 Received: from debbugs.gnu.org ([208.118.235.43]:52401) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1dmlrm-0000mf-Iw for guix-patches@gnu.org; Tue, 29 Aug 2017 15:08:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1dmlrm-0004g5-DB for guix-patches@gnu.org; Tue, 29 Aug 2017 15:08:02 -0400 Subject: [bug#28281] [PATCH] gnu: Add os-prober. Resent-Message-ID: Received: from eggs.gnu.org ([2001:4830:134:3::10]:57387) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dmlqu-0001uf-RY for guix-patches@gnu.org; Tue, 29 Aug 2017 15:07:10 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dmlqq-0000WP-JC for guix-patches@gnu.org; Tue, 29 Aug 2017 15:07:08 -0400 Received: from o125.p8.mailjet.com ([87.253.233.125]:40075) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1dmlqq-0000W3-71 for guix-patches@gnu.org; Tue, 29 Aug 2017 15:07:04 -0400 Message-Id: From: Arun Isaac Date: Wed, 30 Aug 2017 00:36:28 +0530 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+kyle=kyleam.com@gnu.org Sender: "Guix-patches" To: 28281@debbugs.gnu.org * gnu/packages/bootloaders.scm (os-prober): New variable. --- gnu/packages/bootloaders.scm | 66 ++++++++++++++++++++++++++++++++++++++++= ++++ 1 file changed, 66 insertions(+) diff --git a/gnu/packages/bootloaders.scm b/gnu/packages/bootloaders.scm index f66d0bb3f..57d284be6 100644 --- a/gnu/packages/bootloaders.scm +++ b/gnu/packages/bootloaders.scm @@ -395,3 +395,69 @@ also initializes the boards (RAM etc).") =20 (define-public u-boot-odroid-c2 (make-u-boot-package "odroid-c2" "aarch64-linux-gnu")) + +(define-public os-prober + (package + (name "os-prober") + (version "1.76") + (source + (origin + (method url-fetch) + (uri (string-append "mirror://debian/pool/main/o/os-prober/os-probe= r_" + version ".tar.xz")) + (sha256 + (base32 + "1vb45i76bqivlghrq7m3n07qfmmq4wxrkplqx8gywj011rhq19fk")))) + (build-system gnu-build-system) + (arguments + `(#:modules ((guix build gnu-build-system) + (guix build utils) + (ice-9 ftw) ; for ftw + (ice-9 regex) ; for string-match + (srfi srfi-2) ; for and-let* + (srfi srfi-26)) ; for cut + #:make-flags (list "CC=3Dgcc") + #:tests? #f ; no tests + #:phases + (modify-phases %standard-phases + (replace 'configure + (lambda* (#:key outputs #:allow-other-keys) + (substitute* (find-files ".") + (("/usr") (assoc-ref outputs "out"))) + (substitute* (find-files "." "50mounted-tests$") + (("mkdir") "mkdir -p")) + #t)) + (replace 'install + (lambda* (#:key outputs #:allow-other-keys) + (let* ((out (assoc-ref outputs "out")) + (bin (string-append out "/bin")) + (lib (string-append out "/lib")) + (share (string-append out "/share"))) + (for-each (cut install-file <> bin) + (list "linux-boot-prober" "os-prober")) + (install-file "newns" (string-append lib "/os-prober")) + (install-file "common.sh" (string-append share "/os-prober"= )) + (install-file "os-probes/mounted/powerpc/20macosx" + (string-append lib "/os-probes/mounted")) + (for-each + (lambda (directory) + (ftw directory + (lambda (file stat flag) + (when (eq? flag 'regular) + (and-let* ((result (or (string-match "/common/"= file) + (string-match "/x86/" fi= le)))) + (install-file + file (dirname + (string-append + lib "/" (substring file 0 (match:star= t result 0)) + (substring file (1- (match:end result= 0)))))))) + #t))) + (list "os-probes" "linux-boot-probes")) + #t)))))) + (home-page "https://joeyh.name/code/os-prober") + (synopsis "Detect other operating systems") + (description "os-prober probes disks on the system for other operating +systems so that they can be added to the bootloader. It also works out ho= w to +boot existing GNU/Linux systems and detects what distribution is installed= in +order to add a suitable bootloader menu entry.") + (license license:gpl2+))) --=20 2.13.4 =