From aa46a028c4ff46e3f2e6866921866d2ed6373ba3 Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Wed, 15 Apr 2015 22:44:51 +0200 Subject: profiles: Generalize "hooks" for 'profile-derivation'. * guix/profiles.scm (info-dir-file): Remove (null? (manifest-entries manifest)) test. (ca-certificate-bundle): Likewise. (ghc-package-cache-file): Turn 'if' into 'and', and remove second arm. (%default-profile-hooks): New variable. (profile-derivation): Remove #:info-dir?, #:ghc-package-cache?, and #:ca-certificate-bundle?. Add #:hooks. Iterate over HOOKS. Adjust 'inputs' accordingly. * guix/scripts/package.scm (guix-package): Adjust 'profile-derivation' call accordingly. * tests/packages.scm ("--search-paths with pattern"): Likewise. * tests/profiles.scm ("profile-derivation", "profile-derivation, inputs"): Likewise. --- tests/packages.scm | 4 +--- tests/profiles.scm | 8 ++------ 2 files changed, 3 insertions(+), 9 deletions(-) (limited to 'tests') diff --git a/tests/packages.scm b/tests/packages.scm index 4e3a116cb8..d7c169a585 100644 --- a/tests/packages.scm +++ b/tests/packages.scm @@ -599,9 +599,7 @@ (profile-derivation (manifest (map package->manifest-entry (list p1 p2))) - #:info-dir? #f - #:ghc-package-cache? #f - #:ca-certificate-bundle? #f) + #:hooks '()) #:guile-for-build (%guile-for-build)))) (build-derivations %store (list prof)) (string-match (format #f "^export XML_CATALOG_FILES=\"~a/xml/+bar/baz/catalog\\.xml\"\n" diff --git a/tests/profiles.scm b/tests/profiles.scm index d20cb9d808..54fbaea864 100644 --- a/tests/profiles.scm +++ b/tests/profiles.scm @@ -183,9 +183,7 @@ ((entry -> (package->manifest-entry %bootstrap-guile)) (guile (package->derivation %bootstrap-guile)) (drv (profile-derivation (manifest (list entry)) - #:info-dir? #f - #:ghc-package-cache? #f - #:ca-certificate-bundle? #f)) + #:hooks '())) (profile -> (derivation->output-path drv)) (bindir -> (string-append profile "/bin")) (_ (built-derivations (list drv)))) @@ -197,9 +195,7 @@ (mlet* %store-monad ((entry -> (package->manifest-entry packages:glibc "debug")) (drv (profile-derivation (manifest (list entry)) - #:info-dir? #f - #:ghc-package-cache? #f - #:ca-certificate-bundle? #f))) + #:hooks '()))) (return (derivation-inputs drv)))) (test-end "profiles") -- cgit v1.2.3