Mirror of GNU Guix
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.

56 lines
1.9 KiB

  1. /* Guix --- Nix package management from Guile. -*- coding: utf-8 -*-
  2. Copyright (C) 2012 Ludovic Courtès <ludo@gnu.org>
  3. This file is part of Guix.
  4. Guix is free software; you can redistribute it and/or modify it
  5. under the terms of the GNU General Public License as published by
  6. the Free Software Foundation; either version 3 of the License, or (at
  7. your option) any later version.
  8. Guix is distributed in the hope that it will be useful, but
  9. WITHOUT ANY WARRANTY; without even the implied warranty of
  10. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  11. GNU General Public License for more details.
  12. You should have received a copy of the GNU General Public License
  13. along with Guix. If not, see <http://www.gnu.org/licenses/>. */
  14. /* Release file to build Guix with Nix. Useful to bootstrap Guix on
  15. Guix-enabled Hydra instances. */
  16. let
  17. nixpkgs = <nixpkgs>;
  18. jobs = {
  19. tarball =
  20. let pkgs = import nixpkgs {}; in
  21. pkgs.releaseTools.sourceTarball {
  22. name = "guix-tarball";
  23. src = <guix>;
  24. buildInputs = with pkgs; [ guile ];
  25. buildNativeInputs = with pkgs; [ gettext cvs pkgconfig ];
  26. configureFlags =
  27. [ "--with-nixpkgs=${nixpkgs}" "--with-nix-prefix=${pkgs.nix}" ];
  28. };
  29. build =
  30. { system ? builtins.currentSystem }:
  31. let pkgs = import nixpkgs { inherit system; }; in
  32. pkgs.releaseTools.nixBuild {
  33. name = "guix";
  34. buildInputs = [ pkgs.guile ];
  35. buildNativeInputs = [ pkgs.pkgconfig ];
  36. src = jobs.tarball;
  37. configureFlags =
  38. [ "--with-nixpkgs=${nixpkgs}" "--with-nix-prefix=${pkgs.nix}" ];
  39. # XXX: Since we need to talk to a running daemon, for the benefit of
  40. # `nixpkgs-derivation*' & co., we need to escape the chroot.
  41. preConfigure = "export NIX_REMOTE=daemon";
  42. __noChroot = true;
  43. };
  44. };
  45. in
  46. jobs