···103103 <title>Ensuring a user provided a possible value</title>
104104<programlisting><![CDATA[
105105let sslLibrary = "bearssl";
106106-in lib.asserts.assertOneOf "sslLibrary" sslLibrary [ "openssl" "bearssl" ];
106106+in lib.asserts.assertOneOf "sslLibrary" sslLibrary [ "openssl" "libressl" ];
107107=> false
108108stderr> trace: sslLibrary must be one of "openssl", "libressl", but is: "bearssl"
109109 ]]></programlisting>
···11-{ lib, stdenv, fetchgit, libX11, libXinerama, libXft, patches ? [], conf ? null }:
22-33-let
44- name = "dwm-git-20180602";
55-in
11+{ lib, stdenv, fetchgit, libX11, libXinerama, libXft, writeText, patches ? [ ]
22+, conf ? null }:
6374stdenv.mkDerivation {
88- inherit name;
55+ pname = "dwm-git";
66+ version = "20200303";
97108 src = fetchgit {
119 url = "git://git.suckless.org/dwm";
1212- rev = "b69c870a3076d78ab595ed1cd4b41cf6b03b2610";
1313- sha256 = "10i079h79l4gdch1qy2vrrb2xxxkgkjmgphr5r9a75jbbagwvz0k";
1010+ rev = "61bb8b2241d4db08bea4261c82e27cd9797099e7";
1111+ sha256 = "1j3vly8dln35vnwnwwlaa8ql9fmnlmrv43jcyc8dbfhfxiw6f34l";
1412 };
15131614 buildInputs = [ libX11 libXinerama libXft ];
···2018 # Allow users set their own list of patches
2119 inherit patches;
22202323- # Allow users to override the entire config file AFTER appying the patches
2424- postPatch = lib.optionalString (conf!=null) ''
2525- echo -n '${conf}' > config.def.h
2626- '';
2727-2828- buildPhase = "make";
2121+ # Allow users to set the config.def.h file containing the configuration
2222+ postPatch = let
2323+ configFile = if lib.isDerivation conf || builtins.isPath conf then
2424+ conf
2525+ else
2626+ writeText "config.def.h" conf;
2727+ in lib.optionalString (conf != null) "cp ${configFile} config.def.h";
29283029 meta = with lib; {
3130 homepage = "https://suckless.org/";
3231 description = "Dynamic window manager for X, development version";
3332 license = licenses.mit;
3434- maintainers = with maintainers; [xeji];
3333+ maintainers = with maintainers; [ xeji ];
3534 platforms = platforms.unix;
3635 };
3736}
+1
pkgs/build-support/bintools-wrapper/default.nix
···6464 else if targetPlatform.system == "powerpc-linux" then "${libc_lib}/lib/ld.so.1"
6565 else if targetPlatform.isMips then "${libc_lib}/lib/ld.so.1"
6666 else if targetPlatform.isDarwin then "/usr/lib/dyld"
6767+ else if targetPlatform.isFreeBSD then "/libexec/ld-elf.so.1"
6768 else if lib.hasSuffix "pc-gnu" targetPlatform.config then "ld.so.1"
6869 else null;
6970
-1
pkgs/build-support/release/debian-build.nix
···22# that contains a Debian-like (i.e. dpkg-based) OS.
3344{ name ? "debian-build"
55-, lib
65, diskImage
76, src, lib, stdenv, vmTools, checkinstall
87, fsTranslation ? false