aboutsummaryrefslogtreecommitdiff
path: root/gnu/packages/debian.scm
diff options
context:
space:
mode:
authorEfraim Flashner <efraim@flashner.co.il>2022-05-23 18:18:46 +0300
committerEfraim Flashner <efraim@flashner.co.il>2022-05-23 21:59:49 +0300
commitd660d3f337e77850d40c0ee84930e3ee4c847017 (patch)
treeead72a3e3d14656a7ece4dd227ec04c8b2c229ae /gnu/packages/debian.scm
parent83fd96ed389801baa16d6e995499d86ef34f87d5 (diff)
downloadguix-d660d3f337e77850d40c0ee84930e3ee4c847017.tar
guix-d660d3f337e77850d40c0ee84930e3ee4c847017.tar.gz
gnu: debootstrap: Rewrite using new style.
* gnu/packages/debian.scm (debootstrap)[arguments]: Rewrite using g-exps. [inputs]: Remove input labels.
Diffstat (limited to 'gnu/packages/debian.scm')
-rw-r--r--gnu/packages/debian.scm104
1 files changed, 51 insertions, 53 deletions
diff --git a/gnu/packages/debian.scm b/gnu/packages/debian.scm
index 22f51d2db6..615367baa3 100644
--- a/gnu/packages/debian.scm
+++ b/gnu/packages/debian.scm
@@ -22,6 +22,7 @@
#:use-module ((guix licenses) #:prefix license:)
#:use-module (guix download)
#:use-module (guix git-download)
+ #:use-module (guix gexp)
#:use-module (guix packages)
#:use-module (guix build-system gnu)
#:use-module (guix build-system trivial)
@@ -201,62 +202,59 @@ contains the archive keys used for that.")
(base32 "0hfx6k86kby4xf0xqskpllq00g159j4khh66hfi6dhcdb91dgyd7"))))
(build-system gnu-build-system)
(arguments
- `(#:phases
- (modify-phases %standard-phases
- (delete 'configure)
- (add-after 'unpack 'patch-source
- (lambda* (#:key inputs outputs #:allow-other-keys)
- (let ((out (assoc-ref outputs "out"))
- (tzdata (assoc-ref inputs "tzdata"))
- (dpkg (assoc-ref inputs "dpkg"))
- (debian (assoc-ref inputs "debian-keyring"))
- (ubuntu (assoc-ref inputs "ubuntu-keyring")))
- (substitute* "Makefile"
- (("/usr") "")
- (("-o root -g root") "")
- (("chown root.*") "\n"))
- (substitute* '("scripts/etch"
- "scripts/potato"
- "scripts/sarge"
- "scripts/sid"
- "scripts/woody"
- "scripts/woody.buildd")
- (("/usr") debian))
- (substitute* "scripts/gutsy"
- (("/usr") ubuntu))
- (substitute* "debootstrap"
- (("=/usr") (string-append "=" out))
- (("/usr/bin/dpkg") (string-append dpkg "/bin/dpkg")))
- ;; Ensure PATH works both in guix and within the debian chroot
- ;; workaround for: https://bugs.debian.org/929889
- (substitute* "functions"
- (("PATH=/sbin:/usr/sbin:/bin:/usr/bin")
- "PATH=$PATH:/sbin:/usr/sbin:/bin:/usr/bin"))
- (substitute* (find-files "scripts" ".")
- (("/usr/share/zoneinfo") (string-append tzdata "/share/zoneinfo"))))))
- (add-after 'install 'install-man-file
- (lambda* (#:key outputs #:allow-other-keys)
- (let ((out (assoc-ref outputs "out")))
+ (list
+ #:phases
+ #~(modify-phases %standard-phases
+ (delete 'configure)
+ (add-after 'unpack 'patch-source
+ (lambda* (#:key inputs outputs #:allow-other-keys)
+ (let ((debian #$(this-package-input "debian-archive-keyring"))
+ (ubuntu #$(this-package-input "ubuntu-keyring")))
+ (substitute* "Makefile"
+ (("/usr") "")
+ (("-o root -g root") "")
+ (("chown root.*") "\n"))
+ (substitute* '("scripts/etch"
+ "scripts/potato"
+ "scripts/sarge"
+ "scripts/sid"
+ "scripts/woody"
+ "scripts/woody.buildd")
+ (("/usr") debian))
+ (substitute* "scripts/gutsy"
+ (("/usr") ubuntu))
+ (substitute* "debootstrap"
+ (("=/usr") (string-append "=" #$output))
+ (("/usr/bin/dpkg") (search-input-file inputs "/bin/dpkg")))
+ ;; Ensure PATH works both in guix and within the debian chroot
+ ;; workaround for: https://bugs.debian.org/929889
+ (substitute* "functions"
+ (("PATH=/sbin:/usr/sbin:/bin:/usr/bin")
+ "PATH=$PATH:/sbin:/usr/sbin:/bin:/usr/bin"))
+ (substitute* (find-files "scripts")
+ (("/usr/share/zoneinfo")
+ (search-input-directory inputs "/share/zoneinfo"))))))
+ (add-after 'install 'install-man-file
+ (lambda* (#:key outputs #:allow-other-keys)
(install-file "debootstrap.8"
- (string-append out "/share/man/man8")))))
- (add-after 'install 'wrap-executable
- (lambda* (#:key outputs #:allow-other-keys)
- (let ((debootstrap (string-append (assoc-ref outputs "out")
- "/sbin/debootstrap"))
- (path (getenv "PATH")))
- (wrap-program debootstrap
- `("PATH" ":" prefix (,path)))))))
- #:make-flags (list (string-append "DESTDIR=" (assoc-ref %outputs "out")))
- #:tests? #f)) ; no tests
+ (string-append #$output "/share/man/man8"))))
+ (add-after 'install 'wrap-executable
+ (lambda* (#:key outputs #:allow-other-keys)
+ (let ((debootstrap (string-append #$output "/sbin/debootstrap"))
+ (path (getenv "PATH")))
+ (wrap-program debootstrap
+ `("PATH" ":" prefix (,path)))))))
+ #:make-flags #~(list (string-append "DESTDIR=" #$output))
+ #:tests? #f)) ; no tests
(inputs
- `(("debian-keyring" ,debian-archive-keyring)
- ("ubuntu-keyring" ,ubuntu-keyring)
- ("dpkg" ,dpkg)
- ("tzdata" ,tzdata)
+ (list debian-archive-keyring
+ ubuntu-keyring
+ dpkg
+ tzdata
- ;; Called at run-time from various places, needs to be in PATH.
- ("gnupg" ,gnupg)
- ("wget" ,wget)))
+ ;; Called at run-time from various places, needs to be in PATH.
+ gnupg
+ wget))
(native-inputs
(list perl))
(home-page "https://tracker.debian.org/pkg/debootstrap")