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: 3a4658ea04d6
Choose a base ref
...
head repository: NixOS/nixpkgs
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: b3fcd9375d89
Choose a head ref
Loading
Showing 514 changed files with 8,424 additions and 3,176 deletions.
4 changes: 4 additions & 0 deletions doc/languages-frameworks/rust.section.md
Original file line number Diff line number Diff line change
@@ -43,6 +43,7 @@ rustPlatform.buildRustPackage rec {
};
cargoSha256 = "0q68qyl2h6i0qsz82z840myxlnjay8p1w5z7hfyr8fqp7wgwa9cx";
verifyCargoDeps = true;
meta = with stdenv.lib; {
description = "A fast line-oriented regex search tool, similar to ag and ack";
@@ -64,6 +65,9 @@ When the `Cargo.lock`, provided by upstream, is not in sync with the
added in `cargoPatches` will also be prepended to the patches in `patches` at
build-time.

When `verifyCargoDeps` is set to `true`, the build will also verify that the
`cargoSha256` is not out of date by comparing the `Cargo.lock` file in both the `cargoDeps` and `src`. Note that this option changes the value of `cargoSha256` since it also copies the `Cargo.lock` in it. To avoid breaking backward-compatibility this option is not enabled by default but hopefully will be in the future.

## Compiling Rust crates using Nix instead of Cargo

### Simple operation
12 changes: 8 additions & 4 deletions lib/modules.nix
Original file line number Diff line number Diff line change
@@ -591,12 +591,16 @@ rec {
{ options, ... }:
{ options = setAttrByPath optionName (mkOption {
visible = false;
apply = x: throw "The option `${showOption optionName}' can no longer be used since it's been removed. ${replacementInstructions}";
});
config.warnings =
let opt = getAttrFromPath optionName options; in
optional opt.isDefined ''
config.assertions =
let opt = getAttrFromPath optionName options; in [{
assertion = !opt.isDefined;
message = ''
The option definition `${showOption optionName}' in ${showFiles opt.files} no longer has any effect; please remove it.
${replacementInstructions}'';
${replacementInstructions}
'';
}];
};

/* Return a module that causes a warning to be shown if the
2 changes: 1 addition & 1 deletion lib/systems/doubles.nix
Original file line number Diff line number Diff line change
@@ -7,7 +7,7 @@ let

all = [
"aarch64-linux"
"armv5tel-linux" "armv6l-linux" "armv7l-linux"
"armv5tel-linux" "armv6l-linux" "armv7a-linux" "armv7l-linux"

"mipsel-linux"

4 changes: 2 additions & 2 deletions lib/tests/systems.nix
Original file line number Diff line number Diff line change
@@ -14,7 +14,7 @@ let
in with lib.systems.doubles; lib.runTests {
testall = mseteq all (linux ++ darwin ++ freebsd ++ openbsd ++ netbsd ++ illumos ++ wasi ++ windows ++ embedded);

testarm = mseteq arm [ "armv5tel-linux" "armv6l-linux" "armv7l-linux" "arm-none" "armv7a-darwin" ];
testarm = mseteq arm [ "armv5tel-linux" "armv6l-linux" "armv7a-linux" "armv7l-linux" "arm-none" "armv7a-darwin" ];
testi686 = mseteq i686 [ "i686-linux" "i686-freebsd" "i686-netbsd" "i686-openbsd" "i686-cygwin" "i686-windows" "i686-none" "i686-darwin" ];
testmips = mseteq mips [ "mipsel-linux" ];
testx86_64 = mseteq x86_64 [ "x86_64-linux" "x86_64-darwin" "x86_64-freebsd" "x86_64-openbsd" "x86_64-netbsd" "x86_64-cygwin" "x86_64-solaris" "x86_64-windows" "x86_64-none" ];
@@ -24,7 +24,7 @@ in with lib.systems.doubles; lib.runTests {
testfreebsd = mseteq freebsd [ "i686-freebsd" "x86_64-freebsd" ];
testgnu = mseteq gnu (linux /* ++ kfreebsd ++ ... */);
testillumos = mseteq illumos [ "x86_64-solaris" ];
testlinux = mseteq linux [ "aarch64-linux" "armv5tel-linux" "armv6l-linux" "armv7l-linux" "i686-linux" "mipsel-linux" "riscv32-linux" "riscv64-linux" "x86_64-linux" "powerpc64le-linux" ];
testlinux = mseteq linux [ "aarch64-linux" "armv5tel-linux" "armv6l-linux" "armv7a-linux" "armv7l-linux" "i686-linux" "mipsel-linux" "riscv32-linux" "riscv64-linux" "x86_64-linux" "powerpc64le-linux" ];
testnetbsd = mseteq netbsd [ "i686-netbsd" "x86_64-netbsd" ];
testopenbsd = mseteq openbsd [ "i686-openbsd" "x86_64-openbsd" ];
testwindows = mseteq windows [ "i686-cygwin" "x86_64-cygwin" "i686-windows" "x86_64-windows" ];
57 changes: 57 additions & 0 deletions maintainers/maintainer-list.nix
Original file line number Diff line number Diff line change
@@ -1655,6 +1655,12 @@
githubId = 1316469;
name = "Naomi Morse";
};
dkudriavtsev = {
email = "dkudriavtsev@gmail.com";
github = "dkudriavtsev";
githubId = 9790772;
name = "Dmitry Kudriavtsev";
};
dmalikov = {
email = "malikov.d.y@gmail.com";
github = "dmalikov";
@@ -2007,6 +2013,11 @@
githubId = 4828;
name = "Eric Merritt";
};
ericdallo = {
email = "ercdll1337@gmail.com";
github = "ericdallo";
name = "Eric Dallo";
};
ericsagnes = {
email = "eric.sagnes@gmail.com";
github = "ericsagnes";
@@ -2045,6 +2056,12 @@
github = "ertes";
name = "Ertugrul Söylemez";
};
esclear = {
email = "esclear@users.noreply.github.com";
github = "esclear";
githubId = 7432848;
name = "Daniel Albert";
};
Esteth = {
email = "adam.copp@gmail.com";
name = "Adam Copp";
@@ -2077,6 +2094,12 @@
githubId = 195032;
name = "Eric Evenchick";
};
evenbrenden = {
email = "evenbrenden@gmail.com";
github = "evenbrenden";
githubId = 2512008;
name = "Even Brenden";
};
exfalso = {
email = "0slemi0@gmail.com";
github = "exfalso";
@@ -2841,6 +2864,12 @@
githubId = 820715;
name = "Jake Logemann";
};
jakestanger = {
email = "mail@jstanger.dev";
github = "JakeStanger";
githubId = 5057870;
name = "Jake Stanger";
};
jakewaksbaum = {
email = "jake.waksbaum@gmail.com";
github = "jbaum98";
@@ -3132,6 +3161,11 @@
githubId = 392720;
name = "Jon Banafato";
};
jonathanmarler = {
email = "johnnymarler@gmail.com";
github = "marler8997";
name = "Jonathan Marler";
};
jonathanreeve = {
email = "jon.reeve@gmail.com";
github = "JonathanReeve";
@@ -3495,6 +3529,11 @@
githubId = 1362179;
name = "Kyle Lacy";
};
laikq = {
email = "gwen@quasebarth.de";
github = "laikq";
name = "Gwendolyn Quasebarth";
};
lasandell = {
email = "lasandell@gmail.com";
github = "lasandell";
@@ -5796,6 +5835,12 @@
githubId = 1151264;
name = "Sebastian Graf";
};
shahrukh330 = {
email = "shahrukh330@gmail.com";
github = "shahrukh330";
githubId = 1588288;
name = "Shahrukh Khan";
};
shanemikel = {
email = "shanemikel1@gmail.com";
github = "shanemikel";
@@ -5881,6 +5926,12 @@
fingerprint = "ADF4 C13D 0E36 1240 BD01 9B51 D1DE 6D7F 6936 63A5";
}];
};
simonchatts = {
email = "code@chatts.net";
github = "simonchatts";
githubId = 11135311;
name = "Simon Chatterjee";
};
simonvandel = {
email = "simon.vandel@gmail.com";
github = "simonvandel";
@@ -7089,6 +7140,12 @@
githubId = 1866448;
name = "Eric Bailey";
};
yvt = {
email = "i@yvt.jp";
github = "yvt";
githubId = 5253988;
name = "yvt";
};
z77z = {
email = "maggesi@math.unifi.it";
github = "maggesi";
6 changes: 6 additions & 0 deletions nixos/doc/manual/release-notes/rl-1909.xml
Original file line number Diff line number Diff line change
@@ -513,6 +513,12 @@
must be owned by either <literal>root</literal> or the user specified in <option>services.gitlab.user</option>.
</para>
</listitem>
<listitem>
<para>
The Twitter client <literal>corebird</literal> has been dropped as <link xlink:href="https://www.patreon.com/posts/corebirds-future-18921328">it is discontinued and does not work against the new Twitter API</link>.
Please use the fork <literal>cawbird</literal> instead which has been adapted to the API changes and is still maintained.
</para>
</listitem>
</itemizedlist>
</section>

7 changes: 6 additions & 1 deletion nixos/doc/manual/release-notes/rl-2003.xml
Original file line number Diff line number Diff line change
@@ -23,6 +23,11 @@
Support is planned until the end of October 2020, handing over to 20.09.
</para>
</listitem>
<listitem>
<para>
Postgresql for NixOS service now defaults to v11.
</para>
</listitem>
</itemizedlist>
</section>

@@ -73,7 +78,7 @@

<itemizedlist>
<listitem>
<para />
<para>SD images are now compressed by default using <literal>bzip2</literal>.</para>
</listitem>
</itemizedlist>
</section>
16 changes: 9 additions & 7 deletions nixos/modules/config/system-environment.nix
Original file line number Diff line number Diff line change
@@ -8,11 +8,6 @@ let

cfg = config.environment;

pamProfiles =
map
(replaceStrings ["$HOME" "$USER"] ["@{HOME}" "@{PAM_USER}"])
cfg.profiles;

in

{
@@ -75,13 +70,20 @@ in
let
suffixedVariables =
flip mapAttrs cfg.profileRelativeSessionVariables (envVar: suffixes:
flip concatMap pamProfiles (profile:
flip concatMap cfg.profiles (profile:
map (suffix: "${profile}${suffix}") suffixes
)
);

# We're trying to use the same syntax for PAM variables and env variables.
# That means we need to map the env variables that people might use to their
# equivalent PAM variable.
# Note: PAM_USER is a PAM_ITEM, HOME is an environment variable, they have
# different syntax.
replaceEnvVars = replaceStrings ["$HOME" "$USER"] ["\${HOME}" "@{PAM_USER}"];

pamVariable = n: v:
''${n} DEFAULT="${concatStringsSep ":" (toList v)}"'';
''${n} DEFAULT="${concatStringsSep ":" (map replaceEnvVars (toList v))}"'';

pamVariables =
concatStringsSep "\n"
19 changes: 17 additions & 2 deletions nixos/modules/installer/cd-dvd/sd-image.nix
Original file line number Diff line number Diff line change
@@ -98,6 +98,16 @@ in
populate the ./files/boot (/boot) directory.
'';
};

compressImage = mkOption {
type = types.bool;
default = true;
description = ''
Whether the SD image should be compressed using
<command>bzip2</command>.
'';
};

};

config = {
@@ -118,10 +128,12 @@ in

sdImage.storePaths = [ config.system.build.toplevel ];

system.build.sdImage = pkgs.callPackage ({ stdenv, dosfstools, e2fsprogs, mtools, libfaketime, utillinux }: stdenv.mkDerivation {
system.build.sdImage = pkgs.callPackage ({ stdenv, dosfstools, e2fsprogs, mtools, libfaketime, utillinux, bzip2 }: stdenv.mkDerivation {
name = config.sdImage.imageName;

nativeBuildInputs = [ dosfstools e2fsprogs mtools libfaketime utillinux ];
nativeBuildInputs = [ dosfstools e2fsprogs mtools libfaketime utillinux bzip2 ];

inherit (config.sdImage) compressImage;

buildCommand = ''
mkdir -p $out/nix-support $out/sd-image
@@ -168,6 +180,9 @@ in
# Verify the FAT partition before copying it.
fsck.vfat -vn firmware_part.img
dd conv=notrunc if=firmware_part.img of=$img seek=$START count=$SECTORS
if test -n "$compressImage"; then
bzip2 $img
fi
'';
}) {};

4 changes: 3 additions & 1 deletion nixos/modules/module-list.nix
Original file line number Diff line number Diff line change
@@ -299,10 +299,11 @@
./services/desktops/gnome3/chrome-gnome-shell.nix
./services/desktops/gnome3/evolution-data-server.nix
./services/desktops/gnome3/glib-networking.nix
./services/desktops/gnome3/gnome-initial-setup.nix
./services/desktops/gnome3/gnome-keyring.nix
./services/desktops/gnome3/gnome-online-accounts.nix
./services/desktops/gnome3/gnome-remote-desktop.nix
./services/desktops/gnome3/gnome-online-miners.nix
./services/desktops/gnome3/gnome-remote-desktop.nix
./services/desktops/gnome3/gnome-settings-daemon.nix
./services/desktops/gnome3/gnome-user-share.nix
./services/desktops/gnome3/rygel.nix
@@ -503,6 +504,7 @@
./services/monitoring/das_watchdog.nix
./services/monitoring/datadog-agent.nix
./services/monitoring/dd-agent/dd-agent.nix
./services/monitoring/do-agent.nix
./services/monitoring/fusion-inventory.nix
./services/monitoring/grafana.nix
./services/monitoring/grafana-reporter.nix
3 changes: 2 additions & 1 deletion nixos/modules/services/databases/postgresql.nix
Original file line number Diff line number Diff line change
@@ -226,7 +226,8 @@ in
# Note: when changing the default, make it conditional on
# ‘system.stateVersion’ to maintain compatibility with existing
# systems!
mkDefault (if versionAtLeast config.system.stateVersion "17.09" then pkgs.postgresql_9_6
mkDefault (if versionAtLeast config.system.stateVersion "20.03" then pkgs.postgresql_11
else if versionAtLeast config.system.stateVersion "17.09" then pkgs.postgresql_9_6
else if versionAtLeast config.system.stateVersion "16.03" then pkgs.postgresql_9_5
else throw "postgresql_9_4 was removed, please upgrade your postgresql version.");

Loading