;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2012, 2013, 2014, 2015, 2017, 2018, 2019 Ludovic Courtès ;;; Copyright © 2018 Jan (janneke) Nieuwenhuizen ;;; ;;; This file is part of GNU Guix. ;;; ;;; GNU Guix is free software; you can redistribute it and/or modify it ;;; under the terms of the GNU General Public License as published by ;;; the Free Software Foundation; either version 3 of the License, or (at ;;; your option) any later version. ;;; ;;; GNU Guix is distributed in the hope that it will be useful, but ;;; WITHOUT ANY WARRANTY; without even the implied warranty of ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ;;; GNU General Public License for more details. ;;; ;;; You should have received a copy of the GNU General Public License ;;; along with GNU Guix. If not, see . (define-module (test-union) #:use-module (guix tests) #:use-module (guix store) #:use-module (guix utils) #:use-module (guix derivations) #:use-module (guix packages) #:use-
aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTobias Geerinckx-Rice <me@tobias.gr>2019-04-08 12:41:23 +0200
committerTobias Geerinckx-Rice <me@tobias.gr>2019-04-10 20:53:56 +0200
commit0fe4601516c878dfd3b40f796f85a4038f086637 (patch)
tree90914762de68892ebf267964c1278e3969e0fce6 /gnu/tests/networking.scm
parent3e4e74c10ec1bf57ffcaed987b75127382908697 (diff)
downloadguix-0fe4601516c878dfd3b40f796f85a4038f086637.tar.gz
guix-0fe4601516c878dfd3b40f796f85a4038f086637.zip
gnu: emacs-js2-mode: Don't use unstable tarball.
* gnu/packages/emacs-xyz.scm (emacs-js2-mode)[source]: Use GIT-FETCH and GIT-FILE-NAME.
Diffstat (limited to 'gnu/tests/networking.scm')
0 files changed, 0 insertions, 0 deletions
(lambda (policy) `(begin (use-modules (guix build union) (srfi srfi-1)) (union-build (assoc-ref %outputs "out") (map cdr %build-inputs) #:resolve-collision ,policy)))) (drv1 (build-expression->derivation %store "union-first" (builder 'first) #:inputs `(("guile" ,guile) ("fake" ,fake)) #:modules '((guix build union)))) (drv2 (build-expression->derivation %store "union-last" (builder 'last) #:inputs `(("guile" ,guile) ("fake" ,fake)) #:modules '((guix build union))))) (and (build-derivations %store (list drv1 drv2)) (with-directory-excursion (derivation->output-path drv1) (string=? (readlink "bin/guile") (string-append (derivation->output-path guile) "/bin/guile"))) (with-directory-excursion (derivation->output-path drv2) (string=? (readlink "bin/guile") (string-append (derivation->output-path fake) "/bin/guile")))))) (test-assert "union-build #:create-all-directories? #t" (let* ((build `(begin (use-modules (guix build union)) (union-build (assoc-ref %outputs "out") (map cdr %build-inputs) #:create-all-directories? #t))) (input (package-derivation %store %bootstrap-guile)) (drv (build-expression->derivation %store "union-test-all-dirs" build #:modules '((guix build union)) #:inputs `(("g" ,input))))) (and (build-derivations %store (list drv)) (with-directory-excursion (derivation->output-path drv) ;; Even though there's only one input to the union, ;; #:create-all-directories? #t must have created bin/ rather than ;; making it a symlink to Guile's bin/. (and (file-exists? "bin/guile") (file-is-directory? "bin") (eq? 'symlink (stat:type (lstat "bin/guile")))))))) (letrec-syntax ((test-relative-file-name (syntax-rules (=>) ((_ (reference file => expected) rest ...) (begin (test-equal (string-append "relative-file-name " reference " " file) expected (relative-file-name reference file)) (test-relative-file-name rest ...))) ((_) #t)))) (test-relative-file-name ("/a/b" "/a/c/d" => "../c/d") ("/a/b" "/a/b" => "") ("/a/b" "/a" => "..") ("/a/b" "/a/b/c/d" => "c/d") ("/a/b/c" "/a/d/e/f" => "../../d/e/f"))) (test-end)