···12791279 <command>make</command>. You must use this instead of
12801280 <varname>makeFlags</varname> if the arguments contain spaces, e.g.
12811281<programlisting>
12821282-makeFlagsArray=(CFLAGS="-O0 -g" LDFLAGS="-lfoo -lbar")
12821282+preBuild = ''
12831283+ makeFlagsArray+=(CFLAGS="-O0 -g" LDFLAGS="-lfoo -lbar")
12841284+'';
12831285</programlisting>
12841286 Note that shell arrays cannot be passed through environment variables,
12851287 so you cannot set <varname>makeFlagsArray</varname> in a derivation
···11#! /usr/bin/env nix-shell
22-#! nix-shell -i perl -p perl perlPackages.NetAmazonS3 perlPackages.FileSlurp nixUnstable nixUnstable.perl-bindings
22+#! nix-shell -i perl -p perl perlPackages.NetAmazonS3 perlPackages.FileSlurp perlPackages.JSON perlPackages.LWPProtocolHttps nixUnstable nixUnstable.perl-bindings
3344# This command uploads tarballs to tarballs.nixos.org, the
55# content-addressed cache used by fetchurl as a fallback for when
···101101 my ($name, $dest) = @_;
102102 #print STDERR "linking $name to $dest...\n";
103103 $bucket->add_key($name, "", {
104104- 'x-amz-website-redirect-location' => "/" . $dest,
105105- 'x-amz-acl' => "public-read"
104104+ 'x-amz-website-redirect-location' => "/" . $dest,
105105+ 'x-amz-acl' => "public-read"
106106 })
107107 or die "failed to create redirect from $name to $dest\n";
108108 $cache{$name} = 1;
···116116 # Upload the file as sha512/<hash-in-base-16>.
117117 print STDERR "uploading $fn to $mainKey...\n";
118118 $bucket->add_key_filename($mainKey, $fn, {
119119- 'x-amz-meta-original-name' => $name,
120120- 'x-amz-acl' => "public-read"
119119+ 'x-amz-meta-original-name' => $name,
120120+ 'x-amz-acl' => "public-read"
121121 })
122122 or die "failed to upload $fn to $mainKey\n";
123123 $cache{$mainKey} = 1;
+11
maintainers/scripts/eval-release.sh
···11+#! /bin/sh
22+33+if [[ -z "$VERBOSE" ]]; then
44+ echo "You may set VERBOSE=1 to see debug output or to any other non-empty string to make this script completely silent"
55+fi
66+unset HOME NIXPKGS_CONFIG # Force empty config
77+88+# With the default heap size (380MB), nix-instantiate fails:
99+# Too many heap sections: Increase MAXHINCR or MAX_HEAP_SECTS
1010+export GC_INITIAL_HEAP_SIZE=${GC_INITIAL_HEAP_SIZE:-2000000000} # 2GB
1111+nix-instantiate --strict --eval-only --xml --show-trace "$(dirname "$0")"/eval-release.nix 2>&1 > /dev/null
+1-1
maintainers/scripts/find-tarballs.nix
···3131 if !canEval x then []
3232 else if isDerivation x then optional (canEval x.drvPath) x
3333 else if isList x then concatLists (map derivationsIn' x)
3434- else if isAttrs x then concatLists (mapAttrsToList (n: v: derivationsIn' v) x)
3434+ else if isAttrs x then concatLists (mapAttrsToList (n: v: addErrorContext "while finding tarballs in '${n}':" (derivationsIn' v)) x)
3535 else [ ];
36363737 keyDrv = drv: if canEval drv.drvPath then { key = drv.drvPath; value = drv; } else { };
-7
maintainers/scripts/test-eval-release.sh
···11-#! /bin/sh
22-33-if [[ -z "$VERBOSE" ]]; then
44- echo "You may set VERBOSE=1 to see debug output or to any other non-empty string to make this script completely silent"
55-fi
66-unset HOME NIXPKGS_CONFIG # Force empty config
77-nix-instantiate --strict --eval-only --xml --show-trace "$(dirname "$0")"/eval-release.nix 2>&1 > /dev/null
+15
nixos/doc/manual/release-notes/rl-1903.xml
···440440 from nixpkgs due to the lack of maintainers.
441441 </para>
442442 </listitem>
443443+ <listitem>
444444+ <para>
445445+ It is possible now to uze ZRAM devices as general purpose ephemeral block devices,
446446+ not only as swap. Using more than 1 device as ZRAM swap is no longer recommended,
447447+ but is still possible by setting <literal>zramSwap.swapDevices</literal> explicitly.
448448+ </para>
449449+ <para>
450450+ Default algorithm for ZRAM swap was changed to <literal>zstd</literal>.
451451+ </para>
452452+ <para>
453453+ Changes to ZRAM algorithm are applied during <literal>nixos-rebuild switch</literal>,
454454+ so make sure you have enough swap space on disk to survive ZRAM device rebuild. Alternatively,
455455+ use <literal>nixos-rebuild boot; reboot</literal>.
456456+ </para>
457457+ </listitem>
443458 </itemizedlist>
444459 </section>
445460</section>
+5-2
nixos/lib/make-disk-image.nix
···2727, # The root file system type.
2828 fsType ? "ext4"
29293030+, # Filesystem label
3131+ label ? "nixos"
3232+3033, # The initial NixOS configuration file to be copied to
3134 # /etc/nixos/configuration.nix.
3235 configFile ? null
···134137 # Get start & length of the root partition in sectors to $START and $SECTORS.
135138 eval $(partx $diskImage -o START,SECTORS --nr ${rootPartition} --pairs)
136139137137- mkfs.${fsType} -F -L nixos $diskImage -E offset=$(sectorsToBytes $START) $(sectorsToKilobytes $SECTORS)K
140140+ mkfs.${fsType} -F -L ${label} $diskImage -E offset=$(sectorsToBytes $START) $(sectorsToKilobytes $SECTORS)K
138141 '' else ''
139139- mkfs.${fsType} -F -L nixos $diskImage
142142+ mkfs.${fsType} -F -L ${label} $diskImage
140143 ''}
141144142145 root="$PWD/root"
+67-14
nixos/modules/config/zram.nix
···6677 cfg = config.zramSwap;
8899- devices = map (nr: "zram${toString nr}") (range 0 (cfg.numDevices - 1));
99+ # don't set swapDevices as mkDefault, so we can detect user had read our warning
1010+ # (see below) and made an action (or not)
1111+ devicesCount = if cfg.swapDevices != null then cfg.swapDevices else cfg.numDevices;
1212+1313+ devices = map (nr: "zram${toString nr}") (range 0 (devicesCount - 1));
10141115 modprobe = "${pkgs.kmod}/bin/modprobe";
12161717+ warnings =
1818+ assert cfg.swapDevices != null -> cfg.numDevices >= cfg.swapDevices;
1919+ flatten [
2020+ (optional (cfg.numDevices > 1 && cfg.swapDevices == null) ''
2121+ Using several small zram devices as swap is no better than using one large.
2222+ Set either zramSwap.numDevices = 1 or explicitly set zramSwap.swapDevices.
2323+2424+ Previously multiple zram devices were used to enable multithreaded
2525+ compression. Linux supports multithreaded compression for 1 device
2626+ since 3.15. See https://lkml.org/lkml/2014/2/28/404 for details.
2727+ '')
2828+ ];
2929+1330in
14311532{
···2441 default = false;
2542 type = types.bool;
2643 description = ''
2727- Enable in-memory compressed swap space provided by the zram kernel
2828- module.
2929- See https://www.kernel.org/doc/Documentation/blockdev/zram.txt
4444+ Enable in-memory compressed devices and swap space provided by the zram
4545+ kernel module.
4646+ See <link xlink:href="https://www.kernel.org/doc/Documentation/blockdev/zram.txt">
4747+ https://www.kernel.org/doc/Documentation/blockdev/zram.txt
4848+ </link>.
3049 '';
3150 };
3251···3453 default = 1;
3554 type = types.int;
3655 description = ''
3737- Number of zram swap devices to create.
5656+ Number of zram devices to create. See also
5757+ <literal>zramSwap.swapDevices</literal>
5858+ '';
5959+ };
6060+6161+ swapDevices = mkOption {
6262+ default = null;
6363+ example = 1;
6464+ type = with types; nullOr int;
6565+ description = ''
6666+ Number of zram devices to be used as swap. Must be
6767+ <literal><= zramSwap.numDevices</literal>.
6868+ Default is same as <literal>zramSwap.numDevices</literal>, recommended is 1.
3869 '';
3970 };
4071···4475 description = ''
4576 Maximum amount of memory that can be used by the zram swap devices
4677 (as a percentage of your total memory). Defaults to 1/2 of your total
4747- RAM.
7878+ RAM. Run <literal>zramctl</literal> to check how good memory is
7979+ compressed.
4880 '';
4981 };
5082···5890 '';
5991 };
60929393+ algorithm = mkOption {
9494+ default = "zstd";
9595+ example = "lzo";
9696+ type = with types; either (enum [ "lzo" "lz4" "zstd" ]) str;
9797+ description = ''
9898+ Compression algorithm. <literal>lzo</literal> has good compression,
9999+ but is slow. <literal>lz4</literal> has bad compression, but is fast.
100100+ <literal>zstd</literal> is both good compression and fast.
101101+ You can check what other algorithms are supported by your zram device with
102102+ <programlisting>cat /sys/class/block/zram*/comp_algorithm</programlisting>
103103+ '';
104104+ };
61105 };
6210663107 };
6410865109 config = mkIf cfg.enable {
66110111111+ inherit warnings;
112112+67113 system.requiredKernelConfig = with config.lib.kernelConfig; [
68114 (isModule "ZRAM")
69115 ];
···85131 createZramInitService = dev:
86132 nameValuePair "zram-init-${dev}" {
87133 description = "Init swap on zram-based device ${dev}";
8888- bindsTo = [ "dev-${dev}.swap" ];
89134 after = [ "dev-${dev}.device" "zram-reloader.service" ];
90135 requires = [ "dev-${dev}.device" "zram-reloader.service" ];
91136 before = [ "dev-${dev}.swap" ];
92137 requiredBy = [ "dev-${dev}.swap" ];
138138+ unitConfig.DefaultDependencies = false; # needed to prevent a cycle
93139 serviceConfig = {
94140 Type = "oneshot";
95141 RemainAfterExit = true;
96142 ExecStop = "${pkgs.runtimeShell} -c 'echo 1 > /sys/class/block/${dev}/reset'";
97143 };
98144 script = ''
9999- set -u
100100- set -o pipefail
101101-145145+ set -euo pipefail
146146+102147 # Calculate memory to use for zram
103103- totalmem=$(${pkgs.gnugrep}/bin/grep 'MemTotal: ' /proc/meminfo | ${pkgs.gawk}/bin/awk '{print $2}')
104104- mem=$(((totalmem * ${toString cfg.memoryPercent} / 100 / ${toString cfg.numDevices}) * 1024))
148148+ mem=$(${pkgs.gawk}/bin/awk '/MemTotal: / {
149149+ print int($2*${toString cfg.memoryPercent}/100.0/${toString devicesCount}*1024)
150150+ }' /proc/meminfo)
105151106106- echo $mem > /sys/class/block/${dev}/disksize
152152+ ${pkgs.utillinux}/sbin/zramctl --size $mem --algorithm ${cfg.algorithm} /dev/${dev}
107153 ${pkgs.utillinux}/sbin/mkswap /dev/${dev}
108154 '';
109155 restartIfChanged = false;
···111157 in listToAttrs ((map createZramInitService devices) ++ [(nameValuePair "zram-reloader"
112158 {
113159 description = "Reload zram kernel module when number of devices changes";
160160+ wants = [ "systemd-udevd.service" ];
161161+ after = [ "systemd-udevd.service" ];
162162+ unitConfig.DefaultDependencies = false; # needed to prevent a cycle
114163 serviceConfig = {
115164 Type = "oneshot";
116165 RemainAfterExit = true;
···118167 ExecStart = "${modprobe} zram";
119168 ExecStop = "${modprobe} -r zram";
120169 };
121121- restartTriggers = [ cfg.numDevices ];
170170+ restartTriggers = [
171171+ cfg.numDevices
172172+ cfg.algorithm
173173+ cfg.memoryPercent
174174+ ];
122175 restartIfChanged = true;
123176 })]);
124177
+8-4
nixos/modules/hardware/opengl.nix
···124124125125 config = mkIf cfg.enable {
126126127127- assertions = lib.singleton {
128128- assertion = cfg.driSupport32Bit -> pkgs.stdenv.isx86_64;
129129- message = "Option driSupport32Bit only makes sense on a 64-bit system.";
130130- };
127127+ assertions = [
128128+ { assertion = cfg.driSupport32Bit -> pkgs.stdenv.isx86_64;
129129+ message = "Option driSupport32Bit only makes sense on a 64-bit system.";
130130+ }
131131+ { assertion = cfg.driSupport32Bit -> (config.boot.kernelPackages.kernel.features.ia32Emulation or false);
132132+ message = "Option driSupport32Bit requires a kernel that supports 32bit emulation";
133133+ }
134134+ ];
131135132136 systemd.tmpfiles.rules = [
133137 "L+ /run/opengl-driver - - - - ${package}"
+3-3
nixos/modules/installer/tools/nixos-option.sh
···314314 # echo 1>&2 "Warning: This value is not an option."
315315316316 result=$(evalCfg "")
317317- if names=$(attrNames "$result" 2> /dev/null); then
317317+ if [ ! -z "$result" ]; then
318318+ names=$(attrNames "$result" 2> /dev/null)
318319 echo 1>&2 "This attribute set contains:"
319320 escapeQuotes () { eval echo "$1"; }
320321 nixMap escapeQuotes "$names"
321322 else
322322- echo 1>&2 "An error occurred while looking for attribute names."
323323- echo $result
323323+ echo 1>&2 "An error occurred while looking for attribute names. Are you sure that '$option' exists?"
324324 fi
325325fi
326326
···1818 socketPath = mkOption {
1919 type = types.path;
2020 default = "/var/run/dovecot/stats";
2121- example = "/var/run/dovecot2/stats";
2121+ example = "/var/run/dovecot2/old-stats";
2222 description = ''
2323 Path under which the stats socket is placed.
2424 The user/group under which the exporter runs,
2525 should be able to access the socket in order
2626 to scrape the metrics successfully.
2727+2828+ Please keep in mind that the stats module has changed in
2929+ <link xlink:href="https://wiki2.dovecot.org/Upgrading/2.3">Dovecot 2.3+</link> which
3030+ is not <link xlink:href="https://github.com/kumina/dovecot_exporter/issues/8">compatible with this exporter</link>.
3131+3232+ The following extra config has to be passed to Dovecot to ensure that recent versions
3333+ work with this exporter:
3434+ <programlisting>
3535+ {
3636+ <xref linkend="opt-services.prometheus.exporters.dovecot.enable" /> = true;
3737+ <xref linkend="opt-services.prometheus.exporters.dovecot.socketPath" /> = "/var/run/dovecot2/old-stats";
3838+ <xref linkend="opt-services.dovecot2.extraConfig" /> = '''
3939+ mail_plugins = $mail_plugins old_stats
4040+ service old-stats {
4141+ unix_listener old-stats {
4242+ user = nobody
4343+ group = nobody
4444+ }
4545+ }
4646+ ''';
4747+ }
4848+ </programlisting>
2749 '';
2850 };
2951 scopes = mkOption {
···33}:
4455stdenv.mkDerivation rec {
66- version = "1.9.2";
66+ version = "1.10.0";
77 rev = "v${version}";
8899 inherit testedTargets;
···1414 owner = "ispc";
1515 repo = "ispc";
1616 inherit rev;
1717- sha256 = "0zaw7mwvly1csbdcbz9j8ry89n0r1fag1m1f579l4mgg1x6ksqry";
1717+ sha256 = "1x07n2gaff3v32yvddrb659mx5gg12bnbsqbyfimp396wn04w60b";
1818 };
19192020 # there are missing dependencies in the Makefile, causing sporadic build failures
···3232 llvmPackages.clang-unwrapped # we need to link against libclang, so we need the unwrapped
3333 ];
34343535- patches = [
3636- (fetchpatch {
3737- url = https://github.com/ispc/ispc/commit/d504641f5af9d5992e7c8f0ed42c1063a39ede5b.patch;
3838- sha256 = "192q3gyvam79469bmlwf0jpfi2y4f8hl2vgcvjngsqhvscwira0s";
3939- })
4040- ];
4141-4242- postPatch = "sed -i -e 's/\\/bin\\///g' -e 's/-lcurses/-lncurses/g' Makefile";
3535+ postPatch = "sed -i -e 's,/bin/,,g' -e 's/-lcurses/-lncurses/g' Makefile";
43364437 # TODO: this correctly catches errors early, but also some things that are just weird and don't seem to be real
4538 # errors
+3-3
pkgs/development/compilers/osl/default.nix
···88 # In theory this could use GCC + Clang rather than just Clang,
99 # but https://github.com/NixOS/nixpkgs/issues/29877 stops this
1010 name = "openshadinglanguage-${version}";
1111- version = "1.9.10";
1111+ version = "1.10.2";
12121313 src = fetchFromGitHub {
1414 owner = "imageworks";
1515 repo = "OpenShadingLanguage";
1616- rev = "Release-1.9.10";
1717- sha256 = "1iaw3pgh0h53gxk3bl148n1lfr54cx2yv0gnx2rjp2m5599acbz4";
1616+ rev = "Release-1.10.2";
1717+ sha256 = "1549hav5nd67a3cmhbalyaqhs39dh7w0nilf91pypnadrl1g03k7";
1818 };
19192020 cmakeFlags = [ "-DUSE_BOOST_WAVE=ON" "-DENABLERTTI=ON" ];
···3838 description = "Fast and lightweight key/value database library by Google";
3939 license = licenses.bsd3;
4040 platforms = platforms.all;
4141- maintainers = with maintainers; [ wkennington ];
4241 };
4342}
-1
pkgs/development/libraries/libasyncns/default.nix
···1313 description = "A C library for Linux/Unix for executing name service queries asynchronously";
1414 license = licenses.lgpl21;
1515 platforms = platforms.unix;
1616- maintainers = with maintainers; [ wkennington ];
1716 };
1817}
-1
pkgs/development/libraries/libclc/default.nix
···3232 description = "Implementation of the library requirements of the OpenCL C programming language";
3333 license = licenses.mit;
3434 platforms = platforms.all;
3535- maintainers = with maintainers; [ wkennington ];
3635 };
3736}
···1818 description = "Help to make sense out of syslog data, or, actually, any event data that is present in text form";
1919 license = licenses.lgpl21;
2020 platforms = platforms.all;
2121- maintainers = with maintainers; [ wkennington ];
2221 };
2322}
-1
pkgs/development/libraries/libmbim/default.nix
···2222 description = "Library for talking to WWAN modems and devices which speak the Mobile Interface Broadband Model (MBIM) protocol";
2323 platforms = platforms.linux;
2424 license = licenses.gpl2;
2525- maintainers = with maintainers; [ wkennington ];
2625 };
2726}
···2222 description = "A C library and command-line tool that implements the host-side of the U2F protocol";
2323 license = licenses.bsd2;
2424 platforms = platforms.unix;
2525- maintainers = with maintainers; [ wkennington ];
2625 };
2726}
+1-1
pkgs/development/libraries/libxmlxx/default.nix
···2121 description = "C++ wrapper for the libxml2 XML parser library";
2222 license = licenses.lgpl2Plus;
2323 platforms = platforms.unix;
2424- maintainers = with maintainers; [ phreedom wkennington ];
2424+ maintainers = with maintainers; [ phreedom ];
2525 };
2626}
-1
pkgs/development/libraries/libyaml/default.nix
···3131 description = "A YAML 1.1 parser and emitter written in C";
3232 license = licenses.mit;
3333 platforms = platforms.all;
3434- maintainers = with maintainers; [ wkennington ];
3534 };
3635}
···2020 description = "A C library to interact with the CCID-part of the Yubikey NEO";
2121 license = licenses.bsd3;
2222 platforms = platforms.unix;
2323- maintainers = with maintainers; [ wkennington ];
2423 };
2524}
···2121 description = "MessagePack implementation for C and C++";
2222 homepage = https://msgpack.org;
2323 license = licenses.asl20;
2424- maintainers = with maintainers; [ redbaron wkennington ];
2424+ maintainers = with maintainers; [ redbaron ];
2525 platforms = platforms.all;
2626 };
2727}
+1-2
pkgs/development/libraries/mtdev/default.nix
···1616 kernel MT events to the slotted type B protocol. The events put into
1717 mtdev may be from any MT device, specifically type A without contact
1818 tracking, type A with contact tracking, or type B with contact tracking.
1919- See the kernel documentation for further details.
1919+ See the kernel documentation for further details.
2020 '';
2121 license = licenses.mit;
2222 platforms = platforms.linux;
2323- maintainers = with maintainers; [ wkennington ];
2423 };
2524}
···1919 description = "A more Linux packaging friendly copy of the AudioProcessing module from the WebRTC project";
2020 license = licenses.bsd3;
2121 platforms = platforms.unix;
2222- maintainers = with maintainers; [ wkennington ];
2322 };
2423}
···6666 # IOKit's dependencies are inconsistent between OSX versions, so this is the best we
6767 # can do until nix 1.11's release
6868 __impureHostDeps = [ "/usr/lib" ];
6969+7070+ meta = with stdenv.lib; {
7171+ description = "A package which provides cryptographic recipes and primitives";
7272+ longDescription = ''
7373+ Cryptography includes both high level recipes and low level interfaces to
7474+ common cryptographic algorithms such as symmetric ciphers, message
7575+ digests, and key derivation functions.
7676+ Our goal is for it to be your "cryptographic standard library". It
7777+ supports Python 2.7, Python 3.4+, and PyPy 5.3+.
7878+ '';
7979+ homepage = https://github.com/pyca/cryptography;
8080+ license = with licenses; [ asl20 bsd3 psfl ];
8181+ maintainers = with maintainers; [ primeos ];
8282+ };
6983}
···6767 description = "A Group Communication System with features for implementing high availability within applications";
6868 license = licenses.bsd3;
6969 platforms = platforms.linux;
7070- maintainers = with maintainers; [ wkennington montag451 ];
7070+ maintainers = with maintainers; [ montag451 ];
7171 };
7272}
+2-2
pkgs/servers/dns/knot-dns/default.nix
···77# Note: ATM only the libraries have been tested in nixpkgs.
88stdenv.mkDerivation rec {
99 name = "knot-dns-${version}";
1010- version = "2.7.5";
1010+ version = "2.7.6";
11111212 src = fetchurl {
1313 url = "https://secure.nic.cz/files/knot-dns/knot-${version}.tar.xz";
1414- sha256 = "7d70d6d8f708285517d1d7c4ff2e5ddfd119cd2962c7a8d3f50a4c695209a086";
1414+ sha256 = "a1cb1877f04f7c2549c977c2658cfafd07c7e0e924f8e8aa8d4ae4b707f697a2";
1515 };
16161717 outputs = [ "bin" "out" "dev" ];
+1-1
pkgs/servers/gpm/default.nix
···5757 description = "A daemon that provides mouse support on the Linux console";
5858 license = licenses.gpl2;
5959 platforms = platforms.linux ++ platforms.cygwin;
6060- maintainers = with maintainers; [ eelco wkennington ];
6060+ maintainers = with maintainers; [ eelco ];
6161 };
6262}
···121121 description = "Sound server for POSIX and Win32 systems";
122122 homepage = http://www.pulseaudio.org/;
123123 license = lib.licenses.lgpl2Plus;
124124- maintainers = with lib.maintainers; [ lovek323 wkennington ];
124124+ maintainers = with lib.maintainers; [ lovek323 ];
125125 platforms = lib.platforms.unix;
126126127127 longDescription = ''
-1
pkgs/servers/samba/4.x.nix
···100100 homepage = https://www.samba.org/;
101101 description = "The standard Windows interoperability suite of programs for Linux and Unix";
102102 license = licenses.gpl3;
103103- maintainers = with maintainers; [ wkennington ];
104103 platforms = platforms.unix;
105104 };
106105}
···2626 certificates, and create certificate requests, and other operations.
2727 A shared library and a command-line tool is included.
2828 '';
2929- maintainers = with maintainers; [ wkennington ];
3029 license = licenses.bsd2;
3130 platforms = platforms.all;
3231 };