mirror of
https://codeberg.org/guix/guix.git
synced 2025-10-02 02:15:12 +00:00
packages: Add 'package-with-c-toolchain'.
* guix/build-system.scm (build-system-with-c-toolchain): New procedure. * guix/packages.scm (package-with-c-toolchain): New procedure. * tests/packages.scm ("package-with-c-toolchain"): New test. * doc/guix.texi (package Reference): Document 'package-with-c-toolchain'. (Build Systems): Mention it.
This commit is contained in:
parent
b668450716
commit
46135ce4ce
4 changed files with 94 additions and 2 deletions
|
@ -1430,6 +1430,26 @@
|
|||
(derivation-file-name
|
||||
(package-derivation %store coreutils))))))))
|
||||
|
||||
(test-assert "package-with-c-toolchain"
|
||||
(let* ((dep (dummy-package "chbouib"
|
||||
(build-system gnu-build-system)
|
||||
(native-inputs `(("x" ,grep)))))
|
||||
(p0 (dummy-package "thingie"
|
||||
(build-system gnu-build-system)
|
||||
(inputs `(("foo" ,grep)
|
||||
("bar" ,dep)))))
|
||||
(tc (dummy-package "my-toolchain"))
|
||||
(p1 (package-with-c-toolchain p0 `(("toolchain" ,tc)))))
|
||||
(define toolchain-packages
|
||||
'("gcc" "binutils" "glibc" "ld-wrapper"))
|
||||
|
||||
(match (bag-build-inputs (package->bag p1))
|
||||
((("foo" foo) ("bar" bar) (_ (= package-name packages) . _) ...)
|
||||
(and (not (any (cut member <> packages) toolchain-packages))
|
||||
(member "my-toolchain" packages)
|
||||
(eq? foo grep)
|
||||
(eq? bar dep))))))
|
||||
|
||||
(test-equal "package-patched-vulnerabilities"
|
||||
'(("CVE-2015-1234")
|
||||
("CVE-2016-1234" "CVE-2018-4567")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue