about summary refs log tree commit diff
path: root/pkgs/tools/package-management/guix/default.nix
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2013-07-03 15:33:02 +0200
committerLudovic Courtès <ludo@gnu.org>2013-07-03 15:33:17 +0200
commitb9960211abaaaac044d9bfa0a8395fde46847d05 (patch)
tree5da90d24739f9dc0ce9fc85c27c89e3f2d3c6f84 /pkgs/tools/package-management/guix/default.nix
parent5cfa68ab50f49f73618c068724f6c590a0ae231a (diff)
add GNU Guix
Diffstat (limited to 'pkgs/tools/package-management/guix/default.nix')
-rw-r--r--pkgs/tools/package-management/guix/default.nix73
1 files changed, 73 insertions, 0 deletions
diff --git a/pkgs/tools/package-management/guix/default.nix b/pkgs/tools/package-management/guix/default.nix
new file mode 100644
index 0000000000000..37957235629ea
--- /dev/null
+++ b/pkgs/tools/package-management/guix/default.nix
@@ -0,0 +1,73 @@
+{ fetchurl, stdenv, guile, libgcrypt, sqlite, bzip2, pkgconfig }:
+
+let
+  # Getting the bootstrap Guile binary.  This is normally performed by Guix's build system.
+  base_url = arch:
+    "http://alpha.gnu.org/gnu/guix/bootstrap/${arch}-linux/20130105/guile-2.0.7.tar.xz";
+  boot_guile = {
+    i686 = fetchurl {
+      url = base_url "i686";
+      sha256 = "f9a7c6f4c556eaafa2a69bcf07d4ffbb6682ea831d4c9da9ba095aca3ccd217c";
+    };
+    x86_64 = fetchurl {
+      url = base_url "x86_64";
+      sha256 = "bc43210dcd146d242bef4d354b0aeac12c4ef3118c07502d17ffa8d49e15aa2c";
+    };
+  };
+in stdenv.mkDerivation rec {
+  name = "guix-0.2";
+
+  src = fetchurl {
+    url = "ftp://alpha.gnu.org/gnu/guix/${name}.tar.gz";
+    sha256 = "140y0ywbgl6vxl4nwswz4vim2wwdiajxlksj24lnv40aw5hyvifr";
+  };
+
+  configureFlags =
+     [ "--localstatedir=/nix/var"
+       "--with-libgcrypt-prefix=${libgcrypt}"
+     ];
+
+  preBuild =
+    # Copy the bootstrap Guile tarballs like Guix's makefile normally does.
+    '' cp -v "${boot_guile.i686}" gnu/packages/bootstrap/i686-linux/guile-2.0.7.tar.xz
+       cp -v "${boot_guile.x86_64}" gnu/packages/bootstrap/x86_64-linux/guile-2.0.7.tar.xz
+    '';
+
+  preCheck =
+    # XXX: Skip this test (see commit 91fe0e20c7da2b706a1ac0e7b75235b6c1e6ed0a).
+    '' sed -i tests/guix-package.sh -e's/guix package --version/exit 0/'
+    '';
+
+  nativeBuildInputs = [ pkgconfig ];
+  buildInputs = [ guile libgcrypt sqlite bzip2 ];
+
+  doCheck = true;
+  enableParallelBuilding = true;
+
+  meta = {
+    description = "Functional package manager with a Scheme interface";
+
+    longDescription = ''
+      GNU Guix is a purely functional package manager for the GNU system, and a distribution thereof.
+
+      In addition to standard package management features, Guix supports
+      transactional upgrades and roll-backs, unprivileged package management,
+      per-user profiles, and garbage collection. 
+
+      It provides Guile Scheme APIs, including high-level embedded
+      domain-specific languages (EDSLs), to describe how packages are built
+      and composed.
+
+      A user-land free software distribution for GNU/Linux comes as part of
+      Guix.
+
+      Guix is based on the Nix package manager.
+    '';
+
+    license = "GPLv3+";
+
+    maintainers = [ stdenv.lib.maintainers.ludo ];
+
+    homepage = http://www.gnu.org/software/guix;
+  };
+}