summaryrefslogtreecommitdiff
path: root/guix/packages.scm
diff options
context:
space:
mode:
authorCarl Dong <contact@carldong.me>2020-04-06 14:02:42 -0400
committerCarl Dong <contact@carldong.me>2020-04-06 14:02:42 -0400
commitb066c25026f21fb57677aa34692a5034338e7ee3 (patch)
tree4a18f968187207c0eb61880f1c2bc1f533421205 /guix/packages.scm
parent8a4608b4bf4f13766b4e3d11577c61f398034544 (diff)
gnu: Move PACKAGES-WITH-*PATCHES to (guix packages)
* gnu/packages/cross-base.scm (package-with-extra-patches, package-with-patches): Move procedures from here... * guix/packages.scm (package-with-extra-patches, package-with-patches): ...to here, and export.
Diffstat (limited to 'guix/packages.scm')
-rw-r--r--guix/packages.scm14
1 files changed, 14 insertions, 0 deletions
diff --git a/guix/packages.scm b/guix/packages.scm
index 04d9b7824c..6c6a06e0ce 100644
--- a/guix/packages.scm
+++ b/guix/packages.scm
@@ -111,6 +111,8 @@
package-output
package-grafts
package-patched-vulnerabilities
+ package-with-patches
+ package-with-extra-patches
package/inherit
transitive-input-references
@@ -654,6 +656,18 @@ specifies modules in scope when evaluating SNIPPET."
#:properties `((type . origin)
(patches . ,(length patches)))))))
+(define (package-with-patches original patches)
+ "Return package ORIGINAL with PATCHES applied."
+ (package (inherit original)
+ (source (origin (inherit (package-source original))
+ (patches patches)))))
+
+(define (package-with-extra-patches original patches)
+ "Return package ORIGINAL with all PATCHES appended to its list of patches."
+ (package-with-patches original
+ (append (origin-patches (package-source original))
+ patches)))
+
(define (transitive-inputs inputs)
"Return the closure of INPUTS when considering the 'propagated-inputs'
edges. Omit duplicate inputs, except for those already present in INPUTS