1 /* Build a channel tarball. These contain, in addition to the nixpkgs
2 * expressions themselves, files that indicate the version of nixpkgs
5 { pkgs, nixpkgs, version, versionSuffix }:
7 pkgs.releaseTools.makeSourceTarball {
8 name = "nixos-channel";
12 officialRelease = false; # FIXME: fix this in makeSourceTarball
13 inherit version versionSuffix;
15 buildInputs = [ pkgs.nix ];
19 echo -n $VERSION_SUFFIX > .version-suffix
20 echo -n ${nixpkgs.rev or nixpkgs.shortRev} > .git-revision
21 releaseName=nixos-$VERSION$VERSION_SUFFIX
22 mkdir -p $out/tarballs
23 cp -prd . ../$releaseName
24 chmod -R u+w ../$releaseName
25 ln -s . ../$releaseName/nixpkgs # hack to make ‘<nixpkgs>’ work
26 NIX_STATE_DIR=$TMPDIR nix-env -f ../$releaseName/default.nix -qaP --meta --show-trace --xml \* > /dev/null
28 chmod -R u+w $releaseName
29 tar cfJ $out/tarballs/$releaseName.tar.xz $releaseName