From fcb0109d091622e756781ddac71bd663e5e9c98e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= Date: Sun, 28 Sep 2014 01:04:18 +0200 Subject: [PATCH] gnu: Add Nix. This commit is dedicated to the Nix project, without which we wouldn't be hacking all this today. :-) * gnu/packages/package-management.scm (nix): New variable. --- gnu/packages/package-management.scm | 45 +++++++++++++++++++++++++++-- 1 file changed, 43 insertions(+), 2 deletions(-) diff --git a/gnu/packages/package-management.scm b/gnu/packages/package-management.scm index b789b333b8..837adcd67f 100644 --- a/gnu/packages/package-management.scm +++ b/gnu/packages/package-management.scm @@ -22,7 +22,7 @@ (define-module (gnu packages package-management) #:use-module (guix git-download) #:use-module (guix utils) #:use-module (guix build-system gnu) - #:use-module ((guix licenses) #:select (gpl3+)) + #: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)) @@ -32,7 +32,12 @@ (define-module (gnu packages package-management) #: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 texinfo) + #:use-module (gnu packages perl) + #:use-module (gnu packages curl) + #:use-module (gnu packages web) + #:use-module (gnu packages openssl) + #:use-module (gnu packages bdw-gc)) (define guix-0.7 (package @@ -163,3 +168,39 @@ (define-public guix-devel ("texinfo" ,texinfo) ("graphviz" ,graphviz) ,@(package-native-inputs guix-0.7)))))) + +(define-public nix + (package + (name "nix") + (version "1.7") + (source (origin + (method url-fetch) + (uri (string-append "http://nixos.org/releases/nix/nix-" + version "/nix-" version ".tar.xz")) + (sha256 + (base32 + "14nc7mnma5sffqk9mglbf99w3jm4ck8pxnmkgyhy3qra9xjn749l")))) + (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 "http://nixos.org/nix/") + (synopsis "The Nix package manager") + (description + "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 +sub-directory.") + (license lgpl2.1+)))