summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnderson Torres <anderson.torres.8519@gmail.com>2026-03-25 09:13:22 -0300
committerVagrant Cascadian <vagrant@debian.org>2026-05-26 15:56:32 -0700
commit63e7c1b4ede96b5ef8dd1d9db9ce1528b67fa1dc (patch)
tree988934cc5a1c59b2accc39badcbecb93f9526eab
parentcf1c24736e15aeccc21909c1f9500471f168f882 (diff)
gnu: os-prober: Cleanup.
* gnu/packages/bootloaders.scm (os-prober): Cleanup. [arguments]: Use gexps. [home-page]: Fix redirect. Change-Id: I81d0112b198f2176768be58fac220e87f8921310 Signed-off-by: Vagrant Cascadian <vagrant@debian.org>
-rw-r--r--gnu/packages/bootloaders.scm95
1 files changed, 49 insertions, 46 deletions
diff --git a/gnu/packages/bootloaders.scm b/gnu/packages/bootloaders.scm
index 44695ea94b6..9903fff4461 100644
--- a/gnu/packages/bootloaders.scm
+++ b/gnu/packages/bootloaders.scm
@@ -1825,53 +1825,56 @@ For more information, refer to
1825 (base32 "10w8jz6mqhp0skdcam9mpgv79vx1sv7lkpra3rqjg0jkhvn2in9g")))) 1825 (base32 "10w8jz6mqhp0skdcam9mpgv79vx1sv7lkpra3rqjg0jkhvn2in9g"))))
1826 (build-system gnu-build-system) 1826 (build-system gnu-build-system)
1827 (arguments 1827 (arguments
1828 `(#:modules ((guix build gnu-build-system) 1828 (list
1829 #:tests? #f ; No tests.
1830 #:modules '((guix build gnu-build-system)
1829 (guix build utils) 1831 (guix build utils)
1830 (ice-9 regex) ; for string-match 1832 (ice-9 regex) ; string-match
1831 (srfi srfi-26)) ; for cut 1833 (srfi srfi-26)) ; cut
1832 #:make-flags 1834 #:make-flags
1833 (list ,(string-append "CC=" (cc-for-target))) 1835 #~(list (string-append "CC=" #$(cc-for-target)))
1834 #:tests? #f ; no tests 1836 #:phases
1835 #:phases 1837 #~(modify-phases %standard-phases
1836 (modify-phases %standard-phases 1838 (replace 'configure
1837 (replace 'configure 1839 (lambda _
1838 (lambda* (#:key outputs #:allow-other-keys) 1840 (substitute* (find-files ".")
1839 (substitute* (find-files ".") 1841 (("/usr") #$output))
1840 (("/usr") (assoc-ref outputs "out"))) 1842 (substitute* (find-files "." "50mounted-tests$")
1841 (substitute* (find-files "." "50mounted-tests$") 1843 (("mkdir") "mkdir -p -v"))))
1842 (("mkdir") "mkdir -p")))) 1844 (replace 'install
1843 (replace 'install 1845 (lambda _
1844 (lambda* (#:key outputs #:allow-other-keys) 1846 (define (find-files-non-recursive directory)
1845 (define (find-files-non-recursive directory) 1847 (find-files directory
1846 (find-files directory 1848 (lambda (file stat)
1847 (lambda (file stat) 1849 (string-match (string-append "^" directory "/[^/]*$")
1848 (string-match (string-append "^" directory "/[^/]*$") 1850 file))
1849 file)) 1851 #:directories? #t))
1850 #:directories? #t)) 1852
1851 1853 (let ((bin (string-append #$output "/bin"))
1852 (let* ((out (assoc-ref outputs "out")) 1854 (lib (string-append #$output "/lib"))
1853 (bin (string-append out "/bin")) 1855 (share (string-append #$output "/share")))
1854 (lib (string-append out "/lib")) 1856 (for-each (cut install-file <> bin)
1855 (share (string-append out "/share"))) 1857 (list "linux-boot-prober" "os-prober"))
1856 (for-each (cut install-file <> bin) 1858 (install-file "newns" (string-append lib "/os-prober"))
1857 (list "linux-boot-prober" "os-prober")) 1859 (install-file "common.sh" (string-append share "/os-prober"))
1858 (install-file "newns" (string-append lib "/os-prober")) 1860 (install-file "os-probes/mounted/powerpc/20macosx"
1859 (install-file "common.sh" (string-append share "/os-prober")) 1861 (string-append lib "/os-probes/mounted"))
1860 (install-file "os-probes/mounted/powerpc/20macosx" 1862 (for-each
1861 (string-append lib "/os-probes/mounted")) 1863 (lambda (directory)
1862 (for-each 1864 (for-each
1863 (lambda (directory) 1865 (lambda (file)
1864 (for-each 1866 (let ((destination (string-append lib "/" directory
1865 (lambda (file) 1867 "/" (basename file))))
1866 (let ((destination (string-append lib "/" directory 1868 (mkdir-p (dirname destination))
1867 "/" (basename file)))) 1869 (copy-recursively file destination)))
1868 (mkdir-p (dirname destination)) 1870 (append (find-files-non-recursive (string-append directory "/common"))
1869 (copy-recursively file destination))) 1871 (find-files-non-recursive (string-append directory "/x86")))))
1870 (append (find-files-non-recursive (string-append directory "/common")) 1872 (list "linux-boot-probes"
1871 (find-files-non-recursive (string-append directory "/x86"))))) 1873 "linux-boot-probes/mounted"
1872 (list "os-probes" "os-probes/mounted" "os-probes/init" 1874 "os-probes"
1873 "linux-boot-probes" "linux-boot-probes/mounted")))))))) 1875 "os-probes/init"
1874 (home-page "https://joeyh.name/code/os-prober") 1876 "os-probes/mounted"))))))))
1877 (home-page "https://joeyh.name/code/os-prober/")
1875 (synopsis "Detect other operating systems") 1878 (synopsis "Detect other operating systems")
1876 (description "os-prober probes disks on the system for other operating 1879 (description "os-prober probes disks on the system for other operating
1877systems so that they can be added to the bootloader. It also works out how to 1880systems so that they can be added to the bootloader. It also works out how to