Merge branch 'master' into core-updates

This commit is contained in:
Mark H Weaver 2015-06-21 14:30:22 -04:00
commit bf76d98789
17 changed files with 297 additions and 39 deletions

View File

@ -254,7 +254,8 @@ group - the argument.")
"Complete argument for guix COMMAND." "Complete argument for guix COMMAND."
(cond (cond
((member command ((member command
'("archive" "build" "environment" "lint" "refresh")) '("archive" "build" "edit" "environment" "lint" "refresh"
"size"))
(while t (while t
(pcomplete-here (guix-pcomplete-all-packages)))) (pcomplete-here (guix-pcomplete-all-packages))))
(t (pcomplete-here* (pcomplete-entries))))) (t (pcomplete-here* (pcomplete-entries)))))
@ -302,7 +303,7 @@ INPUT is the current partially completed string."
((option? "-m" "--manifest") ((option? "-m" "--manifest")
(complete* (pcomplete-entries))))) (complete* (pcomplete-entries)))))
((and (command? "archive" "build") ((and (command? "archive" "build" "size")
(option? "-s" "--system")) (option? "-s" "--system"))
(complete* guix-pcomplete-systems)) (complete* guix-pcomplete-systems))

View File

@ -394,6 +394,7 @@ dist_patch_DATA = \
gnu/packages/patches/calibre-no-updates-dialog.patch \ gnu/packages/patches/calibre-no-updates-dialog.patch \
gnu/packages/patches/cdparanoia-fpic.patch \ gnu/packages/patches/cdparanoia-fpic.patch \
gnu/packages/patches/chmlib-inttypes.patch \ gnu/packages/patches/chmlib-inttypes.patch \
gnu/packages/patches/clang-libc-search-path.patch \
gnu/packages/patches/clucene-pkgconfig.patch \ gnu/packages/patches/clucene-pkgconfig.patch \
gnu/packages/patches/cmake-fix-tests.patch \ gnu/packages/patches/cmake-fix-tests.patch \
gnu/packages/patches/coreutils-dummy-man.patch \ gnu/packages/patches/coreutils-dummy-man.patch \

View File

