Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: NixOS/nixpkgs
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 4ed98532a254
Choose a base ref
...
head repository: NixOS/nixpkgs
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 4052f9b84948
Choose a head ref
  • 2 commits
  • 3 files changed
  • 1 contributor

Commits on Mar 24, 2020

  1. Add packages.json to the tarball job

    Moved from nixos-homepage.
    edolstra committed Mar 24, 2020
    2

    Verified

    This commit was signed with the committer’s verified signature. The key has expired.
    grahamc Graham Christensen
    Copy the full SHA
    d6ec410 View commit details
  2. Copy the full SHA
    4052f9b View commit details
Showing with 30 additions and 4 deletions.
  1. +4 −0 nixos/lib/make-options-doc/default.nix
  2. +13 −4 pkgs/top-level/make-tarball.nix
  3. +13 −0 pkgs/top-level/packages-config.nix
4 changes: 4 additions & 0 deletions nixos/lib/make-options-doc/default.nix
Original file line number Diff line number Diff line change
@@ -133,6 +133,7 @@ in {

optionsJSON = pkgs.runCommand "options.json"
{ meta.description = "List of NixOS options in JSON format";
buildInputs = [ pkgs.brotli ];
}
''
# Export list of options in different format.
@@ -141,8 +142,11 @@ in {
cp ${builtins.toFile "options.json" (builtins.unsafeDiscardStringContext (builtins.toJSON optionsNix))} $dst/options.json
brotli -9 < $dst/options.json > $dst/options.json.br
mkdir -p $out/nix-support
echo "file json $dst/options.json" >> $out/nix-support/hydra-build-products
echo "file json-br $dst/options.json.br" >> $out/nix-support/hydra-build-products
''; # */

optionsDocBook = pkgs.runCommand "options-docbook.xml" {} ''
17 changes: 13 additions & 4 deletions pkgs/top-level/make-tarball.nix
Original file line number Diff line number Diff line change
@@ -22,7 +22,7 @@ releaseTools.sourceTarball {
then builtins.substring 0 8 nixpkgs.lastModified
else toString nixpkgs.revCount}.${nixpkgs.shortRev or "dirty"}";

buildInputs = [ nix.out jq lib-tests ];
buildInputs = [ nix.out jq lib-tests pkgs.brotli ];

configurePhase = ''
eval "$preConfigure"
@@ -38,6 +38,8 @@ releaseTools.sourceTarball {
doCheck = true;

checkPhase = ''
set -o pipefail
export NIX_DB_DIR=$TMPDIR
export NIX_STATE_DIR=$TMPDIR
export NIX_PATH=nixpkgs=$TMPDIR/barf.nix
@@ -83,12 +85,10 @@ releaseTools.sourceTarball {
--show-trace --argstr system "$platform" \
-qa --drv-path --system-filter \* --system --meta --xml \
"''${opts[@]}" > /dev/null
stopNest
done
header "checking eval-release.nix"
nix-instantiate --eval --strict --show-trace ./maintainers/scripts/eval-release.nix > /dev/null
stopNest
header "checking find-tarballs.nix"
nix-instantiate --readonly-mode --eval --strict --show-trace --json \
@@ -100,7 +100,16 @@ releaseTools.sourceTarball {
echo "suspiciously low number of URLs"
exit 1
fi
stopNest
header "generating packages.json"
mkdir -p $out/nix-support
echo -n '{"version":2,"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
jq -c < tmp | brotli -9 > $packages
echo "file json-br $packages" >> $out/nix-support/hydra-build-products
'';

distPhase = ''
13 changes: 13 additions & 0 deletions pkgs/top-level/packages-config.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Used in the generation of package search database.
{
# Ensures no aliases are in the results.
allowAliases = false;

# Enable recursion into attribute sets that nix-env normally doesn't look into
# so that we can get a more complete picture of the available packages for the
# purposes of the index.
packageOverrides = super: {
haskellPackages = super.recurseIntoAttrs super.haskellPackages;
rPackages = super.recurseIntoAttrs super.rPackages;
};
}