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: 216cd6c5a30a
Choose a base ref
...
head repository: NixOS/nixpkgs
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 1a547435d17b
Choose a head ref
  • 3 commits
  • 4 files changed
  • 1 contributor

Commits on Mar 24, 2020

  1. Add packages.json to the tarball job

    Moved from nixos-homepage.
    
    (cherry picked from commit d6ec410)
    edolstra committed Mar 24, 2020

    Verified

    This commit was signed with the committer’s verified signature.
    edolstra Eelco Dolstra
    Copy the full SHA
    96c4045 View commit details
  2. Compress optionsJSON using brotli

    (cherry picked from commit 4052f9b)
    edolstra committed Mar 24, 2020

    Verified

    This commit was signed with the committer’s verified signature.
    edolstra Eelco Dolstra
    Copy the full SHA
    0ce53c4 View commit details
  3. nixos/release-small.nix: Export options job

    (cherry picked from commit e51c7f6)
    edolstra committed Mar 24, 2020

    Verified

    This commit was signed with the committer’s verified signature.
    edolstra Eelco Dolstra
    Copy the full SHA
    1a54743 View commit details
Showing with 31 additions and 5 deletions.
  1. +4 −0 nixos/lib/make-options-doc/default.nix
  2. +1 −1 nixos/release-small.nix
  3. +13 −4 pkgs/top-level/make-tarball.nix
  4. +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" {} ''
2 changes: 1 addition & 1 deletion nixos/release-small.nix
Original file line number Diff line number Diff line change
@@ -28,7 +28,7 @@ let
in rec {

nixos = {
inherit (nixos') channel manual iso_minimal dummy;
inherit (nixos') channel manual options iso_minimal dummy;
tests = {
inherit (nixos'.tests)
containers-imperative
17 changes: 13 additions & 4 deletions pkgs/top-level/make-tarball.nix
Original file line number Diff line number Diff line change
@@ -19,7 +19,7 @@ releaseTools.sourceTarball {
version = pkgs.lib.fileContents ../../.version;
versionSuffix = "pre${toString nixpkgs.revCount}.${nixpkgs.shortRev}";

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

configurePhase = ''
eval "$preConfigure"
@@ -35,6 +35,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
@@ -80,12 +82,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 \
@@ -97,7 +97,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;
};
}