@ -286,16 +286,13 @@ run a file system check."
(when check? (when check?
(check-file-system source type)) (check-file-system source type))
(mkdir-p mount-point) (mkdir-p mount-point)
(mount source mount-point type flags (mount source mount-point type flags options)
(if options
(string->pointer options)
%null-pointer))
;; For read-only bind mounts, an extra remount is needed, as per ;; For read-only bind mounts, an extra remount is needed, as per
;; <http://lwn.net/Articles/281157/>, which still applies to Linux 4.0. ;; <http://lwn.net/Articles/281157/>, which still applies to Linux 4.0.
(when (and (= MS_BIND (logand flags MS_BIND)) (when (and (= MS_BIND (logand flags MS_BIND))
(= MS_RDONLY (logand flags MS_RDONLY))) (= MS_RDONLY (logand flags MS_RDONLY)))
(mount source mount-point type (logior MS_BIND MS_REMOUNT MS_RDONLY) (let ((flags (logior MS_BIND MS_REMOUNT MS_RDONLY)))
%null-pointer)))))) (mount source mount-point type flags #f)))))))
;;; file-systems.scm ends here ;;; file-systems.scm ends here

View File

@ -1034,6 +1034,33 @@ buffers, and audio capture.")
and ALSA.") and ALSA.")
(license license:gpl3+))) (license license:gpl3+)))
(define-public raul
(package
(name "raul")
(version "0.8.0")
(source (origin
(method url-fetch)
(uri (string-append "http://download.drobilla.net/raul-"
version ".tar.bz2"))
(sha256
(base32
"09ms40xc1x6qli6lxkwn5ibqh62nl9w7dq0b6jh1q2zvnrxwsd8b"))))
(build-system waf-build-system)
(arguments
`(#:python ,python-2
#:tests? #f)) ; no check target
(inputs
`(("glib" ,glib)
("boost" ,boost)))
(native-inputs
`(("pkg-config" ,pkg-config)))
(home-page "http://drobilla.net/software/raul/")
(synopsis "Real-time audio utility library")
(description
"Raul (Real-time Audio Utility Library) is a C++ utility library primarily
aimed at audio/musical applications.")
(license license:gpl2+)))
(define-public rubberband (define-public rubberband
(package (package
(name "rubberband") (name "rubberband")

View File

@ -780,6 +780,65 @@ analysis (from RNA-Seq), transcription factor binding quantification in
ChIP-Seq, and analysis of metagenomic data.") ChIP-Seq, and analysis of metagenomic data.")
(license license:artistic2.0))) (license license:artistic2.0)))
(define-public fasttree
(package
(name "fasttree")
(version "2.1.8")
(source (origin
(method url-fetch)
(uri (string-append
"http://www.microbesonline.org/fasttree/FastTree-"
version ".c"))
(sha256
(base32
"0dzqc9vr9iiiw21y159xfjl2z90vw0y7r4x6456pcaxiy5hd2wmi"))))
(build-system gnu-build-system)
(arguments
`(#:tests? #f ; no "check" target
#:phases
(modify-phases %standard-phases
(delete 'unpack)
(delete 'configure)
(replace 'build
(lambda* (#:key source #:allow-other-keys)
(and (zero? (system* "gcc"
"-O3"
"-finline-functions"
"-funroll-loops"
"-Wall"
"-o"
"FastTree"
source
"-lm"))
(zero? (system* "gcc"
"-DOPENMP"
"-fopenmp"
"-O3"
"-finline-functions"
"-funroll-loops"
"-Wall"
"-o"
"FastTreeMP"
source
"-lm")))))
(replace 'install
(lambda* (#:key outputs #:allow-other-keys)
(let ((bin (string-append (assoc-ref outputs "out")
"/bin")))
(mkdir-p bin)
(copy-file "FastTree"
(string-append bin "/FastTree"))
(copy-file "FastTreeMP"
(string-append bin "/FastTreeMP"))
#t))))))
(home-page "http://www.microbesonline.org/fasttree")
(synopsis "Infers approximately-maximum-likelihood phylogenetic trees")
(description
"FastTree can handle alignments with up to a million of sequences in a
reasonable amount of time and memory. For large alignments, FastTree is
100-1,000 times faster than PhyML 3.0 or RAxML 7.")
(license license:gpl2+)))
(define-public fastx-toolkit (define-public fastx-toolkit
(package (package
(name "fastx-toolkit") (name "fastx-toolkit")

View File

@ -518,6 +518,7 @@ exec ~a/bin/~a-~a -B~a/lib -Wl,-dynamic-linker -Wl,~a/~a \"$@\"~%"
(define libstdc++ (define libstdc++
;; Intermediate libstdc++ that will allow us to build the final GCC ;; Intermediate libstdc++ that will allow us to build the final GCC
;; (remember that GCC-BOOT0 cannot build libstdc++.) ;; (remember that GCC-BOOT0 cannot build libstdc++.)
;; TODO: Write in terms of 'make-libstdc++'.
(package-with-bootstrap-guile (package-with-bootstrap-guile
(package (inherit gcc-4.9) (package (inherit gcc-4.9)
(name "libstdc++") (name "libstdc++")

View File

@ -345,6 +345,32 @@ Go. It also includes runtime support libraries for these languages.")
'("gcc-arm-link-spec-fix.patch" '("gcc-arm-link-spec-fix.patch"
"gcc-5.0-libvtv-runpath.patch"))))))) "gcc-5.0-libvtv-runpath.patch")))))))
(define-public (make-libstdc++ gcc)
"Return a libstdc++ package based on GCC. The primary use case is when
using compilers other than GCC."
(package
(inherit gcc)
(name "libstdc++")
(arguments
`(#:out-of-source? #t
#:phases (alist-cons-before
'configure 'chdir
(lambda _
(chdir "libstdc++-v3"))
%standard-phases)
#:configure-flags `("--disable-libstdcxx-pch"
,(string-append "--with-gxx-include-dir="
(assoc-ref %outputs "out")
"/include"))))
(outputs '("out" "debug"))
(inputs '())
(native-inputs '())
(propagated-inputs '())
(synopsis "GNU C++ standard library")))
(define-public libstdc++-4.9
(make-libstdc++ gcc-4.9))
(define* (custom-gcc gcc name languages #:key (separate-lib-output? #t)) (define* (custom-gcc gcc name languages #:key (separate-lib-output? #t))
"Return a custom version of GCC that supports LANGUAGES." "Return a custom version of GCC that supports LANGUAGES."
(package (inherit gcc) (package (inherit gcc)

View File

@ -2402,15 +2402,17 @@ settings, themes, mouse settings, and startup of other daemons.")
(native-inputs (native-inputs
`(("intltool" ,intltool) `(("intltool" ,intltool)
("glib" ,glib "bin") ("glib" ,glib "bin")
("gobject-introspection" ,gobject-introspection)
("pkg-config" ,pkg-config))) ("pkg-config" ,pkg-config)))
(inputs (propagated-inputs
`(("glib" ,glib) `(("glib" ,glib)
("gmime" ,gmime) ("gmime" ,gmime)
("libarchive" ,libarchive) ("libxml2" ,libxml2)))
(inputs
`(("libarchive" ,libarchive)
("libgcrypt" ,libgcrypt) ("libgcrypt" ,libgcrypt)
("nettle" ,nettle) ("nettle" ,nettle)
("libsoup" ,libsoup) ("libsoup" ,libsoup)))
("libxml2" ,libxml2)))
(home-page "https://projects.gnome.org/totem") (home-page "https://projects.gnome.org/totem")
(synopsis "Library to parse and save media playlists for GNOME") (synopsis "Library to parse and save media playlists for GNOME")
(description "Totem-pl-parser is a GObjects-based library to parse and save (description "Totem-pl-parser is a GObjects-based library to parse and save

View File

@ -1,6 +1,7 @@
;;; GNU Guix --- Functional package management for GNU ;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2014 Eric Bavier <bavier@member.fsf.org> ;;; Copyright © 2014 Eric Bavier <bavier@member.fsf.org>
;;; Copyright © 2015 Mark H Weaver <mhw@netris.org> ;;; Copyright © 2015 Mark H Weaver <mhw@netris.org>
;;; Copyright © 2015 Ludovic Courtès <ludo@gnu.org>
;;; ;;;
;;; This file is part of GNU Guix. ;;; This file is part of GNU Guix.
;;; ;;;
@ -25,6 +26,8 @@
#:use-module (guix build-system gnu) #:use-module (guix build-system gnu)
#:use-module (guix build-system cmake) #:use-module (guix build-system cmake)
#:use-module (gnu packages) #:use-module (gnu packages)
#:use-module (gnu packages gcc)
#:use-module (gnu packages bootstrap) ;glibc-dynamic-linker
#:use-module (gnu packages perl) #:use-module (gnu packages perl)
#:use-module (gnu packages python) #:use-module (gnu packages python)
#:use-module (gnu packages xml)) #:use-module (gnu packages xml))
@ -84,7 +87,8 @@ tools as well as libraries with equivalent functionality.")
(method url-fetch) (method url-fetch)
(uri (string-append "http://llvm.org/releases/" (uri (string-append "http://llvm.org/releases/"
version "/cfe-" version ".src.tar.xz")) version "/cfe-" version ".src.tar.xz"))
(sha256 (base32 hash)))) (sha256 (base32 hash))
(patches (list (search-patch "clang-libc-search-path.patch")))))
;; Using cmake allows us to treat llvm as an external library. There ;; Using cmake allows us to treat llvm as an external library. There
;; doesn't seem to be any way to do this with clang's autotools-based ;; doesn't seem to be any way to do this with clang's autotools-based
;; build system. ;; build system.
@ -92,10 +96,53 @@ tools as well as libraries with equivalent functionality.")
(native-inputs (package-native-inputs llvm)) (native-inputs (package-native-inputs llvm))
(inputs (inputs
`(("libxml2" ,libxml2) `(("libxml2" ,libxml2)
("gcc-lib" ,gcc-4.9 "lib")
,@(package-inputs llvm))) ,@(package-inputs llvm)))
(propagated-inputs (propagated-inputs
`(("llvm" ,llvm))) `(("llvm" ,llvm)))
(arguments `(#:configure-flags '("-DCLANG_INCLUDE_TESTS=True"))) (arguments
`(#:configure-flags
(list "-DCLANG_INCLUDE_TESTS=True"
;; Find libgcc_s, crtbegin.o, and crtend.o.
(string-append "-DGCC_INSTALL_PREFIX="
(assoc-ref %build-inputs "gcc-lib"))
;; Use a sane default include directory.
(string-append "-DC_INCLUDE_DIRS="
(assoc-ref %build-inputs "libc")
"/include"))
;; Don't use '-g' during the build to save space.
#:build-type "Release"
#:phases (modify-phases %standard-phases
(add-after
'unpack 'set-glibc-file-names
(lambda* (#:key inputs #:allow-other-keys)
(let ((libc (assoc-ref inputs "libc")))
;; Patch the 'getLinuxDynamicLinker' function to that
;; it uses the right dynamic linker file name.
(substitute* "lib/Driver/Tools.cpp"
(("/lib64/ld-linux-x86-64.so.2")
(string-append libc
,(glibc-dynamic-linker))))
;; Same for libc's libdir, to allow crt1.o & co. to be
;; found.
(substitute* "lib/Driver/ToolChains.cpp"
(("@GLIBC_LIBDIR@")
(string-append libc "/lib")))))))))
;; Clang supports the same environment variables as GCC.
(native-search-paths
(list (search-path-specification
(variable "CPATH")
(files '("include")))
(search-path-specification
(variable "LIBRARY_PATH")
(files '("lib" "lib64")))))
(home-page "http://clang.llvm.org") (home-page "http://clang.llvm.org")
(synopsis "C language family frontend for LLVM") (synopsis "C language family frontend for LLVM")
(description (description

View File

@ -0,0 +1,19 @@
Clang attempts to guess file names based on the OS and distro (yes!),
but unfortunately, that doesn't work for us.
This patch makes it easy to insert libc's $libdir so that Clang passes the
correct absolute file name of crt1.o etc. to 'ld'.
--- cfe-3.6.0.src/lib/Driver/ToolChains.cpp 2015-02-18 22:03:07.000000000 +0100
+++ cfe-3.6.0.src/lib/Driver/ToolChains.cpp 2015-06-19 16:37:20.459701044 +0200
@@ -3085,6 +3085,10 @@ Linux::Linux(const Driver &D, const llvm
addPathIfExists(SysRoot + "/lib", Paths);
addPathIfExists(SysRoot + "/usr/lib", Paths);
+
+ // Add libc's lib/ directory to the search path, so that crt1.o, crti.o,
+ // and friends can be found.
+ addPathIfExists("@GLIBC_LIBDIR@", Paths);
}
bool Linux::HasNativeLLVMSupport() const {

View File

@ -3,11 +3,9 @@ This patch adds bindings to Linux syscalls for which glibc has symbols.
Using the FFI would have been nice, but that's not an option when using Using the FFI would have been nice, but that's not an option when using
a statically-linked Guile in an initrd that doesn't have libc.so around. a statically-linked Guile in an initrd that doesn't have libc.so around.
diff --git a/libguile/posix.c b/libguile/posix.c --- guile-2.0.11/libguile/posix.c.orig 2014-02-28 15:01:27.000000000 -0500
index 324f21b..cbee94d 100644 +++ guile-2.0.11/libguile/posix.c 2015-06-21 14:28:23.624251038 -0400
--- a/libguile/posix.c @@ -2245,6 +2245,269 @@
+++ b/libguile/posix.c
@@ -2245,6 +2245,263 @@ scm_init_popen (void)
} }
#endif #endif
@ -26,15 +24,18 @@ index 324f21b..cbee94d 100644
+#define FUNC_NAME s_scm_mount +#define FUNC_NAME s_scm_mount
+{ +{
+ int err; + int err;
+ char *c_source, *c_target, *c_type; + char *c_source, *c_target, *c_type, *c_data;
+ unsigned long c_flags; + unsigned long c_flags;
+ void *c_data;
+ +
+ c_source = scm_to_locale_string (source); + c_source = scm_to_locale_string (source);
+ c_target = scm_to_locale_string (target); + c_target = scm_to_locale_string (target);
+ c_type = scm_to_locale_string (type); + c_type = scm_to_locale_string (type);
+ c_flags = SCM_UNBNDP (flags) ? 0 : scm_to_ulong (flags); + c_flags = SCM_UNBNDP (flags) ? 0 : scm_to_ulong (flags);
+ c_data = SCM_UNBNDP (data) ? NULL : scm_to_pointer (data); +
+ if (SCM_UNBNDP (data) || scm_is_false (data))
+ c_data = NULL;
+ else
+ c_data = scm_to_locale_string (data);
+ +
+ err = mount (c_source, c_target, c_type, c_flags, c_data); + err = mount (c_source, c_target, c_type, c_flags, c_data);
+ if (err != 0) + if (err != 0)
@ -44,6 +45,9 @@ index 324f21b..cbee94d 100644
+ free (c_target); + free (c_target);
+ free (c_type); + free (c_type);
+ +
+ if (c_data != NULL)
+ free (c_data);
+
+ if (err != 0) + if (err != 0)
+ { + {
+ errno = err; + errno = err;
@ -271,5 +275,3 @@ index 324f21b..cbee94d 100644
void void
scm_init_posix () scm_init_posix ()
{ {
--
2.4.1

View File

@ -88,6 +88,39 @@ a focus on simplicity and productivity.")
(home-page "https://ruby-lang.org") (home-page "https://ruby-lang.org")
(license license:ruby))) (license license:ruby)))
(define-public ruby-2.1
(package (inherit ruby)
(version "2.1.6")
(source
(origin
(method url-fetch)
(uri (string-append "http://cache.ruby-lang.org/pub/ruby/"
(version-major+minor version)
"/ruby-" version ".tar.bz2"))
(sha256
(base32
"1sbcmbhadcxk0509svwxbm2vvgmpf3xjxr1397bgp9x46nz36lkv"))))
(arguments
`(#:test-target "test"
#:parallel-tests? #f
#:phases
(alist-cons-before
'configure 'replace-bin-sh
(lambda _
(substitute* '("Makefile.in"
"ext/pty/pty.c"
"io.c"
"lib/mkmf.rb"
"process.c")
(("/bin/sh") (which "sh"))))
%standard-phases)))
(native-search-paths
(list (search-path-specification
(variable "GEM_PATH")
(files (list (string-append "lib/ruby/gems/"
(version-major+minor version)
".0"))))))))
(define-public ruby-1.8 (define-public ruby-1.8
(package (inherit ruby) (package (inherit ruby)
(version "1.8.7-p374") (version "1.8.7-p374")

View File

@ -296,14 +296,14 @@ standards (MPEG-2, MPEG-4 ASP/H.263, MPEG-4 AVC/H.264, and VC-1/VMW3).")
(define-public ffmpeg (define-public ffmpeg
(package (package
(name "ffmpeg") (name "ffmpeg")
(version "2.7") (version "2.7.1")
(source (origin (source (origin
(method url-fetch) (method url-fetch)
(uri (string-append "http://www.ffmpeg.org/releases/ffmpeg-" (uri (string-append "http://www.ffmpeg.org/releases/ffmpeg-"
version ".tar.bz2")) version ".tar.bz2"))
(sha256 (sha256
(base32 (base32
"0jl43b63b20db3yia5xxp0hh8zwdbirk5k9p1d7416nq1b5ckfx8")))) "087pyx1wxvniq3wgj6z80wrb7ampwwsmwndmr7lymzhm4iyvj1vy"))))
(build-system gnu-build-system) (build-system gnu-build-system)
(inputs (inputs
`(("fontconfig" ,fontconfig) `(("fontconfig" ,fontconfig)

View File

@ -39,6 +39,7 @@
%pseudo-terminal-file-system %pseudo-terminal-file-system
%devtmpfs-file-system %devtmpfs-file-system
%immutable-store %immutable-store
%control-groups
%base-file-systems %base-file-systems
@ -152,13 +153,31 @@ file system."
(check? #f) (check? #f)
(flags '(read-only bind-mount)))) (flags '(read-only bind-mount))))
(define %control-groups
(cons (file-system
(device "cgroup")
(mount-point "/sys/fs/cgroup")
(type "tmpfs")
(check? #f))
(map (lambda (subsystem)
(file-system
(device "cgroup")
(mount-point (string-append "/sys/fs/cgroup/" subsystem))
(type "cgroup")
(check? #f)
(options subsystem)
(create-mount-point? #t)))
'("cpuset" "cpu" "cpuacct" "memory" "devices" "freezer"
"blkio" "perf_event" "hugetlb"))))
(define %base-file-systems (define %base-file-systems
;; List of basic file systems to be mounted. Note that /proc and /sys are ;; List of basic file systems to be mounted. Note that /proc and /sys are
;; currently mounted by the initrd. ;; currently mounted by the initrd.
(list %devtmpfs-file-system (append (list %devtmpfs-file-system
%pseudo-terminal-file-system %pseudo-terminal-file-system
%shared-memory-file-system %shared-memory-file-system
%immutable-store)) %immutable-store)
%control-groups))

View File

@ -157,7 +157,7 @@ cross-compiling.)"
(recursive? local-file-recursive?)) ;Boolean (recursive? local-file-recursive?)) ;Boolean
(define* (local-file file #:optional (name (basename file)) (define* (local-file file #:optional (name (basename file))
#:key (recursive? #t)) #:key recursive?)
"Return an object representing local file FILE to add to the store; this "Return an object representing local file FILE to add to the store; this
object can be used in a gexp. FILE will be added to the store under NAME--by object can be used in a gexp. FILE will be added to the store under NAME--by
default the base name of FILE. default the base name of FILE.
@ -167,7 +167,11 @@ designates a flat file and RECURSIVE? is true, its contents are added, and its
permission bits are kept. permission bits are kept.
This is the declarative counterpart of the 'interned-file' monadic procedure." This is the declarative counterpart of the 'interned-file' monadic procedure."
(%local-file file name recursive?)) ;; Canonicalize FILE so that if it's a symlink, it is resolved. Failing to
;; do that, when RECURSIVE? is #t, we could end up creating a dangling
;; symlink in the store, and when RECURSIVE? is #f 'add-to-store' would just
;; throw an error, both of which are inconvenient.
(%local-file (canonicalize-path file) name recursive?))
(define-gexp-compiler (local-file-compiler (file local-file?) system target) (define-gexp-compiler (local-file-compiler (file local-file?) system target)
;; "Compile" FILE by adding it to the store. ;; "Compile" FILE by adding it to the store.

View File

@ -610,11 +610,12 @@ path."
store-path))) store-path)))
(lambda (server basename recursive? hash-algo file-name) (lambda (server basename recursive? hash-algo file-name)
"Add the contents of FILE-NAME under BASENAME to the store. When "Add the contents of FILE-NAME under BASENAME to the store. When
RECURSIVE? is true and FILE-NAME designates a directory, the contents of RECURSIVE? is false, FILE-NAME must designate a regular file--not a directory
FILE-NAME are added recursively; if FILE-NAME designates a flat file and nor a symlink. When RECURSIVE? is true and FILE-NAME designates a directory,
RECURSIVE? is true, its contents are added, and its permission bits are the contents of FILE-NAME are added recursively; if FILE-NAME designates a
kept. HASH-ALGO must be a string such as \"sha256\"." flat file and RECURSIVE? is true, its contents are added, and its permission
(let* ((st (stat file-name #f)) bits are kept. HASH-ALGO must be a string such as \"sha256\"."
(let* ((st (false-if-exception (lstat file-name)))
(args `(,st ,basename ,recursive? ,hash-algo)) (args `(,st ,basename ,recursive? ,hash-algo))
(cache (nix-server-add-to-store-cache server))) (cache (nix-server-add-to-store-cache server)))
(or (and st (hash-ref cache args)) (or (and st (hash-ref cache args))

View File

@ -101,7 +101,7 @@
(let* ((file (search-path %load-path "guix.scm")) (let* ((file (search-path %load-path "guix.scm"))
(local (local-file file)) (local (local-file file))
(exp (gexp (display (ungexp local)))) (exp (gexp (display (ungexp local))))
(intd (add-to-store %store (basename file) #t (intd (add-to-store %store (basename file) #f
"sha256" file))) "sha256" file)))
(and (gexp? exp) (and (gexp? exp)
(match (gexp-inputs exp) (match (gexp-inputs exp)
@ -109,6 +109,25 @@
(eq? x local))) (eq? x local)))
(equal? `(display ,intd) (gexp->sexp* exp))))) (equal? `(display ,intd) (gexp->sexp* exp)))))
(test-assert "one local file, symlink"
(let ((file (search-path %load-path "guix.scm"))
(link (tmpnam)))
(dynamic-wind
(const #t)
(lambda ()
(symlink (canonicalize-path file) link)
(let* ((local (local-file link "my-file" #:recursive? #f))
(exp (gexp (display (ungexp local))))
(intd (add-to-store %store "my-file" #f
"sha256" file)))
(and (gexp? exp)
(match (gexp-inputs exp)
(((x "out"))
(eq? x local)))
(equal? `(display ,intd) (gexp->sexp* exp)))))
(lambda ()
(false-if-exception (delete-file link))))))
(test-assert "one plain file" (test-assert "one plain file"
(let* ((file (plain-file "hi" "Hello, world!")) (let* ((file (plain-file "hi" "Hello, world!"))
(exp (gexp (display (ungexp file)))) (exp (gexp (display (ungexp file))))
@ -360,7 +379,7 @@
(test-assertm "gexp->derivation, local-file" (test-assertm "gexp->derivation, local-file"
(mlet* %store-monad ((file -> (search-path %load-path "guix.scm")) (mlet* %store-monad ((file -> (search-path %load-path "guix.scm"))
(intd (interned-file file)) (intd (interned-file file #:recursive? #f))
(local -> (local-file file)) (local -> (local-file file))
(exp -> (gexp (begin (exp -> (gexp (begin
(stat (ungexp local)) (stat (ungexp local))