You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

193 lines
7.7 KiB

;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2013, 2014, 2015 Ludovic Courtès <>
;;; 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 (gpl3+ lgpl2.1+))
#:use-module (gnu packages)
#:use-module (gnu packages guile)
#:use-module ((gnu packages compression) #:select (bzip2 gzip))
#:use-module (gnu packages gnupg)
#:use-module (gnu packages databases)
#: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 emacs)
#:use-module (gnu packages openssl)
#:use-module (gnu packages bdw-gc))
(define-public guix-0.8
(name "guix")
(version "0.8")
(source (origin
(method url-fetch)
(uri (string-append ""
version ".tar.gz"))
(build-system gnu-build-system)
`(#:configure-flags (list
(string-append "--with-libgcrypt-prefix="
(assoc-ref %build-inputs
#:phases (alist-cons-before
'configure 'copy-bootstrap-guile
(lambda* (#:key system inputs #:allow-other-keys)
(define (copy arch)
(let ((guile (assoc-ref inputs
(string-append "boot-guile/"
(target (string-append "gnu/packages/bootstrap/"
arch "-linux/"
(copy-file guile target)))
(copy "i686")
(copy "x86_64")
(copy "mips64el")
(native-inputs `(("pkg-config" ,pkg-config)
("emacs" ,emacs))) ;for guix.el
(let ((boot-guile (lambda (arch hash)
(method url-fetch)
(uri (string-append
arch "-linux"
(sha256 hash)))))
`(("bzip2" ,bzip2)
("gzip" ,gzip)
("sqlite" ,sqlite)
("libgcrypt" ,libgcrypt)
("guile" ,guile-2.0)
,(boot-guile "i686"
,(boot-guile "x86_64"
,(boot-guile "mips64el"
(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.
(let ((commit "4655005"))
(package (inherit guix-0.8)
(version (string-append "0.8." commit))
(source (origin
(method git-fetch)
(uri (git-reference
(url "git://")
(commit commit)))
(substitute-keyword-arguments (package-arguments guix-0.8)
((#:phases phases)
'configure 'bootstrap
(lambda _
;; Make sure 'msgmerge' can modify the PO files.
(for-each (lambda (po)
(chmod po #o666))
(find-files "." "\\.po$"))
(zero? (system* "./bootstrap")))
`(("autoconf" ,(autoconf-wrapper))
("automake" ,automake)
("gettext" ,gnu-gettext)
("texinfo" ,texinfo)
("graphviz" ,graphviz)
,@(package-native-inputs guix-0.8)))
`(("guile-json" ,guile-json)
("geiser" ,geiser) ;for guix.el
,@(package-propagated-inputs guix-0.8))))))
(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)
("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+)))