Merge branch 'core-updates'
This commit is contained in:
commit
0734a9a813
10
Makefile.am
10
Makefile.am
|
@ -81,10 +81,12 @@ MODULES = \
|
|||
gnu/packages/compression.scm \
|
||||
gnu/packages/cpio.scm \
|
||||
gnu/packages/cppi.scm \
|
||||
gnu/packages/cross-base.scm \
|
||||
gnu/packages/curl.scm \
|
||||
gnu/packages/cyrus-sasl.scm \
|
||||
gnu/packages/dejagnu.scm \
|
||||
gnu/packages/ddrescue.scm \
|
||||
gnu/packages/dwm.scm \
|
||||
gnu/packages/ed.scm \
|
||||
gnu/packages/emacs.scm \
|
||||
gnu/packages/fdisk.scm \
|
||||
|
@ -114,6 +116,7 @@ MODULES = \
|
|||
gnu/packages/irssi.scm \
|
||||
gnu/packages/ld-wrapper.scm \
|
||||
gnu/packages/less.scm \
|
||||
gnu/packages/lesstif.scm \
|
||||
gnu/packages/libapr.scm \
|
||||
gnu/packages/libdaemon.scm \
|
||||
gnu/packages/libevent.scm \
|
||||
|
@ -158,6 +161,7 @@ MODULES = \
|
|||
gnu/packages/pth.scm \
|
||||
gnu/packages/python.scm \
|
||||
gnu/packages/qemu.scm \
|
||||
gnu/packages/ratpoison.scm \
|
||||
gnu/packages/readline.scm \
|
||||
gnu/packages/recutils.scm \
|
||||
gnu/packages/rsync.scm \
|
||||
|
@ -184,6 +188,7 @@ MODULES = \
|
|||
gnu/packages/wget.scm \
|
||||
gnu/packages/which.scm \
|
||||
gnu/packages/xml.scm \
|
||||
gnu/packages/xorg.scm \
|
||||
gnu/packages/zile.scm \
|
||||
gnu/packages/zip.scm \
|
||||
gnu/system/vm.scm
|
||||
|
@ -209,6 +214,7 @@ dist_patch_DATA = \
|
|||
gnu/packages/patches/flac-fix-memcmp-not-declared.patch \
|
||||
gnu/packages/patches/flex-bison-tests.patch \
|
||||
gnu/packages/patches/gawk-shell.patch \
|
||||
gnu/packages/patches/gcc-cross-environment-variables.patch \
|
||||
gnu/packages/patches/gettext-gets-undeclared.patch \
|
||||
gnu/packages/patches/glib-tests-desktop.patch \
|
||||
gnu/packages/patches/glib-tests-homedir.patch \
|
||||
|
@ -233,6 +239,7 @@ dist_patch_DATA = \
|
|||
gnu/packages/patches/make-impure-dirs.patch \
|
||||
gnu/packages/patches/mcron-install.patch \
|
||||
gnu/packages/patches/perl-no-sys-dirs.patch \
|
||||
gnu/packages/patches/python-fix-dbm.patch \
|
||||
gnu/packages/patches/procps-make-3.82.patch \
|
||||
gnu/packages/patches/qemu-multiple-smb-shares.patch \
|
||||
gnu/packages/patches/readline-link-ncurses.patch \
|
||||
|
@ -240,7 +247,8 @@ dist_patch_DATA = \
|
|||
gnu/packages/patches/tcsh-fix-autotest.patch \
|
||||
gnu/packages/patches/teckit-cstdio.patch \
|
||||
gnu/packages/patches/vpnc-script.patch \
|
||||
gnu/packages/patches/w3m-fix-compile.patch
|
||||
gnu/packages/patches/w3m-fix-compile.patch \
|
||||
gnu/packages/patches/xpdf-constchar.patch
|
||||
|
||||
bootstrapdir = $(guilemoduledir)/gnu/packages/bootstrap
|
||||
bootstrap_x86_64_linuxdir = $(bootstrapdir)/x86_64-linux
|
||||
|
|
|
@ -517,8 +517,13 @@ Thus, when installing MPC, the MPFR and GMP libraries also get installed
|
|||
in the profile; removing MPC also removes MPFR and GMP---unless they had
|
||||
also been explicitly installed independently.
|
||||
|
||||
Besides, packages sometime rely on the definition of environment
|
||||
variables for their search paths (see explanation of
|
||||
@code{--search-paths} below.) Any missing or possibly incorrect
|
||||
environment variable definitions are reported here.
|
||||
|
||||
@c XXX: keep me up-to-date
|
||||
Besides, when installing a GNU package, the tool reports the
|
||||
Finally, when installing a GNU package, the tool reports the
|
||||
availability of a newer upstream version. In the future, it may provide
|
||||
the option of installing directly from the upstream version, even if
|
||||
that version is not yet in the distribution.
|
||||
|
@ -566,6 +571,21 @@ Installing, removing, or upgrading packages from a generation that has
|
|||
been rolled back to overwrites previous future generations. Thus, the
|
||||
history of a profile's generations is always linear.
|
||||
|
||||
@item --search-paths
|
||||
@cindex search paths
|
||||
Report environment variable definitions, in Bash syntax, that may be
|
||||
needed in order to use the set of installed packages. These environment
|
||||
variables are used to specify @dfn{search paths} for files used by some
|
||||
of the installed packages.
|
||||
|
||||
For example, GCC needs the @code{CPATH} and @code{LIBRARY_PATH}
|
||||
environment variables to be defined so it can look for headers and
|
||||
libraries in the user's profile (@pxref{Environment Variables,,, gcc,
|
||||
Using the GNU Compiler Collection (GCC)}). If GCC and, say, the C
|
||||
library are installed in the profile, then @code{--search-paths} will
|
||||
suggest setting these variables to @code{@var{profile}/include} and
|
||||
@code{@var{profile}/lib}, respectively.
|
||||
|
||||
@item --profile=@var{profile}
|
||||
@itemx -p @var{profile}
|
||||
Use @var{profile} instead of the user's default profile.
|
||||
|
|
|
@ -148,6 +148,10 @@ exec ~a --no-auto-compile \"$0\" \"$@\"
|
|||
("perl" ,perl)
|
||||
("patch/skip-amhello"
|
||||
,(search-patch "automake-skip-amhello-tests.patch"))))
|
||||
(native-search-paths
|
||||
(list (search-path-specification
|
||||
(variable "ACLOCAL_PATH")
|
||||
(directories '("share/aclocal")))))
|
||||
(arguments
|
||||
'(#:patches (list (assoc-ref %build-inputs "patch/skip-amhello"))
|
||||
#:modules ((guix build gnu-build-system)
|
||||
|
|
|
@ -48,19 +48,7 @@
|
|||
"--disable-xmltoman"
|
||||
"--enable-tests"
|
||||
"--disable-qt3" "--disable-qt4"
|
||||
"--disable-gtk" "--disable-gtk3")
|
||||
#:phases (alist-cons-before
|
||||
'configure 'set-perl-path
|
||||
(lambda* (#:key inputs #:allow-other-keys)
|
||||
;; FIXME: Remove this phase when proper support for search
|
||||
;; paths is available.
|
||||
(let ((xml-parser (assoc-ref inputs
|
||||
"intltool/perl-xml-parser")))
|
||||
(setenv "PERL5LIB"
|
||||
(string-append xml-parser
|
||||
"/lib/perl5/site_perl"))
|
||||
#t))
|
||||
%standard-phases)))
|
||||
"--disable-gtk" "--disable-gtk3")))
|
||||
(inputs
|
||||
`(("expat" ,expat)
|
||||
("glib" ,glib)
|
||||
|
|
|
@ -90,14 +90,14 @@ lines.")
|
|||
(define-public sed
|
||||
(package
|
||||
(name "sed")
|
||||
(version "4.2.1")
|
||||
(version "4.2.2")
|
||||
(source (origin
|
||||
(method url-fetch)
|
||||
(uri (string-append "mirror://gnu/sed/sed-" version
|
||||
".tar.bz2"))
|
||||
(sha256
|
||||
(base32
|
||||
"13wlsb4sf5d5a82xjhxqmdvrrn36rmw5f0pl9qyb9zkvldnb7hra"))))
|
||||
"1myvrmh99jsvk7v3d7crm0gcrq51hmmm1r2kjyyci152in1x2j7h"))))
|
||||
(build-system gnu-build-system)
|
||||
(synopsis "Stream editor")
|
||||
(arguments
|
||||
|
@ -153,14 +153,14 @@ files (as archives).")
|
|||
(define-public patch
|
||||
(package
|
||||
(name "patch")
|
||||
(version "2.6.1")
|
||||
(version "2.7.1")
|
||||
(source (origin
|
||||
(method url-fetch)
|
||||
(uri (string-append "mirror://gnu/patch/patch-"
|
||||
version ".tar.xz"))
|
||||
(sha256
|
||||
(base32
|
||||
"18012gxs9wc96izskp1q7bclrwns6rdmkn4jj31c8jbyfz6l5npq"))))
|
||||
"1sqckf560pzwgniy00vcpdv2c9c11s4cmhlm14yqgg8avd3bl94i"))))
|
||||
(build-system gnu-build-system)
|
||||
(native-inputs '()) ; FIXME: needs `ed' for the tests
|
||||
(arguments
|
||||
|
@ -179,18 +179,15 @@ producing patched versions.")
|
|||
(define-public diffutils
|
||||
(package
|
||||
(name "diffutils")
|
||||
(version "3.2")
|
||||
(version "3.3")
|
||||
(source (origin
|
||||
(method url-fetch)
|
||||
(uri (string-append "mirror://gnu/diffutils/diffutils-"
|
||||
version ".tar.xz"))
|
||||
(sha256
|
||||
(base32
|
||||
"0jci0wv68025xd0s0rq4s5qxpx56dd9d730lka63qpzk1rfvfkxb"))))
|
||||
"1761vymxbp4wb5rzjvabhdkskk95pghnn67464byvzb5mfl8jpm2"))))
|
||||
(build-system gnu-build-system)
|
||||
(inputs `(("patch/gets"
|
||||
,(search-patch "diffutils-gets-undeclared.patch"))))
|
||||
(arguments `(#:patches (list (assoc-ref %build-inputs "patch/gets"))))
|
||||
(synopsis "Comparing and merging files")
|
||||
(description
|
||||
"GNU Diffutils is a package of several programs related to finding
|
||||
|
@ -264,14 +261,14 @@ The tools supplied with this package are:
|
|||
(define-public coreutils
|
||||
(package
|
||||
(name "coreutils")
|
||||
(version "8.20")
|
||||
(version "8.21")
|
||||
(source (origin
|
||||
(method url-fetch)
|
||||
(uri (string-append "mirror://gnu/coreutils/coreutils-"
|
||||
version ".tar.xz"))
|
||||
(sha256
|
||||
(base32
|
||||
"1cly97xdy3v4nbbx631k43smqw0nnpn651kkprs0yyl2cj3pkjyv"))))
|
||||
"064f512185iysqqcvhnhaf3bfmzrvcgs7n405qsyp99zmfyl9amd"))))
|
||||
(build-system gnu-build-system)
|
||||
(inputs `(("acl" ,acl)
|
||||
("gmp" ,gmp)
|
||||
|
@ -340,14 +337,14 @@ that it is possible to use Make to build and install the program.")
|
|||
(define-public binutils
|
||||
(package
|
||||
(name "binutils")
|
||||
(version "2.22")
|
||||
(version "2.23.2")
|
||||
(source (origin
|
||||
(method url-fetch)
|
||||
(uri (string-append "mirror://gnu/binutils/binutils-"
|
||||
version ".tar.bz2"))
|
||||
(sha256
|
||||
(base32
|
||||
"1a9w66v5dwvbnawshjwqcgz7km6kw6ihkzp6sswv9ycc3knzhykc"))))
|
||||
"15qhbkz3r266xaa52slh857qn3abw7rb2x2jnhpfrafpzrb4x4gy"))))
|
||||
(build-system gnu-build-system)
|
||||
|
||||
;; Split Binutils in several outputs, mostly to avoid collisions in
|
||||
|
@ -365,7 +362,11 @@ that it is possible to use Make to build and install the program.")
|
|||
"LDFLAGS=-static-libgcc"
|
||||
|
||||
;; Don't search under /usr/lib & co.
|
||||
"--with-lib-path=/no-ld-lib-path")))
|
||||
"--with-lib-path=/no-ld-lib-path"
|
||||
|
||||
;; Glibc 2.17 has a "comparison of unsigned
|
||||
;; expression >= 0 is always true" in wchar.h.
|
||||
"--disable-werror")))
|
||||
|
||||
(synopsis "Binary utilities: bfd gas gprof ld")
|
||||
(description
|
||||
|
@ -375,17 +376,6 @@ BFD (Binary File Descriptor) library, `gprof', `nm', `strip', etc.")
|
|||
(license gpl3+)
|
||||
(home-page "http://www.gnu.org/software/binutils/")))
|
||||
|
||||
(define-public binutils-2.23
|
||||
(package (inherit binutils)
|
||||
(version "2.23.2")
|
||||
(source (origin
|
||||
(method url-fetch)
|
||||
(uri (string-append "mirror://gnu/binutils/binutils-"
|
||||
version ".tar.bz2"))
|
||||
(sha256
|
||||
(base32
|
||||
"15qhbkz3r266xaa52slh857qn3abw7rb2x2jnhpfrafpzrb4x4gy"))))))
|
||||
|
||||
(define-public glibc
|
||||
(package
|
||||
(name "glibc")
|
||||
|
@ -403,13 +393,28 @@ BFD (Binary File Descriptor) library, `gprof', `nm', `strip', etc.")
|
|||
;; users should automatically pull Linux headers as well.
|
||||
(propagated-inputs `(("linux-headers" ,linux-libre-headers)))
|
||||
|
||||
;; Store the locales separately (~100 MiB). Note that "out" retains a
|
||||
;; reference to them anyway, so there's no space savings here.
|
||||
;; TODO: Eventually we may want to add a $LOCALE_ARCHIVE search path like
|
||||
;; Nixpkgs does.
|
||||
(outputs '("out" "locales"))
|
||||
|
||||
(arguments
|
||||
`(#:out-of-source? #t
|
||||
#:patches (list (assoc-ref %build-inputs "patch/ld.so.cache"))
|
||||
#:configure-flags
|
||||
(list "--enable-add-ons"
|
||||
"--sysconfdir=/etc"
|
||||
"--localedir=/var/run/current-system/sw/lib/locale" ; XXX
|
||||
(string-append "--localedir=" (assoc-ref %outputs "locales")
|
||||
"/share/locale")
|
||||
|
||||
;; `--localedir' is not honored, so work around it.
|
||||
;; See <http://sourceware.org/ml/libc-alpha/2013-03/msg00093.html>.
|
||||
(string-append "libc_cv_localedir="
|
||||
(assoc-ref %outputs "locales")
|
||||
"/share/locale")
|
||||
|
||||
|
||||
(string-append "--with-headers="
|
||||
(assoc-ref %build-inputs "linux-headers")
|
||||
"/include")
|
||||
|
@ -475,7 +480,12 @@ BFD (Binary File Descriptor) library, `gprof', `nm', `strip', etc.")
|
|||
(substitute* "libio/iopopen.c"
|
||||
(("/bin/sh")
|
||||
(string-append out "/bin/bash")))))
|
||||
%standard-phases)))
|
||||
(alist-cons-after
|
||||
'install 'install-locales
|
||||
(lambda _
|
||||
(zero? (system* "make" "localedata/install-locales")))
|
||||
%standard-phases))))
|
||||
|
||||
(inputs `(("patch/ld.so.cache"
|
||||
,(search-patch "glibc-no-ld-so-cache.patch"))
|
||||
("static-bash" ,(static-package bash-light))))
|
||||
|
@ -578,7 +588,8 @@ identifier SYSTEM."
|
|||
#:implicit-inputs? #f
|
||||
,@(substitute-keyword-arguments (package-arguments binutils)
|
||||
((#:configure-flags cf)
|
||||
`(list ,(string-append "--target=" (boot-triplet)))))))
|
||||
`(cons ,(string-append "--target=" (boot-triplet))
|
||||
,cf)))))
|
||||
(inputs %boot0-inputs))))
|
||||
|
||||
(define gcc-boot0
|
||||
|
@ -940,35 +951,6 @@ store.")
|
|||
,@(fold alist-delete (package-inputs ld-wrapper-boot3)
|
||||
'("guile" "bash"))))))
|
||||
|
||||
(define-public ld-wrapper-2.23 ; TODO: remove when Binutils is updated
|
||||
(package (inherit ld-wrapper)
|
||||
(inputs `(("binutils" ,binutils-2.23)
|
||||
,@(alist-delete "binutils" (package-inputs ld-wrapper))))))
|
||||
|
||||
(define-public gcc-4.8
|
||||
;; FIXME: Move to gcc.scm when Binutils is updated.
|
||||
(package (inherit gcc-4.7)
|
||||
(version "4.8.0")
|
||||
(source (origin
|
||||
(method url-fetch)
|
||||
(uri (string-append "mirror://gnu/gcc/gcc-"
|
||||
version "/gcc-" version ".tar.bz2"))
|
||||
(sha256
|
||||
(base32
|
||||
"0b6cp9d1sas3vq6dj3zrgd134p9b569fqhbixb9cl7mp698zwdxh"))))
|
||||
(inputs `(("gmp" ,gmp)
|
||||
("mpfr" ,mpfr)
|
||||
("mpc" ,mpc)
|
||||
("isl" ,isl)
|
||||
("cloog" ,cloog)
|
||||
("zlib" ,(@ (gnu packages compression) zlib))
|
||||
|
||||
;; With ld from Binutils 2.22, we get the following error while
|
||||
;; linking gcov:
|
||||
;; ld: gcov: hidden symbol `__deregister_frame_info' in /nix/store/47myfniw4x7kfc601d7q1yvz5mixlr00-gcc-4.7.2/lib/gcc/x86_64-unknown-linux-gnu/4.7.2/libgcc_eh.a(unwind-dw2-fde-dip.o) is referenced by DSO
|
||||
;; See <http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57015>.
|
||||
("ld-wrapper" ,ld-wrapper-2.23)))))
|
||||
|
||||
(define-public %final-inputs
|
||||
;; Final derivations used as implicit inputs by `gnu-build-system'.
|
||||
(let ((finalize (cut package-with-explicit-inputs <> %boot4-inputs
|
||||
|
|
|
@ -135,6 +135,7 @@ check whether everything is alright."
|
|||
"Return the name of Glibc's dynamic linker for SYSTEM."
|
||||
(cond ((string=? system "x86_64-linux") "/lib/ld-linux-x86-64.so.2")
|
||||
((string=? system "i686-linux") "/lib/ld-linux.so.2")
|
||||
((string=? system "mips64el-linux") "/lib/ld.so.1")
|
||||
(else (error "dynamic linker name not known for this system"
|
||||
system))))
|
||||
|
||||
|
@ -153,7 +154,8 @@ check whether everything is alright."
|
|||
(let ((raw (build-system
|
||||
(name "raw")
|
||||
(description "Raw build system with direct store access")
|
||||
(build (lambda* (store name source inputs #:key outputs system)
|
||||
(build (lambda* (store name source inputs
|
||||
#:key outputs system search-paths)
|
||||
(define (->store file)
|
||||
(add-to-store store file #t "sha256"
|
||||
(or (search-bootstrap-binary file
|
||||
|
@ -351,6 +353,13 @@ exec ~a/bin/.gcc-wrapped -B~a/lib \
|
|||
("i686-linux"
|
||||
(base32
|
||||
"06wqs0xxnpw3hn0xjb4c9cs0899p1xwkcysa2rvzhvpra0c5vsg2")))))))))
|
||||
(native-search-paths
|
||||
(list (search-path-specification
|
||||
(variable "CPATH")
|
||||
(directories '("include")))
|
||||
(search-path-specification
|
||||
(variable "LIBRARY_PATH")
|
||||
(directories '("lib" "lib64")))))
|
||||
(synopsis "Bootstrap binaries of the GNU Compiler Collection")
|
||||
(description #f)
|
||||
(home-page #f)
|
||||
|
|
|
@ -0,0 +1,244 @@
|
|||
;;; GNU Guix --- Functional package management for GNU
|
||||
;;; Copyright © 2013 Ludovic Courtès <ludo@gnu.org>
|
||||
;;;
|
||||
;;; 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 <http://www.gnu.org/licenses/>.
|
||||
|
||||
(define-module (gnu packages cross-base)
|
||||
#:use-module (guix licenses)
|
||||
#:use-module (gnu packages)
|
||||
#:use-module (gnu packages gcc)
|
||||
#:use-module (gnu packages base)
|
||||
#:use-module (gnu packages linux)
|
||||
#:use-module (guix packages)
|
||||
#:use-module (guix download)
|
||||
#:use-module (guix utils)
|
||||
#:use-module (guix build-system gnu)
|
||||
#:use-module (guix build-system trivial)
|
||||
#:use-module (srfi srfi-1)
|
||||
#:use-module (srfi srfi-26)
|
||||
#:use-module (ice-9 match))
|
||||
|
||||
(define (cross p target)
|
||||
(package (inherit p)
|
||||
(location (source-properties->location (current-source-location)))
|
||||
(name (string-append (package-name p) "-cross-" target))
|
||||
(arguments
|
||||
(substitute-keyword-arguments (package-arguments p)
|
||||
((#:configure-flags flags)
|
||||
`(cons ,(string-append "--target=" target)
|
||||
,flags))))))
|
||||
|
||||
(define cross-binutils
|
||||
(cut cross binutils <>))
|
||||
|
||||
(define* (cross-gcc target
|
||||
#:optional (xbinutils (cross-binutils target)) libc)
|
||||
"Return a cross-compiler for TARGET, where TARGET is a GNU triplet. Use
|
||||
XBINUTILS as the associated cross-Binutils. If LIBC is false, then build a
|
||||
GCC that does not target a libc; otherwise, target that libc."
|
||||
(define args
|
||||
;; Get the arguments as if we were building for TARGET. In particular, we
|
||||
;; want `glibc-dynamic-linker' to return the right thing.
|
||||
(parameterize ((%current-system (gnu-triplet->nix-system target)))
|
||||
(package-arguments gcc-4.7)))
|
||||
|
||||
(package (inherit gcc-4.7)
|
||||
(name (string-append "gcc-cross-"
|
||||
(if libc "" "sans-libc-")
|
||||
target))
|
||||
(arguments
|
||||
`(#:implicit-inputs? #f
|
||||
#:modules ((guix build gnu-build-system)
|
||||
(guix build utils)
|
||||
(ice-9 regex)
|
||||
(srfi srfi-1)
|
||||
(srfi srfi-26))
|
||||
#:patches (list (assoc-ref %build-inputs "patch/cross-env-vars"))
|
||||
|
||||
,@(substitute-keyword-arguments args
|
||||
((#:configure-flags flags)
|
||||
`(append (list ,(string-append "--target=" target)
|
||||
,@(if libc
|
||||
'()
|
||||
`( ;; Disable features not needed at this stage.
|
||||
"--disable-shared" "--enable-static"
|
||||
|
||||
;; Disable C++ because libstdc++'s
|
||||
;; configure script otherwise fails with
|
||||
;; "Link tests are not allowed after
|
||||
;; GCC_NO_EXECUTABLES."
|
||||
"--enable-languages=c"
|
||||
|
||||
"--disable-threads" ; libgcc, would need libc
|
||||
"--disable-libmudflap"
|
||||
"--disable-libgomp"
|
||||
"--disable-libssp"
|
||||
"--disable-libquadmath"
|
||||
"--disable-decimal-float" ; would need libc
|
||||
)))
|
||||
|
||||
,(if libc
|
||||
flags
|
||||
`(remove (cut string-match "--enable-languages.*" <>)
|
||||
,flags))))
|
||||
((#:make-flags flags)
|
||||
(if libc
|
||||
`(let ((libc (assoc-ref %build-inputs "libc")))
|
||||
;; FLAGS_FOR_TARGET are needed for the target libraries to
|
||||
;; receive the -Bxxx for the startfiles.
|
||||
(cons (string-append "FLAGS_FOR_TARGET=-B" libc "/lib")
|
||||
,flags))
|
||||
flags))
|
||||
((#:phases phases)
|
||||
(let ((phases
|
||||
`(alist-cons-after
|
||||
'install 'make-cross-binutils-visible
|
||||
(lambda* (#:key outputs inputs #:allow-other-keys)
|
||||
(let* ((out (assoc-ref outputs "out"))
|
||||
(libexec (string-append out "/libexec/gcc/"
|
||||
,target))
|
||||
(binutils (string-append
|
||||
(assoc-ref inputs "binutils-cross")
|
||||
"/bin/" ,target "-")))
|
||||
(for-each (lambda (file)
|
||||
(symlink (string-append binutils file)
|
||||
(string-append libexec "/"
|
||||
file)))
|
||||
'("as" "ld" "nm"))
|
||||
#t))
|
||||
,phases)))
|
||||
(if libc
|
||||
`(alist-cons-before
|
||||
'configure 'set-cross-path
|
||||
(lambda* (#:key inputs #:allow-other-keys)
|
||||
;; Add the cross Linux headers to CROSS_CPATH, and remove
|
||||
;; them from CPATH.
|
||||
(let ((libc (assoc-ref inputs "libc"))
|
||||
(linux (assoc-ref inputs
|
||||
"libc/cross-linux-headers")))
|
||||
(define (cross? x)
|
||||
;; Return #t if X is a cross-libc or cross Linux.
|
||||
(or (string-prefix? libc x)
|
||||
(string-prefix? linux x)))
|
||||
|
||||
(setenv "CROSS_CPATH"
|
||||
(string-append libc "/include:"
|
||||
linux "/include"))
|
||||
(setenv "CROSS_LIBRARY_PATH"
|
||||
(string-append libc "/lib"))
|
||||
|
||||
(let ((cpath (search-path-as-string->list
|
||||
(getenv "CPATH")))
|
||||
(libpath (search-path-as-string->list
|
||||
(getenv "LIBRARY_PATH"))))
|
||||
(setenv "CPATH"
|
||||
(list->search-path-as-string
|
||||
(remove cross? cpath) ":"))
|
||||
(setenv "LIBRARY_PATH"
|
||||
(list->search-path-as-string
|
||||
(remove cross? libpath) ":"))
|
||||
#t)))
|
||||
,phases)
|
||||
phases)))
|
||||
((#:strip-binaries? _)
|
||||
;; Disable stripping as this can break binaries, with object files
|
||||
;; of libgcc.a showing up as having an unknown architecture. See
|
||||
;; <http://lists.fedoraproject.org/pipermail/arm/2010-August/000663.html>
|
||||
;; for instance.
|
||||
#f))))
|
||||
(inputs
|
||||
`(("patch/cross-env-vars"
|
||||
,(search-patch "gcc-cross-environment-variables.patch"))
|
||||
|
||||
("binutils-cross" ,xbinutils)
|
||||
|
||||
;; Call it differently so that the builder can check whether the "libc"
|
||||
;; input is #f.
|
||||
("libc-native" ,@(assoc-ref %final-inputs "libc"))
|
||||
|
||||
;; Remaining inputs.
|
||||
,@(let ((inputs (append (package-inputs gcc-4.7)
|
||||
(alist-delete "libc" %final-inputs))))
|
||||
(if libc
|
||||
`(("libc" ,libc)
|
||||
,@inputs)
|
||||
inputs))))))
|
||||
|
||||
(define* (cross-libc target
|
||||
#:optional
|
||||
(xgcc (cross-gcc target))
|
||||
(xbinutils (cross-binutils target)))
|
||||
"Return a libc cross-built for TARGET, a GNU triplet. Use XGCC and
|
||||
XBINUTILS and the cross tool chain."
|
||||
(define xlinux-headers
|
||||
(package (inherit linux-libre-headers)
|
||||
(name (string-append (package-name linux-libre-headers)
|
||||
"-cross-" target))
|
||||
(arguments
|
||||
(substitute-keyword-arguments (package-arguments linux-libre-headers)
|
||||
((#:phases phases)
|
||||
`(alist-replace
|
||||
'build
|
||||
(lambda _
|
||||
(setenv "ARCH" ,(system->linux-architecture target))
|
||||
(format #t "`ARCH' set to `~a' (cross compiling)~%" (getenv "ARCH"))
|
||||
|
||||
(and (zero? (system* "make" "defconfig"))
|
||||
(zero? (system* "make" "mrproper" "headers_check"))))
|
||||
,phases))))
|
||||
(inputs `(("cross-gcc" ,xgcc)
|
||||
("cross-binutils" ,xbinutils)
|
||||
,@(package-inputs linux-libre-headers)))))
|
||||
|
||||
(package (inherit glibc)
|
||||
(name (string-append "glibc-cross-" target))
|
||||
(arguments
|
||||
(substitute-keyword-arguments
|
||||
`(#:strip-binaries? #f ; disable stripping (see above)
|
||||
,@(package-arguments glibc))
|
||||
((#:configure-flags flags)
|
||||
`(cons ,(string-append "--host=" target)
|
||||
,flags))
|
||||
((#:phases phases)
|
||||
`(alist-cons-before
|
||||
'configure 'set-cross-linux-headers-path
|
||||
(lambda* (#:key inputs #:allow-other-keys)
|
||||
(let ((linux (assoc-ref inputs "cross-linux-headers")))
|
||||
(setenv "CROSS_CPATH"
|
||||
(string-append linux "/include"))
|
||||
#t))
|
||||
,phases))))
|
||||
(propagated-inputs `(("cross-linux-headers" ,xlinux-headers)))
|
||||
(inputs `(("cross-gcc" ,xgcc)
|
||||
("cross-binutils" ,xbinutils)
|
||||
,@(package-inputs glibc)))))
|
||||
|
||||
|
||||
;;;
|
||||
;;; Concrete cross toolchains.
|
||||
;;;
|
||||
|
||||
(define-public xgcc-mips64el
|
||||
(let ((triplet "mips64el-linux-gnu"))
|
||||
(cross-gcc triplet
|
||||
(cross-binutils triplet)
|
||||
(cross-libc triplet))))
|
||||
|
||||
;; (define-public xgcc-armel
|
||||
;; (let ((triplet "armel-linux-gnueabi"))
|
||||
;; (cross-gcc triplet
|
||||
;; (cross-binutils triplet)
|
||||
;; (cross-libc triplet))))
|
|
@ -55,18 +55,7 @@
|
|||
("pkg-config" ,pkg-config)
|
||||
("zlib" ,zlib)))
|
||||
(arguments
|
||||
`(#:configure-flags '("--with-gnutls" "--with-gssapi")
|
||||
#:phases
|
||||
(alist-replace
|
||||
'unpack
|
||||
(lambda* (#:key #:allow-other-keys #:rest args)
|
||||
(let ((unpack (assoc-ref %standard-phases 'unpack)))
|
||||
(apply unpack args)
|
||||
;; The following patch-shebang phase will replace perl
|
||||
;; by the correct path.
|
||||
(substitute* "tests/runtests.pl"
|
||||
(("#!/usr/bin/env perl") "#!/usr/bin/perl"))))
|
||||
%standard-phases)))
|
||||
`(#:configure-flags '("--with-gnutls" "--with-gssapi")))
|
||||
(synopsis "curl, command line tool for transferring data with URL syntax")
|
||||
(description
|
||||
"curl is a command line tool for transferring data with URL syntax,
|
||||
|
|
|
@ -0,0 +1,86 @@
|
|||
;;; GNU Guix --- Functional package management for GNU
|
||||
;;; Copyright © 2013 Cyril Roelandt <tipecaml@gmail.com>
|
||||
;;;
|
||||
;;; 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 <http://www.gnu.org/licenses/>.
|
||||
|
||||
(define-module (gnu packages dwm)
|
||||
#:use-module (guix licenses)
|
||||
#:use-module (guix packages)
|
||||
#:use-module (guix download)
|
||||
#:use-module (guix build-system gnu)
|
||||
#:use-module (gnu packages)
|
||||
#:use-module (gnu packages xorg))
|
||||
|
||||
(define-public dwm
|
||||
(package
|
||||
(name "dwm")
|
||||
(version "6.0")
|
||||
(source (origin
|
||||
(method url-fetch)
|
||||
(uri (string-append "http://dl.suckless.org/dwm/dwm-"
|
||||
version ".tar.gz"))
|
||||
(sha256
|
||||
(base32 "0mpbivy9j80l1jqq4bd4g4z8s5c54fxrjj44avmfwncjwqylifdj"))))
|
||||
(build-system gnu-build-system)
|
||||
(arguments
|
||||
`(#:tests? #f
|
||||
#:phases
|
||||
(alist-replace
|
||||
'configure
|
||||
(lambda _
|
||||
(substitute* "Makefile" (("\\$\\{CC\\}") "gcc"))
|
||||
#t)
|
||||
(alist-replace
|
||||
'install
|
||||
(lambda* (#:key outputs #:allow-other-keys)
|
||||
(let ((out (assoc-ref outputs "out")))
|
||||
(zero?
|
||||
(system* "make" "install"
|
||||
(string-append "DESTDIR=" out) "PREFIX="))))
|
||||
%standard-phases))))
|
||||
(inputs
|
||||
`(("libx11" ,libx11)
|
||||
("libxinerama" ,libxinerama)))
|
||||
(home-page "http://dwm.suckless.org/")
|
||||
(synopsis "Dynamic window manager")
|
||||
(description
|
||||
"dwm is a dynamic window manager for X. It manages windows in tiled,
|
||||
monocle and floating layouts. All of the layouts can be applied dynamically,
|
||||
optimising the environment for the application in use and the task performed.
|
||||
|
||||
In tiled layout windows are managed in a master and stacking area. The master
|
||||
area contains the window which currently needs most attention, whereas the
|
||||
stacking area contains all other windows. In monocle layout all windows are
|
||||
maximised to the screen size. In floating layout windows can be resized and
|
||||
moved freely. Dialog windows are always managed floating, regardless of the
|
||||
layout applied.
|
||||
|
||||
Windows are grouped by tags. Each window can be tagged with one or multiple
|
||||
tags. Selecting certain tags displays all windows with these tags.
|
||||
|
||||
Each screen contains a small status bar which displays all available tags, the
|
||||
layout, the number of visible windows, the title of the focused window, and the
|
||||
text read from the root window name property, if the screen is focused. A
|
||||
floating window is indicated with an empty square and a maximised floating
|
||||
window is indicated with a filled square before the windows title. The selected
|
||||
tags are indicated with a different color. The tags of the focused window are
|
||||
indicated with a filled square in the top left corner. The tags which are
|
||||
applied to one or more windows are indicated with an empty square in the top
|
||||
left corner.
|
||||
|
||||
dwm draws a small customizable border around windows to indicate the focus
|
||||
state.")
|
||||
(license x11)))
|
|
@ -26,7 +26,16 @@
|
|||
#:use-module (gnu packages texinfo)
|
||||
#:use-module (gnu packages gnutls)
|
||||
#:use-module (gnu packages pkg-config)
|
||||
#:use-module (gnu packages guile))
|
||||
#:use-module (gnu packages guile)
|
||||
#:use-module (gnu packages xorg)
|
||||
#:use-module (gnu packages lesstif)
|
||||
#:use-module (gnu packages libjpeg)
|
||||
#:use-module (gnu packages libtiff)
|
||||
#:use-module (gnu packages libpng)
|
||||
#:use-module ((gnu packages compression)
|
||||
#:renamer (symbol-prefix-proc 'compression:))
|
||||
#:use-module (gnu packages xml)
|
||||
#:use-module (gnu packages glib))
|
||||
|
||||
(define-public emacs
|
||||
(package
|
||||
|
@ -43,7 +52,8 @@
|
|||
(arguments
|
||||
'(#:configure-flags
|
||||
(list (string-append "--with-crt-dir=" (assoc-ref %build-inputs "libc")
|
||||
"/lib"))
|
||||
"/lib")
|
||||
"--with-gif=no") ; XXX: add libungif
|
||||
#:patches (list (assoc-ref %build-inputs "patch/epaths"))
|
||||
#:phases (alist-cons-before
|
||||
'configure 'fix-/bin/pwd
|
||||
|
@ -60,16 +70,22 @@
|
|||
("ncurses" ,ncurses)
|
||||
|
||||
;; TODO: Add the optional dependencies.
|
||||
;; ("xlibs" ,xlibs)
|
||||
("xlibs" ,libx11)
|
||||
("libXaw" ,libxaw) ; XXX: eventually replace by GTK+
|
||||
;; ("gtk+" ,gtk+)
|
||||
;; ("libXft" ,libXft)
|
||||
;; ("libtiff" ,libtiff)
|
||||
("libXft" ,libxft)
|
||||
("libtiff" ,libtiff)
|
||||
;; ("libungif" ,libungif)
|
||||
;; ("libjpeg" ,libjpeg)
|
||||
;; ("libpng" ,libpng)
|
||||
;; ("libXpm" ,libXpm)
|
||||
;; ("libxml2" ,libxml2)
|
||||
;; ("dbus-library" ,dbus-library)
|
||||
("libjpeg" ,libjpeg-8)
|
||||
|
||||
;; When looking for libpng `configure' links with `-lpng -lz', so we
|
||||
;; must also provide zlib as an input.
|
||||
("libpng" ,libpng)
|
||||
("zlib" ,compression:zlib)
|
||||
|
||||
("libXpm" ,libxpm)
|
||||
("libxml2" ,libxml2)
|
||||
("dbus" ,dbus)
|
||||
|
||||
("patch/epaths" ,(search-patch "emacs-configure-sh.patch"))
|
||||
))
|
||||
|
|
|
@ -38,6 +38,20 @@
|
|||
(sha256 (base32
|
||||
"0gpcz6swir64kp0dk3rwgqqkmf48b90dqgczdmznjjryhrahx9r9"))))
|
||||
(build-system gnu-build-system)
|
||||
(arguments
|
||||
`(#:phases
|
||||
(alist-replace
|
||||
'install
|
||||
(lambda* (#:key outputs #:allow-other-keys #:rest args)
|
||||
(let ((install (assoc-ref %standard-phases 'install))
|
||||
(include (string-append (assoc-ref outputs "out") "/include")))
|
||||
(apply install args)
|
||||
;; Unravel one directory, since ft2build.h includes directly from
|
||||
;; freetype/, not freetype2/freetype; this is announced in the file
|
||||
;; to be changed in a future release.
|
||||
(symlink (string-append include "/freetype2/freetype")
|
||||
(string-append include "/freetype"))))
|
||||
%standard-phases)))
|
||||
(synopsis "Freetype, a library to render fonts")
|
||||
(description
|
||||
"Freetype is a library that can be used by applications to access the
|
||||
|
|
|
@ -26,13 +26,13 @@
|
|||
(define-public gawk
|
||||
(package
|
||||
(name "gawk")
|
||||
(version "4.0.0")
|
||||
(version "4.0.2")
|
||||
(source (origin
|
||||
(method url-fetch)
|
||||
(uri (string-append "mirror://gnu/gawk/gawk-" version
|
||||
".tar.bz2"))
|
||||
".tar.xz"))
|
||||
(sha256
|
||||
(base32 "0sss7rhpvizi2a88h6giv0i7w5h07s2fxkw3s6n1hqvcnhrfgbb0"))))
|
||||
(base32 "04vd0axif762mf781pj3days6ilv2333b9zi9c50y5mma66g5q91"))))
|
||||
(build-system gnu-build-system)
|
||||
(arguments
|
||||
`(#:parallel-tests? #f ; test suite fails in parallel
|
||||
|
|
|
@ -35,18 +35,22 @@
|
|||
(let ((stripped? #t)) ; TODO: make this a parameter
|
||||
(package
|
||||
(name "gcc")
|
||||
(version "4.7.2")
|
||||
(version "4.7.3")
|
||||
(source (origin
|
||||
(method url-fetch)
|
||||
(uri (string-append "mirror://gnu/gcc/gcc-"
|
||||
version "/gcc-" version ".tar.bz2"))
|
||||
(sha256
|
||||
(base32
|
||||
"115h03hil99ljig8lkrq4qk426awmzh0g99wrrggxf8g07bq74la"))))
|
||||
"1hx9h64ivarlzi4hxvq42as5m9vlr5cyzaaq4gzj4i619zmkfz1g"))))
|
||||
(build-system gnu-build-system)
|
||||
(inputs `(("gmp" ,gmp)
|
||||
("mpfr" ,mpfr)
|
||||
("mpc" ,mpc))) ; TODO: libelf, ppl, cloog, zlib, etc.
|
||||
("mpc" ,mpc)
|
||||
("isl" ,isl)
|
||||
("cloog" ,cloog)
|
||||
("libelf" ,libelf)
|
||||
("zlib" ,zlib)))
|
||||
(arguments
|
||||
`(#:out-of-source? #t
|
||||
#:strip-binaries? ,stripped?
|
||||
|
@ -65,8 +69,8 @@
|
|||
#:make-flags
|
||||
(let ((libc (assoc-ref %build-inputs "libc")))
|
||||
`(,@(if libc
|
||||
(list (string-append "LDFLAGS_FOR_BUILD="
|
||||
"-L" libc "/lib "
|
||||
(list (string-append "LDFLAGS_FOR_TARGET="
|
||||
"-B" libc "/lib "
|
||||
"-Wl,-dynamic-linker "
|
||||
"-Wl," libc
|
||||
,(glibc-dynamic-linker)))
|
||||
|
@ -102,7 +106,7 @@
|
|||
;; RUNPATH to GCC even when `libgcc_s' is not NEEDED.
|
||||
;; There's not much that can be done to avoid it, though.
|
||||
(format #f "#define LIB_SPEC \"-L~a/lib %{!static:-rpath=~a/lib \
|
||||
%{!static-libgcc:-rpath=~a/lib64 -rpath=~a/lib}} \" ~a~%"
|
||||
%{!static-libgcc:-rpath=~a/lib64 -rpath=~a/lib}} \" ~a"
|
||||
libc libc out out suffix))
|
||||
(("#define STARTFILE_SPEC.*$" line)
|
||||
(format #f "#define STANDARD_STARTFILE_PREFIX_1 \"~a/lib\"
|
||||
|
@ -132,6 +136,14 @@
|
|||
"install"))))
|
||||
%standard-phases)))))
|
||||
|
||||
(native-search-paths
|
||||
(list (search-path-specification
|
||||
(variable "CPATH")
|
||||
(directories '("include")))
|
||||
(search-path-specification
|
||||
(variable "LIBRARY_PATH")
|
||||
(directories '("lib" "lib64")))))
|
||||
|
||||
(properties `((gcc-libc . ,(assoc-ref inputs "libc"))))
|
||||
(synopsis "GNU Compiler Collection")
|
||||
(description
|
||||
|
@ -144,6 +156,18 @@ used in the GNU system including the GNU/Linux variant.")
|
|||
(license gpl3+)
|
||||
(home-page "http://gcc.gnu.org/"))))
|
||||
|
||||
(define-public gcc-4.8
|
||||
;; FIXME: Move to gcc.scm when Binutils is updated.
|
||||
(package (inherit gcc-4.7)
|
||||
(version "4.8.0")
|
||||
(source (origin
|
||||
(method url-fetch)
|
||||
(uri (string-append "mirror://gnu/gcc/gcc-"
|
||||
version "/gcc-" version ".tar.bz2"))
|
||||
(sha256
|
||||
(base32
|
||||
"0b6cp9d1sas3vq6dj3zrgd134p9b569fqhbixb9cl7mp698zwdxh"))))))
|
||||
|
||||
(define-public isl
|
||||
(package
|
||||
(name "isl")
|
||||
|
|
|
@ -171,3 +171,45 @@ It consists of a PostScript interpreter layer, and a graphics
|
|||
library.")
|
||||
(license license:gpl3+)
|
||||
(home-page "http://www.gnu.org/software/ghostscript/")))
|
||||
|
||||
(define-public gs-fonts
|
||||
(package
|
||||
(name "gs-fonts")
|
||||
(version "8.11")
|
||||
(source (origin
|
||||
(method url-fetch)
|
||||
(uri (string-append "mirror://sourceforge/gs-fonts/gs-fonts/"
|
||||
version
|
||||
"%20%28base%2035%2C%20GPL%29/ghostscript-fonts-std-"
|
||||
version
|
||||
".tar.gz"))
|
||||
(sha256 (base32
|
||||
"00f4l10xd826kak51wsmaz69szzm2wp8a41jasr4jblz25bg7dhf"))))
|
||||
(build-system gnu-build-system)
|
||||
(arguments
|
||||
`(#:tests? #f ; nothing to check, just files to copy
|
||||
#:modules ((guix build gnu-build-system)
|
||||
(guix build utils)
|
||||
(srfi srfi-1)) ; for alist-delete
|
||||
#:phases
|
||||
(alist-delete
|
||||
'configure
|
||||
(alist-delete
|
||||
'build
|
||||
(alist-replace
|
||||
'install
|
||||
(lambda* (#:key outputs #:allow-other-keys)
|
||||
(let* ((out (assoc-ref outputs "out"))
|
||||
(dir (string-append out "/share/fonts/type1/ghostscript")))
|
||||
(mkdir-p dir)
|
||||
(for-each
|
||||
(lambda (file)
|
||||
(copy-file file (string-append dir "/" file)))
|
||||
(find-files "." "pfb|afm"))))
|
||||
%standard-phases)))))
|
||||
(synopsis "free replacements for the PostScript fonts")
|
||||
(description
|
||||
"gs-fonts provides fonts and font metrics customarily distributed with
|
||||
Ghostscript. It currently includes the 35 standard PostScript fonts.")
|
||||
(license license:gpl2)
|
||||
(home-page "http://sourceforge.net/projects/gs-fonts/")))
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
;;; GNU Guix --- Functional package management for GNU
|
||||
;;; Copyright © 2013 Nikita Karetnikov <nikita@karetnikov.org>
|
||||
;;; Copyright © 2013 Ludovic Courtès <ludo@gnu.org>
|
||||
;;; Copyright © 2013 Andreas Enge <andreas@enge.fr>
|
||||
;;; Copyright © 2013 Nikita Karetnikov <nikita@karetnikov.org>
|
||||
;;;
|
||||
;;; This file is part of GNU Guix.
|
||||
;;;
|
||||
|
@ -18,7 +19,8 @@
|
|||
;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
(define-module (gnu packages glib)
|
||||
#:use-module ((guix licenses) #:select (lgpl2.0+ gpl2+ gpl2))
|
||||
#:use-module ((guix licenses)
|
||||
#:renamer (symbol-prefix-proc 'license:))
|
||||
#:use-module (guix packages)
|
||||
#:use-module (guix download)
|
||||
#:use-module (guix build-system gnu)
|
||||
|
@ -28,11 +30,10 @@
|
|||
#:use-module ((gnu packages gettext)
|
||||
#:renamer (symbol-prefix-proc 'guix:))
|
||||
#:use-module (gnu packages libffi)
|
||||
#:use-module (gnu packages perl)
|
||||
#:use-module (gnu packages pkg-config)
|
||||
#:use-module (gnu packages python)
|
||||
#:use-module (gnu packages perl)
|
||||
#:use-module ((gnu packages xml)
|
||||
#:renamer (symbol-prefix-proc 'xml:)))
|
||||
#:use-module (gnu packages xml))
|
||||
|
||||
(define-public dbus
|
||||
(package
|
||||
|
@ -48,7 +49,7 @@
|
|||
"1wacqyfkcpayg7f8rvx9awqg275n5pksxq5q7y21lxjx85x6pfjz"))))
|
||||
(build-system gnu-build-system)
|
||||
(inputs
|
||||
`(("expat" ,xml:expat)
|
||||
`(("expat" ,expat)
|
||||
("pkg-config" ,pkg-config)))
|
||||
(home-page "http://dbus.freedesktop.org/")
|
||||
(synopsis "Message bus for inter-process communication (IPC)")
|
||||
|
@ -68,7 +69,7 @@ to communicate directly (without going through the message bus
|
|||
daemon). Currently the communicating applications are on one computer,
|
||||
or through unencrypted TCP/IP suitable for use behind a firewall with
|
||||
shared NFS home directories.")
|
||||
(license gpl2+))) ; or Academic Free License 2.1
|
||||
(license license:gpl2+))) ; or Academic Free License 2.1
|
||||
|
||||
(define-public glib
|
||||
(package
|
||||
|
@ -126,43 +127,32 @@ shared NFS home directories.")
|
|||
and interfaces for such runtime functionality as an event loop, threads,
|
||||
dynamic loading, and an object system.")
|
||||
(home-page "http://developer.gnome.org/glib/")
|
||||
(license lgpl2.0+))) ; some files are under lgpl2.1+
|
||||
(license license:lgpl2.0+))) ; some files are under lgpl2.1+
|
||||
|
||||
(define-public intltool
|
||||
(package
|
||||
(name "intltool")
|
||||
(version "0.40.6")
|
||||
(version "0.50.2")
|
||||
(source (origin
|
||||
(method url-fetch)
|
||||
(uri (string-append
|
||||
"mirror://gnome/sources/intltool/0.40/intltool-"
|
||||
version
|
||||
".tar.bz2"))
|
||||
(uri (string-append "https://launchpad.net/intltool/trunk/"
|
||||
version "/+download/intltool-"
|
||||
version ".tar.gz"))
|
||||
(sha256
|
||||
(base32
|
||||
"0r1vkvy5xzqk01yl6a0xlrry39bra24alkrx6279b77hc62my7jd"))))
|
||||
"01j4yd7i84n9nk4ccs6yifg84pp68nr9by57jdbhj7dpdxf5rwk7"))))
|
||||
(build-system gnu-build-system)
|
||||
(arguments
|
||||
'(#:phases (alist-cons-before
|
||||
'configure 'set-perl-path
|
||||
(lambda* (#:key inputs #:allow-other-keys)
|
||||
;; FIXME: Remove this phase when proper support for search
|
||||
;; paths is available.
|
||||
(let ((xml-parser (assoc-ref inputs "perl-xml-parser")))
|
||||
(setenv "PERL5LIB"
|
||||
(string-append xml-parser
|
||||
"/lib/perl5/site_perl"))
|
||||
#t))
|
||||
%standard-phases)))
|
||||
(native-inputs `(("pkg-config" ,pkg-config)))
|
||||
(propagated-inputs
|
||||
`(("gettext" ,guix:gettext)
|
||||
("perl-xml-parser" ,xml:perl-xml-parser)
|
||||
`(;; Propagate gettext because users expect it to be there, and so does
|
||||
;; the `intltool-update' script.
|
||||
("gettext" ,guix:gettext)
|
||||
|
||||
("perl-xml-parser" ,perl-xml-parser)
|
||||
("perl" ,perl)))
|
||||
(home-page "http://freedesktop.org/wiki/Software/intltool")
|
||||
(synopsis "Tools to centralize translation of many different file formats")
|
||||
(home-page "https://launchpad.net/intltool/+download")
|
||||
(synopsis "Tools to centralise translations of different file formats")
|
||||
(description
|
||||
"intltool is a set of tools to centralize translation of many different
|
||||
"intltool is a set of tools to centralise translations of many different
|
||||
file formats using GNU gettext-compatible PO files.
|
||||
|
||||
The intltool collection can be used to do these things:
|
||||
|
@ -175,4 +165,4 @@ The intltool collection can be used to do these things:
|
|||
|
||||
Merge back the translations from .po files into .xml, .desktop and
|
||||
oaf files. This merge step will happen at build resp. installation time.")
|
||||
(license gpl2)))
|
||||
(license license:gpl2+)))
|
||||
|
|
|
@ -88,6 +88,11 @@
|
|||
;; When cross-compiling, a native version of Guile itself is needed.
|
||||
(self-native-input? #t)
|
||||
|
||||
(native-search-paths
|
||||
(list (search-path-specification
|
||||
(variable "GUILE_LOAD_PATH")
|
||||
(directories '("share/guile/site")))))
|
||||
|
||||
(synopsis "Scheme implementation intended especially for extensions")
|
||||
(description
|
||||
"GNU Guile 1.8 is an interpreter for the Scheme programming language,
|
||||
|
@ -137,6 +142,14 @@ extensible. It supports many SRFIs.")
|
|||
(string-append bash "/bin/bash")))))
|
||||
%standard-phases)))
|
||||
|
||||
(native-search-paths
|
||||
(list (search-path-specification
|
||||
(variable "GUILE_LOAD_PATH")
|
||||
(directories '("share/guile/site/2.0")))
|
||||
(search-path-specification
|
||||
(variable "GUILE_LOAD_COMPILED_PATH")
|
||||
(directories '("share/guile/site/2.0")))))
|
||||
|
||||
(synopsis "Scheme implementation intended especially for extensions")
|
||||
(description
|
||||
"GNU Guile is an implementation of the Scheme programming language, with
|
||||
|
@ -151,15 +164,7 @@ call interface, and powerful string processing.")
|
|||
(define-public guile-2.0/fixed
|
||||
;; A package of Guile 2.0 that's rarely changed. It is the one used
|
||||
;; in the `base' module, and thus changing it entails a full rebuild.
|
||||
(package (inherit guile-2.0)
|
||||
(version "2.0.7")
|
||||
(source (origin
|
||||
(method url-fetch)
|
||||
(uri (string-append "mirror://gnu/guile/guile-" version
|
||||
".tar.xz"))
|
||||
(sha256
|
||||
(base32
|
||||
"0f53pxkia4v17n0avwqlcjpy0n89hkazm2xsa6p84lv8k6k8y9vg"))))))
|
||||
guile-2.0)
|
||||
|
||||
|
||||
;;;
|
||||
|
|
|
@ -0,0 +1,50 @@
|
|||
;;; GNU Guix --- Functional package management for GNU
|
||||
;;; Copyright © 2013 Andreas Enge <andreas@enge.fr>
|
||||
;;;
|
||||
;;; 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 <http://www.gnu.org/licenses/>.
|
||||
|
||||
(define-module (gnu packages lesstif)
|
||||
#:use-module ((guix licenses)
|
||||
#:renamer (symbol-prefix-proc 'license:))
|
||||
#:use-module (guix packages)
|
||||
#:use-module (guix download)
|
||||
#:use-module (guix build-system gnu)
|
||||
#:use-module (gnu packages xorg))
|
||||
|
||||
|
||||
(define-public lesstif
|
||||
(package
|
||||
(name "lesstif")
|
||||
(version "0.95.2")
|
||||
(source
|
||||
(origin
|
||||
(method url-fetch)
|
||||
(uri (string-append
|
||||
"mirror://sourceforge/lesstif/lesstif/" version
|
||||
"/lesstif-" version ".tar.bz2"))
|
||||
(sha256
|
||||
(base32
|
||||
"1qzpxjjf7ri1jzv71mvq5m9g8hfaj5yzwp30rwxlm6n2b24a6jpb"))))
|
||||
(build-system gnu-build-system)
|
||||
(propagated-inputs
|
||||
`(("printproto" ,printproto)))
|
||||
(inputs
|
||||
`(("libxext" ,libxext)
|
||||
("libxt" ,libxt)))
|
||||
(home-page "http://lesstif.sourceforge.net/")
|
||||
(synopsis "Clone of the Motif toolkit for the X window system")
|
||||
(description "Clone of the Motif toolkit for the X window system")
|
||||
(license license:gpl2+))) ; some files are lgpl2.1+ or x11
|
|
@ -31,18 +31,25 @@
|
|||
#:use-module (guix download)
|
||||
#:use-module (guix build-system gnu))
|
||||
|
||||
(define-public (system->linux-architecture arch)
|
||||
"Return the Linux architecture name for ARCH, a Guix system name such as
|
||||
\"x86_64-linux\"."
|
||||
(let ((arch (car (string-split arch #\-))))
|
||||
(cond ((string=? arch "i686") "i386")
|
||||
((string-prefix? "mips" arch) "mips")
|
||||
((string-prefix? "arm" arch) "arm")
|
||||
(else arch))))
|
||||
|
||||
(define-public linux-libre-headers
|
||||
(let* ((version* "3.3.8")
|
||||
(build-phase
|
||||
'(lambda* (#:key system #:allow-other-keys)
|
||||
(let ((arch (car (string-split system #\-))))
|
||||
(setenv "ARCH"
|
||||
(cond ((string=? arch "i686") "i386")
|
||||
(else arch)))
|
||||
(format #t "`ARCH' set to `~a'~%" (getenv "ARCH")))
|
||||
(lambda (arch)
|
||||
`(lambda _
|
||||
(setenv "ARCH" ,(system->linux-architecture arch))
|
||||
(format #t "`ARCH' set to `~a'~%" (getenv "ARCH"))
|
||||
|
||||
(and (zero? (system* "make" "defconfig"))
|
||||
(zero? (system* "make" "mrproper" "headers_check")))))
|
||||
(zero? (system* "make" "mrproper" "headers_check"))))))
|
||||
(install-phase
|
||||
`(lambda* (#:key outputs #:allow-other-keys)
|
||||
(let ((out (assoc-ref outputs "out")))
|
||||
|
@ -73,7 +80,7 @@
|
|||
(guix build utils)
|
||||
(srfi srfi-1))
|
||||
#:phases (alist-replace
|
||||
'build ,build-phase
|
||||
'build ,(build-phase (%current-system))
|
||||
(alist-replace
|
||||
'install ,install-phase
|
||||
(alist-delete 'configure %standard-phases)))
|
||||
|
|
|
@ -324,7 +324,10 @@
|
|||
(string-append incdir "/asm-generic"))
|
||||
#t))))
|
||||
(inputs `(("libc" ,glibc)
|
||||
("linux-headers" ,linux-libre-headers))))))
|
||||
("linux-headers" ,linux-libre-headers)))
|
||||
|
||||
;; Only one output.
|
||||
(outputs '("out")))))
|
||||
|
||||
(define %gcc-static
|
||||
;; A statically-linked GCC, with stripped-down functionality.
|
||||
|
|
|
@ -27,18 +27,15 @@
|
|||
(define-public gmp
|
||||
(package
|
||||
(name "gmp")
|
||||
(version "5.1.0")
|
||||
(version "5.1.1")
|
||||
(source (origin
|
||||
(method url-fetch)
|
||||
(uri
|
||||
;; Note: this version is not available from GNU mirrors
|
||||
;; because it was made with an Automake affected by
|
||||
;; CVE-2012-3386.
|
||||
(string-append "ftp://ftp.gmplib.org/pub/gmp-"
|
||||
version "/gmp-" version ".tar.bz2"))
|
||||
(string-append "mirror://gnu/gmp/gmp-"
|
||||
version ".tar.xz"))
|
||||
(sha256
|
||||
(base32
|
||||
"15n7xxgasbxdch8ii8z9ic6fxc2ysk3q8iavf55abjp5iylspnfz"))))
|
||||
"1hili06lcf0clg5qfvz7knm6pmj6ab54yhsvskp1mdny5xw4vmjb"))))
|
||||
(build-system gnu-build-system)
|
||||
(native-inputs `(("m4" ,m4)))
|
||||
(arguments `(#:configure-flags
|
||||
|
@ -73,13 +70,13 @@ faster algorithms.")
|
|||
(define-public mpfr
|
||||
(package
|
||||
(name "mpfr")
|
||||
(version "3.1.1")
|
||||
(version "3.1.2")
|
||||
(source (origin
|
||||
(method url-fetch)
|
||||
(uri (string-append "mirror://gnu/mpfr/mpfr-" version
|
||||
".tar.xz"))
|
||||
(sha256 (base32
|
||||
"0ym1ylcq803n52qrggxqmkz66gbn8ncc3ybawal31v5y5p1srma9"))))
|
||||
"0fs501qi8l523gs3cpy4jjcnvwxggyfbklcys80wq236xx3hz79r"))))
|
||||
(build-system gnu-build-system)
|
||||
(propagated-inputs `(("gmp" ,gmp))) ; <mpfr.h> refers to <gmp.h>
|
||||
(synopsis "C library for arbitrary precision floating-point arithmetic")
|
||||
|
|
|
@ -55,7 +55,7 @@
|
|||
("libtool" ,libtool "bin")
|
||||
("zlib" ,zlib)))
|
||||
(arguments
|
||||
`(#:parallel-tests? #f
|
||||
`(#:tests? #f
|
||||
#:phases
|
||||
(alist-replace
|
||||
'configure
|
||||
|
@ -63,19 +63,7 @@
|
|||
(let ((configure (assoc-ref %standard-phases 'configure)))
|
||||
(apply configure args)
|
||||
(copy-file (which "libtool") "libtool")))
|
||||
(alist-replace
|
||||
'check
|
||||
(lambda* (#:key #:allow-other-keys #:rest args)
|
||||
(let ((check (assoc-ref %standard-phases 'check)))
|
||||
(for-each (lambda (f)
|
||||
(substitute* (string-append "tests/scripts/" f)
|
||||
(("/bin/rm") "rm")))
|
||||
'("all" "its-all" "passwd-search" "sql-all" "test027-emptydn"))
|
||||
;; disable especially finicky tests
|
||||
(delete-file "tests/scripts/test058-syncrepl-asymmetric")
|
||||
(delete-file "tests/scripts/test061-syncreplication-initiation")
|
||||
(apply check args)))
|
||||
%standard-phases))))
|
||||
%standard-phases)))
|
||||
(synopsis "openldap, an implementation of the Lightweight Directory Access Protocol")
|
||||
(description
|
||||
"OpenLDAP is a free implementation of the Lightweight Directory Access Protocol.")
|
||||
|
|
|
@ -0,0 +1,24 @@
|
|||
Search path environment variables for cross-compilers. See the discussion
|
||||
at <http://gcc.gnu.org/ml/gcc/2013-02/msg00124.html>.
|
||||
|
||||
--- gcc-4.7.2/gcc/incpath.c 2012-01-27 00:34:58.000000000 +0100
|
||||
+++ gcc-4.7.2/gcc/incpath.c 2013-02-12 10:11:27.000000000 +0100
|
||||
@@ -452,7 +452,7 @@ register_include_chains (cpp_reader *pfi
|
||||
|
||||
/* CPATH and language-dependent environment variables may add to the
|
||||
include chain. */
|
||||
- add_env_var_paths ("CPATH", BRACKET);
|
||||
+ add_env_var_paths ("CROSS_CPATH", BRACKET);
|
||||
add_env_var_paths (lang_env_vars[idx], SYSTEM);
|
||||
|
||||
target_c_incpath.extra_pre_includes (sysroot, iprefix, stdinc);
|
||||
|
||||
--- gcc-4.7.2/gcc/system.h 2012-02-17 00:16:28.000000000 +0100
|
||||
+++ gcc-4.7.2/gcc/system.h 2013-02-12 10:22:17.000000000 +0100
|
||||
@@ -1023,4 +1023,6 @@ helper_const_non_const_cast (const char
|
||||
#define DEBUG_VARIABLE
|
||||
#endif
|
||||
|
||||
+#define LIBRARY_PATH_ENV "CROSS_LIBRARY_PATH"
|
||||
+
|
||||
#endif /* ! GCC_SYSTEM_H */
|
|
@ -0,0 +1,20 @@
|
|||
This patch allows the dbm module to be built using the compatibility mode of
|
||||
gdbm. It will not be needed any more with Python 2.7.4.
|
||||
--- setup.py 2013-04-06 00:53:37.000000000 +0200
|
||||
+++ setup.py.new 2013-04-06 19:55:05.000000000 +0200
|
||||
@@ -1158,10 +1158,14 @@
|
||||
for cand in dbm_order:
|
||||
if cand == "ndbm":
|
||||
if find_file("ndbm.h", inc_dirs, []) is not None:
|
||||
- # Some systems have -lndbm, others don't
|
||||
+ # Some systems have -lndbm, some have -lgdbm_compat,
|
||||
+ # others have no particular linker flags.
|
||||
if self.compiler.find_library_file(lib_dirs,
|
||||
'ndbm'):
|
||||
ndbm_libs = ['ndbm']
|
||||
+ elif self.compiler.find_library_file(lib_dirs,
|
||||
+ 'gdbm_compat'):
|
||||
+ ndbm_libs = ['gdbm_compat']
|
||||
else:
|
||||
ndbm_libs = []
|
||||
print "building dbm using ndbm"
|
|
@ -0,0 +1,15 @@
|
|||
This patch circumvents an error with 'const char *' to 'char *' conversion,
|
||||
see http://gnats.netbsd.org/45562 .
|
||||
|
||||
diff -u a/xpdf/XPDFViewer.cc b/xpdf/XPDFViewer.cc
|
||||
--- a/xpdf/XPDFViewer.cc 2011-08-15 23:08:53.000000000 +0200
|
||||
+++ b/xpdf/XPDFViewer.cc 2013-03-31 15:13:21.000000000 +0200
|
||||
@@ -1803,7 +1803,7 @@
|
||||
menuPane = XmCreatePulldownMenu(toolBar, "zoomMenuPane", args, n);
|
||||
for (i = 0; i < nZoomMenuItems; ++i) {
|
||||
n = 0;
|
||||
- s = XmStringCreateLocalized(zoomMenuInfo[i].label);
|
||||
+ s = XmStringCreateLocalized((char *) zoomMenuInfo[i].label);
|
||||
XtSetArg(args[n], XmNlabelString, s); ++n;
|
||||
XtSetArg(args[n], XmNuserData, (XtPointer)i); ++n;
|
||||
sprintf(buf, "zoom%d", i);
|
|
@ -17,16 +17,21 @@
|
|||
;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
(define-module (gnu packages pdf)
|
||||
#:use-module ((guix licenses) #:select (gpl2+))
|
||||
#:use-module ((guix licenses)
|
||||
#:renamer (symbol-prefix-proc 'license:))
|
||||
#:use-module (guix packages)
|
||||
#:use-module (guix download)
|
||||
#:use-module (guix build-system gnu)
|
||||
#:use-module (gnu packages)
|
||||
#:use-module (gnu packages compression)
|
||||
#:use-module (gnu packages fontutils)
|
||||
#:use-module (gnu packages ghostscript)
|
||||
#:use-module (gnu packages lesstif)
|
||||
#:use-module (gnu packages libjpeg)
|
||||
#:use-module (gnu packages libpng)
|
||||
#:use-module (gnu packages libtiff)
|
||||
#:use-module (gnu packages pkg-config))
|
||||
#:use-module (gnu packages pkg-config)
|
||||
#:use-module (gnu packages xorg))
|
||||
|
||||
(define-public poppler
|
||||
(package
|
||||
|
@ -40,17 +45,74 @@
|
|||
"1rmrspavldlpqi6g76fijcmshy80m0kxd01nc1dmy4id3h4las44"))))
|
||||
(build-system gnu-build-system)
|
||||
;; FIXME: more dependencies could be added
|
||||
;; cairo output: no (requires cairo >= 1.10.0)
|
||||
;; qt4 wrapper: no
|
||||
;; glib wrapper: no (requires cairo output)
|
||||
;; introspection: no
|
||||
;; use gtk-doc: no
|
||||
;; use libcurl: no
|
||||
;; use libopenjpeg: no
|
||||
(inputs `(("fontconfig" ,fontconfig)
|
||||
("freetype" ,freetype)
|
||||
("libjpeg-8" ,libjpeg-8)
|
||||
("libpng" ,libpng)
|
||||
("libtiff" ,libtiff)
|
||||
("pkg-config" ,pkg-config)
|
||||
("zlib" ,zlib)))
|
||||
(arguments
|
||||
`(#:tests? #f ; no test data provided with the tarball
|
||||
#:configure-flags '("--enable-xpdf-headers"))) ; to install header files
|
||||
#:configure-flags
|
||||
'("--enable-xpdf-headers" ; to install header files
|
||||
"--enable-zlib")))
|
||||
(synopsis "Poppler, a pdf rendering library")
|
||||
(description
|
||||
"Poppler is a PDF rendering library based on the xpdf-3.0 code base.")
|
||||
(license gpl2+)
|
||||
(license license:gpl2+)
|
||||
(home-page "http://poppler.freedesktop.org/")))
|
||||
|
||||
(define-public xpdf
|
||||
(package
|
||||
(name "xpdf")
|
||||
(version "3.03")
|
||||
(source (origin
|
||||
(method url-fetch)
|
||||
(uri (string-append "ftp://ftp.foolabs.com/pub/xpdf/xpdf-"
|
||||
version ".tar.gz"))
|
||||
(sha256 (base32
|
||||
"1jnfzdqc54wa73lw28kjv0m7120mksb0zkcn81jdlvijyvc67kq2"))))
|
||||
(build-system gnu-build-system)
|
||||
(inputs `(("freetype" ,freetype)
|
||||
("gs-fonts" ,gs-fonts)
|
||||
("lesstif" ,lesstif)
|
||||
("libpaper" ,libpaper)
|
||||
("libx11" ,libx11)
|
||||
("libxext" ,libxext)
|
||||
("libxp" ,libxp)
|
||||
("libxpm" ,libxpm)
|
||||
("libxt" ,libxt)
|
||||
("zlib" ,zlib)
|
||||
("patch/constchar"
|
||||
,(search-patch "xpdf-constchar.patch"))))
|
||||
(arguments
|
||||
`(#:tests? #f ; there is no check target
|
||||
#:patches (list (assoc-ref %build-inputs
|
||||
"patch/constchar"))
|
||||
#:phases
|
||||
(alist-replace
|
||||
'install
|
||||
(lambda* (#:key outputs inputs #:allow-other-keys #:rest args)
|
||||
(let* ((install (assoc-ref %standard-phases 'install))
|
||||
(out (assoc-ref outputs "out"))
|
||||
(xpdfrc (string-append out "/etc/xpdfrc"))
|
||||
(gs-fonts (assoc-ref inputs "gs-fonts")))
|
||||
(apply install args)
|
||||
(substitute* xpdfrc
|
||||
(("/usr/local/share/ghostscript/fonts")
|
||||
(string-append gs-fonts "/share/fonts/type1/ghostscript"))
|
||||
(("#fontFile") "fontFile"))))
|
||||
%standard-phases)))
|
||||
(synopsis "Viewer for pdf files based on the Motif toolkit.")
|
||||
(description
|
||||
"Xpdf is a viewer for Portable Document Format (PDF) files")
|
||||
(license license:gpl3) ; or gpl2, but not gpl2+
|
||||
(home-page "http://www.foolabs.com/xpdf/")))
|
||||
|
|
|
@ -63,6 +63,9 @@
|
|||
(string-append "-Dloclibpth=" libc "/lib")))))
|
||||
%standard-phases)))
|
||||
(inputs `(("patch/no-sys-dirs" ,(search-patch "perl-no-sys-dirs.patch"))))
|
||||
(native-search-paths (list (search-path-specification
|
||||
(variable "PERL5LIB")
|
||||
(directories '("lib/perl5/site_perl")))))
|
||||
(synopsis "Implementation of the Perl programming language")
|
||||
(description
|
||||
"Perl 5 is a highly capable, feature-rich programming language with over
|
||||
|
|
|
@ -36,6 +36,11 @@
|
|||
"05wc5nwkqz7saj2v33ydmz1y6jdg659dll4jjh91n41m63gx0qsg"))))
|
||||
(build-system gnu-build-system)
|
||||
(arguments `(#:configure-flags '("--with-internal-glib")))
|
||||
(native-search-paths
|
||||
(list (search-path-specification
|
||||
(variable "PKG_CONFIG_PATH")
|
||||
(directories '("lib/pkgconfig" "lib64/pkgconfig"
|
||||
"share/pkgconfig")))))
|
||||
(home-page "http://www.freedesktop.org/wiki/Software/pkg-config")
|
||||
(license gpl2+)
|
||||
(synopsis "a helper tool used when compiling applications and
|
||||
|
|
|
@ -67,6 +67,10 @@
|
|||
("openssl" ,openssl)
|
||||
("readline" ,readline)
|
||||
("zlib" ,zlib)))
|
||||
(native-search-paths
|
||||
(list (search-path-specification
|
||||
(variable "PYTHONPATH")
|
||||
(directories '("lib/python2.7/site-packages")))))
|
||||
(home-page "http://python.org")
|
||||
(synopsis
|
||||
"Python, a high-level dynamically-typed programming language")
|
||||
|
|
|
@ -0,0 +1,71 @@
|
|||
;;; GNU Guix --- Functional package management for GNU
|
||||
;;; Copyright © 2013 Ludovic Courtès <ludo@gnu.org>
|
||||
;;;
|
||||
;;; 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 <http://www.gnu.org/licenses/>.
|
||||
|
||||
(define-module (gnu packages ratpoison)
|
||||
#:use-module (guix packages)
|
||||
#:use-module (guix download)
|
||||
#:use-module (guix build-system gnu)
|
||||
#:use-module ((guix licenses) #:select (gpl2+))
|
||||
#:use-module (gnu packages xorg)
|
||||
#:use-module (gnu packages perl)
|
||||
#:use-module (gnu packages readline)
|
||||
#:use-module (gnu packages pkg-config)
|
||||
#:use-module (gnu packages fontutils))
|
||||
|
||||
(define-public ratpoison
|
||||
(package
|
||||
(name "ratpoison")
|
||||
(version "1.4.6")
|
||||
(source (origin
|
||||
(method url-fetch)
|
||||
(uri (string-append "mirror://savannah/ratpoison/ratpoison-"
|
||||
version ".tar.xz"))
|
||||
(sha256
|
||||
(base32
|
||||
"0v4mh8d3vsh5xbbycfdl3g8zfygi1rkslh1x7k5hi1d05bfq3cdr"))))
|
||||
(build-system gnu-build-system)
|
||||
(inputs
|
||||
`(("perl" ,perl)
|
||||
("pkg-config" ,pkg-config)
|
||||
("libXi" ,libxi)
|
||||
("readline" ,readline)
|
||||
("xextproto" ,xextproto)
|
||||
("libXtst" ,libxtst)
|
||||
("freetype" ,freetype)
|
||||
("fontconfig" ,fontconfig)
|
||||
("libXft" ,libxft)
|
||||
("libXpm" ,libxpm)
|
||||
("libXt" ,libxt)
|
||||
("inputproto" ,inputproto)
|
||||
("libX11" ,libx11)))
|
||||
(home-page "http://www.nongnu.org/ratpoison/")
|
||||
(synopsis "A simple mouse-free tiling window manager")
|
||||
(description
|
||||
"Ratpoison is a simple window manager with no fat library
|
||||
dependencies, no fancy graphics, no window decorations, and no
|
||||
rodent dependence. It is largely modelled after GNU Screen which
|
||||
has done wonders in the virtual terminal market.
|
||||
|
||||
The screen can be split into non-overlapping frames. All windows
|
||||
are kept maximized inside their frames to take full advantage of
|
||||
your precious screen real estate.
|
||||
|
||||
All interaction with the window manager is done through keystrokes.
|
||||
Ratpoison has a prefix map to minimize the key clobbering that
|
||||
cripples Emacs and other quality pieces of software.")
|
||||
(license gpl2+)))
|
|
@ -33,6 +33,7 @@
|
|||
#:use-module (gnu packages pkg-config)
|
||||
#:use-module (gnu packages python)
|
||||
#:use-module (gnu packages tcsh)
|
||||
#:use-module (gnu packages xorg)
|
||||
#:use-module (gnu packages zip))
|
||||
|
||||
(define texlive-extra-src
|
||||
|
@ -66,6 +67,8 @@
|
|||
("icu4c" ,icu4c)
|
||||
("ghostscript" ,ghostscript)
|
||||
("libpng" ,libpng)
|
||||
("libxaw" ,libxaw)
|
||||
("libxt" ,libxt)
|
||||
("perl" ,perl)
|
||||
("poppler" ,poppler)
|
||||
("pkg-config" ,pkg-config)
|
||||
|
@ -88,7 +91,6 @@
|
|||
,(string-append "--datarootdir=" (assoc-ref %outputs "data"))
|
||||
,(string-append "--infodir=" (assoc-ref %outputs "out") "/share/info")
|
||||
,(string-append "--mandir=" (assoc-ref %outputs "out") "/share/man")
|
||||
"--without-x" ; FIXME: Drop as soon as X is available.
|
||||
"--with-system-freetype2"
|
||||
;; "--with-system-gd"
|
||||
;; "--with-system-graphite"
|
||||
|
|
|
@ -43,13 +43,6 @@
|
|||
`(("gnutls" ,gnutls)
|
||||
("perl" ,perl)
|
||||
("gettext" ,guix:gettext)))
|
||||
(arguments
|
||||
'(#:phases
|
||||
(alist-cons-before 'build 'patch-/usr/bin/env
|
||||
(lambda _
|
||||
(for-each patch-shebang
|
||||
'("doc/texi2pod.pl" "tests/run-px")))
|
||||
%standard-phases)))
|
||||
(home-page "http://www.gnu.org/software/wget/")
|
||||
(synopsis "Non-interactive command-line utility for downloading files")
|
||||
(description
|
||||
|
|
|
@ -19,6 +19,7 @@
|
|||
|
||||
(define-module (gnu packages xml)
|
||||
#:use-module (gnu packages)
|
||||
#:use-module (gnu packages compression)
|
||||
#:use-module (gnu packages gnupg)
|
||||
#:use-module (gnu packages perl)
|
||||
#:use-module (gnu packages python)
|
||||
|
@ -64,7 +65,21 @@ things the parser might find in the XML document (like start tags).")
|
|||
(home-page "http://www.xmlsoft.org/")
|
||||
(synopsis "libxml2, a C parser for XML")
|
||||
(inputs `(("perl" ,perl)
|
||||
("python" ,python)))
|
||||
("python" ,python)
|
||||
("zlib" ,zlib)))
|
||||
(arguments
|
||||
`(#:phases
|
||||
(alist-replace
|
||||
'install
|
||||
(lambda* (#:key inputs outputs #:allow-other-keys #:rest args)
|
||||
(let ((install (assoc-ref %standard-phases 'install))
|
||||
(glibc (assoc-ref inputs "libc"))
|
||||
(out (assoc-ref outputs "out")))
|
||||
(apply install args)
|
||||
(chdir "python")
|
||||
(substitute* "setup.py" (("/opt/include") (string-append glibc "/include")))
|
||||
(system* "python" "setup.py" "install" (string-append "--prefix=" out))))
|
||||
%standard-phases)))
|
||||
(description
|
||||
"Libxml2 is the XML C parser and toolkit developed for the Gnome project
|
||||
(but it is usable outside of the Gnome platform).")
|
||||
|
@ -86,7 +101,19 @@ things the parser might find in the XML document (like start tags).")
|
|||
(synopsis "libxslt, a C library for applying XSLT stylesheets to XML documents")
|
||||
(inputs `(("libgcrypt" ,libgcrypt)
|
||||
("libxml2" ,libxml2)
|
||||
("python" ,python)))
|
||||
("python" ,python)
|
||||
("zlib" ,zlib)))
|
||||
(arguments
|
||||
`(#:phases
|
||||
(alist-replace
|
||||
'configure
|
||||
(lambda* (#:key inputs #:allow-other-keys #:rest args)
|
||||
(let ((configure (assoc-ref %standard-phases 'configure))
|
||||
(libxml2 (assoc-ref inputs "libxml2")))
|
||||
;; FIXME: This should be done more centrally.
|
||||
(setenv "PYTHONPATH" (string-append libxml2 "/lib/python2.7/site-packages"))
|
||||
(apply configure args)))
|
||||
%standard-phases)))
|
||||
(description
|
||||
"Libxslt is an XSLT C library developed for the GNOME project. It is
|
||||
based on libxml for XML parsing, tree manipulation and XPath support.")
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -38,11 +38,11 @@
|
|||
(define* (cmake-build store name source inputs
|
||||
#:key (guile #f)
|
||||
(outputs '("out")) (configure-flags ''())
|
||||
(search-paths '())
|
||||
(make-flags ''())
|
||||
(patches ''()) (patch-flags ''("--batch" "-p1"))
|
||||
(cmake (@ (gnu packages cmake) cmake))
|
||||
(out-of-source? #f)
|
||||
(path-exclusions ''())
|
||||
(tests? #t)
|
||||
(test-target "test")
|
||||
(parallel-build? #t) (parallel-tests? #f)
|
||||
|
@ -71,13 +71,15 @@ provides a 'CMakeLists.txt' file as its build system."
|
|||
#:system ,system
|
||||
#:outputs %outputs
|
||||
#:inputs %build-inputs
|
||||
#:search-paths ',(map search-path-specification->sexp
|
||||
(append search-paths
|
||||
(standard-search-paths)))
|
||||
#:patches ,patches
|
||||
#:patch-flags ,patch-flags
|
||||
#:phases ,phases
|
||||
#:configure-flags ,configure-flags
|
||||
#:make-flags ,make-flags
|
||||
#:out-of-source? ,out-of-source?
|
||||
#:path-exclusions ,path-exclusions
|
||||
#:tests? ,tests?
|
||||
#:test-target ,test-target
|
||||
#:parallel-build? ,parallel-build?
|
||||
|
|
|
@ -27,6 +27,7 @@
|
|||
#:use-module (ice-9 match)
|
||||
#:export (gnu-build
|
||||
gnu-build-system
|
||||
standard-search-paths
|
||||
standard-inputs
|
||||
package-with-explicit-inputs
|
||||
package-with-extra-configure-variable
|
||||
|
@ -135,6 +136,24 @@ use `--strip-all' as the arguments to `strip'."
|
|||
;; Store passed to STANDARD-INPUTS.
|
||||
(make-parameter #f))
|
||||
|
||||
(define (standard-packages)
|
||||
"Return the list of (NAME PACKAGE OUTPUT) or (NAME PACKAGE) tuples of
|
||||
standard packages used as implicit inputs of the GNU build system."
|
||||
|
||||
;; Resolve (gnu packages base) lazily to hide circular dependency.
|
||||
(let ((distro (resolve-module '(gnu packages base))))
|
||||
(module-ref distro '%final-inputs)))
|
||||
|
||||
(define (standard-search-paths)
|
||||
"Return the list of <search-path-specification> for the standard (implicit)
|
||||
inputs."
|
||||
(append-map (match-lambda
|
||||
((_ (? package? p) _ ...)
|
||||
(package-native-search-paths p))
|
||||
(_
|
||||
'()))
|
||||
(standard-packages)))
|
||||
|
||||
(define standard-inputs
|
||||
(memoize
|
||||
(lambda (system)
|
||||
|
@ -148,9 +167,7 @@ System: GCC, GNU Make, Bash, Coreutils, etc."
|
|||
(z
|
||||
(error "invalid standard input" z)))
|
||||
|
||||
;; Resolve (gnu packages base) lazily to hide circular dependency.
|
||||
(let* ((distro (resolve-module '(gnu packages base)))
|
||||
(inputs (module-ref distro '%final-inputs)))
|
||||
(let ((inputs (standard-packages)))
|
||||
(append inputs
|
||||
(append-map (match-lambda
|
||||
((name package _ ...)
|
||||
|
@ -159,11 +176,12 @@ System: GCC, GNU Make, Bash, Coreutils, etc."
|
|||
|
||||
(define* (gnu-build store name source inputs
|
||||
#:key (guile #f)
|
||||
(outputs '("out")) (configure-flags ''())
|
||||
(outputs '("out"))
|
||||
(search-paths '())
|
||||
(configure-flags ''())
|
||||
(make-flags ''())
|
||||
(patches ''()) (patch-flags ''("--batch" "-p1"))
|
||||
(out-of-source? #f)
|
||||
(path-exclusions ''())
|
||||
(tests? #t)
|
||||
(test-target "check")
|
||||
(parallel-build? #t) (parallel-tests? #t)
|
||||
|
@ -190,6 +208,16 @@ the builder's environment, from the host. Note that we distinguish
|
|||
between both, because for Guile's own modules like (ice-9 foo), we want
|
||||
to use GUILE's own version of it, rather than import the user's one,
|
||||
which could lead to gratuitous input divergence."
|
||||
(define implicit-inputs
|
||||
(and implicit-inputs?
|
||||
(parameterize ((%store store))
|
||||
(standard-inputs system))))
|
||||
|
||||
(define implicit-search-paths
|
||||
(if implicit-inputs?
|
||||
(standard-search-paths)
|
||||
'()))
|
||||
|
||||
(define builder
|
||||
`(begin
|
||||
(use-modules ,@modules)
|
||||
|
@ -199,13 +227,15 @@ which could lead to gratuitous input divergence."
|
|||
#:system ,system
|
||||
#:outputs %outputs
|
||||
#:inputs %build-inputs
|
||||
#:search-paths ',(map search-path-specification->sexp
|
||||
(append implicit-search-paths
|
||||
search-paths))
|
||||
#:patches ,patches
|
||||
#:patch-flags ,patch-flags
|
||||
#:phases ,phases
|
||||
#:configure-flags ,configure-flags
|
||||
#:make-flags ,make-flags
|
||||
#:out-of-source? ,out-of-source?
|
||||
#:path-exclusions ,path-exclusions
|
||||
#:tests? ,tests?
|
||||
#:test-target ,test-target
|
||||
#:parallel-build? ,parallel-build?
|
||||
|
@ -233,8 +263,7 @@ which could lead to gratuitous input divergence."
|
|||
'())
|
||||
,@inputs
|
||||
,@(if implicit-inputs?
|
||||
(parameterize ((%store store))
|
||||
(standard-inputs system))
|
||||
implicit-inputs
|
||||
'()))
|
||||
#:outputs outputs
|
||||
#:modules imported-modules
|
||||
|
|
|
@ -38,6 +38,7 @@
|
|||
(define* (perl-build store name source inputs
|
||||
#:key
|
||||
(perl (@ (gnu packages perl) perl))
|
||||
(search-paths '())
|
||||
(tests? #t)
|
||||
(make-maker-flags ''())
|
||||
(phases '(@ (guix build perl-build-system)
|
||||
|
@ -53,6 +54,10 @@
|
|||
(guix build utils))))
|
||||
"Build SOURCE using PERL, and with INPUTS. This assumes that SOURCE
|
||||
provides a `Makefile.PL' file as its build system."
|
||||
(define perl-search-paths
|
||||
(append (package-native-search-paths perl)
|
||||
(standard-search-paths)))
|
||||
|
||||
(define builder
|
||||
`(begin
|
||||
(use-modules ,@modules)
|
||||
|
@ -60,6 +65,9 @@ provides a `Makefile.PL' file as its build system."
|
|||
#:source ,(if (and source (derivation-path? source))
|
||||
(derivation-path->output-path source)
|
||||
source)
|
||||
#:search-paths ',(map search-path-specification->sexp
|
||||
(append perl-search-paths
|
||||
search-paths))
|
||||
#:make-maker-flags ,make-maker-flags
|
||||
#:system ,system
|
||||
#:test-target "test"
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
;;; GNU Guix --- Functional package management for GNU
|
||||
;;; Copyright © 2012 Ludovic Courtès <ludo@gnu.org>
|
||||
;;; Copyright © 2012, 2013 Ludovic Courtès <ludo@gnu.org>
|
||||
;;;
|
||||
;;; This file is part of GNU Guix.
|
||||
;;;
|
||||
|
@ -26,7 +26,9 @@
|
|||
#:export (trivial-build-system))
|
||||
|
||||
(define* (trivial-build store name source inputs
|
||||
#:key outputs guile system builder (modules '()))
|
||||
#:key
|
||||
outputs guile system builder (modules '())
|
||||
search-paths)
|
||||
"Run build expression BUILDER, an expression, for SYSTEM. SOURCE is
|
||||
ignored."
|
||||
(define guile-for-build
|
||||
|
|
|
@ -48,33 +48,22 @@
|
|||
#f
|
||||
dir))
|
||||
|
||||
(define* (set-paths #:key inputs (path-exclusions '())
|
||||
(define* (set-paths #:key inputs (search-paths '())
|
||||
#:allow-other-keys)
|
||||
(define (relevant-input-directories env-var)
|
||||
;; Return the subset of INPUTS that should be considered when setting
|
||||
;; ENV-VAR.
|
||||
(match (assoc-ref path-exclusions env-var)
|
||||
(#f
|
||||
(map cdr inputs))
|
||||
((excluded ...)
|
||||
(filter-map (match-lambda
|
||||
((name . dir)
|
||||
(and (not (member name excluded))
|
||||
(define input-directories
|
||||
(match inputs
|
||||
(((_ . dir) ...)
|
||||
dir)))
|
||||
inputs))))
|
||||
|
||||
(set-path-environment-variable "PATH" '("bin")
|
||||
(relevant-input-directories "PATH"))
|
||||
(set-path-environment-variable "CPATH" '("include")
|
||||
(relevant-input-directories "CPATH"))
|
||||
(set-path-environment-variable "LIBRARY_PATH" '("lib" "lib64")
|
||||
(relevant-input-directories "LIBRARY_PATH"))
|
||||
(set-path-environment-variable "PATH" '("bin" "sbin")
|
||||
input-directories)
|
||||
|
||||
;; FIXME: Eventually move this to the `search-paths' field of the
|
||||
;; `pkg-config' package.
|
||||
(set-path-environment-variable "PKG_CONFIG_PATH"
|
||||
'("lib/pkgconfig" "lib64/pkgconfig")
|
||||
(relevant-input-directories "PKG_CONFIG_PATH"))
|
||||
(for-each (match-lambda
|
||||
((env-var (directories ...) separator)
|
||||
(set-path-environment-variable env-var directories
|
||||
input-directories
|
||||
#:separator separator)))
|
||||
search-paths)
|
||||
|
||||
;; Dump the environment variables as a shell script, for handy debugging.
|
||||
(system "export > environment-variables"))
|
||||
|
@ -120,9 +109,10 @@ makefiles."
|
|||
(base (basename out))
|
||||
(dash (string-rindex base #\-)))
|
||||
;; XXX: We'd rather use `package-name->name+version' or similar.
|
||||
(if dash
|
||||
(string-drop (if dash
|
||||
(substring base 0 dash)
|
||||
base)))
|
||||
base)
|
||||
(+ 1 (string-index base #\-)))))
|
||||
|
||||
(let* ((prefix (assoc-ref outputs "out"))
|
||||
(bindir (assoc-ref outputs "bin"))
|
||||
|
|
|
@ -50,10 +50,6 @@
|
|||
(define* (perl-build #:key inputs (phases %standard-phases)
|
||||
#:allow-other-keys #:rest args)
|
||||
"Build the given Perl package, applying all of PHASES in order."
|
||||
(set-path-environment-variable "PERL5LIB" '("lib/perl5/site_perl")
|
||||
(match inputs
|
||||
(((_ . path) ...)
|
||||
path)))
|
||||
(apply gnu:gnu-build
|
||||
#:inputs inputs #:phases phases
|
||||
args))
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
;;; GNU Guix --- Functional package management for GNU
|
||||
;;; Copyright © 2012, 2013 Ludovic Courtès <ludo@gnu.org>
|
||||
;;; Copyright © 2013 Andreas Enge <andreas@enge.fr>
|
||||
;;; Copyright © 2013 Nikita Karetnikov <nikita@karetnikov.org>
|
||||
;;;
|
||||
;;; This file is part of GNU Guix.
|
||||
;;;
|
||||
|
@ -31,6 +33,7 @@
|
|||
with-directory-excursion
|
||||
mkdir-p
|
||||
copy-recursively
|
||||
delete-file-recursively
|
||||
find-files
|
||||
|
||||
set-path-environment-variable
|
||||
|
@ -49,9 +52,10 @@
|
|||
patch-shebang
|
||||
patch-makefile-SHELL
|
||||
fold-port-matches
|
||||
remove-store-references))
|
||||
remove-store-references
|
||||
wrap-program))
|
||||
|
||||
|
||||
|
||||
;;;
|
||||
;;; Directories.
|
||||
;;;
|
||||
|
@ -120,8 +124,11 @@ return values of applying PROC to the port."
|
|||
(() #t))))
|
||||
|
||||
(define* (copy-recursively source destination
|
||||
#:optional (log (current-output-port)))
|
||||
"Copy SOURCE directory to DESTINATION."
|
||||
#:key
|
||||
(log (current-output-port))
|
||||
(follow-symlinks? #f))
|
||||
"Copy SOURCE directory to DESTINATION. Follow symlinks if FOLLOW-SYMLINKS?
|
||||
is true; otherwise, just preserve them. Write verbose output to the LOG port."
|
||||
(define strip-source
|
||||
(let ((len (string-length source)))
|
||||
(lambda (file)
|
||||
|
@ -132,7 +139,12 @@ return values of applying PROC to the port."
|
|||
(let ((dest (string-append destination
|
||||
(strip-source file))))
|
||||
(format log "`~a' -> `~a'~%" file dest)
|
||||
(copy-file file dest)))
|
||||
(case (stat:type stat)
|
||||
((symlink)
|
||||
(let ((target (readlink file)))
|
||||
(symlink target dest)))
|
||||
(else
|
||||
(copy-file file dest)))))
|
||||
(lambda (dir stat result) ; down
|
||||
(mkdir-p (string-append destination
|
||||
(strip-source dir))))
|
||||
|
@ -144,7 +156,31 @@ return values of applying PROC to the port."
|
|||
file (strerror errno))
|
||||
#f)
|
||||
#t
|
||||
source))
|
||||
source
|
||||
|
||||
(if follow-symlinks?
|
||||
stat
|
||||
lstat)))
|
||||
|
||||
(define (delete-file-recursively dir)
|
||||
"Delete DIR recursively, like `rm -rf', without following symlinks. Report
|
||||
but ignore errors."
|
||||
(file-system-fold (const #t) ; enter?
|
||||
(lambda (file stat result) ; leaf
|
||||
(delete-file file))
|
||||
(const #t) ; down
|
||||
(lambda (dir stat result) ; up
|
||||
(rmdir dir))
|
||||
(const #t) ; skip
|
||||
(lambda (file stat errno result)
|
||||
(format (current-error-port)
|
||||
"warning: failed to delete ~a: ~a~%"
|
||||
file (strerror errno)))
|
||||
#t
|
||||
dir
|
||||
|
||||
;; Don't follow symlinks.
|
||||
lstat))
|
||||
|
||||
(define (find-files dir regexp)
|
||||
"Return the list of files under DIR whose basename matches REGEXP."
|
||||
|
@ -426,7 +462,7 @@ bytes transferred and the continuation of the transfer as a thunk."
|
|||
(stat:mtimensec stat)))
|
||||
|
||||
(define patch-shebang
|
||||
(let ((shebang-rx (make-regexp "^[[:blank:]]*([[:graph:]]+)(.*)$")))
|
||||
(let ((shebang-rx (make-regexp "^[[:blank:]]*([[:graph:]]+)[[:blank:]]*([[:graph:]]*)(.*)$")))
|
||||
(lambda* (file
|
||||
#:optional
|
||||
(path (search-path-as-string->list (getenv "PATH")))
|
||||
|
@ -465,16 +501,29 @@ FILE are kept unchanged."
|
|||
(let ((line (false-if-exception (read-line p))))
|
||||
(and=> (and line (regexp-exec shebang-rx line))
|
||||
(lambda (m)
|
||||
(let* ((cmd (match:substring m 1))
|
||||
(bin (search-path path (basename cmd))))
|
||||
(let* ((interp (match:substring m 1))
|
||||
(arg1 (match:substring m 2))
|
||||
(rest (match:substring m 3))
|
||||
(has-env (string-suffix? "/env" interp))
|
||||
(cmd (if has-env arg1 (basename interp)))
|
||||
(bin (search-path path cmd)))
|
||||
(if bin
|
||||
(if (string=? bin cmd)
|
||||
(if (string=? bin interp)
|
||||
#f ; nothing to do
|
||||
(if has-env
|
||||
(begin
|
||||
(format (current-error-port)
|
||||
"patch-shebang: ~a: changing `~a' to `~a'~%"
|
||||
file cmd bin)
|
||||
(patch p bin (match:substring m 2))))
|
||||
file (string-append interp " " arg1) bin)
|
||||
(patch p bin rest))
|
||||
(begin
|
||||
(format (current-error-port)
|
||||
"patch-shebang: ~a: changing `~a' to `~a'~%"
|
||||
file interp bin)
|
||||
(patch p bin
|
||||
(if (string-null? arg1)
|
||||
""
|
||||
(string-append " " arg1 rest))))))
|
||||
(begin
|
||||
(format (current-error-port)
|
||||
"patch-shebang: ~a: warning: no binary for interpreter `~a' found in $PATH~%"
|
||||
|
@ -605,6 +654,70 @@ known as `nuke-refs' in Nixpkgs."
|
|||
(put-u8 out (char->integer char))
|
||||
result))))))
|
||||
|
||||
(define* (wrap-program prog #:rest vars)
|
||||
"Rename PROG to .PROG-real and make PROG a wrapper. VARS should look like
|
||||
this:
|
||||
|
||||
'(VARIABLE DELIMITER POSITION LIST-OF-DIRECTORIES)
|
||||
|
||||
where DELIMITER is optional. ':' will be used if DELIMITER is not given.
|
||||
|
||||
For example, this command:
|
||||
|
||||
(wrap-program \"foo\"
|
||||
'(\"PATH\" \":\" = (\"/nix/.../bar/bin\"))
|
||||
'(\"CERT_PATH\" suffix (\"/nix/.../baz/certs\"
|
||||
\"/qux/certs\")))
|
||||
|
||||
will copy 'foo' to '.foo-real' and create the file 'foo' with the following
|
||||
contents:
|
||||
|
||||
#!location/of/bin/bash
|
||||
export PATH=\"/nix/.../bar/bin\"
|
||||
export CERT_PATH=\"$CERT_PATH${CERT_PATH:+:}/nix/.../baz/certs:/qux/certs\"
|
||||
exec location/of/.foo-real
|
||||
|
||||
This is useful for scripts that expect particular programs to be in $PATH, for
|
||||
programs that expect particular shared libraries to be in $LD_LIBRARY_PATH, or
|
||||
modules in $GUILE_LOAD_PATH, etc."
|
||||
(let ((prog-real (string-append (dirname prog) "/." (basename prog) "-real"))
|
||||
(prog-tmp (string-append (dirname prog) "/." (basename prog) "-tmp")))
|
||||
(define (export-variable lst)
|
||||
;; Return a string that exports an environment variable.
|
||||
(match lst
|
||||
((var sep '= rest)
|
||||
(format #f "export ~a=\"~a\""
|
||||
var (string-join rest sep)))
|
||||
((var sep 'prefix rest)
|
||||
(format #f "export ~a=\"~a${~a~a+~a}$~a\""
|
||||
var (string-join rest sep) var sep sep var))
|
||||
((var sep 'suffix rest)
|
||||
(format #f "export ~a=\"$~a${~a~a+~a}~a\""
|
||||
var var var sep sep (string-join rest sep)))
|
||||
((var '= rest)
|
||||
(format #f "export ~a=\"~a\""
|
||||
var (string-join rest ":")))
|
||||
((var 'prefix rest)
|
||||
(format #f "export ~a=\"~a${~a:+:}$~a\""
|
||||
var (string-join rest ":") var var))
|
||||
((var 'suffix rest)
|
||||
(format #f "export ~a=\"$~a${~a:+:}~a\""
|
||||
var var var (string-join rest ":")))))
|
||||
|
||||
(copy-file prog prog-real)
|
||||
|
||||
(with-output-to-file prog-tmp
|
||||
(lambda ()
|
||||
(format #t
|
||||
"#!~a~%~a~%exec \"~a\" \"$@\"~%"
|
||||
(which "bash")
|
||||
(string-join (map export-variable vars)
|
||||
"\n")
|
||||
(canonicalize-path prog-real))))
|
||||
|
||||
(chmod prog-tmp #o755)
|
||||
(rename-file prog-tmp prog)))
|
||||
|
||||
;;; Local Variables:
|
||||
;;; eval: (put 'call-with-output-file/atomic 'scheme-indent-function 1)
|
||||
;;; eval: (put 'with-throw-handler 'scheme-indent-function 1)
|
||||
|
|
|
@ -107,8 +107,7 @@
|
|||
"http://mirrors.ircam.fr/pub/apache/"
|
||||
"http://apache-mirror.rbc.ru/pub/apache/")
|
||||
(xorg ; from http://www.x.org/wiki/Releases/Download
|
||||
"http://xorg.freedesktop.org/releases/" ; main mirrors
|
||||
"http://www.x.org/pub/"
|
||||
"http://www.x.org/releases/" ; main mirrors
|
||||
"ftp://mirror.csclub.uwaterloo.ca/x.org/" ; North America
|
||||
"ftp://xorg.mirrors.pair.com/"
|
||||
"http://mirror.csclub.uwaterloo.ca/x.org/"
|
||||
|
|
|
@ -37,6 +37,11 @@
|
|||
origin-file-name
|
||||
base32
|
||||
|
||||
<search-path-specification>
|
||||
search-path-specification
|
||||
search-path-specification?
|
||||
search-path-specification->sexp
|
||||
|
||||
package
|
||||
package?
|
||||
package-name
|
||||
|
@ -49,6 +54,7 @@
|
|||
package-native-inputs
|
||||
package-propagated-inputs
|
||||
package-outputs
|
||||
package-native-search-paths
|
||||
package-search-paths
|
||||
package-synopsis
|
||||
package-description
|
||||
|
@ -105,8 +111,22 @@ representation."
|
|||
((_ str)
|
||||
#'(nix-base32-string->bytevector str)))))
|
||||
|
||||
;; A package.
|
||||
;; The specification of a search path.
|
||||
(define-record-type* <search-path-specification>
|
||||
search-path-specification make-search-path-specification
|
||||
search-path-specification?
|
||||
(variable search-path-specification-variable)
|
||||
(directories search-path-specification-directories)
|
||||
(separator search-path-specification-separator (default ":")))
|
||||
|
||||
(define (search-path-specification->sexp spec)
|
||||
"Return an sexp representing SPEC, a <search-path-specification>. The sexp
|
||||
corresponds to the arguments expected by `set-path-environment-variable'."
|
||||
(match spec
|
||||
(($ <search-path-specification> variable directories separator)
|
||||
`(,variable ,directories ,separator))))
|
||||
|
||||
;; A package.
|
||||
(define-record-type* <package>
|
||||
package make-package
|
||||
package?
|
||||
|
@ -129,10 +149,13 @@ representation."
|
|||
|
||||
(outputs package-outputs ; list of strings
|
||||
(default '("out")))
|
||||
(search-paths package-search-paths ; list of (ENV-VAR (DIRS ...))
|
||||
(default '())) ; tuples; see
|
||||
; `set-path-environment-variable'
|
||||
; (aka. "setup-hook")
|
||||
|
||||
; lists of
|
||||
; <search-path-specification>,
|
||||
; for native and cross
|
||||
; inputs
|
||||
(native-search-paths package-native-search-paths (default '()))
|
||||
(search-paths package-search-paths (default '()))
|
||||
|
||||
(synopsis package-synopsis) ; one-line description
|
||||
(description package-description) ; one or two paragraphs
|
||||
|
@ -328,16 +351,22 @@ PACKAGE for SYSTEM."
|
|||
(($ <package> name version source (= build-system-builder builder)
|
||||
args inputs propagated-inputs native-inputs self-native-input?
|
||||
outputs)
|
||||
;; TODO: For `search-paths', add a builder prologue that calls
|
||||
;; `set-path-environment-variable'.
|
||||
(let ((inputs (map expand-input
|
||||
(package-transitive-inputs package))))
|
||||
(let* ((inputs (package-transitive-inputs package))
|
||||
(input-drvs (map expand-input inputs))
|
||||
(paths (delete-duplicates
|
||||
(append-map (match-lambda
|
||||
((_ (? package? p) _ ...)
|
||||
(package-native-search-paths
|
||||
p))
|
||||
(_ '()))
|
||||
inputs))))
|
||||
|
||||
(apply builder
|
||||
store (package-full-name package)
|
||||
(and source
|
||||
(package-source-derivation store source system))
|
||||
inputs
|
||||
input-drvs
|
||||
#:search-paths paths
|
||||
#:outputs outputs #:system system
|
||||
(args))))))))
|
||||
|
||||
|
|
|
@ -330,6 +330,53 @@ but ~a is available upstream~%")
|
|||
((getaddrinfo-error ftp-error) #f)
|
||||
(else (apply throw key args))))))
|
||||
|
||||
(define* (search-path-environment-variables packages profile
|
||||
#:optional (getenv getenv))
|
||||
"Return environment variable definitions that may be needed for the use of
|
||||
PACKAGES in PROFILE. Use GETENV to determine the current settings and report
|
||||
only settings not already effective."
|
||||
|
||||
;; The search path info is not stored in the manifest. Thus, we infer the
|
||||
;; search paths from same-named packages found in the distro.
|
||||
|
||||
(define package-in-manifest->package
|
||||
(match-lambda
|
||||
((name version _ ...)
|
||||
(match (append (find-packages-by-name name version)
|
||||
(find-packages-by-name name))
|
||||
((p _ ...) p)
|
||||
(_ #f)))))
|
||||
|
||||
(define search-path-definition
|
||||
(match-lambda
|
||||
(($ <search-path-specification> variable directories separator)
|
||||
(let ((values (or (and=> (getenv variable)
|
||||
(cut string-tokenize* <> separator))
|
||||
'()))
|
||||
(directories (filter file-exists?
|
||||
(map (cut string-append profile
|
||||
"/" <>)
|
||||
directories))))
|
||||
(if (every (cut member <> values) directories)
|
||||
#f
|
||||
(format #f "export ~a=\"~a\""
|
||||
variable
|
||||
(string-join directories separator)))))))
|
||||
|
||||
(let* ((packages (filter-map package-in-manifest->package packages))
|
||||
(search-paths (delete-duplicates
|
||||
(append-map package-native-search-paths
|
||||
packages))))
|
||||
(filter-map search-path-definition search-paths)))
|
||||
|
||||
(define (display-search-paths packages profile)
|
||||
"Display the search path environment variables that may need to be set for
|
||||
PACKAGES, in the context of PROFILE."
|
||||
(let ((settings (search-path-environment-variables packages profile)))
|
||||
(unless (null? settings)
|
||||
(format #t (_ "The following environment variable definitions may be needed:~%"))
|
||||
(format #t "~{ ~a~%~}" settings))))
|
||||
|
||||
|
||||
;;;
|
||||
;;; Command-line options.
|
||||
|
@ -354,6 +401,8 @@ Install, remove, or upgrade PACKAGES in a single transaction.\n"))
|
|||
-u, --upgrade[=REGEXP] upgrade all the installed packages matching REGEXP"))
|
||||
(display (_ "
|
||||
--roll-back roll back to the previous generation"))
|
||||
(display (_ "
|
||||
--search-paths display needed environment variable definitions"))
|
||||
(newline)
|
||||
(display (_ "
|
||||
-p, --profile=PROFILE use PROFILE instead of the user's default profile"))
|
||||
|
@ -408,6 +457,9 @@ Install, remove, or upgrade PACKAGES in a single transaction.\n"))
|
|||
(option '("roll-back") #f #f
|
||||
(lambda (opt name arg result)
|
||||
(alist-cons 'roll-back? #t result)))
|
||||
(option '("search-paths") #f #f
|
||||
(lambda (opt name arg result)
|
||||
(cons `(query search-paths) result)))
|
||||
(option '(#\p "profile") #t #f
|
||||
(lambda (opt name arg result)
|
||||
(alist-cons 'profile arg
|
||||
|
@ -728,7 +780,9 @@ Install, remove, or upgrade PACKAGES in a single transaction.\n"))
|
|||
(build-derivations (%store) (list prof-drv)))
|
||||
(begin
|
||||
(switch-symlinks name prof)
|
||||
(switch-symlinks profile name))))))))))
|
||||
(switch-symlinks profile name)
|
||||
(display-search-paths packages
|
||||
profile))))))))))
|
||||
|
||||
(define (process-query opts)
|
||||
;; Process any query specified by OPTS. Return #t when a query was
|
||||
|
@ -776,6 +830,16 @@ Install, remove, or upgrade PACKAGES in a single transaction.\n"))
|
|||
(for-each (cute package->recutils <> (current-output-port))
|
||||
(find-packages-by-description regexp))
|
||||
#t))
|
||||
|
||||
(('search-paths)
|
||||
(let* ((manifest (profile-manifest profile))
|
||||
(packages (manifest-packages manifest))
|
||||
(settings (search-path-environment-variables packages
|
||||
profile
|
||||
(const #f))))
|
||||
(format #t "~{~a~%~}" settings)
|
||||
#t))
|
||||
|
||||
(_ #f))))
|
||||
|
||||
(let ((opts (parse-options)))
|
||||
|
|
|
@ -61,6 +61,7 @@
|
|||
version-compare
|
||||
version>?
|
||||
package-name->name+version
|
||||
string-tokenize*
|
||||
file-extension
|
||||
call-with-temporary-output-file
|
||||
fold2
|
||||
|
@ -517,6 +518,33 @@ introduce the version part."
|
|||
(let ((dot (string-rindex file #\.)))
|
||||
(and dot (substring file (+ 1 dot) (string-length file)))))
|
||||
|
||||
(define (string-tokenize* string separator)
|
||||
"Return the list of substrings of STRING separated by SEPARATOR. This is
|
||||
like `string-tokenize', but SEPARATOR is a string."
|
||||
(define (index string what)
|
||||
(let loop ((string string)
|
||||
(offset 0))
|
||||
(cond ((string-null? string)
|
||||
#f)
|
||||
((string-prefix? what string)
|
||||
offset)
|
||||
(else
|
||||
(loop (string-drop string 1) (+ 1 offset))))))
|
||||
|
||||
(define len
|
||||
(string-length separator))
|
||||
|
||||
(let loop ((string string)
|
||||
(result '()))
|
||||
(cond ((index string separator)
|
||||
=>
|
||||
(lambda (offset)
|
||||
(loop (string-drop string (+ offset len))
|
||||
(cons (substring string 0 offset)
|
||||
result))))
|
||||
(else
|
||||
(reverse (cons string result))))))
|
||||
|
||||
(define (call-with-temporary-output-file proc)
|
||||
"Call PROC with a name of a temporary file and open output port to that
|
||||
file; close the file and delete it when leaving the dynamic extent of this
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
;;; GNU Guix --- Functional package management for GNU
|
||||
;;; Copyright © 2012 Ludovic Courtès <ludo@gnu.org>
|
||||
;;; Copyright © 2012, 2013 Ludovic Courtès <ludo@gnu.org>
|
||||
;;;
|
||||
;;; This file is part of GNU Guix.
|
||||
;;;
|
||||
|
@ -25,7 +25,8 @@
|
|||
#:use-module (guix utils)
|
||||
#:use-module (guix base32)
|
||||
#:use-module (guix derivations)
|
||||
#:use-module ((guix packages) #:select (package-derivation))
|
||||
#:use-module ((guix packages)
|
||||
#:select (package-derivation package-native-search-paths))
|
||||
#:use-module (gnu packages bootstrap)
|
||||
#:use-module (ice-9 match)
|
||||
#:use-module (srfi srfi-1)
|
||||
|
@ -50,6 +51,13 @@
|
|||
(list name (package-derivation %store package))))
|
||||
(@@ (gnu packages base) %boot0-inputs))))
|
||||
|
||||
(define %bootstrap-search-paths
|
||||
;; Search path specifications that go with %BOOTSTRAP-INPUTS.
|
||||
(append-map (match-lambda
|
||||
((name package _ ...)
|
||||
(package-native-search-paths package)))
|
||||
(@@ (gnu packages base) %boot0-inputs)))
|
||||
|
||||
(define network-reachable?
|
||||
(false-if-exception (getaddrinfo "www.gnu.org" "80" AI_NUMERICSERV)))
|
||||
|
||||
|
@ -83,7 +91,8 @@
|
|||
(build (gnu-build %store "hello-2.8" tarball
|
||||
%bootstrap-inputs
|
||||
#:implicit-inputs? #f
|
||||
#:guile %bootstrap-guile))
|
||||
#:guile %bootstrap-guile
|
||||
#:search-paths %bootstrap-search-paths))
|
||||
(out (derivation-path->output-path build)))
|
||||
(and (build-derivations %store (list (pk 'hello-drv build)))
|
||||
(valid-path? %store out)
|
||||
|
|
|
@ -47,6 +47,10 @@ test -L "$profile" && test -L "$profile-1-link"
|
|||
! test -f "$profile-2-link"
|
||||
test -f "$profile/bin/guile"
|
||||
|
||||
# No search path env. var. here.
|
||||
guix package --search-paths -p "$profile"
|
||||
test "`guix package --search-paths -p "$profile" | wc -l`" = 0
|
||||
|
||||
# Check whether we have network access.
|
||||
if guile -c '(getaddrinfo "www.gnu.org" "80" AI_NUMERICSERV)' 2> /dev/null
|
||||
then
|
||||
|
@ -119,6 +123,10 @@ then
|
|||
rm "$profile-1-link"
|
||||
guix package --bootstrap -p "$profile" --roll-back
|
||||
test "`readlink_base "$profile"`" = "$profile-0-link"
|
||||
|
||||
# Make sure LIBRARY_PATH gets listed by `--search-paths'.
|
||||
guix package --bootstrap -p "$profile" -i guile-bootstrap -i gcc-bootstrap
|
||||
guix package --search-paths -p "$profile" | grep LIBRARY_PATH
|
||||
fi
|
||||
|
||||
# Make sure the `:' syntax works.
|
||||
|
|
|
@ -22,6 +22,7 @@
|
|||
#:use-module (guix utils)
|
||||
#:use-module (guix derivations)
|
||||
#:use-module (guix packages)
|
||||
#:use-module (guix build-system)
|
||||
#:use-module (guix build-system trivial)
|
||||
#:use-module (guix build-system gnu)
|
||||
#:use-module (gnu packages)
|
||||
|
@ -160,6 +161,41 @@
|
|||
(let ((p (pk 'drv d (derivation-path->output-path d))))
|
||||
(eq? 'hello (call-with-input-file p read))))))
|
||||
|
||||
(test-assert "search paths"
|
||||
(let* ((p (make-prompt-tag "return-search-paths"))
|
||||
(s (build-system
|
||||
(name "raw")
|
||||
(description "Raw build system with direct store access")
|
||||
(build (lambda* (store name source inputs
|
||||
#:key outputs system search-paths)
|
||||
search-paths))))
|
||||
(x (list (search-path-specification
|
||||
(variable "GUILE_LOAD_PATH")
|
||||
(directories '("share/guile/site/2.0")))
|
||||
(search-path-specification
|
||||
(variable "GUILE_LOAD_COMPILED_PATH")
|
||||
(directories '("share/guile/site/2.0")))))
|
||||
(a (package (inherit (dummy-package "guile"))
|
||||
(build-system s)
|
||||
(native-search-paths x)))
|
||||
(b (package (inherit (dummy-package "guile-foo"))
|
||||
(build-system s)
|
||||
(inputs `(("guile" ,a)))))
|
||||
(c (package (inherit (dummy-package "guile-bar"))
|
||||
(build-system s)
|
||||
(inputs `(("guile" ,a)
|
||||
("guile-foo" ,b))))))
|
||||
(let-syntax ((collect (syntax-rules ()
|
||||
((_ body ...)
|
||||
(call-with-prompt p
|
||||
(lambda ()
|
||||
body ...)
|
||||
(lambda (k search-paths)
|
||||
search-paths))))))
|
||||
(and (null? (collect (package-derivation %store a)))
|
||||
(equal? x (collect (package-derivation %store b)))
|
||||
(equal? x (collect (package-derivation %store c)))))))
|
||||
|
||||
(unless (false-if-exception (getaddrinfo "www.gnu.org" "80" AI_NUMERICSERV))
|
||||
(test-skip 1))
|
||||
(test-assert "GNU Make, bootstrap"
|
||||
|
|
|
@ -66,6 +66,16 @@
|
|||
("nixpkgs" "1.0pre22125_a28fe19")
|
||||
("gtk2" "2.38.0"))))
|
||||
|
||||
(test-equal "string-tokenize*"
|
||||
'(("foo")
|
||||
("foo" "bar" "baz")
|
||||
("foo" "bar" "")
|
||||
("foo" "bar" "baz"))
|
||||
(list (string-tokenize* "foo" ":")
|
||||
(string-tokenize* "foo;bar;baz" ";")
|
||||
(string-tokenize* "foo!bar!" "!")
|
||||
(string-tokenize* "foo+-+bar+-+baz" "+-+")))
|
||||
|
||||
(test-equal "fold2, 1 list"
|
||||
(list (reverse (iota 5))
|
||||
(map - (reverse (iota 5))))
|
||||
|
|
Loading…
Reference in New Issue