···11+/* Library of low-level helper functions for nix expressions.22+ *33+ * Please implement (mostly) exhaustive unit tests44+ * for new functions in `./tests.nix'.55+ */16let2738 # trivial, often used functions
+10
lib/tests.nix
···277277 expected = [ "2001" "db8" "0" "0042" "" "8a2e" "370" "" ];278278 };279279280280+ testComposeExtensions = {281281+ expr = let obj = makeExtensible (self: { foo = self.bar; });282282+ f = self: super: { bar = false; baz = true; };283283+ g = self: super: { bar = super.baz or false; };284284+ f_o_g = composeExtensions f g;285285+ composed = obj.extend f_o_g;286286+ in composed.foo;287287+ expected = true;288288+ };289289+280290}
+9
lib/trivial.nix
···8585 # argument, but it's nice this way if several uses of `extends` are cascaded.8686 extends = f: rattrs: self: let super = rattrs self; in super // f self super;87878888+ # Compose two extending functions of the type expected by 'extends'8989+ # into one where changes made in the first are available in the9090+ # 'super' of the second9191+ composeExtensions =9292+ f: g: self: super:9393+ let fApplied = f self super;9494+ super' = super // fApplied;9595+ in fApplied // g self super';9696+8897 # Create an overridable, recursive attribute set. For example:8998 #9099 # nix-repl> obj = makeExtensible (self: { })
+2
nixos/doc/manual/release-notes/rl-1709.xml
···3535<itemizedlist>3636 <listitem>3737 <para>3838+ Top-level <literal>idea</literal> package collection was renamed.3939+ All JetBrains IDEs are now at <literal>jetbrains</literal>.3840 </para>3941 </listitem>4042</itemizedlist>
+8-1
nixos/modules/security/acme.nix
···1919 '';2020 };21212222+ domain = mkOption {2323+ type = types.nullOr types.str;2424+ default = null;2525+ description = "Domain to fetch certificate for (defaults to the entry name)";2626+ };2727+2228 email = mkOption {2329 type = types.nullOr types.str;2430 default = null;···163157 servicesLists = mapAttrsToList certToServices cfg.certs;164158 certToServices = cert: data:165159 let160160+ domain = if data.domain != null then data.domain else cert;166161 cpath = "${cfg.directory}/${cert}";167162 rights = if data.allowKeysForGroup then "750" else "700";168168- cmdline = [ "-v" "-d" cert "--default_root" data.webroot "--valid_min" cfg.validMin ]163163+ cmdline = [ "-v" "-d" domain "--default_root" data.webroot "--valid_min" cfg.validMin ]169164 ++ optionals (data.email != null) [ "--email" data.email ]170165 ++ concatMap (p: [ "-f" p ]) data.plugins171166 ++ concatLists (mapAttrsToList (name: root: [ "-d" (if root == null then name else "${name}:${root}")]) data.extraDomains);
···5757index 838d343..ca7fc0d 1006445858--- a/giscanner/shlibs.py5959+++ b/giscanner/shlibs.py6060-@@ -53,10 +53,24 @@ def _resolve_libtool(options, binary, libraries):6060+@@ -53,10 +53,27 @@ def _resolve_libtool(options, binary, libraries):6161 # Match absolute paths on OS X to conform to how libraries are usually6262 # referenced on OS X systems.6363 def _ldd_library_pattern(library_name):6464+ nix_store_dir = re.escape('@nixStoreDir@'.rstrip('/'))6565 pattern = "(?<![A-Za-z0-9_-])(lib*%s[^A-Za-z0-9_-][^\s\(\)]*)"6666-- if platform.system() == 'Darwin':6767-- pattern = "([^\s]*lib*%s[^A-Za-z0-9_-][^\s\(\)]*)"6666+ if platform.system() == 'Darwin':6767+ pattern = "([^\s]*lib*%s[^A-Za-z0-9_-][^\s\(\)]*)"6868- return re.compile(pattern % re.escape(library_name))6969++ return re.compile(pattern % re.escape(library_name))6970+ pattern = r'''7071+ (7172+ (?:···868587868887 # This is a what we do for non-la files. We assume that we are on an8989-@@ -115,7 +129,11 @@ def _resolve_non_libtool(options, binary, libraries):8888+@@ -115,7 +132,11 @@ def _resolve_non_libtool(options, binary, libraries):9089 m = pattern.search(line)9190 if m:9291 del patterns[library]
···3333 "LAPACK="3434 ];35353636- NIX_CFLAGS = "-fPIC";3737-3836 meta = with stdenv.lib; {3937 homepage = http://faculty.cse.tamu.edu/davis/suitesparse.html;4038 description = "A suite of sparse matrix algorithms";
···11+diff --git a/Source/JavaScriptCore/API/WebKitAvailability.h b/Source/JavaScriptCore/API/WebKitAvailability.h22+index ab53183..1310dec 10064433+--- a/Source/JavaScriptCore/API/WebKitAvailability.h44++++ b/Source/JavaScriptCore/API/WebKitAvailability.h55+@@ -27,57 +27,12 @@66+ #define __WebKitAvailability__77+88+ #if defined(__APPLE__)99+-1010+-#include <AvailabilityMacros.h>1111+ #include <CoreFoundation/CoreFoundation.h>1212+-1313+-#if !TARGET_OS_IPHONE && __MAC_OS_X_VERSION_MIN_REQUIRED < 1011001414+-/* To support availability macros that mention newer OS X versions when building on older OS X versions,1515+- we provide our own definitions of the underlying macros that the availability macros expand to. We're1616+- free to expand the macros as no-ops since frameworks built on older OS X versions only ship bundled with1717+- an application rather than as part of the system.1818+-*/1919+-2020+-#ifndef __NSi_10_10 // Building from trunk rather than SDK.2121+-#define __NSi_10_10 introduced=10.0 // Use 10.0 to indicate that everything is available.2222+-#endif2323+-2424+-#ifndef __NSi_10_11 // Building from trunk rather than SDK.2525+-#define __NSi_10_11 introduced=10.0 // Use 10.0 to indicate that everything is available.2626+-#endif2727+-2828+-#ifndef __NSi_10_12 // Building from trunk rather than SDK.2929+-#define __NSi_10_12 introduced=10.0 // Use 10.0 to indicate that everything is available.3030+-#endif3131+-3232+-#ifndef __AVAILABILITY_INTERNAL__MAC_10_93333+-#define __AVAILABILITY_INTERNAL__MAC_10_93434+-#endif3535+-3636+-#ifndef __AVAILABILITY_INTERNAL__MAC_10_103737+-#define __AVAILABILITY_INTERNAL__MAC_10_103838+ #endif3939+4040+-#ifndef AVAILABLE_MAC_OS_X_VERSION_10_9_AND_LATER4141+-#define AVAILABLE_MAC_OS_X_VERSION_10_9_AND_LATER4242+-#endif4343+-4444+-#ifndef AVAILABLE_MAC_OS_X_VERSION_10_10_AND_LATER4545+-#define AVAILABLE_MAC_OS_X_VERSION_10_10_AND_LATER4646+-#endif4747+-4848+-#endif /* __MAC_OS_X_VERSION_MIN_REQUIRED <= 101100 */4949+-5050+-#if defined(BUILDING_GTK__)5151+ #undef CF_AVAILABLE5252+ #define CF_AVAILABLE(_mac, _ios)5353+ #undef CF_ENUM_AVAILABLE5454+ #define CF_ENUM_AVAILABLE(_mac, _ios)5555+-#endif5656+-5757+-#else5858+-#define CF_AVAILABLE(_mac, _ios)5959+-#define CF_ENUM_AVAILABLE(_mac, _ios)6060+-#endif6161+6262+ #endif /* __WebKitAvailability__ */
···11-Derivied from a patch distributed with the Homebrew formula:22-https://github.com/Homebrew/homebrew-core/blob/6ae11ea82c00dc8c11297ecc3f06bc33979862d8/Formula/bonnie++.rb33-44-55-Copyright 2009-2016 Homebrew contributors.66-77-Redistribution and use in source and binary forms, with or without88-modification, are permitted provided that the following conditions99-are met:1010-1111- 1. Redistributions of source code must retain the above copyright1212- notice, this list of conditions and the following disclaimer.1313- 2. Redistributions in binary form must reproduce the above copyright1414- notice, this list of conditions and the following disclaimer in the1515- documentation and/or other materials provided with the distribution.1616-1717-THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR1818-IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES1919-OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.2020-IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,2121-INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT2222-NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,2323-DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY2424-THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT2525-(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF2626-THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.2727-2828-2929-# Changes included in this patchset:3030-# 3) Remove the #ifdef _LARGEFILE64_SOURCE macros which not only prohibits the intended functionality of3131-# splitting into 2 GB files for such filesystems but also incorrectly tests for it in the first place.3232-# The ideal fix would be to replace the AC_TRY_RUN() in configure.in if the fail code actually worked.3333-# Files affected: bonnie++.cp3434-3535-diff --git i/bonnie++.cpp w/bonnie++.cpp3636-index 8c5a43a..8a4b3dc 1006443737---- i/bonnie++.cpp3838-+++ w/bonnie++.cpp3939-@@ -294,11 +294,7 @@ int main(int argc, char *argv[])4040- {4141- char *sbuf = _strdup(optarg);4242- char *size = strtok(sbuf, ":");4343--#ifdef _LARGEFILE64_SOURCE4444- file_size = size_from_str(size, "gt");4545--#else4646-- file_size = size_from_str(size, "g");4747--#endif4848- size = strtok(NULL, "");4949- if(size)5050- {5151-@@ -384,15 +380,6 @@ int main(int argc, char *argv[])5252- if(file_size % 1024 > 512)5353- file_size = file_size + 1024 - (file_size % 1024);5454- }5555--#ifndef _LARGEFILE64_SOURCE5656-- if(file_size == 2048)5757-- file_size = 2047;5858-- if(file_size > 2048)5959-- {6060-- fprintf(stderr, "Large File Support not present, can't do %dM.\n", file_size);6161-- usage();6262-- }6363--#endif6464- globals.byte_io_size = min(file_size, globals.byte_io_size);6565- globals.byte_io_size = max(0, globals.byte_io_size);6666-6767-@@ -465,14 +452,6 @@ int main(int argc, char *argv[])6868- && (directory_max_size < directory_min_size || directory_max_size < 06969- || directory_min_size < 0) )7070- usage();7171--#ifndef _LARGEFILE64_SOURCE7272-- if(file_size > (1 << (31 - 20 + globals.io_chunk_bits)) )7373-- {7474-- fprintf(stderr7575-- , "The small chunk size and large IO size make this test impossible in 32bit.\n");7676-- usage();7777-- }7878--#endif7979- if(file_size && globals.ram && (file_size * concurrency) < (globals.ram * 2) )8080- {8181- fprintf(stderr