Non puoi selezionare più di 25 argomenti Gli argomenti devono iniziare con una lettera o un numero, possono includere trattini ('-') e possono essere lunghi fino a 35 caratteri.

267 righe
11 KiB

;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2013, 2014, 2015 Ludovic Courtès <>
;;; Copyright © 2015 Ricardo Wurmus <>
;;; 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
;;; GNU General Public License for more details.
;;; You should have received a copy of the GNU General Public License
;;; along with GNU Guix. If not, see <>.
(define-module (gnu packages package-management)
#:use-module (guix packages)
#:use-module (guix download)
#:use-module (guix git-download)
#:use-module (guix utils)
#:use-module (guix build-system gnu)
#:use-module ((guix licenses) #:select (gpl2+ gpl3+ lgpl2.1+))
#:use-module (gnu packages)
#:use-module (gnu packages guile)
#:use-module (gnu packages compression)
#:use-module (gnu packages gnupg)
#:use-module (gnu packages databases)
#:use-module (gnu packages gnutls)
#:use-module (gnu packages graphviz)
#:use-module (gnu packages pkg-config)
#:use-module (gnu packages autotools)
#:use-module (gnu packages gettext)
#:use-module (gnu packages texinfo)
#:use-module (gnu packages perl)
#:use-module (gnu packages curl)
#:use-module (gnu packages web)
#:use-module (gnu packages man)
#:use-module (gnu packages emacs)
#:use-module (gnu packages openssl)
#:use-module (gnu packages bdw-gc))
(define (boot-guile-uri arch)
"Return the URI for the bootstrap Guile tarball for ARCH."
(if (string=? "armhf" arch)
(string-append ""
arch "-linux"
(string-append ""
arch "-linux"
(define-public guix-0.8.2
(name "guix")
(version "0.8.2")
(source (origin
(method url-fetch)
(uri (string-append ""
version ".tar.gz"))
(build-system gnu-build-system)
`(#:configure-flags (list
(string-append "--with-bash-completion-dir="
(assoc-ref %outputs "out")
(string-append "--with-libgcrypt-prefix="
(assoc-ref %build-inputs
#:phases (modify-phases %standard-phases
'configure 'copy-bootstrap-guile
(lambda* (#:key system inputs #:allow-other-keys)
(define (boot-guile-version arch)
(if (string=? "armhf" arch)
(define (copy arch)
(let ((guile (assoc-ref inputs
(string-append "boot-guile/"
(target (string-append "gnu/packages/bootstrap/"
arch "-linux/"
(boot-guile-version arch)
(copy-file guile target)))
(copy "i686")
(copy "x86_64")
(copy "mips64el")
(copy "armhf")
'install 'wrap-program
(lambda* (#:key inputs outputs #:allow-other-keys)
;; Make sure the 'guix' command finds GnuTLS and
;; Guile-JSON automatically.
(let* ((out (assoc-ref outputs "out"))
(json (assoc-ref inputs "guile-json"))
(gnutls (assoc-ref inputs "gnutls"))
(path (string-append
json "/share/guile/site/2.0:"
gnutls "/share/guile/site/2.0")))
(wrap-program (string-append out "/bin/guix")
`("GUILE_LOAD_PATH" ":" prefix (,path))
`("GUILE_LOAD_COMPILED_PATH" ":" prefix (,path)))
(native-inputs `(("pkg-config" ,pkg-config)
("emacs" ,emacs-no-x))) ;for guix.el
(let ((boot-guile (lambda (arch hash)
(method url-fetch)
(uri (boot-guile-uri arch))
(sha256 hash)))))
`(("bzip2" ,bzip2)
("gzip" ,gzip)
("sqlite" ,sqlite)
("libgcrypt" ,libgcrypt)
("guile" ,guile-2.0)
,(boot-guile "i686"
,(boot-guile "x86_64"
,(boot-guile "mips64el"
,(boot-guile "armhf"
`(("gnutls" ,gnutls) ;for 'guix download' & co.
("guile-json" ,guile-json)
("geiser" ,geiser))) ;for guix.el
(home-page "")
(synopsis "Functional package manager for installed software packages and versions")
"GNU Guix is a functional package manager for the GNU system, and is
also a distribution thereof. It includes a virtual machine image. Besides
the usual package management features, it also supports transactional
upgrades and roll-backs, per-user profiles, and much more. It is based on
the Nix package manager.")
(license gpl3+)))
(define guix-devel
;; Development version of Guix.
;; Note: use a short commit id; when using the long one, the limit on socket
;; file names is exceeded while running the tests.
(let ((commit "a43b55f"))
(package (inherit guix-0.8.2)
(version (string-append "0.8.2." commit))
(source (origin
(method git-fetch)
(uri (git-reference
(url "git://")
(commit commit)))
(file-name (string-append "guix-" version "-checkout"))))
(substitute-keyword-arguments (package-arguments guix-0.8.2)
((#:phases phases)
'unpack 'bootstrap
(lambda _
;; Make sure 'msgmerge' can modify the PO files.
(for-each (lambda (po)
(chmod po #o666))
(find-files "." "\\.po$"))
(zero? (system* "sh" "bootstrap")))
`(("autoconf" ,(autoconf-wrapper))
("automake" ,automake)
("gettext" ,gnu-gettext)
("texinfo" ,texinfo)
("graphviz" ,graphviz)
("help2man" ,help2man)
,@(package-native-inputs guix-0.8.2))))))
(define-public guix guix-devel)
(define-public nix
(name "nix")
(version "1.8")
(source (origin
(method url-fetch)
(uri (string-append ""
version "/nix-" version ".tar.xz"))
(build-system gnu-build-system)
;; XXX: Should we pass '--with-store-dir=/gnu/store'? But then we'd also
;; need '--localstatedir=/var'. But then! The thing would use /var/nix
;; instead of /var/guix. So in the end, we do nothing special.
(native-inputs `(("perl" ,perl)
("pkg-config" ,pkg-config)))
(inputs `(("curl" ,curl)
("openssl" ,openssl)
("libgc" ,libgc)
("sqlite" ,sqlite)
("bzip2" ,bzip2)))
(propagated-inputs `(("perl-www-curl" ,perl-www-curl)
("perl-dbi" ,perl-dbi)
("perl-dbd-sqlite" ,perl-dbd-sqlite)))
(home-page "")
(synopsis "The Nix package manager")
"Nix is a purely functional package manager. This means that it treats
packages like values in purely functional programming languages such as
Haskell—they are built by functions that don't have side-effects, and they
never change after they have been built. Nix stores packages in the Nix
store, usually the directory /nix/store, where each package has its own unique
(license lgpl2.1+)))
(define-public stow
(name "stow")
(version "2.2.0")
(source (origin
(method url-fetch)
(uri (string-append "mirror://gnu/stow/stow-"
version ".tar.gz"))
(build-system gnu-build-system)
`(("perl" ,perl)))
`(("perl-test-simple" ,perl-test-simple)
("perl-test-output" ,perl-test-output)
("perl-capture-tiny" ,perl-capture-tiny)))
(home-page "")
(synopsis "Managing installed software packages")
"GNU Stow is a symlink manager. It generates symlinks to directories
of data and makes them appear to be merged into the same directory. It is
typically used for managing software packages installed from source, by
letting you install them apart in distinct directories and then create
symlinks to the files in a common directory such as /usr/local.")
(license gpl2+)))