From 1e8da4cdefb089ac7d2453d71f72924540238d87 Mon Sep 17 00:00:00 2001 From: Julien Lepiller Date: Thu, 23 Jan 2020 03:24:01 +0100 Subject: guix: ocaml: Also replace dune when relevant in package-with-explicit-ocaml. * guix/build-system/ocaml.scm (package-with-explicit-ocaml): Take a dune argument and add it to transformed packages when relevant. --- guix/build-system/ocaml.scm | 20 +++++++++++++++++--- 1 file changed, 17 insertions(+), 3 deletions(-) (limited to 'guix') 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)) -- cgit v1.2.3 From a13db7e2ab05ee3ab9a42dd6a101130b8896fee0 Mon Sep 17 00:00:00 2001 From: Efraim Flashner Date: Sat, 25 Jan 2020 21:39:04 +0200 Subject: build: cargo-build-system: Allow patched crates. * guix/build/cargo-build-system.scm (crate-src?): Don't check for a gzipped tarball, just make sure it's not a directory. --- guix/build/cargo-build-system.scm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'guix') diff --git a/guix/build/cargo-build-system.scm b/guix/build/cargo-build-system.scm index 8a8d74ee1b..78c27a29e4 100644 --- a/guix/build/cargo-build-system.scm +++ b/guix/build/cargo-build-system.scm @@ -2,7 +2,7 @@ ;;; Copyright © 2016 David Craven ;;; Copyright © 2017 Mathieu Othacehe ;;; Copyright © 2019 Ivan Petkov -;;; Copyright © 2019 Efraim Flashner +;;; Copyright © 2019, 2020 Efraim Flashner ;;; ;;; 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 -- cgit v1.2.3 From 61b95c15cfb2c9b0d02cf09f93c0df76be0972b5 Mon Sep 17 00:00:00 2001 From: Efraim Flashner Date: Mon, 27 Jan 2020 09:17:32 +0200 Subject: build: cargo-build-system: Add pkg-config environment variables. * guix/build/cargo-build-system.scm (configure): Add environment variables to use system libgit2 and libssh2. * gnu/packages/crates-io.scm (rust-libgit2-sys-0.10, rust-libssh2-sys-0.2)[arguments]: Remove LIBGIT2 and LIBSSH2 environment variable settings. * gnu/packages/rust-apps.scm (tokei)[arguments]: Same. --- gnu/packages/crates-io.scm | 3 --- gnu/packages/rust-apps.scm | 4 +--- guix/build/cargo-build-system.scm | 2 ++ 3 files changed, 3 insertions(+), 6 deletions(-) (limited to 'guix') diff --git a/gnu/packages/crates-io.scm b/gnu/packages/crates-io.scm index 1099a25d87..a5f224f99e 100644 --- a/gnu/packages/crates-io.scm +++ b/gnu/packages/crates-io.scm @@ -5626,8 +5626,6 @@ values of all the exported APIs match the platform that libc is compiled for.") (lambda* (#:key inputs #:allow-other-keys) (let ((openssl (assoc-ref inputs "openssl"))) (setenv "OPENSSL_DIR" openssl)) - (setenv "LIBGIT2_SYS_USE_PKG_CONFIG" "1") - (setenv "LIBSSH2_SYS_USE_PKG_CONFIG" "1") #t))))) (native-inputs `(("libgit2" ,libgit2) @@ -5734,7 +5732,6 @@ functions and static variables these libraries contain.") (lambda* (#:key inputs #:allow-other-keys) (let ((openssl (assoc-ref inputs "openssl"))) (setenv "OPENSSL_DIR" openssl)) - (setenv "LIBSSH2_SYS_USE_PKG_CONFIG" "1") #t))))) (native-inputs `(("libssh2" ,libssh2) diff --git a/gnu/packages/rust-apps.scm b/gnu/packages/rust-apps.scm index d9a672f777..90bd146442 100644 --- a/gnu/packages/rust-apps.scm +++ b/gnu/packages/rust-apps.scm @@ -143,9 +143,7 @@ gitignore rules.") (add-after 'configure 'unvendor-libraries-from-crates (lambda* (#:key inputs #:allow-other-keys) (let ((openssl (assoc-ref inputs "openssl"))) - (setenv "OPENSSL_DIR" openssl) - (setenv "LIBGIT2_SYS_USE_PKG_CONFIG" "1") - (setenv "LIBSSH2_SYS_USE_PKG_CONFIG" "1")) + (setenv "OPENSSL_DIR" openssl)) #t))))) (native-inputs `(("libgit2" ,libgit2) diff --git a/guix/build/cargo-build-system.scm b/guix/build/cargo-build-system.scm index 78c27a29e4..0721989589 100644 --- a/guix/build/cargo-build-system.scm +++ b/guix/build/cargo-build-system.scm @@ -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 -- cgit v1.2.3 From 4968ea2c9279389d3b2f427dec29d07f1031784c Mon Sep 17 00:00:00 2001 From: Tobias Geerinckx-Rice Date: Fri, 17 Jan 2020 22:18:29 +0100 Subject: Use HTTPS for liballeg.org. * gnu/packages/game-development.scm (allegro-4, allegro)[home-page]: Use HTTPS. * guix/licenses.scm (giftware): Likewise. --- gnu/packages/game-development.scm | 4 ++-- guix/licenses.scm | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'guix') diff --git a/gnu/packages/game-development.scm b/gnu/packages/game-development.scm index 13006f3509..5160bcf2ea 100644 --- a/gnu/packages/game-development.scm +++ b/gnu/packages/game-development.scm @@ -723,7 +723,7 @@ package is the Nuklear bindings for LÖVE created by Kevin Harrison.") multimedia programming. It handles common, low-level tasks such as creating windows, accepting user input, loading data, drawing images, playing sounds, etc.") - (home-page "http://liballeg.org") + (home-page "https://liballeg.org") (license license:giftware))) (define-public allegro @@ -764,7 +764,7 @@ etc.") multimedia programming. It handles common, low-level tasks such as creating windows, accepting user input, loading data, drawing images, playing sounds, etc.") - (home-page "http://liballeg.org") + (home-page "https://liballeg.org") (license license:bsd-3))) (define-public allegro-5.0 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 -- cgit v1.2.3