Merge branch 'master' into core-updates

Resolved conflicts:
* gnu/packages/scheme.scm: Conflict in import of (guix licenses). On master,
"#:hide (openssl)" was used. On core-updates, "#:select (some licenses)" was
used. The latter won the conflict.
* gnu/packages/version-control.scm (git)[arguments]: Whitespace conflict
in 'install-shell-completion.
This commit is contained in:
Leo Famulari 2016-07-22 18:57:40 -04:00
commit d227260d2f
No known key found for this signature in database
GPG key ID: 2646FA30BACA7F08
89 changed files with 1437 additions and 818 deletions

View file

@ -1,5 +1,5 @@
;;; GNU Guix --- Functional package management for GNU ;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2014 Ludovic Courtès <ludo@gnu.org> ;;; Copyright © 2014, 2016 Ludovic Courtès <ludo@gnu.org>
;;; ;;;
;;; This file is part of GNU Guix. ;;; This file is part of GNU Guix.
;;; ;;;
@ -19,7 +19,9 @@
(define-module (build-self) (define-module (build-self)
#:use-module (gnu) #:use-module (gnu)
#:use-module (guix) #:use-module (guix)
#:use-module (guix config)
#:use-module (srfi srfi-1) #:use-module (srfi srfi-1)
#:use-module (srfi srfi-19)
#:export (build)) #:export (build))
;;; Commentary: ;;; Commentary:
@ -44,6 +46,18 @@ (define-module (build-self)
(define libgcrypt (define libgcrypt
(first (find-best-packages-by-name "libgcrypt" #f))) (first (find-best-packages-by-name "libgcrypt" #f)))
(define zlib
(first (find-best-packages-by-name "zlib" #f)))
(define gzip
(first (find-best-packages-by-name "gzip" #f)))
(define bzip2
(first (find-best-packages-by-name "bzip2" #f)))
(define xz
(first (find-best-packages-by-name "xz" #f)))
(define guile-json (define guile-json
(first (find-best-packages-by-name "guile-json" #f))) (first (find-best-packages-by-name "guile-json" #f)))
@ -57,12 +71,33 @@ (define (top-source-directory)
(lambda (file) (lambda (file)
(string-append (dirname file) "/..")))) (string-append (dirname file) "/.."))))
(define (date-version-string)
"Return the current date and hour in UTC timezone, for use as a poor
person's version identifier."
;; XXX: Replace with a Git commit id.
(date->string (current-date 0) "~Y~m~d.~H"))
;; The procedure below is our return value. ;; The procedure below is our return value.
(define* (build source #:key verbose? (define* (build source
#:key verbose? (version (date-version-string))
#:allow-other-keys #:allow-other-keys
#:rest rest) #:rest rest)
"Return a derivation that unpacks SOURCE into STORE and compiles Scheme "Return a derivation that unpacks SOURCE into STORE and compiles Scheme
files." files."
;; The '%xxxdir' variables were added to (guix config) in July 2016 so we
;; cannot assume that they are defined. Try to guess their value when
;; they're undefined (XXX: we get an incorrect guess when environment
;; variables such as 'NIX_STATE_DIR' are defined!).
(define storedir
(if (defined? '%storedir) %storedir %store-directory))
(define localstatedir
(if (defined? '%localstatedir) %localstatedir (dirname %state-directory)))
(define sysconfdir
(if (defined? '%sysconfdir) %sysconfdir (dirname %config-directory)))
(define sbindir
(if (defined? '%sbindir) %sbindir (dirname %guix-register-program)))
(define builder (define builder
#~(begin #~(begin
(use-modules (guix build pull)) (use-modules (guix build pull))
@ -73,12 +108,28 @@ (define builder
(build-guix #$output #$source (build-guix #$output #$source
#:system #$%system
#:storedir #$storedir
#:localstatedir #$localstatedir
#:sysconfdir #$sysconfdir
#:sbindir #$sbindir
#:package-name #$%guix-package-name
#:package-version #$version
#:bug-report-address #$%guix-bug-report-address
#:home-page-url #$%guix-home-page-url
#:libgcrypt #$libgcrypt
#:zlib #$zlib
#:gzip #$gzip
#:bzip2 #$bzip2
#:xz #$xz
;; XXX: This is not perfect, enabling VERBOSE? means ;; XXX: This is not perfect, enabling VERBOSE? means
;; building a different derivation. ;; building a different derivation.
#:debug-port (if #$verbose? #:debug-port (if #$verbose?
(current-error-port) (current-error-port)
(%make-void-port "w")) (%make-void-port "w")))))
#:gcrypt #$libgcrypt)))
(gexp->derivation "guix-latest" builder (gexp->derivation "guix-latest" builder
#:modules '((guix build pull) #:modules '((guix build pull)

View file

@ -323,6 +323,12 @@ related to the hardware---e.g., use of different instruction set
extensions---or to the operating system kernel---e.g., reliance on extensions---or to the operating system kernel---e.g., reliance on
@code{uname} or @file{/proc} files. @code{uname} or @file{/proc} files.
@item
When writing documentation, please use gender-neutral wording when
referring to people, such as
@uref{https://en.wikipedia.org/wiki/Singular_they, singular
``they''@comma{} ``their''@comma{} ``them''}, and so forth.
@end enumerate @end enumerate
When posting a patch to the mailing list, use @samp{[PATCH] @dots{}} as When posting a patch to the mailing list, use @samp{[PATCH] @dots{}} as

View file

@ -2387,7 +2387,7 @@ package looks like this:
(base32 (base32
"0ssi1wpaf7plaswqqjwigppsg5fyh99vdlb9kzl7c9lng89ndq1i")))) "0ssi1wpaf7plaswqqjwigppsg5fyh99vdlb9kzl7c9lng89ndq1i"))))
(build-system gnu-build-system) (build-system gnu-build-system)
(arguments `(#:configure-flags '("--enable-silent-rules"))) (arguments '(#:configure-flags '("--enable-silent-rules")))
(inputs `(("gawk" ,gawk))) (inputs `(("gawk" ,gawk)))
(synopsis "Hello, GNU world: An example GNU package") (synopsis "Hello, GNU world: An example GNU package")
(description "Guess what GNU Hello prints!") (description "Guess what GNU Hello prints!")
@ -2452,12 +2452,44 @@ The @code{arguments} field specifies options for the build system
@var{gnu-build-system} as a request run @file{configure} with the @var{gnu-build-system} as a request run @file{configure} with the
@code{--enable-silent-rules} flag. @code{--enable-silent-rules} flag.
@cindex quote
@cindex quoting
@findex '
@findex quote
What about these quote (@code{'}) characters? They are Scheme syntax to
introduce a literal list; @code{'} is synonymous with @code{quote}.
@xref{Expression Syntax, quoting,, guile, GNU Guile Reference Manual},
for details. Here the value of the @code{arguments} field is a list of
arguments passed to the build system down the road, as with @code{apply}
(@pxref{Fly Evaluation, @code{apply},, guile, GNU Guile Reference
Manual}).
The hash-colon (@code{#:}) sequence defines a Scheme @dfn{keyword}
(@pxref{Keywords,,, guile, GNU Guile Reference Manual}), and
@code{#:configure-flags} is a keyword used to pass a keyword argument
to the build system (@pxref{Coding With Keywords,,, guile, GNU Guile
Reference Manual}).
@item @item
The @code{inputs} field specifies inputs to the build process---i.e., The @code{inputs} field specifies inputs to the build process---i.e.,
build-time or run-time dependencies of the package. Here, we define an build-time or run-time dependencies of the package. Here, we define an
input called @code{"gawk"} whose value is that of the @var{gawk} input called @code{"gawk"} whose value is that of the @var{gawk}
variable; @var{gawk} is itself bound to a @code{<package>} object. variable; @var{gawk} is itself bound to a @code{<package>} object.
@cindex backquote (quasiquote)
@findex `
@findex quasiquote
@cindex comma (unquote)
@findex ,
@findex unquote
@findex ,@@
@findex unquote-splicing
Again, @code{`} (a backquote, synonymous with @code{quasiquote}) allows
us to introduce a literal list in the @code{inputs} field, while
@code{,} (a comma, synonymous with @code{unquote}) allows us to insert a
value in that list (@pxref{Expression Syntax, unquote,, guile, GNU Guile
Reference Manual}).
Note that GCC, Coreutils, Bash, and other essential tools do not need to Note that GCC, Coreutils, Bash, and other essential tools do not need to
be specified as inputs here. Instead, @var{gnu-build-system} takes care be specified as inputs here. Instead, @var{gnu-build-system} takes care
of ensuring that they are present (@pxref{Build Systems}). of ensuring that they are present (@pxref{Build Systems}).
@ -5633,6 +5665,20 @@ archive}), the daemon may download substitutes from it:
guix-daemon --substitute-urls=http://example.org:8080 guix-daemon --substitute-urls=http://example.org:8080
@end example @end example
As a bonus, @command{guix publish} also serves as a content-addressed
mirror for source files referenced in @code{origin} records
(@pxref{origin Reference}). For instance, assuming @command{guix
publish} is running on @code{example.org}, the following URL returns the
raw @file{hello-2.10.tar.gz} file with the given SHA256 hash
(represented in @code{nix-base32} format, @pxref{Invoking guix hash}):
@example
http://example.org/file/hello-2.10.tar.gz/sha256/0ssi1@dots{}ndq1i
@end example
Obviously, these URLs only work for files that are in the store; in
other cases, they return 404 (``Not Found'').
The following options are available: The following options are available:
@table @code @table @code

View file

@ -166,6 +166,7 @@ GNU_SYSTEM_MODULES = \
%D%/packages/gv.scm \ %D%/packages/gv.scm \
%D%/packages/gxmessage.scm \ %D%/packages/gxmessage.scm \
%D%/packages/haskell.scm \ %D%/packages/haskell.scm \
%D%/packages/hexedit.scm \
%D%/packages/hugs.scm \ %D%/packages/hugs.scm \
%D%/packages/hurd.scm \ %D%/packages/hurd.scm \
%D%/packages/ibus.scm \ %D%/packages/ibus.scm \

View file

@ -346,8 +346,8 @@ (define-public mingetty
(version "1.08") (version "1.08")
(source (origin (source (origin
(method url-fetch) (method url-fetch)
(uri (string-append "mirror://sourceforge/mingetty/mingetty-" (uri (string-append "mirror://sourceforge/mingetty/mingetty/"
version ".tar.gz")) version "/mingetty-" version ".tar.gz"))
(sha256 (sha256
(base32 (base32
"05yxrp44ky2kg6qknk1ih0kvwkgbn9fbz77r3vci7agslh5wjm8g")))) "05yxrp44ky2kg6qknk1ih0kvwkgbn9fbz77r3vci7agslh5wjm8g"))))
@ -440,8 +440,8 @@ (define-public netcat
(version "0.7.1") (version "0.7.1")
(source (origin (source (origin
(method url-fetch) (method url-fetch)
(uri (string-append "mirror://sourceforge/netcat/netcat-" (uri (string-append "mirror://sourceforge/netcat/netcat/" version
version ".tar.bz2")) "/netcat-" version ".tar.bz2"))
(sha256 (sha256
(base32 (base32
"1frjcdkhkpzk0f84hx6hmw5l0ynpmji8vcbaxg8h5k2svyxz0nmm")))) "1frjcdkhkpzk0f84hx6hmw5l0ynpmji8vcbaxg8h5k2svyxz0nmm"))))
@ -705,7 +705,8 @@ (define-public clusterssh
(source (origin (source (origin
(method url-fetch) (method url-fetch)
(uri (string-append "mirror://sourceforge/clusterssh/" (uri (string-append "mirror://sourceforge/clusterssh/"
"clusterssh-" version ".tar.gz")) "1.%20ClusterSSH%20Series%203/" version
"/clusterssh-" version ".tar.gz"))
(sha256 (sha256
(base32 (base32
"1bwggpvaj2al5blg1ynapviv2kpydffpzq2zkhi81najnvzc1rr7")))) "1bwggpvaj2al5blg1ynapviv2kpydffpzq2zkhi81najnvzc1rr7"))))
@ -1112,8 +1113,8 @@ (define-public detox
(version "1.2.0") (version "1.2.0")
(source (origin (source (origin
(method url-fetch) (method url-fetch)
(uri (string-append "mirror://sourceforge/detox/detox-" (uri (string-append "mirror://sourceforge/detox/detox/" version
version ".tar.bz2")) "/detox-" version ".tar.bz2"))
(sha256 (sha256
(base32 (base32
"1y6vvjqsg54kl49cry73jbfhr04s7wjs779vrr9zrq6kww7dkymb")))) "1y6vvjqsg54kl49cry73jbfhr04s7wjs779vrr9zrq6kww7dkymb"))))

View file

@ -42,9 +42,8 @@ (define-public audacity
(source (source
(origin (origin
(method url-fetch) (method url-fetch)
(uri (uri (string-append "mirror://sourceforge/audacity/audacity/" version
(string-append "/audacity-minsrc-" version ".tar.xz"))
"mirror://sourceforge/audacity/audacity-minsrc-" version ".tar.xz"))
(sha256 (sha256
(base32 "1cs2w3fwqylpqmfwkvlgdx5lhclpckfil7pqibl37qlbnf4qvndh")) (base32 "1cs2w3fwqylpqmfwkvlgdx5lhclpckfil7pqibl37qlbnf4qvndh"))
(patches (search-patches "audacity-fix-ffmpeg-binding.patch")))) (patches (search-patches "audacity-fix-ffmpeg-binding.patch"))))

View file

@ -75,8 +75,8 @@ (define-public alsa-modular-synth
(version "2.1.2") (version "2.1.2")
(source (origin (source (origin
(method url-fetch) (method url-fetch)
(uri (string-append "mirror://sourceforge/alsamodular/ams-" (uri (string-append "mirror://sourceforge/alsamodular/alsamodular"
version ".tar.bz2")) "/" version "/ams-" version ".tar.bz2"))
(sha256 (sha256
(base32 (base32
"1azbrhpfk4nnybr7kgmc7w6al6xnzppg853vas8gmkh185kk11l0")))) "1azbrhpfk4nnybr7kgmc7w6al6xnzppg853vas8gmkh185kk11l0"))))
@ -766,8 +766,8 @@ (define-public faad2
(version "2.7") (version "2.7")
(source (origin (source (origin
(method url-fetch) (method url-fetch)
(uri (string-append (uri (string-append "mirror://sourceforge/faac/faad2-src/faad2-"
"mirror://sourceforge/faac/faad2-" version ".zip")) version "/faad2-" version ".zip"))
(sha256 (sha256
(base32 (base32
"16f3l16c00sg0wkrkm3vzv0gy3g97x309vw788igs0cap2x1ak3z")))) "16f3l16c00sg0wkrkm3vzv0gy3g97x309vw788igs0cap2x1ak3z"))))
@ -868,7 +868,7 @@ (define-public guitarix
(source (origin (source (origin
(method url-fetch) (method url-fetch)
(uri (string-append (uri (string-append
"mirror://sourceforge/guitarix/guitarix2-" "mirror://sourceforge/guitarix/guitarix/guitarix2-"
version ".tar.xz")) version ".tar.xz"))
(sha256 (sha256
(base32 (base32
@ -1230,8 +1230,8 @@ (define-public libbs2b
(version "3.1.0") (version "3.1.0")
(source (origin (source (origin
(method url-fetch) (method url-fetch)
(uri (string-append (uri (string-append "mirror://sourceforge/bs2b/libbs2b/" version
"mirror://sourceforge/bs2b/libbs2b-" version ".tar.lzma")) "/libbs2b-" version ".tar.lzma"))
(sha256 (sha256
(base32 (base32
"1mcc4gjkmphczjybnsrip3gq1f974knzys7x49bv197xk3fn8wdr")))) "1mcc4gjkmphczjybnsrip3gq1f974knzys7x49bv197xk3fn8wdr"))))
@ -1253,10 +1253,8 @@ (define-public liblo
(version "0.28") (version "0.28")
(source (origin (source (origin
(method url-fetch) (method url-fetch)
(uri (string-append (uri (string-append "mirror://sourceforge/liblo/liblo/" version
"mirror://sourceforge/liblo/liblo-" "/liblo-" version ".tar.gz"))
version
".tar.gz"))
(sha256 (sha256
(base32 (base32
"02drgnpirvl2ihvzgsmn02agr5sj3vipzzw9vma56qlkgfvak56s")))) "02drgnpirvl2ihvzgsmn02agr5sj3vipzzw9vma56qlkgfvak56s"))))
@ -1709,9 +1707,9 @@ (define-public timidity++
(version "2.14.0") (version "2.14.0")
(source (origin (source (origin
(method url-fetch) (method url-fetch)
(uri (string-append (uri (string-append "mirror://sourceforge/timidity/TiMidity++"
"mirror://sourceforge/timidity/TiMidity++-" "/TiMidity++-" version
version ".tar.bz2")) "/TiMidity++-" version ".tar.bz2"))
(sha256 (sha256
(base32 (base32
"0xk41w4qbk23z1fvqdyfblbz10mmxsllw0svxzjw5sa9y11vczzr")))) "0xk41w4qbk23z1fvqdyfblbz10mmxsllw0svxzjw5sa9y11vczzr"))))
@ -1871,7 +1869,7 @@ (define-public libmodplug
(source (origin (source (origin
(method url-fetch) (method url-fetch)
(uri (string-append (uri (string-append
"mirror://sourceforge/project/modplug-xmms/" "mirror://sourceforge/modplug-xmms/"
name "/" version "/" name "-" version ".tar.gz")) name "/" version "/" name "-" version ".tar.gz"))
(sha256 (sha256
(base32 (base32
@ -1892,7 +1890,7 @@ (define-public libxmp
(version "4.3.10") (version "4.3.10")
(source (origin (source (origin
(method url-fetch) (method url-fetch)
(uri (string-append "mirror://sourceforge/xmp/libxmp/" (uri (string-append "mirror://sourceforge/xmp/libxmp/" version "/"
name "-" version ".tar.gz")) name "-" version ".tar.gz"))
(sha256 (sha256
(base32 (base32
@ -1912,7 +1910,7 @@ (define-public xmp
(version "4.0.10") (version "4.0.10")
(source (origin (source (origin
(method url-fetch) (method url-fetch)
(uri (string-append "mirror://sourceforge/xmp/xmp/" (uri (string-append "mirror://sourceforge/xmp/xmp/" version "/"
name "-" version ".tar.gz")) name "-" version ".tar.gz"))
(sha256 (sha256
(base32 (base32
@ -1972,8 +1970,8 @@ (define-public sox
(version "14.4.2") (version "14.4.2")
(source (origin (source (origin
(method url-fetch) (method url-fetch)
(uri (string-append "mirror://sourceforge/sox/sox-" (uri (string-append "mirror://sourceforge/sox/sox/" version "/"
version ".tar.bz2")) name "-" version ".tar.bz2"))
(sha256 (sha256
(base32 (base32
"170lx90r1nlnb2j6lg00524iwvqy72p48vii4xc5prrh8dnrb9l1")))) "170lx90r1nlnb2j6lg00524iwvqy72p48vii4xc5prrh8dnrb9l1"))))
@ -2035,8 +2033,8 @@ (define-public twolame
(source (source
(origin (origin
(method url-fetch) (method url-fetch)
(uri (string-append (uri (string-append "mirror://sourceforge/twolame/twolame/" version
"mirror://sourceforge/twolame/twolame-" version ".tar.gz")) "/twolame-" version ".tar.gz"))
(sha256 (sha256
(base32 "0ahiqqng5pidwhj1wzph4vxxgxxgcfa3gl0gywipzx2ii7s35wwq")))) (base32 "0ahiqqng5pidwhj1wzph4vxxgxxgcfa3gl0gywipzx2ii7s35wwq"))))
(build-system gnu-build-system) (build-system gnu-build-system)
@ -2102,8 +2100,8 @@ (define-public qsynth
(source (source
(origin (origin
(method url-fetch) (method url-fetch)
(uri (string-append (uri (string-append "mirror://sourceforge/qsynth/qsynth/" version
"mirror://sourceforge/qsynth/qsynth-" version ".tar.gz")) "/qsynth-" version ".tar.gz"))
(sha256 (sha256
(base32 "034p6mbwrjnxd9b6h20cidxi4ilkk3cgpjp154j0jzjs1ipf7x2h")))) (base32 "034p6mbwrjnxd9b6h20cidxi4ilkk3cgpjp154j0jzjs1ipf7x2h"))))
(build-system gnu-build-system) (build-system gnu-build-system)

View file

@ -3124,7 +3124,7 @@ (define-public rseqc
(method url-fetch) (method url-fetch)
(uri (uri
(string-append "mirror://sourceforge/rseqc/" (string-append "mirror://sourceforge/rseqc/"
version "/RSeQC-" version ".tar.gz")) "RSeQC-" version ".tar.gz"))
(sha256 (sha256
(base32 "15ly0254yi032qzkdplg00q144qfdsd986gh62829rl5bkxhj330")) (base32 "15ly0254yi032qzkdplg00q144qfdsd986gh62829rl5bkxhj330"))
(modules '((guix build utils))) (modules '((guix build utils)))
@ -3235,7 +3235,7 @@ (define-public samtools
(origin (origin
(method url-fetch) (method url-fetch)
(uri (uri
(string-append "mirror://sourceforge/samtools/" (string-append "mirror://sourceforge/samtools/samtools/"
version "/samtools-" version ".tar.bz2")) version "/samtools-" version ".tar.bz2"))
(sha256 (sha256
(base32 (base32
@ -3295,7 +3295,7 @@ (define-public samtools-0.1
(origin (origin
(method url-fetch) (method url-fetch)
(uri (uri
(string-append "mirror://sourceforge/samtools/" (string-append "mirror://sourceforge/samtools/samtools/"
version "/samtools-" version ".tar.bz2")) version "/samtools-" version ".tar.bz2"))
(sha256 (sha256
(base32 "1m33xsfwz0s8qi45lylagfllqg7fphf4dr0780rsvw75av9wk06h")))) (base32 "1m33xsfwz0s8qi45lylagfllqg7fphf4dr0780rsvw75av9wk06h"))))
@ -4022,9 +4022,8 @@ (define-public subread
(version "1.4.6-p2") (version "1.4.6-p2")
(source (origin (source (origin
(method url-fetch) (method url-fetch)
(uri (string-append (uri (string-append "mirror://sourceforge/subread/subread-"
"mirror://sourceforge/subread/subread-" version "/subread-" version "-source.tar.gz"))
version "-source.tar.gz"))
(sha256 (sha256
(base32 (base32
"06sv9mpcsdj6p68y15d6gi70lca3lxmzk0dn61hg0kfsa7rxmsr3")))) "06sv9mpcsdj6p68y15d6gi70lca3lxmzk0dn61hg0kfsa7rxmsr3"))))

View file

@ -38,7 +38,7 @@ (define-public boost
(source (origin (source (origin
(method url-fetch) (method url-fetch)
(uri (string-append (uri (string-append
"mirror://sourceforge/boost/boost_" "mirror://sourceforge/boost/boost/" version "/boost_"
(string-map (lambda (x) (if (eq? x #\.) #\_ x)) version) (string-map (lambda (x) (if (eq? x #\.) #\_ x)) version)
".tar.bz2")) ".tar.bz2"))
(sha256 (sha256

View file

@ -51,8 +51,8 @@ (define-public libcddb
(version "1.3.2") (version "1.3.2")
(source (origin (source (origin
(method url-fetch) (method url-fetch)
(uri (string-append "mirror://sourceforge/libcddb/libcddb-" (uri (string-append "mirror://sourceforge/libcddb/libcddb/" version
version ".tar.bz2")) "/libcddb-" version ".tar.bz2"))
(sha256 (sha256
(base32 (base32
"0fr21a7vprdyy1bq6s99m0x420c9jm5fipsd63pqv8qyfkhhxkim")))) "0fr21a7vprdyy1bq6s99m0x420c9jm5fipsd63pqv8qyfkhhxkim"))))

View file

@ -1,6 +1,7 @@
;;; GNU Guix --- Functional package management for GNU ;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2015 Andreas Enge <andreas@enge.fr> ;;; Copyright © 2015 Andreas Enge <andreas@enge.fr>
;;; Copyright © 2015 Mark H Weaver <mhw@netris.org> ;;; Copyright © 2015 Mark H Weaver <mhw@netris.org>
;;; Copyright © 2016 Ludovic Courtès <ludo@gnu.org>
;;; ;;;
;;; This file is part of GNU Guix. ;;; This file is part of GNU Guix.
;;; ;;;
@ -24,7 +25,6 @@ (define-module (gnu packages certs)
#:use-module (guix build-system gnu) #:use-module (guix build-system gnu)
#:use-module (guix build-system trivial) #:use-module (guix build-system trivial)
#:use-module (gnu packages) #:use-module (gnu packages)
#:use-module (gnu packages gnuzilla)
#:use-module (gnu packages python) #:use-module (gnu packages python)
#:use-module (gnu packages perl) #:use-module (gnu packages perl)
#:use-module (gnu packages tls)) #:use-module (gnu packages tls))
@ -71,8 +71,20 @@ (define certdata2pem
(home-page "http://pkgs.fedoraproject.org/cgit/ca-certificates.git/"))) (home-page "http://pkgs.fedoraproject.org/cgit/ca-certificates.git/")))
(define-public nss-certs (define-public nss-certs
(package (inherit nss) ; to reuse the source, version and some metadata (package
(name "nss-certs") (name "nss-certs")
(version "3.23")
(source (origin
(method url-fetch)
(uri (let ((version-with-underscores
(string-join (string-split version #\.) "_")))
(string-append
"https://ftp.mozilla.org/pub/mozilla.org/security/nss/"
"releases/NSS_" version-with-underscores "_RTM/src/"
"nss-" version ".tar.gz")))
(sha256
(base32
"1kqidv91icq96m9m8zx50n7px08km2l88458rkgyjwcn3kiq7cwl"))))
(build-system gnu-build-system) (build-system gnu-build-system)
(outputs '("out")) (outputs '("out"))
(native-inputs (native-inputs
@ -124,4 +136,6 @@ (define (maybe-install-cert file)
(synopsis "CA certificates from Mozilla") (synopsis "CA certificates from Mozilla")
(description (description
"This package provides certificates for Certification Authorities (CA) "This package provides certificates for Certification Authorities (CA)
taken from the NSS package and thus ultimately from the Mozilla project."))) taken from the NSS package and thus ultimately from the Mozilla project.")
(home-page "https://developer.mozilla.org/en-US/docs/Mozilla/Projects/NSS")
(license license:mpl2.0)))

View file

@ -287,8 +287,8 @@ (define-public lcov
(version "1.12") (version "1.12")
(source (origin (source (origin
(method url-fetch) (method url-fetch)
(uri (string-append "mirror://sourceforge/ltp/lcov-" (uri (string-append "mirror://sourceforge/ltp/Coverage%20Analysis"
version ".tar.gz")) "/LCOV-" version "/lcov-" version ".tar.gz"))
(sha256 (sha256
(base32 (base32
"19wfifdpxxivhq9adbphanjfga9bg9spms9v7c3589wndjff8x5l")))) "19wfifdpxxivhq9adbphanjfga9bg9spms9v7c3589wndjff8x5l"))))

View file

@ -634,7 +634,8 @@ (define-public squashfs-tools
(version "4.3") (version "4.3")
(source (origin (source (origin
(method url-fetch) (method url-fetch)
(uri (string-append "mirror://sourceforge/squashfs/" (uri (string-append "mirror://sourceforge/squashfs/squashfs/"
"squashfs" version "/"
"squashfs" version ".tar.gz")) "squashfs" version ".tar.gz"))
(sha256 (sha256
(base32 (base32

View file

@ -306,8 +306,8 @@ (define-public hplip
(version "3.16.3") (version "3.16.3")
(source (origin (source (origin
(method url-fetch) (method url-fetch)
(uri (string-append "mirror://sourceforge/hplip/" (uri (string-append "mirror://sourceforge/hplip/hplip/" version
"hplip-" version ".tar.gz")) "/hplip-" version ".tar.gz"))
(sha256 (sha256
(base32 (base32
"1501qdnkjp1ybgagy5188fmf6cgmj5555ygjl3543nlbwcp31lj2")))) "1501qdnkjp1ybgagy5188fmf6cgmj5555ygjl3543nlbwcp31lj2"))))

View file

@ -28,8 +28,8 @@ (define-public djvulibre
(version "3.5.27") (version "3.5.27")
(source (origin (source (origin
(method url-fetch) (method url-fetch)
(uri (string-append "mirror://sourceforge/djvu/djvulibre-" (uri (string-append "mirror://sourceforge/djvu/DjVuLibre/"
version ".tar.gz")) version "/djvulibre-" version ".tar.gz"))
(sha256 (sha256
(base32 (base32
"0psh3zl9dj4n4r3lx25390nx34xz0bg0ql48zdskhq354ljni5p6")))) "0psh3zl9dj4n4r3lx25390nx34xz0bg0ql48zdskhq354ljni5p6"))))

View file

@ -135,8 +135,8 @@ (define-public docbook-xsl
(version "1.78.1") (version "1.78.1")
(source (origin (source (origin
(method url-fetch) (method url-fetch)
(uri (string-append "mirror://sourceforge/docbook/docbook-xsl-" (uri (string-append "mirror://sourceforge/docbook/docbook-xsl/"
version ".tar.bz2")) version "/docbook-xsl-" version ".tar.bz2"))
(sha256 (sha256
(base32 (base32
"0rxl013ncmz1n6ymk2idvx3hix9pdabk8xn01cpcv32wmfb753y9")))) "0rxl013ncmz1n6ymk2idvx3hix9pdabk8xn01cpcv32wmfb753y9"))))
@ -176,7 +176,8 @@ (define-public dblatex
(version "0.3.5") (version "0.3.5")
(source (origin (source (origin
(method url-fetch) (method url-fetch)
(uri (string-append "mirror://sourceforge/dblatex/dblatex-" (uri (string-append "mirror://sourceforge/dblatex/dblatex/"
"dblatex-" version "/dblatex-"
version ".tar.bz2")) version ".tar.bz2"))
(sha256 (sha256
(base32 (base32

View file

@ -43,8 +43,8 @@ (define-public asciidoc
(version "8.6.9") (version "8.6.9")
(source (origin (source (origin
(method url-fetch) (method url-fetch)
(uri (string-append "mirror://sourceforge/asciidoc/asciidoc-" (uri (string-append "mirror://sourceforge/asciidoc/asciidoc/"
version ".tar.gz")) version "/asciidoc-" version ".tar.gz"))
(sha256 (sha256
(base32 (base32
"1w71nk527lq504njmaf0vzr93pgahkgzzxzglrq6bay8cw2rvnvq")))) "1w71nk527lq504njmaf0vzr93pgahkgzzxzglrq6bay8cw2rvnvq"))))
@ -126,8 +126,8 @@ (define-public scrollkeeper
(source (source
(origin (origin
(method url-fetch) (method url-fetch)
(uri (string-append "mirror://sourceforge/scrollkeeper/scrollkeeper-" (uri (string-append "mirror://sourceforge/scrollkeeper/scrollkeeper/"
version ".tar.gz")) version "/scrollkeeper-" version ".tar.gz"))
(sha256 (sha256
(base32 "1bfxwxc1ngh11v36z899sz9qam366r050fhkyb5adv65lb1x62sa")))) (base32 "1bfxwxc1ngh11v36z899sz9qam366r050fhkyb5adv65lb1x62sa"))))
(build-system gnu-build-system) (build-system gnu-build-system)

View file

@ -270,7 +270,7 @@ (define-public rage
(define-public enlightenment (define-public enlightenment
(package (package
(name "enlightenment") (name "enlightenment")
(version "0.21.0") (version "0.21.1")
(source (origin (source (origin
(method url-fetch) (method url-fetch)
(uri (uri
@ -278,7 +278,7 @@ (define-public enlightenment
name "/" name "-" version ".tar.xz")) name "/" name "-" version ".tar.xz"))
(sha256 (sha256
(base32 (base32
"0p85dmk9ysbf9y7vlc92z7495mh9l860xj3s8pspy9mscv3dnwg9")))) "119sxrgrz163c01yx0q9n2jpmmbv0a58akmz0c2z4xy37f1m02rx"))))
(build-system gnu-build-system) (build-system gnu-build-system)
(arguments (arguments
`(#:configure-flags '("--enable-mount-eeze"))) `(#:configure-flags '("--enable-mount-eeze")))

View file

@ -114,8 +114,8 @@ (define-public dfu-programmer
(source (source
(origin (origin
(method url-fetch) (method url-fetch)
(uri (string-append "mirror://sourceforge/dfu-programmer/dfu-programmer-" (uri (string-append "mirror://sourceforge/dfu-programmer/dfu-programmer/"
version ".tar.gz")) version "/dfu-programmer-" version ".tar.gz"))
(sha256 (sha256
(base32 (base32
"15gr99y1z9vbvhrkd25zqhnzhg6zjmaam3vfjzf2mazd39mx7d0x")) "15gr99y1z9vbvhrkd25zqhnzhg6zjmaam3vfjzf2mazd39mx7d0x"))

View file

@ -129,7 +129,7 @@ (define-public font-dejavu
(version "2.35") (version "2.35")
(source (origin (source (origin
(method url-fetch) (method url-fetch)
(uri (string-append "mirror://sourceforge/dejavu/" (uri (string-append "mirror://sourceforge/dejavu/dejavu/"
version "/dejavu-fonts-ttf-" version "/dejavu-fonts-ttf-"
version ".tar.bz2")) version ".tar.bz2"))
(sha256 (sha256
@ -386,7 +386,7 @@ (define-public font-terminus
(origin (origin
(method url-fetch) (method url-fetch)
(uri (string-append (uri (string-append
"mirror://sourceforge/project/terminus-font/terminus-font-" "mirror://sourceforge/terminus-font/terminus-font-"
version version
"/terminus-font-" "/terminus-font-"
version version
@ -476,7 +476,8 @@ (define-public font-wqy-zenhei
(source (origin (source (origin
(method url-fetch) (method url-fetch)
(uri (string-append (uri (string-append
"mirror://sourceforge/wqy/wqy-zenhei-" "mirror://sourceforge/wqy/wqy-zenhei/" version
"%20%28Fighting-state%20RC1%29/wqy-zenhei-"
version ".tar.gz")) version ".tar.gz"))
(file-name (string-append "wqy-zenhei-" version ".tar.gz")) (file-name (string-append "wqy-zenhei-" version ".tar.gz"))
(sha256 (sha256

View file

@ -397,8 +397,8 @@ (define-public potrace
(source (source
(origin (origin
(method url-fetch) (method url-fetch)
(uri (string-append "mirror://sourceforge/potrace/potrace-" (uri (string-append "mirror://sourceforge/potrace/" version
version ".tar.gz")) "/potrace-" version ".tar.gz"))
(sha256 (sha256
(base32 (base32
"115p2vgyq7p2mf4nidk2x3aa341nvv2v8ml056vbji36df5l6lk2")))) "115p2vgyq7p2mf4nidk2x3aa341nvv2v8ml056vbji36df5l6lk2"))))

View file

@ -7,6 +7,7 @@
;;; Copyright © 2015, 2016 David Thompson <davet@gnu.org> ;;; Copyright © 2015, 2016 David Thompson <davet@gnu.org>
;;; Copyright © 2016 Efraim Flashner <efraim@flashner.co.il> ;;; Copyright © 2016 Efraim Flashner <efraim@flashner.co.il>
;;; Copyright © 2016 Kei Kebreau <kei@openmailbox.org> ;;; Copyright © 2016 Kei Kebreau <kei@openmailbox.org>
;;; Copyright © 2016 Ricardo Wurmus <rekado@elephly.net>
;;; ;;;
;;; This file is part of GNU Guix. ;;; This file is part of GNU Guix.
;;; ;;;
@ -342,6 +343,58 @@ (define-public allegro-4
(home-page "http://liballeg.org") (home-page "http://liballeg.org")
(license license:giftware))) (license license:giftware)))
(define-public allegro
(package
(name "allegro")
(version "5.2.0")
(source (origin
(method url-fetch)
(uri (string-append "http://download.gna.org/allegro/allegro/"
version "/allegro-" version ".tar.gz"))
(sha256
(base32
"1mwzgzc4nb5k5zkbq7yrc6hg63yxq3wk69lmjag1h19x8b6njnmg"))))
(build-system cmake-build-system)
(arguments `(#:tests? #f)) ; there are no tests
(inputs
;; FIXME: Add the following optional inputs: xinput2, opensl, dumb
`(("flac" ,flac)
("freetype" ,freetype)
("glu" ,glu)
("gtk" ,gtk+-2)
("libjpeg" ,libjpeg)
("libpng" ,libpng)
("libtheora" ,libtheora)
("libvorbis" ,libvorbis)
("libxcursor" ,libxcursor)
("libxinerama" ,libxinerama)
("libxrandr" ,libxrandr)
("mesa" ,mesa)
("openal" ,openal)
("physfs" ,physfs)
("zlib" ,zlib)))
(native-inputs
`(("pkg-config" ,pkg-config)))
(synopsis "Game programming library")
(description "Allegro is a library mainly aimed at video game and
multimedia programming. It handles common, low-level tasks such as creating
windows, accepting user input, loading data, drawing images, playing sounds,
etc.")
(home-page "http://liballeg.org")
(license license:bsd-3)))
(define-public allegro-5.0
(package (inherit allegro)
(name "allegro")
(version "5.0.11")
(source (origin
(method url-fetch)
(uri (string-append "http://download.gna.org/allegro/allegro/"
version "/allegro-" version ".tar.gz"))
(sha256
(base32
"0cd51qrh97jrr0xdmnivqgwljpmizg8pixsgvc4blqqlaz4i9zj9"))))))
(define-public aseprite (define-public aseprite
(package (package
(name "aseprite") (name "aseprite")

View file

@ -1024,14 +1024,16 @@ (define-public gnujump
(define-public wesnoth (define-public wesnoth
(package (package
(name "wesnoth") (name "wesnoth")
(version "1.12.5") (version "1.12.6")
(source (origin (source (origin
(method url-fetch) (method url-fetch)
(uri (string-append "mirror://sourceforge/wesnoth/" (uri (string-append "mirror://sourceforge/wesnoth/wesnoth-"
(version-major+minor version) "/wesnoth-"
version "/"
name "-" version ".tar.bz2")) name "-" version ".tar.bz2"))
(sha256 (sha256
(base32 (base32
"07d8ms9ayswg2g530p0zwmz3d77zv68l6nmc718iq9sbv90av6jr")))) "0kifp6g1dsr16m6ngjq2hx19h851fqg326ps3krnhpyix963h3x5"))))
(build-system cmake-build-system) (build-system cmake-build-system)
(arguments (arguments
'(#:tests? #f ; no check target '(#:tests? #f ; no check target

View file

@ -41,8 +41,8 @@ (define-public lcms
(version "2.6") (version "2.6")
(source (origin (source (origin
(method url-fetch) (method url-fetch)
(uri (string-append (uri (string-append "mirror://sourceforge/lcms/lcms/" version
"mirror://sourceforge/lcms/lcms2-" version ".tar.gz")) "/lcms2-" version ".tar.gz"))
(sha256 (base32 (sha256 (base32
"1c8lgq8gfs3nyplvbx9k8wzfj6r2bqi3f611vb1m8z3476454wji")))) "1c8lgq8gfs3nyplvbx9k8wzfj6r2bqi3f611vb1m8z3476454wji"))))
(build-system gnu-build-system) (build-system gnu-build-system)

View file

@ -80,7 +80,7 @@ (define-public freeglut
(source (origin (source (origin
(method url-fetch) (method url-fetch)
(uri (string-append (uri (string-append
"mirror://sourceforge/project/freeglut/freeglut/" "mirror://sourceforge/freeglut/freeglut/"
version "/freeglut-" version ".tar.gz")) version "/freeglut-" version ".tar.gz"))
(sha256 (sha256
(base32 (base32
@ -121,7 +121,7 @@ (define-public ftgl
(source (origin (source (origin
(method url-fetch) (method url-fetch)
(uri (string-append (uri (string-append
"mirror://sourceforge/project/ftgl/FTGL%20Source/2.1.3~rc5/" "mirror://sourceforge/ftgl/FTGL%20Source/2.1.3~rc5/"
"ftgl-" version ".tar.gz")) "ftgl-" version ".tar.gz"))
(sha256 (sha256
(base32 (base32
@ -358,10 +358,8 @@ (define-public glew
(version "1.11.0") (version "1.11.0")
(source (origin (source (origin
(method url-fetch) (method url-fetch)
(uri (string-append (uri (string-append "mirror://sourceforge/glew/glew/" version
"mirror://sourceforge/glew/glew-" "/glew-" version ".tgz"))
version
".tgz"))
(sha256 (sha256
(base32 (base32
"1mhkllxz49l1x680dmzrv2i82qjrq017sykah3xc90f2d8qcxfv9")) "1mhkllxz49l1x680dmzrv2i82qjrq017sykah3xc90f2d8qcxfv9"))

View file

@ -788,7 +788,7 @@ (define-public gtkglext
(version "1.2.0") (version "1.2.0")
(source (origin (source (origin
(method url-fetch) (method url-fetch)
(uri (string-append "mirror://sourceforge/project/gtkglext/gtkglext/" (uri (string-append "mirror://sourceforge/gtkglext/gtkglext/"
version "/gtkglext-" version ".tar.gz")) version "/gtkglext-" version ".tar.gz"))
(sha256 (sha256
(base32 "1ya4d2j2aacr9ii5zj4ac95fjpdvlm2rg79mgnk7yvl1dcy3y1z5")) (base32 "1ya4d2j2aacr9ii5zj4ac95fjpdvlm2rg79mgnk7yvl1dcy3y1z5"))

View file

@ -46,8 +46,8 @@ (define-public gnucash
(source (source
(origin (origin
(method url-fetch) (method url-fetch)
(uri (string-append "mirror://sourceforge/gnucash/gnucash-" (uri (string-append "mirror://sourceforge/gnucash/gnucash%20%28stable%29/"
version ".tar.bz2")) version "/gnucash-" version ".tar.bz2"))
(sha256 (sha256
(base32 (base32
"0x84f07p30pwhriamv8ifljgw755cj87rc12jy1xddf47spyj7rp")) "0x84f07p30pwhriamv8ifljgw755cj87rc12jy1xddf47spyj7rp"))

View file

@ -119,8 +119,8 @@ (define-public gts
(version "0.7.6") (version "0.7.6")
(source (origin (source (origin
(method url-fetch) (method url-fetch)
(uri (string-append "mirror://sourceforge/gts/gts-" (uri (string-append "mirror://sourceforge/gts/gts/" version
version ".tar.gz")) "/gts-" version ".tar.gz"))
(sha256 (sha256
(base32 (base32
"07mqx09jxh8cv9753y2d2jsv7wp8vjmrd7zcfpbrddz3wc9kx705")))) "07mqx09jxh8cv9753y2d2jsv7wp8vjmrd7zcfpbrddz3wc9kx705"))))

46
gnu/packages/hexedit.scm Normal file
View file

@ -0,0 +1,46 @@
;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2016 Kei Kebreau <kei@openmailbox.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 hexedit)
#:use-module ((guix licenses) #:prefix license:)
#:use-module (guix packages)
#:use-module (gnu packages)
#:use-module (gnu packages ncurses)
#:use-module (guix download)
#:use-module (guix build-system gnu))
(define-public hexedit
(package
(name "hexedit")
(version "1.2.13")
(source (origin
(method url-fetch)
(uri (string-append "http://rigaux.org/"
name "-" version ".src.tgz"))
(sha256
(base32
"1mwdp1ikk64cqmagnrrps5jkn3li3n47maiqh2qc1xbp1ains4ka"))))
(build-system gnu-build-system)
(arguments '(#:tests? #f)) ; no check target
(inputs `(("ncurses" ,ncurses)))
(synopsis "View and edit files or devices in hexadecimal or ASCII")
(description "hexedit shows a file both in ASCII and in hexadecimal. The
file can be a device as the file is read a piece at a time. You can modify
the file and search through it.")
(home-page "http://rigaux.org/hexedit.html")
(license license:gpl2+)))

View file

@ -332,8 +332,8 @@ (define-public openjpeg
(origin (origin
(method url-fetch) (method url-fetch)
(uri (uri
(string-append "mirror://sourceforge/openjpeg.mirror/" name "-" (string-append "mirror://sourceforge/openjpeg.mirror/" version "/"
version ".tar.gz")) name "-" version ".tar.gz"))
(sha256 (sha256
(base32 "00zzm303zvv4ijzancrsb1cqbph3pgz0nky92k9qx3fq9y0vnchj")) (base32 "00zzm303zvv4ijzancrsb1cqbph3pgz0nky92k9qx3fq9y0vnchj"))
(patches (search-patches "openjpeg-use-after-free-fix.patch" (patches (search-patches "openjpeg-use-after-free-fix.patch"
@ -369,8 +369,8 @@ (define-public openjpeg-2.0
(origin (origin
(method url-fetch) (method url-fetch)
(uri (uri
(string-append "mirror://sourceforge/openjpeg.mirror/" name "-" (string-append "mirror://sourceforge/openjpeg.mirror/" version "/"
version ".tar.gz")) name "-" version ".tar.gz"))
(sha256 (sha256
(base32 "1c2xc3nl2mg511b63rk7hrckmy14681p1m44mzw3n1fyqnjm0b0z")) (base32 "1c2xc3nl2mg511b63rk7hrckmy14681p1m44mzw3n1fyqnjm0b0z"))
(patches (search-patches "openjpeg-use-after-free-fix.patch" (patches (search-patches "openjpeg-use-after-free-fix.patch"
@ -384,8 +384,8 @@ (define-public openjpeg-1
(origin (origin
(method url-fetch) (method url-fetch)
(uri (uri
(string-append "mirror://sourceforge/openjpeg.mirror/" name "-" (string-append "mirror://sourceforge/openjpeg.mirror/" version "/"
version ".tar.gz")) name "-" version ".tar.gz"))
(sha256 (sha256
(base32 "11waq9w215zvzxrpv40afyd18qf79mxc28fda80bm3ax98cpppqm")))))) (base32 "11waq9w215zvzxrpv40afyd18qf79mxc28fda80bm3ax98cpppqm"))))))
@ -396,8 +396,7 @@ (define-public giflib
(source (origin (source (origin
(method url-fetch) (method url-fetch)
(uri (string-append "mirror://sourceforge/giflib/giflib-" (uri (string-append "mirror://sourceforge/giflib/giflib-"
(first (string-split version #\.)) version ".tar.bz2"))
".x/giflib-" version ".tar.bz2"))
(sha256 (sha256
(base32 (base32
"1md83dip8rf29y40cm5r7nn19705f54iraz6545zhwa6y8zyq9yz")))) "1md83dip8rf29y40cm5r7nn19705f54iraz6545zhwa6y8zyq9yz"))))
@ -443,7 +442,8 @@ (define-public libungif
(version "4.1.4") (version "4.1.4")
(source (origin (source (origin
(method url-fetch) (method url-fetch)
(uri (string-append "mirror://sourceforge/giflib/libungif-" (uri (string-append "mirror://sourceforge/giflib/libungif-4.x/"
"libungif-" version "/libungif-"
version ".tar.bz2")) version ".tar.bz2"))
(sha256 (sha256
(base32 (base32
@ -463,8 +463,8 @@ (define-public imlib2
(source (origin (source (origin
(method url-fetch) (method url-fetch)
(uri (string-append (uri (string-append
"mirror://sourceforge/enlightenment/imlib2-" "mirror://sourceforge/enlightenment/imlib2-src/" version
version ".tar.bz2")) "/imlib2-" version ".tar.bz2"))
(sha256 (sha256
(base32 (base32
"08809xxk2555yj6glixzw9a0x3x8cx55imd89kj3r0h152bn8a3x")))) "08809xxk2555yj6glixzw9a0x3x8cx55imd89kj3r0h152bn8a3x"))))
@ -663,8 +663,8 @@ (define-public libmng
(version "2.0.3") (version "2.0.3")
(source (origin (source (origin
(method url-fetch) (method url-fetch)
(uri (string-append "mirror://sourceforge/libmng/" (uri (string-append "mirror://sourceforge/libmng/libmng-devel/"
name "-" version ".tar.xz")) version "/" name "-" version ".tar.xz"))
(sha256 (sha256
(base32 (base32
"1lvxnpds0vcf0lil6ia2036ghqlbl740c4d2sz0q5g6l93fjyija")))) "1lvxnpds0vcf0lil6ia2036ghqlbl740c4d2sz0q5g6l93fjyija"))))

View file

@ -30,6 +30,7 @@ (define-module (gnu packages java)
#:use-module (gnu packages autotools) #:use-module (gnu packages autotools)
#:use-module (gnu packages base) #:use-module (gnu packages base)
#:use-module (gnu packages bash) #:use-module (gnu packages bash)
#:use-module (gnu packages certs)
#:use-module (gnu packages cpio) #:use-module (gnu packages cpio)
#:use-module (gnu packages cups) #:use-module (gnu packages cups)
#:use-module (gnu packages compression) #:use-module (gnu packages compression)
@ -262,7 +263,8 @@ (define-public icedtea-6
#:modules ((guix build utils) #:modules ((guix build utils)
(guix build gnu-build-system) (guix build gnu-build-system)
(ice-9 popen) (ice-9 popen)
(ice-9 rdelim)) (ice-9 rdelim)
(srfi srfi-19))
#:configure-flags #:configure-flags
(let* ((gcjdir (assoc-ref %build-inputs "gcj")) (let* ((gcjdir (assoc-ref %build-inputs "gcj"))
@ -281,8 +283,8 @@ (define-public icedtea-6
,(string-append "--with-jdk-home=" jdk) ,(string-append "--with-jdk-home=" jdk)
,(string-append "--with-java=" jdk "/bin/java"))) ,(string-append "--with-java=" jdk "/bin/java")))
#:phases #:phases
(alist-replace (modify-phases %standard-phases
'unpack (replace 'unpack
(lambda* (#:key source inputs #:allow-other-keys) (lambda* (#:key source inputs #:allow-other-keys)
(and (zero? (system* "tar" "xvf" source)) (and (zero? (system* "tar" "xvf" source))
(begin (begin
@ -291,9 +293,8 @@ (define-public icedtea-6
(with-directory-excursion "openjdk.src" (with-directory-excursion "openjdk.src"
(copy-file (assoc-ref inputs "openjdk6-src") (copy-file (assoc-ref inputs "openjdk6-src")
"openjdk6-src.tar.xz") "openjdk6-src.tar.xz")
(zero? (system* "tar" "xvf" "openjdk6-src.tar.xz")))))) (zero? (system* "tar" "xvf" "openjdk6-src.tar.xz")))))))
(alist-cons-after (add-after 'unpack 'patch-patches
'unpack 'patch-patches
(lambda _ (lambda _
;; shebang in patches so that they apply cleanly ;; shebang in patches so that they apply cleanly
(substitute* '("patches/jtreg-jrunscript.patch" (substitute* '("patches/jtreg-jrunscript.patch"
@ -305,9 +306,8 @@ (define-public icedtea-6
(("ALSA_INCLUDE=/usr/include/alsa/version.h") (("ALSA_INCLUDE=/usr/include/alsa/version.h")
(string-append "ALSA_INCLUDE=" (string-append "ALSA_INCLUDE="
(assoc-ref %build-inputs "alsa-lib") (assoc-ref %build-inputs "alsa-lib")
"/include/alsa/version.h")))) "/include/alsa/version.h")))))
(alist-cons-after (add-after 'unpack 'patch-paths
'unpack 'patch-paths
(lambda _ (lambda _
;; buildtree.make generates shell scripts, so we need to replace ;; buildtree.make generates shell scripts, so we need to replace
;; the generated shebang ;; the generated shebang
@ -383,9 +383,8 @@ (define-public icedtea-6
(("AZ=AZM;2005-12-31-20-00-00;AZN") "AZ=AZN") (("AZ=AZM;2005-12-31-20-00-00;AZN") "AZ=AZN")
(("MZ=MZM;2006-06-30-22-00-00;MZN") "MZ=MZN") (("MZ=MZM;2006-06-30-22-00-00;MZN") "MZ=MZN")
(("RO=ROL;2005-06-30-21-00-00;RON") "RO=RON") (("RO=ROL;2005-06-30-21-00-00;RON") "RO=RON")
(("TR=TRL;2004-12-31-22-00-00;TRY") "TR=TRY")))) (("TR=TRL;2004-12-31-22-00-00;TRY") "TR=TRY")))))
(alist-cons-before (add-before 'configure 'set-additional-paths
'configure 'set-additional-paths
(lambda* (#:key inputs #:allow-other-keys) (lambda* (#:key inputs #:allow-other-keys)
(let* ((gcjdir (assoc-ref %build-inputs "gcj")) (let* ((gcjdir (assoc-ref %build-inputs "gcj"))
(gcjlib (string-append gcjdir "/lib")) (gcjlib (string-append gcjdir "/lib"))
@ -412,9 +411,8 @@ (define-public icedtea-6
"/include")) "/include"))
(setenv "ALT_FREETYPE_LIB_PATH" (setenv "ALT_FREETYPE_LIB_PATH"
(string-append (assoc-ref %build-inputs "freetype") (string-append (assoc-ref %build-inputs "freetype")
"/lib")))) "/lib")))))
(alist-cons-before (add-before 'check 'fix-test-framework
'check 'fix-test-framework
(lambda _ (lambda _
;; Fix PATH in test environment ;; Fix PATH in test environment
(substitute* "src/jtreg/com/sun/javatest/regtest/Main.java" (substitute* "src/jtreg/com/sun/javatest/regtest/Main.java"
@ -422,9 +420,8 @@ (define-public icedtea-6
(string-append "PATH=" (getenv "PATH")))) (string-append "PATH=" (getenv "PATH"))))
(substitute* "src/jtreg/com/sun/javatest/util/SysEnv.java" (substitute* "src/jtreg/com/sun/javatest/util/SysEnv.java"
(("/usr/bin/env") (which "env"))) (("/usr/bin/env") (which "env")))
#t) #t))
(alist-cons-before (add-before 'check 'fix-hotspot-tests
'check 'fix-hotspot-tests
(lambda _ (lambda _
(with-directory-excursion "openjdk.src/hotspot/test/" (with-directory-excursion "openjdk.src/hotspot/test/"
(substitute* "jprt.config" (substitute* "jprt.config"
@ -437,9 +434,8 @@ (define-public icedtea-6
(("/bin/rm") (which "rm")) (("/bin/rm") (which "rm"))
(("/bin/cp") (which "cp")) (("/bin/cp") (which "cp"))
(("/bin/mv") (which "mv")))) (("/bin/mv") (which "mv"))))
#t) #t))
(alist-cons-before (add-before 'check 'fix-jdk-tests
'check 'fix-jdk-tests
(lambda _ (lambda _
(with-directory-excursion "openjdk.src/jdk/test/" (with-directory-excursion "openjdk.src/jdk/test/"
(substitute* "com/sun/jdi/JdbReadTwiceTest.sh" (substitute* "com/sun/jdi/JdbReadTwiceTest.sh"
@ -495,9 +491,8 @@ (define-public icedtea-6
(("/bin/chmod") (which "chmod"))) (("/bin/chmod") (which "chmod")))
(substitute* "java/util/zip/ZipFile/Assortment.java" (substitute* "java/util/zip/ZipFile/Assortment.java"
(("/bin/sh") (which "sh")))) (("/bin/sh") (which "sh"))))
#t) #t))
(alist-replace (replace 'check
'check
(lambda _ (lambda _
;; The "make check-*" targets always return zero, so we need to ;; The "make check-*" targets always return zero, so we need to
;; check for errors in the associated log files to determine ;; check for errors in the associated log files to determine
@ -519,9 +514,8 @@ (define-public icedtea-6
(or #t ; skip tests (or #t ; skip tests
(and (run-test "check-hotspot") (and (run-test "check-hotspot")
(run-test "check-langtools") (run-test "check-langtools")
(run-test "check-jdk"))))) (run-test "check-jdk"))))))
(alist-replace (replace 'install
'install
(lambda* (#:key outputs #:allow-other-keys) (lambda* (#:key outputs #:allow-other-keys)
(let ((doc (string-append (assoc-ref outputs "doc") (let ((doc (string-append (assoc-ref outputs "doc")
"/share/doc/icedtea")) "/share/doc/icedtea"))
@ -529,8 +523,47 @@ (define-public icedtea-6
(jdk (assoc-ref outputs "jdk"))) (jdk (assoc-ref outputs "jdk")))
(copy-recursively "openjdk.build/docs" doc) (copy-recursively "openjdk.build/docs" doc)
(copy-recursively "openjdk.build/j2re-image" jre) (copy-recursively "openjdk.build/j2re-image" jre)
(copy-recursively "openjdk.build/j2sdk-image" jdk))) (copy-recursively "openjdk.build/j2sdk-image" jdk))))
%standard-phases))))))))))) ;; By default IcedTea only generates an empty keystore. In order to
;; be able to use certificates in Java programs we need to generate a
;; keystore from a set of certificates. For convenience we use the
;; certificates from the nss-certs package.
(add-after 'install 'install-keystore
(lambda* (#:key inputs outputs #:allow-other-keys)
(let* ((keystore "cacerts")
(certs-dir (string-append (assoc-ref inputs "nss-certs")
"/etc/ssl/certs"))
(keytool (string-append (assoc-ref outputs "jdk")
"/bin/keytool")))
(define (import-cert cert)
(format #t "Importing certificate ~a\n" (basename cert))
(let* ((port (open-pipe* OPEN_WRITE keytool
"-import"
"-alias" (basename cert)
"-keystore" keystore
"-storepass" "changeit"
"-file" cert)))
(display "yes\n" port)
(when (not (zero? (status:exit-val (close-pipe port))))
(error "failed to import" cert))))
;; This is necessary because the certificate directory contains
;; files with non-ASCII characters in their names.
(setlocale LC_ALL "en_US.utf8")
(setenv "LC_ALL" "en_US.utf8")
(for-each import-cert (find-files certs-dir "\\.pem$"))
(mkdir-p (string-append (assoc-ref outputs "out")
"/lib/security"))
(mkdir-p (string-append (assoc-ref outputs "jdk")
"/jre/lib/security"))
(install-file keystore
(string-append (assoc-ref outputs "out")
"/lib/security"))
(install-file keystore
(string-append (assoc-ref outputs "jdk")
"/jre/lib/security"))
#t))))))
(native-inputs (native-inputs
`(("ant" ,ant) `(("ant" ,ant)
("alsa-lib" ,alsa-lib) ("alsa-lib" ,alsa-lib)
@ -553,6 +586,7 @@ (define-public icedtea-6
("libxslt" ,libxslt) ;for xsltproc ("libxslt" ,libxslt) ;for xsltproc
("mit-krb5" ,mit-krb5) ("mit-krb5" ,mit-krb5)
("nss" ,nss) ("nss" ,nss)
("nss-certs" ,nss-certs)
("libx11" ,libx11) ("libx11" ,libx11)
("libxcomposite" ,libxcomposite) ("libxcomposite" ,libxcomposite)
("libxt" ,libxt) ("libxt" ,libxt)
@ -798,6 +832,9 @@ (define-public icedtea-8
(delete 'patch-paths) (delete 'patch-paths)
(delete 'set-additional-paths) (delete 'set-additional-paths)
(delete 'patch-patches) (delete 'patch-patches)
;; FIXME: This phase is needed but fails with this version of
;; IcedTea.
(delete 'install-keystore)
(replace 'install (replace 'install
(lambda* (#:key outputs #:allow-other-keys) (lambda* (#:key outputs #:allow-other-keys)
(let ((doc (string-append (assoc-ref outputs "doc") (let ((doc (string-append (assoc-ref outputs "doc")

View file

@ -127,7 +127,7 @@ (define-public librevenge
(origin (origin
(method url-fetch) (method url-fetch)
(uri (string-append "mirror://sourceforge/libwpd/" name "/" name "-" (uri (string-append "mirror://sourceforge/libwpd/" name "/" name "-"
version ".tar.xz")) version "/" name "-" version ".tar.xz"))
(sha256 (base32 (sha256 (base32
"03ygxyb0vfjv8raif5q62sl33b54wkr5rzgadb8slijm6k281wpn")))) "03ygxyb0vfjv8raif5q62sl33b54wkr5rzgadb8slijm6k281wpn"))))
(build-system gnu-build-system) (build-system gnu-build-system)
@ -158,8 +158,8 @@ (define-public libwpd
(source (source
(origin (origin
(method url-fetch) (method url-fetch)
(uri (string-append "mirror://sourceforge/libwpd/" name "/" name "-" (uri (string-append "mirror://sourceforge/" name "/" name "/"
version ".tar.xz")) name "-" version "/" name "-" version ".tar.xz"))
(sha256 (base32 (sha256 (base32
"0b6krzr6kxzm89g6bapn805kdayq70hn16n5b5wfs2lwrf0ag2wx")))) "0b6krzr6kxzm89g6bapn805kdayq70hn16n5b5wfs2lwrf0ag2wx"))))
(build-system gnu-build-system) (build-system gnu-build-system)
@ -220,8 +220,8 @@ (define-public libwpg
(source (source
(origin (origin
(method url-fetch) (method url-fetch)
(uri (string-append "mirror://sourceforge/libwpg/" name "/" name "-" (uri (string-append "mirror://sourceforge/" name "/" name "/"
version ".tar.xz")) name "-" version "/" name "-" version ".tar.xz"))
(sha256 (base32 (sha256 (base32
"097jx8a638fwwfrzf6v29r1yhc34rq9526py7wf0ck2z4fcr2w3g")))) "097jx8a638fwwfrzf6v29r1yhc34rq9526py7wf0ck2z4fcr2w3g"))))
(build-system gnu-build-system) (build-system gnu-build-system)
@ -576,8 +576,8 @@ (define-public libmwaw
(source (source
(origin (origin
(method url-fetch) (method url-fetch)
(uri (string-append "mirror://sourceforge/" name "/" name "/" (uri (string-append "mirror://sourceforge/" name "/" name "/" name "-"
name "-" version ".tar.xz")) version "/" name "-" version ".tar.xz"))
(sha256 (base32 (sha256 (base32
"1vx9h419fcfcs0yj071hsg9d2qvkacgca6052m8hv3h743cdmzil")))) "1vx9h419fcfcs0yj071hsg9d2qvkacgca6052m8hv3h743cdmzil"))))
(build-system gnu-build-system) (build-system gnu-build-system)
@ -607,7 +607,7 @@ (define-public libwps
(origin (origin
(method url-fetch) (method url-fetch)
(uri (string-append "mirror://sourceforge/" name "/" name "/" (uri (string-append "mirror://sourceforge/" name "/" name "/"
name "-" version ".tar.xz")) name "-" version "/" name "-" version ".tar.xz"))
(sha256 (base32 (sha256 (base32
"0nlrdk7di015l0sk0ivjdqs86zdcvf73p9z9s9ry5glyhrknzxjk")))) "0nlrdk7di015l0sk0ivjdqs86zdcvf73p9z9s9ry5glyhrknzxjk"))))
(build-system gnu-build-system) (build-system gnu-build-system)
@ -635,7 +635,7 @@ (define-public hunspell
(source (source
(origin (origin
(method url-fetch) (method url-fetch)
(uri (string-append "mirror://sourceforge/" name "/" (uri (string-append "mirror://sourceforge/" name "/Hunspell/" version "/"
name "-" version ".tar.gz")) name "-" version ".tar.gz"))
(sha256 (base32 (sha256 (base32
"0v14ff9s37vkh45diaddndcrj0hmn67arh8xh8k79q9c1vgc1cm7")))) "0v14ff9s37vkh45diaddndcrj0hmn67arh8xh8k79q9c1vgc1cm7"))))
@ -655,7 +655,8 @@ (define-public hyphen
(source (source
(origin (origin
(method url-fetch) (method url-fetch)
(uri (string-append "mirror://sourceforge/hunspell/" (uri (string-append "mirror://sourceforge/hunspell/Hyphen/"
(version-major+minor version) "/"
name "-" version ".tar.gz")) name "-" version ".tar.gz"))
(sha256 (base32 (sha256 (base32
"01ap9pr6zzzbp4ky0vy7i1983fwyqy27pl0ld55s30fdxka3ciih")))) "01ap9pr6zzzbp4ky0vy7i1983fwyqy27pl0ld55s30fdxka3ciih"))))
@ -676,7 +677,7 @@ (define-public mythes
(source (source
(origin (origin
(method url-fetch) (method url-fetch)
(uri (string-append "mirror://sourceforge/hunspell/" (uri (string-append "mirror://sourceforge/hunspell/MyThes/" version "/"
name "-" version ".tar.gz")) name "-" version ".tar.gz"))
(sha256 (base32 (sha256 (base32
"0prh19wy1c74kmzkkavm9qslk99gz8h8wmjvwzjc6lf8v2az708y")))) "0prh19wy1c74kmzkkavm9qslk99gz8h8wmjvwzjc6lf8v2az708y"))))

View file

@ -138,7 +138,7 @@ (define-public libmtp
(version "1.1.11") (version "1.1.11")
(source (origin (source (origin
(method url-fetch) (method url-fetch)
(uri (string-append "mirror://sourceforge/libmtp/" version (uri (string-append "mirror://sourceforge/libmtp/libmtp/" version
"/libmtp-" version ".tar.gz")) "/libmtp-" version ".tar.gz"))
(sha256 (sha256
(base32 (base32
@ -174,7 +174,7 @@ (define-public gmtp
(version "1.3.10") (version "1.3.10")
(source (origin (source (origin
(method url-fetch) (method url-fetch)
(uri (string-append "mirror://sourceforge/gmtp/" version (uri (string-append "mirror://sourceforge/gmtp/gMTP-" version
"/gmtp-" version ".tar.gz")) "/gmtp-" version ".tar.gz"))
(sha256 (sha256
(base32 (base32

View file

@ -723,7 +723,8 @@ (define-public extundelete
(source (origin (source (origin
(method url-fetch) (method url-fetch)
(uri (string-append "mirror://sourceforge/extundelete/" (uri (string-append "mirror://sourceforge/extundelete/"
version "/extundelete-" version ".tar.bz2")) "extundelete/" version "/extundelete-"
version ".tar.bz2"))
(sha256 (sha256
(base32 (base32
"1x0r7ylxlp9lbj3d7sqf6j2a222dwy2nfpff05jd6mkh4ihxvyd1")))) "1x0r7ylxlp9lbj3d7sqf6j2a222dwy2nfpff05jd6mkh4ihxvyd1"))))
@ -777,8 +778,8 @@ (define-public strace
(version "4.7") (version "4.7")
(source (origin (source (origin
(method url-fetch) (method url-fetch)
(uri (string-append "mirror://sourceforge/strace/strace-" (uri (string-append "mirror://sourceforge/strace/strace/" version
version ".tar.xz")) "/strace-" version ".tar.xz"))
(sha256 (sha256
(base32 (base32
"158iwk0pl2mfw93m1843xb7a2zb8p6lh0qim07rca6f1ff4dk764")))) "158iwk0pl2mfw93m1843xb7a2zb8p6lh0qim07rca6f1ff4dk764"))))
@ -1114,8 +1115,8 @@ (define-public bridge-utils
(version "1.5") (version "1.5")
(source (origin (source (origin
(method url-fetch) (method url-fetch)
(uri (string-append "mirror://sourceforge/bridge/bridge-utils-" (uri (string-append "mirror://sourceforge/bridge/bridge/"
version ".tar.gz")) "bridge-utils-" version ".tar.gz"))
(sha256 (sha256
(base32 (base32
"12367cwqmi0yqphi6j8rkx97q8hw52yq2fx4k0xfclkcizxybya2")))) "12367cwqmi0yqphi6j8rkx97q8hw52yq2fx4k0xfclkcizxybya2"))))
@ -2096,7 +2097,7 @@ (define-public hdparm
(version "9.45") (version "9.45")
(source (origin (source (origin
(method url-fetch) (method url-fetch)
(uri (string-append "mirror://sourceforge/" name "/" (uri (string-append "mirror://sourceforge/" name "/" name "/"
name "-" version ".tar.gz")) name "-" version ".tar.gz"))
(sha256 (sha256
(base32 (base32
@ -2149,8 +2150,8 @@ (define-public acpi
(version "1.7") (version "1.7")
(source (origin (source (origin
(method url-fetch) (method url-fetch)
(uri (string-append "mirror://sourceforge/acpiclient/" (uri (string-append "mirror://sourceforge/acpiclient/acpiclient/"
name "-" version ".tar.gz")) version "/" name "-" version ".tar.gz"))
(sha256 (sha256
(base32 (base32
"01ahldvf0gc29dmbd5zi4rrnrw2i1ajnf30sx2vyaski3jv099fp")))) "01ahldvf0gc29dmbd5zi4rrnrw2i1ajnf30sx2vyaski3jv099fp"))))
@ -2290,7 +2291,7 @@ (define-public libavc1394
(version "0.5.4") (version "0.5.4")
(source (origin (source (origin
(method url-fetch) (method url-fetch)
(uri (string-append "mirror://sourceforge/libavc1394/" (uri (string-append "mirror://sourceforge/libavc1394/libavc1394/"
name "-" version ".tar.gz")) name "-" version ".tar.gz"))
(sha256 (sha256
(base32 (base32
@ -2676,7 +2677,7 @@ (define-public thinkfan
(source (origin (source (origin
(method url-fetch) (method url-fetch)
(uri (string-append "mirror://sourceforge/thinkfan/" (uri (string-append "mirror://sourceforge/thinkfan/"
version "/thinkfan-" version ".tar.gz")) "/thinkfan-" version ".tar.gz"))
(sha256 (sha256
(base32 (base32
"0nz4c48f0i0dljpk5y33c188dnnwg8gz82s4grfl8l64jr4n675n")) "0nz4c48f0i0dljpk5y33c188dnnwg8gz82s4grfl8l64jr4n675n"))

View file

@ -35,8 +35,8 @@ (define-public lirc
(version "0.9.4") (version "0.9.4")
(source (origin (source (origin
(method url-fetch) (method url-fetch)
(uri (string-append "mirror://sourceforge/lirc/lirc-" (uri (string-append "mirror://sourceforge/lirc/LIRC/" version
version ".tar.bz2")) "/lirc-" version ".tar.bz2"))
(sha256 (sha256
(base32 (base32
"1l2xzhnm4hrla51ik09hcafki0y8wnww7svfm7j63zbl2rssc66x")) "1l2xzhnm4hrla51ik09hcafki0y8wnww7svfm7j63zbl2rssc66x"))

View file

@ -36,7 +36,7 @@ (define-public libfm
(version "1.2.4") (version "1.2.4")
(source (origin (source (origin
(method url-fetch) (method url-fetch)
(uri (string-append "mirror://sourceforge/project/pcmanfm/" (uri (string-append "mirror://sourceforge/pcmanfm/"
"PCManFM%20%2B%20Libfm%20%28tarball%20release" "PCManFM%20%2B%20Libfm%20%28tarball%20release"
"%29/LibFM/" name "-" version ".tar.xz")) "%29/LibFM/" name "-" version ".tar.xz"))
(sha256 (sha256
@ -75,7 +75,7 @@ (define-public lxappearance
(version "0.6.2") (version "0.6.2")
(source (origin (source (origin
(method url-fetch) (method url-fetch)
(uri (string-append "mirror://sourceforge/project/lxde/" (uri (string-append "mirror://sourceforge/lxde/"
"LXAppearance/" name "-" version ".tar.xz")) "LXAppearance/" name "-" version ".tar.xz"))
(sha256 (sha256
(base32 (base32
@ -96,7 +96,7 @@ (define-public lxrandr
(version "0.3.1") (version "0.3.1")
(source (origin (source (origin
(method url-fetch) (method url-fetch)
(uri (string-append "mirror://sourceforge/project/lxde/LXRandR" (uri (string-append "mirror://sourceforge/lxde/LXRandR"
"%20%28monitor%20config%20tool%29/LXRandR%20" "%20%28monitor%20config%20tool%29/LXRandR%20"
(version-major+minor version) ".x/" (version-major+minor version) ".x/"
name "-" version ".tar.xz")) name "-" version ".tar.xz"))
@ -122,7 +122,7 @@ (define-public lxtask
(version "0.1.7") (version "0.1.7")
(source (origin (source (origin
(method url-fetch) (method url-fetch)
(uri (string-append "mirror://sourceforge/project/lxde/LXTask" (uri (string-append "mirror://sourceforge/lxde/LXTask"
"%20%28task%20manager%29/LXTask%20" "%20%28task%20manager%29/LXTask%20"
(version-major+minor version) ".x/" (version-major+minor version) ".x/"
name "-" version ".tar.xz")) name "-" version ".tar.xz"))
@ -146,7 +146,7 @@ (define-public lxterminal
(version "0.2.0") (version "0.2.0")
(source (origin (source (origin
(method url-fetch) (method url-fetch)
(uri (string-append "mirror://sourceforge/project/lxde/LXTerminal" (uri (string-append "mirror://sourceforge/lxde/LXTerminal"
"%20%28terminal%20emulator%29/LXTerminal%20" "%20%28terminal%20emulator%29/LXTerminal%20"
version "/" name "-" version ".tar.gz")) version "/" name "-" version ".tar.gz"))
(sha256 (sha256
@ -171,7 +171,7 @@ (define-public menu-cache
(version "1.0.1") (version "1.0.1")
(source (origin (source (origin
(method url-fetch) (method url-fetch)
(uri (string-append "mirror://sourceforge/project/lxde/" name "/" (uri (string-append "mirror://sourceforge/lxde/" name "/"
(version-major+minor version) "/" (version-major+minor version) "/"
name "-" version ".tar.xz")) name "-" version ".tar.xz"))
(sha256 (sha256
@ -193,7 +193,7 @@ (define-public pcmanfm
(version "1.2.4") (version "1.2.4")
(source (origin (source (origin
(method url-fetch) (method url-fetch)
(uri (string-append "mirror://sourceforge/project/" name "/" (uri (string-append "mirror://sourceforge/" name "/"
"PCManFM%20%2B%20Libfm%20%28tarball%20release" "PCManFM%20%2B%20Libfm%20%28tarball%20release"
"%29/PCManFM/" name "-" version ".tar.xz")) "%29/PCManFM/" name "-" version ".tar.xz"))
(sha256 (sha256

View file

@ -678,14 +678,15 @@ (define-public claws-mail
(define-public msmtp (define-public msmtp
(package (package
(name "msmtp") (name "msmtp")
(version "1.6.4") (version "1.6.5")
(source (source
(origin (origin
(method url-fetch) (method url-fetch)
(uri (string-append (uri (string-append "mirror://sourceforge/msmtp/msmtp/" version
"mirror://sourceforge/msmtp/msmtp-" version ".tar.xz")) "/msmtp-" version ".tar.xz"))
(sha256 (base32 (sha256
"1kfihblm769s4hv8iah5mqynqd6hfwlyz5rcg2v423a4llic0jcv")))) (base32
"01jh9ba49bih8zsh40myw6qq1ll210q1vw0jg865vrn7jc3dd83n"))))
(build-system gnu-build-system) (build-system gnu-build-system)
(inputs (inputs
`(("libidn" ,libidn) `(("libidn" ,libidn)
@ -811,7 +812,7 @@ (define-public exim
(define-public dovecot (define-public dovecot
(package (package
(name "dovecot") (name "dovecot")
(version "2.2.19") (version "2.2.25")
(source (source
(origin (origin
(method url-fetch) (method url-fetch)
@ -819,7 +820,7 @@ (define-public dovecot
(version-major+minor version) "/" (version-major+minor version) "/"
name "-" version ".tar.gz")) name "-" version ".tar.gz"))
(sha256 (base32 (sha256 (base32
"17sf5aancad4pg1vx1606k99389wg76blpqzmnmxlz4hklzix7km")))) "0rwn5wc5b8j9fzqcjggdgpzmb77myrf4ra294z1gg5v3hhng7nfq"))))
(build-system gnu-build-system) (build-system gnu-build-system)
(native-inputs (native-inputs
`(("pkg-config" ,pkg-config))) `(("pkg-config" ,pkg-config)))

View file

@ -13,6 +13,7 @@
;;; Copyright © 2016 Roel Janssen <roel@gnu.org> ;;; Copyright © 2016 Roel Janssen <roel@gnu.org>
;;; Copyright © 2016 Kei Kebreau <kei@openmailbox.org> ;;; Copyright © 2016 Kei Kebreau <kei@openmailbox.org>
;;; Copyright © 2016 Ludovic Courtès <ludo@gnu.org> ;;; Copyright © 2016 Ludovic Courtès <ludo@gnu.org>
;;; Copyright © 2016 Leo Famulari <leo@famulari.name>
;;; ;;;
;;; This file is part of GNU Guix. ;;; This file is part of GNU Guix.
;;; ;;;
@ -35,7 +36,6 @@ (define-module (gnu packages maths)
#:use-module ((guix licenses) #:prefix license:) #:use-module ((guix licenses) #:prefix license:)
#:use-module (guix packages) #:use-module (guix packages)
#:use-module (guix download) #:use-module (guix download)
#:use-module (guix svn-download)
#:use-module (guix utils) #:use-module (guix utils)
#:use-module (guix build utils) #:use-module (guix build utils)
#:use-module (guix build-system cmake) #:use-module (guix build-system cmake)
@ -380,17 +380,22 @@ (define-public scalapack
"See LICENSE in the distribution.")))) "See LICENSE in the distribution."))))
(define-public gnuplot (define-public gnuplot
;; Gnuplot version 5.0.4 was updated in-place, resulting in a hash mismatch.
;; This can be removed at the next version update.
(let ((upstream-version "5.0.4")
(guix-revision "1"))
(package (package
(name "gnuplot") (name "gnuplot")
(version "5.0.2") (version (string-append upstream-version "-" guix-revision))
(source (source
(origin (origin
(method url-fetch) (method url-fetch)
(uri (string-append "mirror://sourceforge/gnuplot/gnuplot/" (uri (string-append "mirror://sourceforge/gnuplot/gnuplot/"
version "/gnuplot-" version ".tar.gz")) upstream-version "/gnuplot-"
upstream-version ".tar.gz"))
(sha256 (sha256
(base32 (base32
"146qn414z96c7cc42a1kb9a4kpjc2q2hfdwk44kjjvgmfp9k2ass")))) "07n3w12dkcxjnhsvsliaqnkhajhi818v6q8mkpmpbplbf92vh70m"))))
(build-system gnu-build-system) (build-system gnu-build-system)
(inputs `(("readline" ,readline) (inputs `(("readline" ,readline)
("cairo" ,cairo) ("cairo" ,cairo)
@ -408,7 +413,7 @@ (define-public gnuplot
;; X11 Style with the additional restriction that derived works may only be ;; X11 Style with the additional restriction that derived works may only be
;; distributed as patches to the original. ;; distributed as patches to the original.
(license (license:fsf-free (license (license:fsf-free
"http://gnuplot.cvs.sourceforge.net/gnuplot/gnuplot/Copyright")))) "http://gnuplot.cvs.sourceforge.net/gnuplot/gnuplot/Copyright")))))
(define-public hdf5 (define-public hdf5
(package (package
@ -797,7 +802,7 @@ (define-public gmsh
(define-public petsc (define-public petsc
(package (package
(name "petsc") (name "petsc")
(version "3.6.2") (version "3.7.2")
(source (source
(origin (origin
(method url-fetch) (method url-fetch)
@ -805,7 +810,7 @@ (define-public petsc
(uri (string-append "http://ftp.mcs.anl.gov/pub/petsc/release-snapshots/" (uri (string-append "http://ftp.mcs.anl.gov/pub/petsc/release-snapshots/"
"petsc-lite-" version ".tar.gz")) "petsc-lite-" version ".tar.gz"))
(sha256 (sha256
(base32 "13h0m5f9xsdpps4lsp59iz2m7zkapwavq2zfkfvs3ab6sndla0l9")))) (base32 "0jfrq6rd4zagw1iimz05m2w91k0jvz3qbik1lk8pqcxw3rvdqk5d"))))
(build-system gnu-build-system) (build-system gnu-build-system)
(native-inputs (native-inputs
`(("python" ,python-2) `(("python" ,python-2)
@ -829,8 +834,8 @@ (define-public petsc
,(string-append "--with-superlu-lib=" ,(string-append "--with-superlu-lib="
(assoc-ref %build-inputs "superlu") "/lib/libsuperlu.a")) (assoc-ref %build-inputs "superlu") "/lib/libsuperlu.a"))
#:phases #:phases
(alist-replace (modify-phases %standard-phases
'configure (replace 'configure
;; PETSc's configure script is actually a python script, so we can't ;; PETSc's configure script is actually a python script, so we can't
;; run it with bash. ;; run it with bash.
(lambda* (#:key outputs (configure-flags '()) (lambda* (#:key outputs (configure-flags '())
@ -840,22 +845,23 @@ (define-public petsc
,@configure-flags))) ,@configure-flags)))
(format #t "build directory: ~s~%" (getcwd)) (format #t "build directory: ~s~%" (getcwd))
(format #t "configure flags: ~s~%" flags) (format #t "configure flags: ~s~%" flags)
(zero? (apply system* "./configure" flags)))) (zero? (apply system* "./configure" flags)))))
(alist-cons-after (add-after 'configure 'clean-local-references
'configure 'clean-local-references
;; Try to keep build directory names from leaking into compiled code
(lambda* (#:key inputs outputs #:allow-other-keys) (lambda* (#:key inputs outputs #:allow-other-keys)
(let ((out (assoc-ref outputs "out"))) (let ((out (assoc-ref outputs "out")))
(substitute* (find-files "." "^petsc(conf|machineinfo).h$") (substitute* (find-files "." "^petsc(conf|machineinfo).h$")
(((getcwd)) out)))) ;; Prevent build directory from leaking into compiled code
(alist-cons-after (((getcwd)) out)
'install 'clean-install ;; Scrub timestamp for reproducibility
((".*Libraries compiled on.*") ""))
#t)))
(add-after 'install 'clean-install
;; Try to keep installed files from leaking build directory names. ;; Try to keep installed files from leaking build directory names.
(lambda* (#:key inputs outputs #:allow-other-keys) (lambda* (#:key inputs outputs #:allow-other-keys)
(let ((out (assoc-ref outputs "out"))) (let ((out (assoc-ref outputs "out")))
(substitute* (map (lambda (file) (substitute* (map (lambda (file)
(string-append out "/lib/petsc/conf/" file)) (string-append out "/lib/petsc/conf/" file))
'("petscvariables" "PETScConfig.cmake")) '("petscvariables"))
(((getcwd)) out)) (((getcwd)) out))
;; Make compiler references point to the store ;; Make compiler references point to the store
(substitute* (string-append out "/lib/petsc/conf/petscvariables") (substitute* (string-append out "/lib/petsc/conf/petscvariables")
@ -868,9 +874,10 @@ (define-public petsc
(delete-file f)))) (delete-file f))))
'("configure.log" "make.log" "gmake.log" '("configure.log" "make.log" "gmake.log"
"test.log" "error.log" "RDict.db" "test.log" "error.log" "RDict.db"
"PETScBuildInternal.cmake"
;; Once installed, should uninstall with Guix ;; Once installed, should uninstall with Guix
"uninstall.py")))) "uninstall.py"))
%standard-phases))))) #t))))))
(home-page "http://www.mcs.anl.gov/petsc") (home-page "http://www.mcs.anl.gov/petsc")
(synopsis "Library to solve PDEs") (synopsis "Library to solve PDEs")
(description "PETSc, pronounced PET-see (the S is silent), is a suite of (description "PETSc, pronounced PET-see (the S is silent), is a suite of
@ -921,7 +928,7 @@ (define-public petsc-complex-openmpi
(define-public slepc (define-public slepc
(package (package
(name "slepc") (name "slepc")
(version "3.6.2") (version "3.7.1")
(source (source
(origin (origin
(method url-fetch) (method url-fetch)
@ -930,7 +937,7 @@ (define-public slepc
(file-name (string-append name "-" version ".tar.gz")) (file-name (string-append name "-" version ".tar.gz"))
(sha256 (sha256
(base32 (base32
"1pv5iqz2kc8sj49zsabyz4arnfpana8mjrhq31vzgk16xldk3d1a")))) "1hijlmrvxvfqslnx8yydzw5xqbsn1yy02g32w0hln1z3cgr1c0k7"))))
(build-system gnu-build-system) (build-system gnu-build-system)
(native-inputs (native-inputs
`(("python" ,python-2))) `(("python" ,python-2)))
@ -946,8 +953,7 @@ (define-public slepc
(assoc-ref %build-inputs "arpack") "/lib")) (assoc-ref %build-inputs "arpack") "/lib"))
#:phases #:phases
(modify-phases %standard-phases (modify-phases %standard-phases
(replace (replace 'configure
'configure
;; configure is a python script, so we can't run it with bash. ;; configure is a python script, so we can't run it with bash.
(lambda* (#:key inputs outputs (configure-flags '()) (lambda* (#:key inputs outputs (configure-flags '())
#:allow-other-keys) #:allow-other-keys)
@ -959,8 +965,7 @@ (define-public slepc
(setenv "SLEPC_DIR" (getcwd)) (setenv "SLEPC_DIR" (getcwd))
(setenv "PETSC_DIR" (assoc-ref inputs "petsc")) (setenv "PETSC_DIR" (assoc-ref inputs "petsc"))
(zero? (apply system* "./configure" flags))))) (zero? (apply system* "./configure" flags)))))
(add-after (add-after 'install 'delete-doc
'install 'delete-doc
;; TODO: SLEPc installs HTML documentation alongside headers in ;; TODO: SLEPc installs HTML documentation alongside headers in
;; $out/include. We'd like to move them to share/doc, but delete ;; $out/include. We'd like to move them to share/doc, but delete
;; them for now, as they are incomplete and installing the complete ;; them for now, as they are incomplete and installing the complete
@ -968,8 +973,7 @@ (define-public slepc
(lambda* (#:key outputs #:allow-other-keys) (lambda* (#:key outputs #:allow-other-keys)
(let* ((out (assoc-ref outputs "out"))) (let* ((out (assoc-ref outputs "out")))
(for-each delete-file (find-files out "\\.html$"))))) (for-each delete-file (find-files out "\\.html$")))))
(add-after (add-after 'install 'clean-install
'install 'clean-install
;; Clean up unnecessary build logs from installation. ;; Clean up unnecessary build logs from installation.
(lambda* (#:key outputs #:allow-other-keys) (lambda* (#:key outputs #:allow-other-keys)
(let ((out (assoc-ref outputs "out"))) (let ((out (assoc-ref outputs "out")))
@ -1208,74 +1212,56 @@ (define-public r-pracma
(define-public superlu (define-public superlu
(package (package
(name "superlu") (name "superlu")
(version "4.3") (version "5.2.1")
(source (source
(origin (origin
(method url-fetch) (method url-fetch)
(uri (string-append "http://crd-legacy.lbl.gov/~xiaoye/SuperLU/" (uri (string-append "http://crd-legacy.lbl.gov/~xiaoye/SuperLU/"
"superlu_" version ".tar.gz")) "superlu_" version ".tar.gz"))
(sha256 (sha256
(base32 "10b785s9s4x0m9q7ihap09275pq4km3k2hk76jiwdfdr5qr2168n")))) (base32 "0qzlb7cd608q62kyppd0a8c65l03vrwqql6gsm465rky23b6dyr8"))
(build-system gnu-build-system) (modules '((guix build utils)))
(snippet
;; Replace the non-free implementation of MC64 with a stub adapted
;; from Debian
'(begin
(use-modules (ice-9 regex)
(ice-9 rdelim))
(call-with-output-file "SRC/mc64ad.c"
(lambda (port)
(display "
#include <stdio.h>
#include <stdlib.h>
void mc64id_(int *a) {
fprintf (stderr, \"SuperLU: non-free MC64 not available. Aborting.\\n\");
abort ();
}
void mc64ad_ (int *a, int *b, int *c, int *d, int *e, double *f, int *g,
int *h, int *i, int *j, int *k, double *l, int *m, int *n) {
fprintf (stderr, \"SuperLU: non-free MC64 not available. Aborting.\\n\");
abort ();
}\n" port)))
;; Remove the corresponding license verbiage. MC64 license follows
;; a "------" line separator.
(with-atomic-file-replacement "License.txt"
(let ((rx (make-regexp "-{8}")))
(lambda (in out)
(let loop ()
(let ((line (read-line in 'concat)))
(unless (regexp-exec rx line)
(display line out)
(loop)))))))))))
(build-system cmake-build-system)
(native-inputs (native-inputs
`(("tcsh" ,tcsh))) `(("tcsh" ,tcsh)))
(inputs (inputs
`(("lapack" ,lapack) `(("blas" ,openblas)
("gfortran" ,gfortran))) ("gfortran" ,gfortran)))
(arguments (arguments
`(#:parallel-build? #f `(#:configure-flags '("-Denable_blaslib:BOOL=NO" ;do not use internal cblas
#:tests? #f ;tests are run as part of `make all` "-DTPL_BLAS_LIBRARIES=openblas"
#:phases "-DBUILD_SHARED_LIBS:BOOL=YES"
(alist-replace "-DCMAKE_INSTALL_LIBDIR=lib")))
'configure
(lambda* (#:key inputs outputs #:allow-other-keys)
(call-with-output-file "make.inc"
(lambda (port)
(format port "
PLAT =
SuperLUroot = ~a
SUPERLULIB = ~a/lib/libsuperlu.a
TMGLIB = libtmglib.a
BLASDEF = -DUSE_VENDOR_BLAS
BLASLIB = -L~a/lib -lblas
LIBS = $(SUPERLULIB) $(BLASLIB)
ARCH = ar
ARCHFLAGS = cr
RANLIB = ranlib
CC = gcc
PIC = -fPIC
CFLAGS = -O3 -DPRNTlevel=0 $(PIC)
NOOPTS = -O0 $(PIC)
FORTRAN = gfortran
FFLAGS = -O2 $(PIC)
LOADER = $(CC)
CDEFS = -DAdd_"
(getcwd)
(assoc-ref outputs "out")
(assoc-ref inputs "lapack")))))
(alist-cons-before
'build 'create-install-directories
(lambda* (#:key outputs #:allow-other-keys)
(for-each
(lambda (dir)
(mkdir-p (string-append (assoc-ref outputs "out")
"/" dir)))
'("lib" "include")))
(alist-replace
'install
(lambda* (#:key outputs #:allow-other-keys)
;; Library is placed in lib during the build phase. Copy over
;; headers to include.
(let* ((out (assoc-ref outputs "out"))
(incdir (string-append out "/include")))
(for-each (lambda (file)
(let ((base (basename file)))
(format #t "installing `~a' to `~a'~%"
base incdir)
(copy-file file
(string-append incdir "/" base))))
(find-files "SRC" ".*\\.h$"))))
%standard-phases)))))
(home-page "http://crd-legacy.lbl.gov/~xiaoye/SuperLU/") (home-page "http://crd-legacy.lbl.gov/~xiaoye/SuperLU/")
(synopsis "Supernodal direct solver for sparse linear systems") (synopsis "Supernodal direct solver for sparse linear systems")
(description (description
@ -1285,7 +1271,9 @@ (define-public superlu
library routines perform an LU decomposition with partial pivoting and library routines perform an LU decomposition with partial pivoting and
triangular system solves through forward and back substitution. The library triangular system solves through forward and back substitution. The library
also provides threshold-based ILU factorization preconditioners.") also provides threshold-based ILU factorization preconditioners.")
(license license:bsd-3))) (license (list license:bsd-3
license:gpl2+ ;EXAMPLE/*fgmr.c
(license:fsf-free "file://SRC/colamd.h")))))
(define-public superlu-dist (define-public superlu-dist
(package (package
@ -1298,6 +1286,30 @@ (define-public superlu-dist
"superlu_dist_" version ".tar.gz")) "superlu_dist_" version ".tar.gz"))
(sha256 (sha256
(base32 "1hnak09yxxp026blq8zhrl7685yip16svwngh1wysqxf8z48vzfj")) (base32 "1hnak09yxxp026blq8zhrl7685yip16svwngh1wysqxf8z48vzfj"))
(modules '((guix build utils)))
(snippet
;; Replace the non-free implementation of MC64 with a stub
'(begin
(use-modules (ice-9 regex)
(ice-9 rdelim))
(call-with-output-file "SRC/mc64ad.c"
(lambda (port)
(display "
#include <stdio.h>
#include <stdlib.h>
void mc64id_(int *a) {
fprintf (stderr, \"SuperLU_DIST: non-free MC64 not available. Aborting.\\n\");
abort ();
}
void mc64ad_ (int *a, int *b, int *c, int *d, int *e, double *f, int *g,
int *h, int *i, int *j, int *k, double *l, int *m, int *n) {
fprintf (stderr, \"SuperLU_DIST: non-free MC64 not available. Aborting.\\n\");
abort ();
}\n" port)))
(delete-file "SRC/mc64ad.f.bak")
(substitute* "SRC/util.c" ;adjust default algorithm
(("RowPerm[[:blank:]]*=[[:blank:]]*LargeDiag")
"RowPerm = NOROWPERM"))))
(patches (search-patches "superlu-dist-scotchmetis.patch")))) (patches (search-patches "superlu-dist-scotchmetis.patch"))))
(build-system gnu-build-system) (build-system gnu-build-system)
(native-inputs (native-inputs
@ -1791,18 +1803,25 @@ (define-public armadillo-for-rcpparmadillo
"1cdpjxb0fz5f28y5qrqgpw53s7qi8s2v3al9lfdldqxngb21vpx8")))))) "1cdpjxb0fz5f28y5qrqgpw53s7qi8s2v3al9lfdldqxngb21vpx8"))))))
(define-public muparser (define-public muparser
;; When switching download sites, muparser re-issued a 2.2.5 release with a
;; different hash. In order to make `guix package --upgrade` work correctly,
;; we set a Guix packaging revision.
;; When the next version of muparser is released, we can remove
;; UPSTREAM-VERSION and REVISION and use the plain VERSION.
(let ((upstream-version "2.2.5")
(revision "2"))
(package (package
(name "muparser") (name "muparser")
(version "2.2.5") (version (string-append upstream-version "-" revision))
(source (source
(origin (origin
(method svn-fetch) (method url-fetch)
(uri (svn-reference (uri (string-append "https://github.com/beltoforion/muparser/archive/v"
(url "http://muparser.googlecode.com/svn/trunk/") upstream-version ".tar.gz"))
(revision 34))) (file-name (string-append name "-" version ".tar.gz"))
(sha256 (sha256
(base32 (base32
"1d6bdbhx9zj3srwj3m7c9hvr18gnx1fx43h6d25my7q85gicpcwn")))) "0277qsi5l23jsck1vhn383bmvc2n9l4a1dl5r9bf7hvjv9ayyrh6"))))
(build-system gnu-build-system) (build-system gnu-build-system)
(arguments (arguments
`(#:configure-flags '("--enable-samples=no") `(#:configure-flags '("--enable-samples=no")
@ -1811,9 +1830,9 @@ (define-public muparser
(synopsis "Fast parser library for mathematical expressions") (synopsis "Fast parser library for mathematical expressions")
(description (description
"muParser is an extensible high performance math parser library. It is "muParser is an extensible high performance math parser library. It is
based on transforming an expression into a bytecode and precalculating based on transforming an expression into a bytecode and precalculating constant
constant parts of it.") parts of it.")
(license license:expat))) (license license:expat))))
(define-public openblas (define-public openblas
(package (package
@ -2006,8 +2025,8 @@ (define-public atlas
(version "3.10.2") (version "3.10.2")
(source (origin (source (origin
(method url-fetch) (method url-fetch)
(uri (string-append "mirror://sourceforge/math-atlas/atlas" (uri (string-append "mirror://sourceforge/math-atlas/Stable/"
version ".tar.bz2")) version "/atlas" version ".tar.bz2"))
(sha256 (sha256
(base32 (base32
"0bqh4bdnjdyww4mcpg6kn0x7338mfqbdgysn97dzrwwb26di7ars")))) "0bqh4bdnjdyww4mcpg6kn0x7338mfqbdgysn97dzrwwb26di7ars"))))
@ -2136,8 +2155,8 @@ (define-public glm
(source (source
(origin (origin
(method url-fetch) (method url-fetch)
(uri (string-append "mirror://sourceforge/ogl-math/glm-" (uri (string-append "mirror://sourceforge/ogl-math/glm-" version
version ".zip")) "/glm-" version ".zip"))
(sha256 (sha256
(base32 (base32
"1cnjmi033a16a95v6xfkr1bvfmkd26hzdjka8j1819hgn5b1nr8l")))) "1cnjmi033a16a95v6xfkr1bvfmkd26hzdjka8j1819hgn5b1nr8l"))))
@ -2355,9 +2374,8 @@ (define-public wcalc
(source (source
(origin (origin
(method url-fetch) (method url-fetch)
(uri (uri (string-append "mirror://sourceforge/w-calc/Wcalc/" version "/"
(string-append "wcalc-" version ".tar.bz2"))
"mirror://sourceforge/w-calc/wcalc-" version ".tar.bz2"))
(sha256 (sha256
(base32 (base32
"1vi8dl6rccqiq1apmpwawyg2ywx6a1ic1d3cvkf2hlwk1z11fb0f")))) "1vi8dl6rccqiq1apmpwawyg2ywx6a1ic1d3cvkf2hlwk1z11fb0f"))))
@ -2381,8 +2399,8 @@ (define-public xaos
(version "3.6") (version "3.6")
(source (origin (source (origin
(method url-fetch) (method url-fetch)
(uri (string-append "mirror://sourceforge/xaos/xaos-" (uri (string-append "mirror://sourceforge/xaos/XaoS/" version
version ".tar.gz")) "/xaos-" version ".tar.gz"))
(sha256 (sha256
(base32 (base32
"15cd1cx1dyygw6g2nhjqq3bsfdj8sj8m4va9n75i0f3ryww3x7wq")))) "15cd1cx1dyygw6g2nhjqq3bsfdj8sj8m4va9n75i0f3ryww3x7wq"))))
@ -2524,7 +2542,7 @@ (define-public matio
(source (source
(origin (origin
(method url-fetch) (method url-fetch)
(uri (string-append "mirror://sourceforge/matio/" version "/" (uri (string-append "mirror://sourceforge/matio/matio/" version "/"
"matio-" version ".tar.gz")) "matio-" version ".tar.gz"))
(sha256 (sha256
(base32 (base32
@ -2538,3 +2556,25 @@ (define-public matio
(description "Matio is a library for reading and writing MAT files. It (description "Matio is a library for reading and writing MAT files. It
supports compressed MAT files, as well as newer (version 7.3) MAT files.") supports compressed MAT files, as well as newer (version 7.3) MAT files.")
(license license:bsd-2))) (license license:bsd-2)))
(define-public libhilbert
(package
(name "libhilbert")
(version "0.2-1")
(source
(origin
(method url-fetch)
(uri (string-append "http://web.cs.dal.ca/~chamilto/hilbert/"
"libhilbert-" version ".tar.gz"))
(sha256
(base32
"0v48x8405dj95gjn2saja4bzhw86d6zl6d3dg8h7dzac2qr97s34"))))
(build-system gnu-build-system)
(home-page "http://web.cs.dal.ca/~chamilto/hilbert")
(synopsis "Hilbert indices for multidimensional data")
(description "The libhilbert library can efficiently calculate Hilbert
curves and order-preserving representations of Hilbert curve indices that use
the same amount of space as the original point representation. This is useful
when using the Gilbert curve as a space filling curve through a
high-dimensional space where not all demensions have the same cardinality.")
(license license:lgpl2.1+)))

View file

@ -33,8 +33,8 @@ (define-public mcrypt
(source (source
(origin (origin
(method url-fetch) (method url-fetch)
(uri (string-append "mirror://sourceforge/mcrypt/mcrypt-" (uri (string-append "mirror://sourceforge/mcrypt/MCrypt/"
version ".tar.gz")) version "/" name "-" version ".tar.gz"))
(sha256 (sha256
(base32 (base32
"161031n1w9pb4yzz9i47szc12a4mwpcpvyxnvafsik2l9s2aliai")) "161031n1w9pb4yzz9i47szc12a4mwpcpvyxnvafsik2l9s2aliai"))
@ -66,8 +66,8 @@ (define-public libmcrypt
(source (source
(origin (origin
(method url-fetch) (method url-fetch)
(uri (string-append "mirror://sourceforge/mcrypt/libmcrypt-" (uri (string-append "mirror://sourceforge/mcrypt/Libmcrypt/" version
version ".tar.gz")) "/libmcrypt-" version ".tar.gz"))
(sha256 (sha256
(base32 (base32
"0gipgb939vy9m66d3k8il98rvvwczyaw2ixr8yn6icds9c3nrsz4")))) "0gipgb939vy9m66d3k8il98rvvwczyaw2ixr8yn6icds9c3nrsz4"))))
@ -89,9 +89,8 @@ (define-public libmhash
(source (source
(origin (origin
(method url-fetch) (method url-fetch)
(uri (string-append "mirror://sourceforge/mhash/mhash/" version
(uri (string-append "mirror://sourceforge/mhash/mhash-" "/mhash-" version ".tar.bz2"))
version ".tar.bz2"))
(sha256 (sha256
(base32 (base32
"1w7yiljan8gf1ibiypi6hm3r363imm3sxl1j8hapjdq3m591qljn")) "1w7yiljan8gf1ibiypi6hm3r363imm3sxl1j8hapjdq3m591qljn"))

View file

@ -290,8 +290,8 @@ (define-public mpg123
(version "1.22.4") (version "1.22.4")
(source (origin (source (origin
(method url-fetch) (method url-fetch)
(uri (string-append "mirror://sourceforge/mpg123/mpg123-" (uri (string-append "mirror://sourceforge/mpg123/mpg123/" version
version ".tar.bz2")) "/mpg123-" version ".tar.bz2"))
(sha256 (sha256
(base32 (base32
"1lj0xv0b6sgqsbhx10dg60cnzgz98i76gxy51kqh11hka0pf0sah")))) "1lj0xv0b6sgqsbhx10dg60cnzgz98i76gxy51kqh11hka0pf0sah"))))
@ -314,7 +314,7 @@ (define-public mpg321
(version "0.3.1") (version "0.3.1")
(source (origin (source (origin
(method url-fetch) (method url-fetch)
(uri (string-append "mirror://sourceforge/mpg321/" (uri (string-append "mirror://sourceforge/mpg321/mpg321/"
version "/mpg321-" version ".tar.gz")) version "/mpg321-" version ".tar.gz"))
(sha256 (sha256
(base32 (base32

View file

@ -98,16 +98,16 @@ (define-public hwloc
(define-public openmpi (define-public openmpi
(package (package
(name "openmpi") (name "openmpi")
(version "1.10.1") (version "1.10.3")
(source (source
(origin (origin
(method url-fetch) (method url-fetch)
(uri (string-append "http://www.open-mpi.org/software/ompi/v" (uri (string-append "https://www.open-mpi.org/software/ompi/v"
(version-major+minor version) (version-major+minor version)
"/downloads/openmpi-" version ".tar.bz2")) "/downloads/openmpi-" version ".tar.bz2"))
(sha256 (sha256
(base32 (base32
"14p4px9a3qzjc22lnl6braxrcrmd9rgmy7fh4qpanawn2pgfq6br")))) "0k95ri9f8kzx5vhzrdbzn59rn2324fs4a96w5v8jy20j8dkbp13l"))))
(build-system gnu-build-system) (build-system gnu-build-system)
(inputs (inputs
`(("hwloc" ,hwloc) `(("hwloc" ,hwloc)
@ -128,7 +128,20 @@ (define-public openmpi
,(string-append "--with-valgrind=" ,(string-append "--with-valgrind="
(assoc-ref %build-inputs "valgrind")) (assoc-ref %build-inputs "valgrind"))
,(string-append "--with-hwloc=" ,(string-append "--with-hwloc="
(assoc-ref %build-inputs "hwloc"))))) (assoc-ref %build-inputs "hwloc")))
#:phases (modify-phases %standard-phases
(add-before 'build 'scrub-timestamps ;reproducibility
(lambda _
(substitute* '("ompi/tools/ompi_info/param.c"
"orte/tools/orte-info/param.c"
"oshmem/tools/oshmem_info/param.c")
((".*(Built|Configured) on.*") ""))
#t))
(add-after 'install 'remove-logs ;reproducibility
(lambda* (#:key outputs #:allow-other-keys)
(let ((out (assoc-ref outputs "out")))
(for-each delete-file (find-files out "config.log"))
#t))))))
(home-page "http://www.open-mpi.org") (home-page "http://www.open-mpi.org")
(synopsis "MPI-2 implementation") (synopsis "MPI-2 implementation")
(description (description

View file

@ -694,8 +694,8 @@ (define-public synthv1
(source (origin (source (origin
(method url-fetch) (method url-fetch)
(uri (uri
(string-append "mirror://sourceforge/synthv1/synthv1-" (string-append "mirror://sourceforge/synthv1/synthv1/" version
version ".tar.gz")) "/synthv1-" version ".tar.gz"))
(sha256 (sha256
(base32 (base32
"0h5zja78phf9705i9g54zh61iczb24iv7rxhljyms30sjgajig1y")))) "0h5zja78phf9705i9g54zh61iczb24iv7rxhljyms30sjgajig1y"))))

View file

@ -232,7 +232,8 @@ (define-public ifstatus
(version "1.1.0") (version "1.1.0")
(source (origin (source (origin
(method url-fetch) (method url-fetch)
(uri (string-append "mirror://sourceforge/ifstatus/ifstatus-v" (uri (string-append "mirror://sourceforge/ifstatus/ifstatus/"
"ifstatus%20v" version "/ifstatus-v"
version ".tar.gz")) version ".tar.gz"))
(sha256 (sha256
(base32 (base32
@ -271,8 +272,8 @@ (define-public nload
(version "0.7.4") (version "0.7.4")
(source (origin (source (origin
(method url-fetch) (method url-fetch)
(uri (string-append "mirror://sourceforge/nload/nload-" (uri (string-append "mirror://sourceforge/nload/nload/" version
version ".tar.gz")) "/nload-" version ".tar.gz"))
(sha256 (sha256
(base32 (base32
"1rb9skch2kgqzigf19x8bzk211jdfjfdkrcvaqyj89jy2pkm3h61")))) "1rb9skch2kgqzigf19x8bzk211jdfjfdkrcvaqyj89jy2pkm3h61"))))

View file

@ -1,5 +1,6 @@
;;; GNU Guix --- Functional package management for GNU ;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2013 Ludovic Courtès <ludo@gnu.org> ;;; Copyright © 2013 Ludovic Courtès <ludo@gnu.org>
;;; Copyright © 2016 Efraim Flashner <efraim@flashner.co.il>
;;; ;;;
;;; This file is part of GNU Guix. ;;; This file is part of GNU Guix.
;;; ;;;
@ -21,10 +22,8 @@ (define-module (gnu packages ocr)
#:use-module (guix packages) #:use-module (guix packages)
#:use-module (guix download) #:use-module (guix download)
#:use-module (guix build-system gnu) #:use-module (guix build-system gnu)
#:use-module (gnu packages autotools)
#:use-module (gnu packages compression) #:use-module (gnu packages compression)
#:use-module (gnu packages image) #:use-module (gnu packages image))
#:use-module (gnu packages pkg-config))
(define-public ocrad (define-public ocrad
(package (package
@ -50,39 +49,24 @@ (define-public ocrad
(define-public tesseract-ocr (define-public tesseract-ocr
(package (package
(name "tesseract-ocr") (name "tesseract-ocr")
(version "3.02.02") (version "3.04.01")
(source (source
(origin (origin
(method url-fetch) (method url-fetch)
(uri (string-append (uri (string-append
"https://tesseract-ocr.googlecode.com/files/tesseract-ocr-" "https://github.com/tesseract-ocr/tesseract/archive/"
version ".tar.gz")) version ".tar.gz"))
(file-name (string-append name "-" version ".tar.gz"))
(sha256 (sha256
(base32 "0g81m9y4iydp7kgr56mlkvjdwpp3mb01q385yhdnyvra7z5kkk96")) (base32 "0snwd8as5i8vx7zkimpd2yg898jl96zf90r65a9w615f2hdkxxjp"))))
(modules '((guix build utils)))
;; Leptonica added a pkg-config file in the meanwhile.
(snippet
'(substitute* "tesseract.pc.in"
(("^# Requires: lept ## .*")
"Requires: lept\n")))))
(build-system gnu-build-system) (build-system gnu-build-system)
(native-inputs (inputs
`(("autoconf" ,autoconf)
("automake" ,automake)
("libtool" ,libtool)))
(propagated-inputs
`(("leptonica" ,leptonica))) `(("leptonica" ,leptonica)))
(arguments (arguments
'(#:phases '(#:configure-flags
(modify-phases %standard-phases
(add-after
'unpack 'autogen
(lambda _
(zero? (system* "sh" "autogen.sh")))))
#:configure-flags
(let ((leptonica (assoc-ref %build-inputs "leptonica"))) (let ((leptonica (assoc-ref %build-inputs "leptonica")))
(list (string-append "LIBLEPT_HEADERSDIR=" leptonica "/include"))))) (list (string-append "LIBLEPT_HEADERSDIR=" leptonica "/include")))))
(home-page "https://code.google.com/p/tesseract-ocr/") (home-page "https://github.com/tesseract-ocr")
(synopsis "Optical character recognition engine") (synopsis "Optical character recognition engine")
(description (description
"Tesseract is an optical character recognition (OCR) engine with very "Tesseract is an optical character recognition (OCR) engine with very

View file

@ -28,7 +28,7 @@ (define-public libtirpc
(version "0.2.4") (version "0.2.4")
(source (origin (source (origin
(method url-fetch) (method url-fetch)
(uri (string-append "mirror://sourceforge/libtirpc/" (uri (string-append "mirror://sourceforge/libtirpc/libtirpc/"
version "/libtirpc-" version "/libtirpc-"
version ".tar.bz2")) version ".tar.bz2"))
(sha256 (sha256

View file

@ -53,8 +53,8 @@ (define-public pwgen
(source (source
(origin (origin
(method url-fetch) (method url-fetch)
(uri (string-append "mirror://sourceforge/pwgen/pwgen-" (uri (string-append "mirror://sourceforge/pwgen/pwgen/" version
version ".tar.gz")) "/pwgen-" version ".tar.gz"))
(sha256 (sha256
(base32 "0mhmw700kkh238fzivcwnwi94bj9f3h36yfh3k3j2v19b0zmjx7b")))) (base32 "0mhmw700kkh238fzivcwnwi94bj9f3h36yfh3k3j2v19b0zmjx7b"))))
(build-system gnu-build-system) (build-system gnu-build-system)

View file

@ -418,8 +418,8 @@ (define-public podofo
(version "0.9.3") (version "0.9.3")
(source (origin (source (origin
(method url-fetch) (method url-fetch)
(uri (string-append "mirror://sourceforge/podofo/podofo-" (uri (string-append "mirror://sourceforge/podofo/podofo/" version
version ".tar.gz")) "/podofo-" version ".tar.gz"))
(sha256 (sha256
(base32 (base32
"1n12lbq9x15vqn7dc0hsccp56l5jdff1xrhvlfqlbklxx0qiw9pc")))) "1n12lbq9x15vqn7dc0hsccp56l5jdff1xrhvlfqlbklxx0qiw9pc"))))
@ -509,8 +509,8 @@ (define-public qpdf
(version "5.1.3") (version "5.1.3")
(source (origin (source (origin
(method url-fetch) (method url-fetch)
(uri (string-append "mirror://sourceforge/qpdf/qpdf-" (uri (string-append "mirror://sourceforge/qpdf/qpdf/" version
version ".tar.gz")) "/qpdf-" version ".tar.gz"))
(sha256 (base32 (sha256 (base32
"1lq1v7xghvl6p4hgrwbps3a13ad6lh4ib3myimb83hxgsgd4n5nm")) "1lq1v7xghvl6p4hgrwbps3a13ad6lh4ib3myimb83hxgsgd4n5nm"))
(modules '((guix build utils))) (modules '((guix build utils)))
@ -561,8 +561,8 @@ (define-public xournal
(source (source
(origin (origin
(method url-fetch) (method url-fetch)
(uri (string-append "mirror://sourceforge/xournal/xournal-" (uri (string-append "mirror://sourceforge/xournal/xournal/" version
version ".tar.gz")) "/xournal-" version ".tar.gz"))
(sha256 (sha256
(base32 (base32
"0c7gjcqhygiyp0ypaipdaxgkbivg6q45vhsj8v5jsi9nh6iqff13")))) "0c7gjcqhygiyp0ypaipdaxgkbivg6q45vhsj8v5jsi9nh6iqff13"))))

View file

@ -6094,8 +6094,8 @@ (define-public perltidy
(version "20160302") (version "20160302")
(source (origin (source (origin
(method url-fetch) (method url-fetch)
(uri (string-append "mirror://sourceforge/perltidy/Perl-Tidy-" (uri (string-append "mirror://sourceforge/perltidy/" version
version ".tar.gz")) "/Perl-Tidy-" version ".tar.gz"))
(sha256 (sha256
(base32 (base32
"19yw63yh5s3pq7k3nkw6nsamg5b8vvwyhgbizslgxg0mqgc4xl3d")))) "19yw63yh5s3pq7k3nkw6nsamg5b8vvwyhgbizslgxg0mqgc4xl3d"))))

View file

@ -73,8 +73,8 @@ (define-public libexif
(version "0.6.21") (version "0.6.21")
(source (origin (source (origin
(method url-fetch) (method url-fetch)
(uri (string-append "mirror://sourceforge/libexif/libexif-" (uri (string-append "mirror://sourceforge/libexif/libexif/"
version ".tar.bz2")) version "/libexif-" version ".tar.bz2"))
(sha256 (sha256
(base32 (base32
"06nlsibr3ylfwp28w8f5466l6drgrnydgxrm4jmxzrmk5svaxk8n")))) "06nlsibr3ylfwp28w8f5466l6drgrnydgxrm4jmxzrmk5svaxk8n"))))
@ -92,8 +92,8 @@ (define-public libgphoto2
(version "2.5.2") (version "2.5.2")
(source (origin (source (origin
(method url-fetch) (method url-fetch)
(uri (string-append "mirror://sourceforge/gphoto/libgphoto2-" (uri (string-append "mirror://sourceforge/gphoto/libgphoto/"
version ".tar.bz2")) version "/libgphoto2-" version ".tar.bz2"))
(sha256 (sha256
(base32 (base32
"0f1818l1vs5fbmrihzyv3qasddbqi3r01jik5crrxddwalsi2bd3")))) "0f1818l1vs5fbmrihzyv3qasddbqi3r01jik5crrxddwalsi2bd3"))))
@ -122,8 +122,8 @@ (define-public gphoto2
(version "2.5.2") (version "2.5.2")
(source (origin (source (origin
(method url-fetch) (method url-fetch)
(uri (string-append "mirror://sourceforge/gphoto/gphoto2-" (uri (string-append "mirror://sourceforge/gphoto/gphoto/" version
version ".tar.bz2")) "/gphoto2-" version ".tar.bz2"))
(sha256 (sha256
(base32 (base32
"16c8k1cxfypg7v5h8xi87grclw7a5ayaamn548ys3zkj727r5fcf")))) "16c8k1cxfypg7v5h8xi87grclw7a5ayaamn548ys3zkj727r5fcf"))))

View file

@ -32,7 +32,8 @@ (define-public argtable
(source (origin (source (origin
(method url-fetch) (method url-fetch)
(uri (string-append (uri (string-append
"mirror://sourceforge/argtable/argtable" "mirror://sourceforge/argtable/argtable/"
"argtable-" version "/argtable"
(string-join (string-split version #\.) "-") (string-join (string-split version #\.) "-")
".tar.gz")) ".tar.gz"))
(sha256 (sha256

View file

@ -1,5 +1,7 @@
;;; GNU Guix --- Functional package management for GNU ;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2014 Ludovic Courtès <ludo@gnu.org> ;;; Copyright © 2014 Ludovic Courtès <ludo@gnu.org>
;;; Copyright © 2016 Daniel Pimentel <d4n1@d4n1.org>
;;; Copyright © 2016 Leo Famulari <leo@famulari.name>
;;; ;;;
;;; This file is part of GNU Guix. ;;; This file is part of GNU Guix.
;;; ;;;
@ -20,9 +22,12 @@ (define-module (gnu packages protobuf)
#:use-module (guix packages) #:use-module (guix packages)
#:use-module (guix download) #:use-module (guix download)
#:use-module (guix build-system gnu) #:use-module (guix build-system gnu)
#:use-module (guix build-system python)
#:use-module ((guix licenses) #:use-module ((guix licenses)
#:select (bsd-3)) #:select (bsd-3))
#:use-module (gnu packages compression)) #:use-module (gnu packages compression)
#:use-module (gnu packages gcc)
#:use-module (gnu packages python))
(define-public protobuf (define-public protobuf
(package (package
@ -44,3 +49,30 @@ (define-public protobuf
yet extensible format. Google uses Protocol Buffers for almost all of its yet extensible format. Google uses Protocol Buffers for almost all of its
internal RPC protocols and file formats.") internal RPC protocols and file formats.")
(license bsd-3))) (license bsd-3)))
(define-public python-protobuf
(package
(name "python-protobuf")
(version "3.0.0b4")
(source
(origin
(method url-fetch)
(uri (pypi-uri "protobuf" version))
(sha256
(base32
"18zvvn8cgbcwi85ws2ny0k4qp33wd525spsb8sxvrj325mbx9cpk"))))
(build-system python-build-system)
(inputs
`(("python-six" ,python-six)))
(home-page "https://github.com/google/protobuf")
(synopsis "Protocol buffers is a data interchange format")
(description
"Protocol buffers are a language-neutral, platform-neutral extensible
mechanism for serializing structured data.")
(license bsd-3)
(properties `((python2-variant . ,(delay python2-protobuf))))))
(define-public python2-protobuf
(package (inherit (package-with-python2
(strip-python2-variant python-protobuf)))
(native-inputs `(("python2-setuptools" ,python2-setuptools)))))

View file

@ -1394,8 +1394,8 @@ (define-public scons
(version "2.3.4") (version "2.3.4")
(source (origin (source (origin
(method url-fetch) (method url-fetch)
(uri (string-append "mirror://sourceforge/scons/scons-" (uri (string-append "mirror://sourceforge/scons/scons/" version
version ".tar.gz")) "/scons-" version ".tar.gz"))
(sha256 (sha256
(base32 (base32
"0hdlci43wjz8maryj83mz04ir6rwcdrrzpd7cpzvdlzycqhdfmsb")))) "0hdlci43wjz8maryj83mz04ir6rwcdrrzpd7cpzvdlzycqhdfmsb"))))
@ -3039,7 +3039,7 @@ (define python-numpy-bootstrap
(source (source
(origin (origin
(method url-fetch) (method url-fetch)
(uri (string-append "mirror://sourceforge/numpy" (uri (string-append "mirror://sourceforge/numpy/NumPy/" version
"/numpy-" version ".tar.gz")) "/numpy-" version ".tar.gz"))
(sha256 (sha256
(base32 (base32
@ -3202,7 +3202,8 @@ (define-public python-pyparsing
(source (source
(origin (origin
(method url-fetch) (method url-fetch)
(uri (string-append "mirror://sourceforge/pyparsing" (uri (string-append "mirror://sourceforge/pyparsing/pyparsing"
"/pyparsing-" version
"/pyparsing-" version ".tar.gz")) "/pyparsing-" version ".tar.gz"))
(sha256 (sha256
(base32 (base32
@ -3323,7 +3324,8 @@ (define-public python-matplotlib
(source (source
(origin (origin
(method url-fetch) (method url-fetch)
(uri (string-append "mirror://sourceforge/matplotlib" (uri (string-append "mirror://sourceforge/matplotlib/matplotlib"
"/matplotlib-" version
"/matplotlib-" version ".tar.gz")) "/matplotlib-" version ".tar.gz"))
(sha256 (sha256
(base32 (base32
@ -3533,7 +3535,8 @@ (define-public python-scipy
(source (source
(origin (origin
(method url-fetch) (method url-fetch)
(uri (string-append "mirror://sourceforge/scipy" ; http://downloads.sourceforge.net/project/scipy/scipy/0.16.1/scipy-0.16.1.tar.gz
(uri (string-append "mirror://sourceforge/scipy/scipy/" version
"/scipy-" version ".tar.xz")) "/scipy-" version ".tar.xz"))
(sha256 (sha256
(base32 (base32
@ -4912,7 +4915,8 @@ (define-public python2-xlib
(version "0.14") (version "0.14")
(source (origin (source (origin
(method url-fetch) (method url-fetch)
(uri (string-append "mirror://sourceforge/python-xlib/" (uri (string-append "mirror://sourceforge/python-xlib/python-xlib"
"/" version "/"
"python-xlib-" version ".tar.gz")) "python-xlib-" version ".tar.gz"))
(sha256 (sha256
(base32 (base32
@ -8738,7 +8742,7 @@ (define-public python2-s3cmd
(source (source
(origin (origin
(method url-fetch) (method url-fetch)
(uri (string-append "mirror://sourceforge/s3tools/" (uri (string-append "mirror://sourceforge/s3tools/s3cmd/" version "/"
"s3cmd-" version ".tar.gz")) "s3cmd-" version ".tar.gz"))
(sha256 (sha256
(base32 (base32
@ -9763,3 +9767,36 @@ (define-public python2-jedi
(native-inputs (native-inputs
`(("python2-setuptools" ,python2-setuptools) `(("python2-setuptools" ,python2-setuptools)
,@(package-native-inputs base)))))) ,@(package-native-inputs base))))))
(define-public ptpython
(package
(name "ptpython")
(version "0.34")
(source (origin
(method url-fetch)
(uri (pypi-uri "ptpython" version))
(sha256
(base32
"1mmbiyzf0n8hm7z2a562x7w5cbl6jc0zsk6vp40q1z4cyblv1k13"))))
(build-system python-build-system)
(inputs
`(("python-docopt" ,python-docopt)
("python-jedi" ,python-jedi)
("python-prompt-toolkit" ,python-prompt-toolkit)
("python-pygments" ,python-pygments)
("python-setuptools" ,python-setuptools)))
(home-page "https://github.com/jonathanslenders/ptpython")
(synopsis "Python Read-Eval-Print-Loop with nice IDE-like features")
(description
"ptpython is a Python read-eval-print loop with IDE-like features.
It supports syntax highlighting, multiline editing, autocompletion, mouse,
color schemes, bracketed paste, Vi and Emacs keybindings, Chinese characters
etc.")
(license bsd-3)
(properties `((python2-variant . ,(delay ptpython-2))))))
(define-public ptpython-2
(let ((base (package-with-python2 (strip-python2-variant ptpython))))
(package
(inherit base)
(name "ptpython2"))))

View file

@ -31,8 +31,8 @@ (define-public rdesktop
(source (origin (source (origin
(method url-fetch) (method url-fetch)
(uri (string-append (uri (string-append
"mirror://sourceforge/rdesktop/rdesktop-" "mirror://sourceforge/" name "/" name "/" version "/"
version ".tar.gz")) name "-" version ".tar.gz"))
(sha256 (sha256
(base32 (base32
"1r7c1rjmw2xzq8fw0scyb453gy9z19774z1z8ldmzzsfndb03cl8")))) "1r7c1rjmw2xzq8fw0scyb453gy9z19774z1z8ldmzzsfndb03cl8"))))

View file

@ -54,6 +54,8 @@ (define-module (gnu packages scheme)
#:use-module (gnu packages fontutils) #:use-module (gnu packages fontutils)
#:use-module (gnu packages image) #:use-module (gnu packages image)
#:use-module (gnu packages xorg) #:use-module (gnu packages xorg)
#:use-module (gnu packages tls)
#:use-module (gnu packages gl)
#:use-module (ice-9 match)) #:use-module (ice-9 match))
(define (mit-scheme-source-directory system version) (define (mit-scheme-source-directory system version)
@ -414,57 +416,94 @@ (define-public racket
(build-system gnu-build-system) (build-system gnu-build-system)
(arguments (arguments
'(#:phases '(#:phases
(let* ((gui-libs
(lambda (inputs)
(define (lib input)
(string-append (assoc-ref inputs input) "/lib"))
(list (lib "glib")
(lib "cairo")
(lib "pango")
(lib "libjpeg")
(lib "gtk")
(lib "gdk-pixbuf")
(lib "fontconfig")
(lib "sqlite"))))) ;to build the doc
(alist-cons-before (alist-cons-before
'configure 'pre-configure 'configure 'pre-configure
(lambda* (#:key inputs #:allow-other-keys) (lambda* (#:key inputs #:allow-other-keys)
(chdir "src") ;; Patch dynamically loaded libraries with their absolute paths.
(let* ((library-path (search-path-as-string->list
;; The GUI libs are dynamically opened through the FFI, so they (getenv "LIBRARY_PATH")))
;; must be in the loader's search path. (find-so (lambda (soname)
(setenv "LD_LIBRARY_PATH" (string-join (gui-libs inputs) ":"))) (search-path
library-path
(format #f "~a.so" soname))))
(patch-ffi-libs (lambda (file libs)
(for-each
(lambda (lib)
(substitute* file
(((format #f "\"~a\"" lib))
(format #f "\"~a\"" (find-so lib)))))
libs))))
(substitute* "collects/db/private/sqlite3/ffi.rkt"
(("ffi-lib sqlite-so")
(format #f "ffi-lib \"~a\"" (find-so "libsqlite3"))))
(substitute* "collects/openssl/libssl.rkt"
(("ffi-lib libssl-so")
(format #f "ffi-lib \"~a\"" (find-so "libssl"))))
(substitute* "collects/openssl/libcrypto.rkt"
(("ffi-lib libcrypto-so")
(format #f "ffi-lib \"~a\"" (find-so "libcrypto"))))
(substitute* "share/pkgs/math-lib/math/private/bigfloat/gmp.rkt"
(("ffi-lib libgmp-so")
(format #f "ffi-lib \"~a\"" (find-so "libgmp"))))
(substitute* "share/pkgs/math-lib/math/private/bigfloat/mpfr.rkt"
(("ffi-lib libmpfr-so")
(format #f "ffi-lib \"~a\"" (find-so "libmpfr"))))
(for-each
(lambda (x) (apply patch-ffi-libs x))
'(("share/pkgs/draw-lib/racket/draw/unsafe/cairo-lib.rkt"
("libfontconfig" "libcairo"))
("share/pkgs/draw-lib/racket/draw/unsafe/glib.rkt"
("libglib-2.0" "libgmodule-2.0" "libgobject-2.0"))
("share/pkgs/draw-lib/racket/draw/unsafe/jpeg.rkt"
("libjpeg"))
("share/pkgs/draw-lib/racket/draw/unsafe/pango.rkt"
("libpango-1.0" "libpangocairo-1.0"))
("share/pkgs/draw-lib/racket/draw/unsafe/png.rkt"
("libpng"))
("share/pkgs/db-lib/db/private/odbc/ffi.rkt"
("libodbc"))
("share/pkgs/gui-lib/mred/private/wx/gtk/x11.rkt"
("libX11"))
("share/pkgs/gui-lib/mred/private/wx/gtk/gsettings.rkt"
("libgio-2.0"))
("share/pkgs/gui-lib/mred/private/wx/gtk/gtk3.rkt"
("libgdk-3" "libgtk-3"))
("share/pkgs/gui-lib/mred/private/wx/gtk/unique.rkt"
("libunique-1.0"))
("share/pkgs/gui-lib/mred/private/wx/gtk/utils.rkt"
("libgdk-x11-2.0" "libgdk_pixbuf-2.0" "libgtk-x11-2.0"))
("share/pkgs/gui-lib/mred/private/wx/gtk/gl-context.rkt"
("libGL"))
("share/pkgs/sgl/gl.rkt"
("libGL" "libGLU")))))
(chdir "src"))
(alist-cons-after (alist-cons-after
'unpack 'patch-/bin/sh 'unpack 'patch-/bin/sh
(lambda _ (lambda _
(substitute* "collects/racket/system.rkt" (substitute* "collects/racket/system.rkt"
(("/bin/sh") (which "sh")))) (("/bin/sh") (which "sh"))))
(alist-cons-after %standard-phases))
'install 'wrap-programs
(lambda* (#:key inputs outputs #:allow-other-keys)
(let ((out (assoc-ref outputs "out")))
(define (wrap prog)
(wrap-program prog
`("LD_LIBRARY_PATH" ":" prefix
,(gui-libs inputs))))
(with-directory-excursion (string-append out "/bin")
(for-each wrap
(list "gracket" "drracket" "slideshow" "mred"))
#t)))
%standard-phases))))
#:tests? #f ; XXX: how to run them? #:tests? #f ; XXX: how to run them?
)) ))
(inputs `(("libffi" ,libffi) (inputs
("glib" ,glib) ; for DrRacket `(("libffi" ,libffi)
;; Hardcode dynamically loaded libraries for better functionality.
;; sqlite and libraries for `racket/draw' are needed to build the doc.
("cairo" ,cairo) ("cairo" ,cairo)
("pango" ,pango)
("libjpeg" ,libjpeg-8)
("fontconfig" ,fontconfig) ("fontconfig" ,fontconfig)
("gdk-pixbuf" ,gdk-pixbuf) ("glib" ,glib)
("gtk" ,gtk+-2) ("glu" ,glu)
("sqlite" ,sqlite))) ;needed to build the doc ("gmp" ,gmp)
("gtk+" ,gtk+) ; propagates gdk-pixbuf+svg
("libjpeg" ,libjpeg)
("libpng" ,libpng)
("libx11" ,libx11)
("mesa" ,mesa)
("mpfr" ,mpfr)
("openssl" ,openssl)
("pango" ,pango)
("sqlite" ,sqlite)
("unixodbc" ,unixodbc)))
(home-page "http://racket-lang.org") (home-page "http://racket-lang.org")
(synopsis "Implementation of Scheme and related languages") (synopsis "Implementation of Scheme and related languages")
(description (description

View file

@ -70,8 +70,8 @@ (define-public dtach
(version "0.9") (version "0.9")
(source (origin (source (origin
(method url-fetch) (method url-fetch)
(uri (string-append "mirror://sourceforge/dtach/dtach-" (uri (string-append "mirror://sourceforge/" name "/" name "/"
version ".tar.gz")) version "/" name "-" version ".tar.gz"))
(sha256 (sha256
(base32 (base32
"1wwj2hlngi8qn2pisvhyfxxs8gyqjlgrrv5lz91w8ly54dlzvs9j")))) "1wwj2hlngi8qn2pisvhyfxxs8gyqjlgrrv5lz91w8ly54dlzvs9j"))))

View file

@ -40,7 +40,7 @@ (define-public slim
(method url-fetch) (method url-fetch)
;; Used to be available from download.berlios.de. ;; Used to be available from download.berlios.de.
(uri (string-append (uri (string-append
"mirror://sourceforge/project/slim.berlios/slim-" "mirror://sourceforge/slim.berlios/slim-"
version ".tar.gz")) version ".tar.gz"))
(sha256 (sha256
(base32 "1pqhk22jb4aja4hkrm7rjgbgzjyh7i4zswdgf5nw862l2znzxpi1")) (base32 "1pqhk22jb4aja4hkrm7rjgbgzjyh7i4zswdgf5nw862l2znzxpi1"))

View file

@ -35,8 +35,9 @@ (define swig
(version "3.0.5") (version "3.0.5")
(source (origin (source (origin
(method url-fetch) (method url-fetch)
(uri (string-append "mirror://sourceforge/swig/swig-" (uri (string-append "mirror://sourceforge/" name "/" name "/"
version ".tar.gz")) name "-" version "/"
name "-" version ".tar.gz"))
(sha256 (sha256
(base32 (base32
"0g1a69vrqxgsnr1wkx851ljn73a2x3jqzxa66s2l3w0kyblbjk4z")))) "0g1a69vrqxgsnr1wkx851ljn73a2x3jqzxa66s2l3w0kyblbjk4z"))))

View file

@ -227,8 +227,8 @@ (define-public tcllib
(version "1.18") (version "1.18")
(source (origin (source (origin
(method url-fetch) (method url-fetch)
(uri (string-append "mirror://sourceforge/" name "/" (uri (string-append "mirror://sourceforge/" name "/" name "/"
name "-" version ".tar.gz")) version "/" name "-" version ".tar.gz"))
(sha256 (sha256
(base32 (base32
"05dmrk9qsryah2n17z6z85dj9l9lfyvnsd7faw0p9bs1pp5pwrkj")))) "05dmrk9qsryah2n17z6z85dj9l9lfyvnsd7faw0p9bs1pp5pwrkj"))))
@ -252,8 +252,8 @@ (define-public tclxml
(version "3.2") (version "3.2")
(source (origin (source (origin
(method url-fetch) (method url-fetch)
(uri (string-append "mirror://sourceforge/" name "/" (uri (string-append "mirror://sourceforge/" name "/TclXML/"
name "-" version ".tar.gz")) version "/" name "-" version ".tar.gz"))
(sha256 (sha256
(base32 (base32
"0ffb4aw63inig3aql33g4pk0kjk14dv238anp1scwjdjh1k6n4gl")) "0ffb4aw63inig3aql33g4pk0kjk14dv238anp1scwjdjh1k6n4gl"))

View file

@ -64,9 +64,9 @@ (define texlive-extra-src
(define texlive-texmf-src (define texlive-texmf-src
(origin (origin
(method url-fetch) (method url-fetch)
(uri "ftp://tug.org/historic/systems/texlive/2016/texlive-20160523-texmf.tar.xz") (uri "ftp://tug.org/historic/systems/texlive/2016/texlive-20160523b-texmf.tar.xz")
(sha256 (base32 (sha256 (base32
"0mfp6kq1p2ys5ni9czx9xl0xh264axri25vqw37yzk8jn3py9l08")))) "1dv8vgfzpczqw82hv9g7a8djhhyzywljmrarlcyy6g2qi5q51glr"))))
(define texlive-bin (define texlive-bin
(package (package
@ -75,9 +75,9 @@ (define texlive-bin
(source (source
(origin (origin
(method url-fetch) (method url-fetch)
(uri "ftp://tug.org/historic/systems/texlive/2016/texlive-20160523-source.tar.xz") (uri "ftp://tug.org/historic/systems/texlive/2016/texlive-20160523b-source.tar.xz")
(sha256 (base32 (sha256 (base32
"07kb8rsw8d42wy3fj1qgqj26y92spx1lbhx6z73wwdb3msnvh4i9")))) "1v91vahxlxkdra0qz3f132vvx5d9cx2jy84yl1hkch0agyj2rcx8"))))
(build-system gnu-build-system) (build-system gnu-build-system)
(inputs (inputs
`(("texlive-extra-src" ,texlive-extra-src) `(("texlive-extra-src" ,texlive-extra-src)
@ -167,8 +167,8 @@ (define texlive-bin
world. world.
This package contains the binaries.") This package contains the binaries.")
(license (license:fsf-free "http://tug.org/texlive/copying.html")) (license (license:fsf-free "https://www.tug.org/texlive/copying.html"))
(home-page "http://www.tug.org/texlive/"))) (home-page "https://www.tug.org/texlive/")))
(define texlive-texmf (define texlive-texmf
(package (package
@ -234,8 +234,8 @@ (define texlive-texmf
world. world.
This package contains the complete tree of texmf-dist data.") This package contains the complete tree of texmf-dist data.")
(license (license:fsf-free "http://tug.org/texlive/copying.html")) (license (license:fsf-free "https://www.tug.org/texlive/copying.html"))
(home-page "http://www.tug.org/texlive/"))) (home-page "https://www.tug.org/texlive/")))
(define-public texlive (define-public texlive
(package (package
@ -296,8 +296,8 @@ (define-public texlive
world. world.
This package contains the complete TeX Live distribution.") This package contains the complete TeX Live distribution.")
(license (license:fsf-free "http://tug.org/texlive/copying.html")) (license (license:fsf-free "https://www.tug.org/texlive/copying.html"))
(home-page "http://www.tug.org/texlive/"))) (home-page "https://www.tug.org/texlive/")))
;; texlive-texmf-minimal is a pruned, small version of the texlive tree, ;; texlive-texmf-minimal is a pruned, small version of the texlive tree,

View file

@ -343,7 +343,7 @@ (define-public utfcpp
(method url-fetch) (method url-fetch)
(uri (uri
(string-append (string-append
"mirror://sourceforge/project/utfcpp/utf8cpp_2x/Release%20" "mirror://sourceforge/utfcpp/utf8cpp_2x/Release%20"
version "/utf8_v" version "/utf8_v"
(string-map (lambda (x) (if (eq? x #\.) #\_ x)) version) (string-map (lambda (x) (if (eq? x #\.) #\_ x)) version)
".zip")) ".zip"))

View file

@ -94,12 +94,13 @@ (define-public bazaar
`(#:tests? #f ; no test target `(#:tests? #f ; no test target
#:python ,python-2 ; Python 3 apparently not yet supported, see #:python ,python-2 ; Python 3 apparently not yet supported, see
; https://answers.launchpad.net/bzr/+question/229048 ; https://answers.launchpad.net/bzr/+question/229048
#:phases (alist-cons-after #:phases
'unpack 'fix-mandir (modify-phases %standard-phases
(add-after 'unpack 'fix-mandir
(lambda _ (lambda _
(substitute* "setup.py" (substitute* "setup.py"
(("man/man1") "share/man/man1"))) (("man/man1") "share/man/man1"))
%standard-phases))) #t)))))
(home-page "https://gnu.org/software/bazaar") (home-page "https://gnu.org/software/bazaar")
(synopsis "Version control system supporting both distributed and centralized workflows") (synopsis "Version control system supporting both distributed and centralized workflows")
(description (description
@ -491,8 +492,9 @@ (define-public git-flow
'(#:tests? #f ; no tests '(#:tests? #f ; no tests
#:make-flags (list (string-append "prefix=" #:make-flags (list (string-append "prefix="
(assoc-ref %outputs "out"))) (assoc-ref %outputs "out")))
#:phases (alist-cons-after #:phases
'unpack 'reset-shFlags-link (modify-phases %standard-phases
(add-after 'unpack 'reset-shFlags-link
(lambda* (#:key inputs #:allow-other-keys) (lambda* (#:key inputs #:allow-other-keys)
;; The link points to a file in the shFlags submodule. ;; The link points to a file in the shFlags submodule.
;; Redirect it to point to our system shFlags. ;; Redirect it to point to our system shFlags.
@ -500,10 +502,9 @@ (define-public git-flow
(begin (begin
(delete-file "gitflow-shFlags") (delete-file "gitflow-shFlags")
(symlink (string-append shflags "/src/shflags") (symlink (string-append shflags "/src/shflags")
"gitflow-shFlags")))) "gitflow-shFlags")))))
(alist-delete (delete 'configure)
'configure (delete 'build))))
(alist-delete 'build %standard-phases)))))
(home-page "http://nvie.com/posts/a-successful-git-branching-model/") (home-page "http://nvie.com/posts/a-successful-git-branching-model/")
(synopsis "Git extensions for Vincent Driessen's branching model") (synopsis "Git extensions for Vincent Driessen's branching model")
(description (description
@ -686,30 +687,28 @@ (define-public subversion
(version "1.8.16") (version "1.8.16")
(source (origin (source (origin
(method url-fetch) (method url-fetch)
(uri (string-append "http://archive.apache.org/dist/subversion/" (uri (string-append "https://archive.apache.org/dist/subversion/"
"subversion-" version ".tar.bz2")) "subversion-" version ".tar.bz2"))
(sha256 (sha256
(base32 (base32
"0imkxn25n6sbcgfldrx4z29npjprb1lxjm5fb89q4297161nx3zi")))) "0imkxn25n6sbcgfldrx4z29npjprb1lxjm5fb89q4297161nx3zi"))))
(build-system gnu-build-system) (build-system gnu-build-system)
(arguments (arguments
'(#:phases (alist-cons-after '(#:phases
'configure 'patch-libtool-wrapper-ls (modify-phases %standard-phases
(add-after 'configure 'patch-libtool-wrapper-ls
(lambda* (#:key inputs #:allow-other-keys) (lambda* (#:key inputs #:allow-other-keys)
;; This substitution allows tests svnauthz_tests and ;; This substitution allows tests svnauthz_tests and svnlook_tests
;; svnlook_tests to pass. These tests execute svnauthz and ;; to pass. These tests execute svnauthz and svnlook through
;; svnlook through their libtool wrapper scripts from svn ;; their libtool wrapper scripts from svn hooks, whose empty
;; hooks, whose empty environments cause "ls: command not ;; environments cause "ls: command not found" errors. It would be
;; found" errors. It would be nice if this fix ultimately ;; nice if this fix ultimately made its way into libtool.
;; made its way into libtool.
(let ((coreutils (assoc-ref inputs "coreutils"))) (let ((coreutils (assoc-ref inputs "coreutils")))
(substitute* "libtool" (substitute* "libtool"
(("\\\\`ls") (string-append "\\`" coreutils "/bin/ls"))))) (("\\\\`ls") (string-append "\\`" coreutils "/bin/ls"))))))
(alist-cons-after (add-after 'install 'install-perl-bindings
'install 'install-perl-bindings
(lambda* (#:key outputs #:allow-other-keys) (lambda* (#:key outputs #:allow-other-keys)
;; Follow the instructions from ;; Follow the instructions from 'subversion/bindings/swig/INSTALL'.
;; 'subversion/bindings/swig/INSTALL'.
(let ((out (assoc-ref outputs "out"))) (let ((out (assoc-ref outputs "out")))
(and (zero? (system* "make" "swig-pl-lib")) (and (zero? (system* "make" "swig-pl-lib"))
;; FIXME: Test failures. ;; FIXME: Test failures.
@ -726,8 +725,7 @@ (define-public subversion
(system* "make" "install" (system* "make" "install"
(string-append "OTHERLDFLAGS=" (string-append "OTHERLDFLAGS="
"-Wl,-rpath=" "-Wl,-rpath="
out "/lib")))))))) out "/lib"))))))))))))
%standard-phases))))
(native-inputs (native-inputs
`(("pkg-config" ,pkg-config) `(("pkg-config" ,pkg-config)
;; For the Perl bindings. ;; For the Perl bindings.
@ -740,7 +738,7 @@ (define-public subversion
("python" ,python-2) ; incompatible with Python 3 (print syntax) ("python" ,python-2) ; incompatible with Python 3 (print syntax)
("sqlite" ,sqlite) ("sqlite" ,sqlite)
("zlib" ,zlib))) ("zlib" ,zlib)))
(home-page "http://subversion.apache.org/") (home-page "https://subversion.apache.org/")
(synopsis "Revision control system") (synopsis "Revision control system")
(description (description
"Subversion exists to be universally recognized and adopted as a "Subversion exists to be universally recognized and adopted as a
@ -902,8 +900,9 @@ (define-public cssc
"cssc-missing-include.patch")))) "cssc-missing-include.patch"))))
(build-system gnu-build-system) (build-system gnu-build-system)
(arguments (arguments
`(#:phases (alist-cons-before `(#:phases
'check 'precheck (modify-phases %standard-phases
(add-before 'check 'precheck
(lambda _ (lambda _
(begin (begin
(substitute* "tests/common/test-common" (substitute* "tests/common/test-common"
@ -917,8 +916,7 @@ (define-public cssc
;; not belong) in the /etc/group file of the build environment. ;; not belong) in the /etc/group file of the build environment.
;; Currently we do not have such a group. Disable this test for now. ;; Currently we do not have such a group. Disable this test for now.
(substitute* "tests/Makefile" (substitute* "tests/Makefile"
(("test-delta ") "")))) (("test-delta ") ""))))))))
%standard-phases)))
;; These are needed for the tests ;; These are needed for the tests
(native-inputs `(("git" ,git) (native-inputs `(("git" ,git)
("cvs" ,cvs))) ("cvs" ,cvs)))
@ -937,8 +935,8 @@ (define-public aegis
(version "4.24") (version "4.24")
(source (origin (source (origin
(method url-fetch) (method url-fetch)
(uri (string-append "mirror://sourceforge/aegis/aegis-" (uri (string-append "mirror://sourceforge/aegis/aegis/" version
version ".tar.gz")) "/aegis-" version ".tar.gz"))
(sha256 (sha256
(base32 (base32
"18s86ssarfmc4l17gbpzybca29m5wa37cbaimdji8czlcry3mcjl")) "18s86ssarfmc4l17gbpzybca29m5wa37cbaimdji8czlcry3mcjl"))
@ -971,8 +969,8 @@ (define-public aegis
"--sharedstatedir=/var/com/aegis") "--sharedstatedir=/var/com/aegis")
#:parallel-build? #f ; There are some nasty racy rules in the Makefile. #:parallel-build? #f ; There are some nasty racy rules in the Makefile.
#:phases #:phases
(alist-cons-before (modify-phases %standard-phases
'configure 'pre-conf (add-before 'configure 'pre-conf
(lambda _ (lambda _
(substitute* (append '("configure" (substitute* (append '("configure"
"etc/check-tar-gz.sh" "etc/check-tar-gz.sh"
@ -988,9 +986,8 @@ (define-public aegis
"libaegis/getpw_cache.cc") "libaegis/getpw_cache.cc")
(find-files "test" "\\.sh")) (find-files "test" "\\.sh"))
(("/bin/sh") (which "sh"))) (("/bin/sh") (which "sh")))
(setenv "SH" (which "sh"))) (setenv "SH" (which "sh"))))
(alist-replace (replace 'check
'check
(lambda _ (lambda _
(let ((home (string-append (getcwd) "/my-new-home"))) (let ((home (string-append (getcwd) "/my-new-home")))
;; Some tests need to write to $HOME. ;; Some tests need to write to $HOME.
@ -1002,8 +999,7 @@ (define-public aegis
(("type lex") "type flex")) (("type lex") "type flex"))
;; The author decided to call the check rule "sure". ;; The author decided to call the check rule "sure".
(zero? (system* "make" "sure")))) (zero? (system* "make" "sure"))))))))
%standard-phases))))
(home-page "http://aegis.sourceforge.net") (home-page "http://aegis.sourceforge.net")
(synopsis "Project change supervisor") (synopsis "Project change supervisor")
(description "Aegis is a project change supervisor, and performs some of (description "Aegis is a project change supervisor, and performs some of

View file

@ -90,8 +90,8 @@ (define-public aalib
(version "1.4rc5") (version "1.4rc5")
(source (origin (source (origin
(method url-fetch) (method url-fetch)
(uri (string-append "mirror://sourceforge/aa-project/" (uri (string-append "mirror://sourceforge/aa-project/aa-lib/"
name "-" version ".tar.gz")) version "/" name "-" version ".tar.gz"))
(sha256 (sha256
(base32 (base32
"1vkh19gb76agvh4h87ysbrgy82hrw88lnsvhynjf4vng629dmpgv")))) "1vkh19gb76agvh4h87ysbrgy82hrw88lnsvhynjf4vng629dmpgv"))))
@ -308,7 +308,8 @@ (define-public libdv
(source (origin (source (origin
(method url-fetch) (method url-fetch)
(uri (string-append (uri (string-append
"mirror://sourceforge/libdv/libdv-" version ".tar.gz")) "mirror://sourceforge/" name "/" name "/"
version "/" name "-" version ".tar.gz"))
(sha256 (sha256
(base32 (base32
"1fl96f2xh2slkv1i1ix7kqk576a0ak1d33cylm0mbhm96d0761d3")))) "1fl96f2xh2slkv1i1ix7kqk576a0ak1d33cylm0mbhm96d0761d3"))))
@ -1094,8 +1095,8 @@ (define-public avidemux
(source (origin (source (origin
(method url-fetch) (method url-fetch)
(uri (string-append (uri (string-append
"mirror://sourceforge/avidemux/avidemux_" "mirror://sourceforge/" name "/" name "/" version "/"
version ".tar.gz")) name "_" version ".tar.gz"))
(sha256 (sha256
(base32 (base32
"0nz52yih8sff53inndkh2dba759xjzsh4b8xjww419lcpk0qp6kn")) "0nz52yih8sff53inndkh2dba759xjzsh4b8xjww419lcpk0qp6kn"))

View file

@ -37,8 +37,9 @@ (define-public w3m
(version "0.5.3") (version "0.5.3")
(source (origin (source (origin
(method url-fetch) (method url-fetch)
(uri (string-append "mirror://sourceforge/w3m/w3m-" (uri (string-append "mirror://sourceforge/" name "/" name "/"
version ".tar.gz")) name "-" version "/"
name "-" version ".tar.gz"))
(sha256 (sha256
(base32 (base32
"1qx9f0kprf92r1wxl3sacykla0g04qsi0idypzz24b7xy9ix5579")) "1qx9f0kprf92r1wxl3sacykla0g04qsi0idypzz24b7xy9ix5579"))

View file

@ -636,7 +636,8 @@ (define-public libquvi-scripts
(origin (origin
(method url-fetch) (method url-fetch)
(uri (string-append (uri (string-append
"mirror://sourceforge/quvi/libquvi-scripts-" version ".tar.xz")) "mirror://sourceforge/quvi/" (version-major+minor version) "/"
name "/" name "-" version ".tar.xz"))
(sha256 (sha256
(base32 "0d0giry6bb57pnidymvdl7i5x9bq3ljk3g4bs294hcr5mj3cq0kw")))) (base32 "0d0giry6bb57pnidymvdl7i5x9bq3ljk3g4bs294hcr5mj3cq0kw"))))
(build-system gnu-build-system) (build-system gnu-build-system)
@ -654,7 +655,8 @@ (define-public libquvi
(origin (origin
(method url-fetch) (method url-fetch)
(uri (string-append (uri (string-append
"mirror://sourceforge/quvi/libquvi-" version ".tar.xz")) "mirror://sourceforge/quvi/" (version-major+minor version) "/" name "/"
name "-" version ".tar.xz"))
(sha256 (sha256
(base32 "00x9gbmzc5cns0gnfag0hsphcr3cb33vbbb9s7ppvvd6bxz2z1mm")))) (base32 "00x9gbmzc5cns0gnfag0hsphcr3cb33vbbb9s7ppvvd6bxz2z1mm"))))
(build-system gnu-build-system) (build-system gnu-build-system)
@ -687,7 +689,8 @@ (define-public quvi
(origin (origin
(method url-fetch) (method url-fetch)
(uri (string-append (uri (string-append
"mirror://sourceforge/quvi/quvi-" version ".tar.xz")) "mirror://sourceforge/" name "/" (version-major+minor version)
"/" name "/" name "-" version ".tar.xz"))
(sha256 (sha256
(base32 "09lhl6dv5zpryasx7yjslfrcdcqlsbwapvd5lg7w6sm5x5n3k8ci")))) (base32 "09lhl6dv5zpryasx7yjslfrcdcqlsbwapvd5lg7w6sm5x5n3k8ci"))))
(build-system gnu-build-system) (build-system gnu-build-system)

View file

@ -336,7 +336,7 @@ (define-public fluxbox
(synopsis "Small and fast window manager") (synopsis "Small and fast window manager")
(source (origin (source (origin
(method url-fetch) (method url-fetch)
(uri (string-append "mirror://sourceforge/fluxbox/" (uri (string-append "mirror://sourceforge/fluxbox/fluxbox/"
version "/fluxbox-" version ".tar.xz")) version "/fluxbox-" version ".tar.xz"))
(sha256 (sha256
(base32 (base32

View file

@ -88,8 +88,8 @@ (define-public wxwidgets-2
(source (source
(origin (origin
(method url-fetch) (method url-fetch)
(uri (string-append (uri (string-append "mirror://sourceforge/wxwindows/" version
"mirror://sourceforge/wxwindows/wxGTK-" version ".tar.gz")) "/wxWidgets-" version ".tar.bz2"))
(sha256 (sha256
(base32 "1gjs9vfga60mk4j4ngiwsk9h6c7j22pw26m3asxr1jwvqbr8kkqk")))) (base32 "1gjs9vfga60mk4j4ngiwsk9h6c7j22pw26m3asxr1jwvqbr8kkqk"))))
(inputs (inputs

View file

@ -108,7 +108,8 @@ (define-public xclip
(origin (origin
(method url-fetch) (method url-fetch)
(uri (string-append (uri (string-append
"mirror://sourceforge/" name "/" name "-" version ".tar.gz")) "mirror://sourceforge/" name "/" name "/" version "/"
name "-" version ".tar.gz"))
(sha256 (sha256
(base32 (base32
"0ibcf46rldnv0r424qcnai1fa5iq3lm5q5rdd7snsi5sb78gmixp")))) "0ibcf46rldnv0r424qcnai1fa5iq3lm5q5rdd7snsi5sb78gmixp"))))
@ -584,8 +585,8 @@ (define-public xosd
(source (origin (source (origin
(method url-fetch) (method url-fetch)
(uri (string-append (uri (string-append
"mirror://sourceforge/libxosd/xosd-" "mirror://sourceforge/libxosd/libxosd/xosd-" version "/"
version ".tar.gz")) name "-" version ".tar.gz"))
(sha256 (sha256
(base32 (base32
"025m7ha89q29swkc7s38knnbn8ysl24g2h5s7imfxflm91psj7sg")))) "025m7ha89q29swkc7s38knnbn8ysl24g2h5s7imfxflm91psj7sg"))))

View file

@ -300,7 +300,7 @@ (define vorbis-tools
(define opus (define opus
(package (package
(name "opus") (name "opus")
(version "1.1.2") (version "1.1.3")
(source (origin (source (origin
(method url-fetch) (method url-fetch)
(uri (string-append (uri (string-append
@ -308,7 +308,7 @@ (define opus
".tar.gz")) ".tar.gz"))
(sha256 (sha256
(base32 (base32
"1z87x5c5x951lhnm70iqr2gqn15wns5cqsw8nnkvl48jwdw00a8f")))) "0cxnd7pjxbgh6l3cbzsw29phpr5cq28fikfhjlp1hc3y5s0gxdjq"))))
(build-system gnu-build-system) (build-system gnu-build-system)
(synopsis "Versatile audio codec") (synopsis "Versatile audio codec")
(description (description

View file

@ -656,7 +656,8 @@ (define-public tinyxml
(version "2.6.2") (version "2.6.2")
(source (origin (source (origin
(method url-fetch) (method url-fetch)
(uri (string-append "mirror://sourceforge/tinyxml/tinyxml_" (uri (string-append "mirror://sourceforge/tinyxml/tinyxml/"
version "/tinyxml_"
(string-join (string-split version #\.) "_") (string-join (string-split version #\.) "_")
".tar.gz")) ".tar.gz"))
(sha256 (sha256

View file

@ -26,7 +26,8 @@ (define-module (gnu services avahi)
#:use-module (gnu packages admin) #:use-module (gnu packages admin)
#:use-module (guix records) #:use-module (guix records)
#:use-module (guix gexp) #:use-module (guix gexp)
#:export (avahi-service #:export (avahi-configuration
avahi-service
avahi-service-type)) avahi-service-type))
;;; Commentary: ;;; Commentary:

View file

@ -94,11 +94,17 @@ (define-module (gnu services base)
guix-publish-configuration? guix-publish-configuration?
guix-publish-service guix-publish-service
guix-publish-service-type guix-publish-service-type
gpm-configuration
gpm-configuration?
gpm-service-type gpm-service-type
gpm-service gpm-service
urandom-seed-service-type urandom-seed-service-type
urandom-seed-service urandom-seed-service
rngd-configuration
rngd-configuration?
rngd-service-type rngd-service-type
rngd-service rngd-service
pam-limits-service-type pam-limits-service-type

View file

@ -27,9 +27,15 @@ (define-module (gnu services databases)
#:use-module (guix records) #:use-module (guix records)
#:use-module (guix gexp) #:use-module (guix gexp)
#:use-module (ice-9 match) #:use-module (ice-9 match)
#:export (postgresql-service #:export (postgresql-configuration
postgresql-configuration?
postgresql-service
postgresql-service-type
mysql-service mysql-service
mysql-configuration)) mysql-service-type
mysql-configuration
mysql-configuration?))
;;; Commentary: ;;; Commentary:
;;; ;;;

View file

@ -27,7 +27,9 @@ (define-module (gnu services dbus)
#:use-module (guix records) #:use-module (guix records)
#:use-module (srfi srfi-1) #:use-module (srfi srfi-1)
#:use-module (ice-9 match) #:use-module (ice-9 match)
#:export (dbus-root-service-type #:export (dbus-configuration
dbus-configuration?
dbus-root-service-type
dbus-service)) dbus-service))
;;; ;;;

View file

@ -45,18 +45,47 @@ (define-module (gnu services desktop)
#:use-module (guix gexp) #:use-module (guix gexp)
#:use-module (srfi srfi-1) #:use-module (srfi srfi-1)
#:use-module (ice-9 match) #:use-module (ice-9 match)
#:export (upower-service #:export (upower-configuration
upower-configuration?
upower-service
upower-service-type
udisks-configuration
udisks-configuration?
udisks-service udisks-service
udisks-service-type
colord-service colord-service
geoclue-application geoclue-application
geoclue-configuration
geoclue-configuration?
%standard-geoclue-applications %standard-geoclue-applications
geoclue-service geoclue-service
geoclue-service-type
bluetooth-service bluetooth-service
polkit-configuration
polkit-configuration?
polkit-service polkit-service
polkit-service-type
elogind-configuration elogind-configuration
elogind-configuration?
elogind-service elogind-service
elogind-service-type
gnome-desktop-configuration
gnome-desktop-configuration?
gnome-desktop-service gnome-desktop-service
gnome-desktop-service-type
xfce-desktop-configuration
xfce-desktop-configuration?
xfce-desktop-service xfce-desktop-service
xfce-desktop-service-type
%desktop-services)) %desktop-services))
;;; Commentary: ;;; Commentary:

View file

@ -30,6 +30,7 @@ (define-module (gnu services dict)
#:use-module (srfi srfi-26) #:use-module (srfi srfi-26)
#:use-module (ice-9 match) #:use-module (ice-9 match)
#:export (dicod-service #:export (dicod-service
dicod-service-type
dicod-configuration dicod-configuration
dicod-database dicod-database
%dicod-database:gcide)) %dicod-database:gcide))

View file

@ -1,6 +1,6 @@
;;; GNU Guix --- Functional package management for GNU ;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2015 Alex Kost <alezost@gmail.com> ;;; Copyright © 2015 Alex Kost <alezost@gmail.com>
;;; Copyright © 2015 Ludovic Courtès <ludo@gnu.org> ;;; Copyright © 2015, 2016 Ludovic Courtès <ludo@gnu.org>
;;; ;;;
;;; This file is part of GNU Guix. ;;; This file is part of GNU Guix.
;;; ;;;
@ -24,7 +24,10 @@ (define-module (gnu services lirc)
#:use-module (guix gexp) #:use-module (guix gexp)
#:use-module (guix records) #:use-module (guix records)
#:use-module (ice-9 match) #:use-module (ice-9 match)
#:export (lirc-service)) #:export (lirc-configuration
lirc-configuation?
lirc-service
lirc-service-type))
;;; Commentary: ;;; Commentary:
;;; ;;;

View file

@ -37,6 +37,7 @@ (define-module (gnu services mail)
dovecot-configuration-error? dovecot-configuration-error?
dovecot-service dovecot-service
dovecot-service-type
dovecot-configuration dovecot-configuration
opaque-dovecot-configuration opaque-dovecot-configuration

View file

@ -39,13 +39,28 @@ (define-module (gnu services networking)
#:use-module (srfi srfi-26) #:use-module (srfi srfi-26)
#:use-module (ice-9 match) #:use-module (ice-9 match)
#:export (%facebook-host-aliases #:export (%facebook-host-aliases
static-networking
static-networking-service static-networking-service
static-networking-service-type
dhcp-client-service dhcp-client-service
%ntp-servers %ntp-servers
ntp-configuration
ntp-configuration?
ntp-service ntp-service
ntp-service-type
tor-configuration
tor-configuration?
tor-hidden-service tor-hidden-service
tor-service tor-service
tor-service-type
bitlbee-configuration
bitlbee-configuration?
bitlbee-service bitlbee-service
bitlbee-service-type
wicd-service wicd-service
network-manager-service network-manager-service
connman-service)) connman-service))

View file

@ -25,7 +25,10 @@ (define-module (gnu services ssh)
#:use-module (guix gexp) #:use-module (guix gexp)
#:use-module (guix records) #:use-module (guix records)
#:use-module (srfi srfi-26) #:use-module (srfi srfi-26)
#:export (lsh-service #:export (lsh-configuration
lsh-configuration?
lsh-service
lsh-service-type
dropbear-configuration dropbear-configuration
dropbear-configuration? dropbear-configuration?

View file

@ -1,6 +1,6 @@
;;; GNU Guix --- Functional package management for GNU ;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2015 David Thompson <davet@gnu.org> ;;; Copyright © 2015 David Thompson <davet@gnu.org>
;;; Copyright © 2015 Ludovic Courtès <ludo@gnu.org> ;;; Copyright © 2015, 2016 Ludovic Courtès <ludo@gnu.org>
;;; Copyright © 2016 ng0 <ng0@we.make.ritual.n0.is> ;;; Copyright © 2016 ng0 <ng0@we.make.ritual.n0.is>
;;; ;;;
;;; This file is part of GNU Guix. ;;; This file is part of GNU Guix.
@ -27,7 +27,10 @@ (define-module (gnu services web)
#:use-module (guix records) #:use-module (guix records)
#:use-module (guix gexp) #:use-module (guix gexp)
#:use-module (ice-9 match) #:use-module (ice-9 match)
#:export (nginx-service)) #:export (nginx-configuration
nginx-configuration?
nginx-service
nginx-service-type))
;;; Commentary: ;;; Commentary:
;;; ;;;

View file

@ -48,6 +48,8 @@ (define-module (gnu services xorg)
slim-service-type slim-service-type
slim-service slim-service
screen-locker
screen-locker?
screen-locker-service-type screen-locker-service-type
screen-locker-service)) screen-locker-service))

View file

@ -737,7 +737,7 @@ (define content-addressed-uris
(append-map (lambda (make-url) (append-map (lambda (make-url)
(filter-map (match-lambda (filter-map (match-lambda
((hash-algo . hash) ((hash-algo . hash)
(string->uri (make-url hash-algo hash)))) (string->uri (make-url file hash-algo hash))))
hashes)) hashes))
content-addressed-mirrors)) content-addressed-mirrors))

View file

@ -1,5 +1,5 @@
;;; GNU Guix --- Functional package management for GNU ;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2013, 2014 Ludovic Courtès <ludo@gnu.org> ;;; Copyright © 2013, 2014, 2016 Ludovic Courtès <ludo@gnu.org>
;;; Copyright © 2015 Taylan Ulrich Bayırlı/Kammer <taylanbayirli@gmail.com> ;;; Copyright © 2015 Taylan Ulrich Bayırlı/Kammer <taylanbayirli@gmail.com>
;;; ;;;
;;; This file is part of GNU Guix. ;;; This file is part of GNU Guix.
@ -36,7 +36,17 @@ (define-module (guix build pull)
;;; Code: ;;; Code:
(define* (build-guix out source (define* (build-guix out source
#:key gcrypt #:key
system
storedir localstatedir sysconfdir sbindir
(package-name "GNU Guix")
(package-version "0")
(bug-report-address "bug-guix@gnu.org")
(home-page-url "https://gnu.org/s/guix")
libgcrypt zlib gzip bzip2 xz
(debug-port (%make-void-port "w")) (debug-port (%make-void-port "w"))
(log-port (current-error-port))) (log-port (current-error-port)))
"Build and install Guix in directory OUT using SOURCE, a directory "Build and install Guix in directory OUT using SOURCE, a directory
@ -55,13 +65,26 @@ (define* (build-guix out source
(copy-file "guix.scm" (string-append out "/guix.scm")) (copy-file "guix.scm" (string-append out "/guix.scm"))
(copy-file "gnu.scm" (string-append out "/gnu.scm")) (copy-file "gnu.scm" (string-append out "/gnu.scm"))
;; Add a fake (guix config) module to allow the other modules to be ;; Instantiate a (guix config) module that preserves the original
;; compiled. The user's (guix config) is the one that will be used. ;; settings.
(copy-file "guix/config.scm.in" (copy-file "guix/config.scm.in"
(string-append out "/guix/config.scm")) (string-append out "/guix/config.scm"))
(substitute* (string-append out "/guix/config.scm") (substitute* (string-append out "/guix/config.scm")
(("@LIBGCRYPT@") (("@PACKAGE_NAME@") package-name)
(string-append gcrypt "/lib/libgcrypt"))) (("@PACKAGE_VERSION@") package-version)
(("@PACKAGE_BUGREPORT@") bug-report-address)
(("@PACKAGE_URL@") home-page-url)
(("@storedir@") storedir)
(("@guix_localstatedir@") localstatedir)
(("@guix_sysconfdir@") sysconfdir)
(("@guix_sbindir@") sbindir)
(("@guix_system@") system)
(("@LIBGCRYPT@") (string-append libgcrypt "/lib/libgcrypt"))
(("@LIBZ@") (string-append zlib "/lib/libz"))
(("@GZIP@") (string-append gzip "/bin/gzip"))
(("@BZIP2@") (string-append bzip2 "/bin/bzip2"))
(("@XZ@") (string-append xz "/bin/xz"))
(("@NIX_INSTANTIATE@") "")) ;remnants from the past
;; Augment the search path so Scheme code can be compiled. ;; Augment the search path so Scheme code can be compiled.
(set! %load-path (cons out %load-path)) (set! %load-path (cons out %load-path))
@ -119,10 +142,6 @@ (define* (build-guix out source
(set! completed (+ 1 completed)))) (set! completed (+ 1 completed))))
files)))) files))))
;; Remove the "fake" (guix config).
(delete-file (string-append out "/guix/config.scm"))
(delete-file (string-append out "/guix/config.go"))
(newline) (newline)
#t) #t)

View file

@ -21,10 +21,17 @@ (define-module (guix config)
%guix-version %guix-version
%guix-bug-report-address %guix-bug-report-address
%guix-home-page-url %guix-home-page-url
%storedir
%localstatedir
%sysconfdir
%sbindir
%store-directory %store-directory
%state-directory %state-directory
%config-directory %config-directory
%guix-register-program %guix-register-program
%system %system
%libgcrypt %libgcrypt
%libz %libz
@ -35,7 +42,8 @@ (define-module (guix config)
;;; Commentary: ;;; Commentary:
;;; ;;;
;;; Compile-time configuration of Guix. ;;; Compile-time configuration of Guix. When adding a substitution variable
;;; here, make sure to equip (guix scripts pull) to substitute it.
;;; ;;;
;;; Code: ;;; Code:
@ -51,21 +59,36 @@ (define %guix-bug-report-address
(define %guix-home-page-url (define %guix-home-page-url
"@PACKAGE_URL@") "@PACKAGE_URL@")
(define %storedir
"@storedir@")
(define %localstatedir
"@guix_localstatedir@")
(define %sysconfdir
"@guix_sysconfdir@")
(define %sbindir
"@guix_sbindir@")
(define %store-directory (define %store-directory
(or (and=> (getenv "NIX_STORE_DIR") canonicalize-path) (or (and=> (getenv "NIX_STORE_DIR") canonicalize-path)
"@storedir@")) %storedir))
(define %state-directory (define %state-directory
;; This must match `NIX_STATE_DIR' as defined in `nix/local.mk'. ;; This must match `NIX_STATE_DIR' as defined in `nix/local.mk'.
(or (getenv "NIX_STATE_DIR") "@guix_localstatedir@/guix")) (or (getenv "NIX_STATE_DIR")
(string-append %localstatedir "/guix")))
(define %config-directory (define %config-directory
;; This must match `GUIX_CONFIGURATION_DIRECTORY' as defined in `nix/local.mk'. ;; This must match `GUIX_CONFIGURATION_DIRECTORY' as defined in `nix/local.mk'.
(or (getenv "GUIX_CONFIGURATION_DIRECTORY") "@guix_sysconfdir@/guix")) (or (getenv "GUIX_CONFIGURATION_DIRECTORY")
(string-append %sysconfdir "/guix")))
(define %guix-register-program (define %guix-register-program
;; The 'guix-register' program. ;; The 'guix-register' program.
(or (getenv "GUIX_REGISTER") "@guix_sbindir@/guix-register")) (or (getenv "GUIX_REGISTER")
(string-append %sbindir "/guix-register")))
(define %system (define %system
"@guix_system@") "@guix_system@")

View file

@ -73,6 +73,7 @@ (define-module (guix derivations)
derivation-name derivation-name
derivation-output-names derivation-output-names
fixed-output-derivation? fixed-output-derivation?
fixed-output-path
offloadable-derivation? offloadable-derivation?
substitutable-derivation? substitutable-derivation?
substitution-oracle substitution-oracle
@ -676,7 +677,11 @@ (define (output-path output hash name) ; makeOutputPath
name name
(string-append name "-" output)))) (string-append name "-" output))))
(define (fixed-output-path output hash-algo hash recursive? name) (define* (fixed-output-path name hash
#:key
(output "out")
(hash-algo 'sha256)
(recursive? #t))
"Return an output path for the fixed output OUTPUT defined by HASH of type "Return an output path for the fixed output OUTPUT defined by HASH of type
HASH-ALGO, of the derivation NAME. RECURSIVE? has the same meaning as for HASH-ALGO, of the derivation NAME. RECURSIVE? has the same meaning as for
'add-to-store'." 'add-to-store'."
@ -736,10 +741,12 @@ (define (add-output-paths drv)
(outputs (map (match-lambda (outputs (map (match-lambda
((output-name . ($ <derivation-output> ((output-name . ($ <derivation-output>
_ algo hash rec?)) _ algo hash rec?))
(let ((path (if hash (let ((path
(fixed-output-path output-name (if hash
algo hash (fixed-output-path name hash
rec? name) #:hash-algo algo
#:output output-name
#:recursive? rec?)
(output-path output-name (output-path output-name
drv-hash name)))) drv-hash name))))
(cons output-name (cons output-name

View file

@ -232,10 +232,10 @@ (define %mirror-file
(define %content-addressed-mirrors (define %content-addressed-mirrors
;; List of content-addressed mirrors. Each mirror is represented as a ;; List of content-addressed mirrors. Each mirror is represented as a
;; procedure that takes an algorithm (symbol) and a hash (bytevector), and ;; procedure that takes a file name, an algorithm (symbol) and a hash
;; returns a URL or #f. ;; (bytevector), and returns a URL or #f.
;; TODO: Add more. ;; TODO: Add more.
'(list (lambda (algo hash) '(list (lambda (file algo hash)
;; 'tarballs.nixos.org' supports several algorithms. ;; 'tarballs.nixos.org' supports several algorithms.
(string-append "http://tarballs.nixos.org/" (string-append "http://tarballs.nixos.org/"
(symbol->string algo) "/" (symbol->string algo) "/"

View file

@ -31,6 +31,7 @@ (define-module (guix scripts publish)
#:use-module (srfi srfi-9 gnu) #:use-module (srfi srfi-9 gnu)
#:use-module (srfi srfi-19) #:use-module (srfi srfi-19)
#:use-module (srfi srfi-26) #:use-module (srfi srfi-26)
#:use-module (srfi srfi-34)
#:use-module (srfi srfi-37) #:use-module (srfi srfi-37)
#:use-module (web http) #:use-module (web http)
#:use-module (web request) #:use-module (web request)
@ -49,6 +50,7 @@ (define-module (guix scripts publish)
#:use-module (guix zlib) #:use-module (guix zlib)
#:use-module (guix ui) #:use-module (guix ui)
#:use-module (guix scripts) #:use-module (guix scripts)
#:use-module ((guix build utils) #:select (dump-port))
#:export (guix-publish)) #:export (guix-publish))
(define (show-help) (define (show-help)
@ -308,6 +310,25 @@ (define* (render-nar store request store-item
store-path) store-path)
(not-found request)))) (not-found request))))
(define (render-content-addressed-file store request
name algo hash)
"Return the content of the result of the fixed-output derivation NAME that
has the given HASH of type ALGO."
;; TODO: Support other hash algorithms.
(if (and (eq? algo 'sha256) (= 32 (bytevector-length hash)))
(let ((item (fixed-output-path name hash
#:hash-algo algo
#:recursive? #f)))
(if (valid-path? store item)
(values `((content-type . (application/octet-stream
(charset . "ISO-8859-1"))))
;; XXX: We're not returning the actual contents, deferring
;; instead to 'http-write'. This is a hack to work around
;; <http://bugs.gnu.org/21093>.
item)
(not-found request)))
(not-found request)))
(define extract-narinfo-hash (define extract-narinfo-hash
(let ((regexp (make-regexp "^([a-df-np-sv-z0-9]{32}).narinfo$"))) (let ((regexp (make-regexp "^([a-df-np-sv-z0-9]{32}).narinfo$")))
(lambda (str) (lambda (str)
@ -398,6 +419,34 @@ (define (http-write server client response body)
(swallow-zlib-error (swallow-zlib-error
(close-port port)) (close-port port))
(values))))) (values)))))
(('application/octet-stream . _)
;; Send a raw file in a separate thread.
(call-with-new-thread
(lambda ()
(catch 'system-error
(lambda ()
(call-with-input-file (utf8->string body)
(lambda (input)
(let* ((size (stat:size (stat input)))
(headers (alist-cons 'content-length size
(alist-delete 'content-length
(response-headers response)
eq?)))
(response (write-response (set-field response
(response-headers)
headers)
client))
(output (response-port response)))
(dump-port input output)
(close-port output)
(values)))))
(lambda args
;; If the file was GC'd behind our back, that's fine. Likewise if
;; the client closes the connection.
(unless (memv (system-error-errno args)
(list ENOENT EPIPE ECONNRESET))
(apply throw args))
(values))))))
(_ (_
;; Handle other responses sequentially. ;; Handle other responses sequentially.
(%http-write server client response body)))) (%http-write server client response body))))
@ -418,7 +467,7 @@ (define* (make-request-handler store
(format #t "~a ~a~%" (format #t "~a ~a~%"
(request-method request) (request-method request)
(uri-path (request-uri request))) (uri-path (request-uri request)))
(if (get-request? request) ; reject POST, PUT, etc. (if (get-request? request) ;reject POST, PUT, etc.
(match (request-path-components request) (match (request-path-components request)
;; /nix-cache-info ;; /nix-cache-info
(("nix-cache-info") (("nix-cache-info")
@ -450,6 +499,14 @@ (define* (make-request-handler store
(_ (_
%default-gzip-compression))) %default-gzip-compression)))
(not-found request))) (not-found request)))
;; /nar/file/NAME/sha256/HASH
(("file" name "sha256" hash)
(guard (c ((invalid-base32-character? c)
(not-found request)))
(let ((hash (nix-base32-string->bytevector hash)))
(render-content-addressed-file store request
name 'sha256 hash))))
(_ (not-found request))) (_ (not-found request)))
(not-found request)))) (not-found request))))

View file

@ -1,5 +1,5 @@
# GNU Guix --- Functional package management for GNU # GNU Guix --- Functional package management for GNU
# Copyright © 2014, 2015 Ludovic Courtès <ludo@gnu.org> # Copyright © 2014, 2015, 2016 Ludovic Courtès <ludo@gnu.org>
# #
# This file is part of GNU Guix. # This file is part of GNU Guix.
# #
@ -139,7 +139,7 @@ if guix system build "$tmpfile" 2> "$errorfile"
then then
exit 1 exit 1
else else
grep "service 'buggy!'.*'does-not-exist'.*undefined" "$errorfile" grep "service 'buggy!'.*'does-not-exist'.*not provided" "$errorfile"
fi fi
# Reporting inconsistent user accounts. # Reporting inconsistent user accounts.

View file

@ -26,6 +26,8 @@ (define-module (test-publish)
#:use-module (guix utils) #:use-module (guix utils)
#:use-module (guix hash) #:use-module (guix hash)
#:use-module (guix store) #:use-module (guix store)
#:use-module (guix derivations)
#:use-module (guix gexp)
#:use-module (guix base32) #:use-module (guix base32)
#:use-module (guix base64) #:use-module (guix base64)
#:use-module ((guix records) #:select (recutils->alist)) #:use-module ((guix records) #:select (recutils->alist))
@ -210,4 +212,36 @@ (define (wait-until-ready port)
(display "This file is not a valid store item." port))) (display "This file is not a valid store item." port)))
(response-code (http-get (publish-uri (string-append "/nar/invalid")))))) (response-code (http-get (publish-uri (string-append "/nar/invalid"))))))
(test-equal "/file/NAME/sha256/HASH"
"Hello, Guix world!"
(let* ((data "Hello, Guix world!")
(hash (call-with-input-string data port-sha256))
(drv (run-with-store %store
(gexp->derivation "the-file.txt"
#~(call-with-output-file #$output
(lambda (port)
(display #$data port)))
#:hash-algo 'sha256
#:hash hash)))
(out (build-derivations %store (list drv))))
(utf8->string
(http-get-body
(publish-uri
(string-append "/file/the-file.txt/sha256/"
(bytevector->nix-base32-string hash)))))))
(test-equal "/file/NAME/sha256/INVALID-NIX-BASE32-STRING"
404
(let ((uri (publish-uri
"/file/the-file.txt/sha256/not-a-nix-base32-string")))
(response-code (http-get uri))))
(test-equal "/file/NAME/sha256/INVALID-HASH"
404
(let ((uri (publish-uri
(string-append "/file/the-file.txt/sha256/"
(bytevector->nix-base32-string
(call-with-input-string "" port-sha256))))))
(response-code (http-get uri))))
(test-end "publish") (test-end "publish")