make-tarball.nix: Restore the 'commit' field in packages.json

Also change incorrect 'revision' to 'rev' in the default value for
'nixpkgs' in release.nix.

Fixes https://github.com/NixOS/nixos-homepage/issues/372.
This commit is contained in:
Eelco Dolstra 2020-03-29 20:14:15 +02:00
parent 0dd5ccc742
commit 5e8545e723
No known key found for this signature in database
GPG key ID: 8170B4726D7198DE
3 changed files with 3 additions and 3 deletions

View file

@ -1,6 +1,6 @@
{ pkgs ? (import ./.. { }), nixpkgs ? { }}:
let
revision = pkgs.lib.trivial.revisionWithDefault (nixpkgs.revision or "master");
revision = pkgs.lib.trivial.revisionWithDefault (nixpkgs.rev or "master");
libDefPos = set:
builtins.map

View file

@ -103,7 +103,7 @@ releaseTools.sourceTarball {
header "generating packages.json"
mkdir -p $out/nix-support
echo -n '{"version":2,"packages":' > tmp
echo -n '{"version":2,"commit":"${nixpkgs.rev}","packages":' > tmp
nix-env -f . -I nixpkgs=${src} -qa --json --arg config 'import ${./packages-config.nix}' "''${opts[@]}" >> tmp
echo -n '}' >> tmp
packages=$out/packages.json.br

View file

@ -8,7 +8,7 @@
$ nix-build pkgs/top-level/release.nix -A coreutils.x86_64-linux
*/
{ nixpkgs ? { outPath = (import ../../lib).cleanSource ../..; revCount = 1234; shortRev = "abcdef"; revision = "0000000000000000000000000000000000000000"; }
{ nixpkgs ? { outPath = (import ../../lib).cleanSource ../..; revCount = 1234; shortRev = "abcdef"; rev = "0000000000000000000000000000000000000000"; }
, officialRelease ? false
# The platforms for which we build Nixpkgs.
, supportedSystems ? [ "x86_64-linux" "x86_64-darwin" "aarch64-linux" ]