diff options
author | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2012-04-09 12:49:03 +0000 |
---|---|---|
committer | Eelco Dolstra <eelco.dolstra@logicblox.com> | 2012-04-09 12:49:03 +0000 |
commit | defe1d36cb0854b6d071943d8cb067562bd1d6b1 (patch) | |
tree | 2452b5a19b57e0e07529c507138327568235379c /release.nix | |
parent | 6b34bd856438481e6c3352a361600af2b4c04224 (diff) | |
download | nixpkgs-defe1d36cb0854b6d071943d8cb067562bd1d6b1.tar nixpkgs-defe1d36cb0854b6d071943d8cb067562bd1d6b1.tar.gz nixpkgs-defe1d36cb0854b6d071943d8cb067562bd1d6b1.tar.bz2 nixpkgs-defe1d36cb0854b6d071943d8cb067562bd1d6b1.tar.lz nixpkgs-defe1d36cb0854b6d071943d8cb067562bd1d6b1.tar.xz nixpkgs-defe1d36cb0854b6d071943d8cb067562bd1d6b1.tar.zst nixpkgs-defe1d36cb0854b6d071943d8cb067562bd1d6b1.zip |
* Generate a NixOS channel.
svn path=/nixos/trunk/; revision=33684
Diffstat (limited to 'release.nix')
-rw-r--r-- | release.nix | 43 |
1 files changed, 40 insertions, 3 deletions
diff --git a/release.nix b/release.nix index 35078be6ccb..c47e34e16b7 100644 --- a/release.nix +++ b/release.nix @@ -1,4 +1,6 @@ -{ nixosSrc ? {outPath = ./.; rev = 1234;} }: +{ nixosSrc ? {outPath = ./.; rev = 1234;} +, nixpkgs ? {outPath = <nixpkgs>; rev = 5678;} +}: let @@ -99,6 +101,42 @@ let }; + channel = + { officialRelease ? false }: + + with import <nixpkgs> {}; + + releaseTools.makeSourceTarball { + name = "nixos-channel"; + + version = builtins.readFile ./VERSION; + + src = nixosSrc; + + inherit officialRelease; + + buildInputs = [ nixUnstable ]; + + expr = + '' + { system ? builtins.currentSystem }: + { pkgs = (import nixpkgs/default.nix { inherit system; }) // { recurseForDerivations = true; }; } + ''; + + distPhase = '' + releaseName=nixos-$VERSION$VERSION_SUFFIX-${toString nixpkgs.rev} + ensureDir "$out/tarballs" + mkdir ../$releaseName + cp -prd . ../$releaseName/nixos + cp -prd ${nixpkgs} ../$releaseName/nixpkgs + echo "$expr" > ../$releaseName/default.nix + NIX_STATE_DIR=$TMPDIR nix-env -f ../$releaseName/default.nix -qaP --meta --xml \* > /dev/null + cd .. + tar cfj $out/tarballs/$releaseName.tar.bz2 $releaseName + ''; # */ + }; + + manual = { officialRelease ? false }: @@ -108,8 +146,7 @@ let (import lib/eval-config.nix { modules = [ { fileSystems = []; } ]; }).options; - revision = - if nixosSrc.rev == 1234 then "HEAD" else toString nixosSrc.rev; + revision = toString nixosSrc.rev; }).manual; |