diff options
author | Marius Bakke <mbakke@fastmail.com> | 2020-01-29 11:12:49 +0100 |
---|---|---|
committer | Marius Bakke <mbakke@fastmail.com> | 2020-01-29 11:12:49 +0100 |
commit | 0895002f68a51de2c237e1fe83ec6e4ffc980eff (patch) | |
tree | 34b1dbfafef2e98892c793c2001f028d1e88efd0 /guix | |
parent | 333d15790caec5c6782c3889a29b6f91d40ac42d (diff) | |
parent | 602059e794182a035f3919c3eb88d7d2085e24df (diff) |
Merge branch 'master' into staging
Diffstat (limited to 'guix')
-rw-r--r-- | guix/build-system/ocaml.scm | 20 | ||||
-rw-r--r-- | guix/build/cargo-build-system.scm | 6 | ||||
-rw-r--r-- | guix/licenses.scm | 2 |
3 files changed, 22 insertions, 6 deletions
diff --git a/guix/build-system/ocaml.scm b/guix/build-system/ocaml.scm index de3e71a5aa..c5996bf0cf 100644 --- a/guix/build-system/ocaml.scm +++ b/guix/build-system/ocaml.scm @@ -92,7 +92,11 @@ (let ((module (resolve-interface '(gnu packages ocaml)))) (module-ref module 'ocaml4.07-findlib))) -(define* (package-with-explicit-ocaml ocaml findlib old-prefix new-prefix +(define (default-ocaml4.07-dune) + (let ((module (resolve-interface '(gnu packages ocaml)))) + (module-ref module 'ocaml4.07-dune))) + +(define* (package-with-explicit-ocaml ocaml findlib dune old-prefix new-prefix #:key variant-property) "Return a procedure of one argument, P. The procedure creates a package with the same fields as P, which is assumed to use OCAML-BUILD-SYSTEM, such @@ -100,6 +104,10 @@ that it is compiled with OCAML and FINDLIB instead. The inputs are changed recursively accordingly. If the name of P starts with OLD-PREFIX, this is replaced by NEW-PREFIX; otherwise, NEW-PREFIX is prepended to the name. +When the package uses the DUNE-BUILD-SYSTEM, the procedure creates a package +with the same fields as P, such that it is compiled with OCAML, FINDLIB and DUNE +instead. + When VARIANT-PROPERTY is present, it is used as a key to search for pre-defined variants of this transformation recorded in the 'properties' field of packages. The property value must be the promise of a package. This is a @@ -132,10 +140,15 @@ pre-defined variants." name)))) (arguments (let ((ocaml (if (promise? ocaml) (force ocaml) ocaml)) - (findlib (if (promise? findlib) (force findlib) findlib))) + (findlib (if (promise? findlib) (force findlib) findlib)) + (dune (if (promise? dune) (force dune) dune))) (ensure-keyword-arguments (package-arguments p) `(#:ocaml ,ocaml - #:findlib ,findlib)))))) + #:findlib ,findlib + ,@(if (eq? (package-build-system p) + (default-dune-build-system)) + `(#:dune ,dune) + '()))))))) (else p))) (define (cut? p) @@ -148,6 +161,7 @@ pre-defined variants." (define package-with-ocaml4.07 (package-with-explicit-ocaml (delay (default-ocaml4.07)) (delay (default-ocaml4.07-findlib)) + (delay (default-ocaml4.07-dune)) "ocaml-" "ocaml4.07-" #:variant-property 'ocaml4.07-variant)) diff --git a/guix/build/cargo-build-system.scm b/guix/build/cargo-build-system.scm index 8a8d74ee1b..0721989589 100644 --- a/guix/build/cargo-build-system.scm +++ b/guix/build/cargo-build-system.scm @@ -2,7 +2,7 @@ ;;; Copyright © 2016 David Craven <david@craven.ch> ;;; Copyright © 2017 Mathieu Othacehe <m.othacehe@gmail.com> ;;; Copyright © 2019 Ivan Petkov <ivanppetkov@gmail.com> -;;; Copyright © 2019 Efraim Flashner <efraim@flashner.co.il> +;;; Copyright © 2019, 2020 Efraim Flashner <efraim@flashner.co.il> ;;; ;;; This file is part of GNU Guix. ;;; @@ -58,7 +58,7 @@ (define (crate-src? path) "Check if PATH refers to a crate source, namely a gzipped tarball with a Cargo.toml file present at its root." - (and (gzip-file? path) + (and (not (directory-exists? path)) ; not a tarball ;; First we print out all file names within the tarball to see if it ;; looks like the source of a crate. However, the tarball will include ;; an extra path component which we would like to ignore (since we're @@ -119,6 +119,8 @@ directory = '" port) ;; upgrading the compiler for example. (setenv "RUSTFLAGS" "--cap-lints allow") (setenv "CC" (string-append (assoc-ref inputs "gcc") "/bin/gcc")) + (setenv "LIBGIT2_SYS_USE_PKG_CONFIG" "1") + (setenv "LIBSSH2_SYS_USE_PKG_CONFIG" "1") ;; We don't use the Cargo.lock file to determine the package versions we use ;; during building, and in any case if one is not present it is created diff --git a/guix/licenses.scm b/guix/licenses.scm index 41d4fefad2..a44a5bac0d 100644 --- a/guix/licenses.scm +++ b/guix/licenses.scm @@ -286,7 +286,7 @@ at URI, which may be a file:// URI pointing the package's tree." (define giftware (license "Giftware" - "http://liballeg.org/license.html" + "https://liballeg.org/license.html" "The Allegro 4 license")) (define gpl1 |