Change:
$ cat = [ "Redacted CACert with UTF-8 Chars in its name" ]; $ nixos-rebuild switch building UnicodeWarning: Unicode equal comparison failed to convert both arguments to Unicode - interpreting them as being unequal if obj['CKALABEL'] in blacklist: So basically, if the provider has UTF-8 chars, you cannot blacklist it. $ cd && mkdir cert && cd cert $ wget "" $ wget "" $ echo "Redacted CACert with UTF-8 Chars in its name" $ nix-shell -p python $ python -V Python 2.7.13 $ python UNTRUSTED)' UnicodeWarning: Unicode equal comparison failed to convert both arguments to Unicode - interpreting them as being unequal if obj['CKALABEL'] in blacklist: Ignoring certificate "UTN USERFirst Object Root CA". SAUTH=CKTNSSMUSTVERIFYTRUST, EPROT=CKTNSSMUSTVERIFYTRUST Ignoring certificate "ComSign Secured CA". SAUTH=CKTNSSMUSTVERIFYTRUST, EPROT=CKTNSSMUSTVERIFYTRUST Ignoring certificate "VeriSign-C3SSA-G2-temporary-intermediate-after-1024bit-removal". SAUTH=CKTNSSMUSTVERIFYTRUST, EPROT=CKTNSSMUSTVERIFYTRUST Found duplicate certificate name StartComCertificationAuthority, renaming. $ ^D $ nix-shell -p python3 $ python -V Python 3.5.3 $ python UNTRUSTED)' Ignoring certificate "UTN USERFirst Object Root CA". SAUTH=CKTNSSMUSTVERIFYTRUST, EPROT=CKTNSSMUSTVERIFYTRUST Ignoring certificate "ComSign Secured CA". SAUTH=CKTNSSMUSTVERIFYTRUST, EPROT=CKTNSSMUSTVERIFYTRUST Ignoring certificate "VeriSign-C3SSA-G2-temporary-intermediate-after-1024bit-removal". SAUTH=CKTNSSMUSTVERIFYTRUST, EPROT=CKTNSSMUSTVERIFYTRUST Certificate "Redacted CACert with UTF-8 Chars in its name" blacklisted, ignoring. Found duplicate certificate name b'StartComCertificationAuthority', renaming. Alter as: -- nativeBuildInputs = [ python ]; ++ nativeBuildInputs = [ python3 ]; System: $ nixos-version 03.1506. (Gorilla) PS. May I have it also backported to 17.03?
ping
Backported to 17.03: Thanks for the report and providing the solution!
I am afraid the patch didn't cut it : <pre03.1623. (Gorilla) building Nix... building the system configuration... these derivations will be built: /nix/store/7vhrnv1pcfxvcgizzq71nnjywvsfg8mz-nss-cacert- /nix/store/k8zah7rqdhqwgngqfqbskp71nj1612wm-ca- /nix/store/6wnx6hr8lvbhsxr3iwk83fdcnr7h5wzm- /nix/store/pkiyvngldjwycdc0afr89b70hnfmz2hd-nixos-system-node1- building path(s) ‘/nix/store/6n1m30h0xnhk3mxsalfpd55pfrzcjkdi-nss-cacert-3.31’ unpacking sources unpacking source archive /nix/store/d7h29gyz2dlvvfjnsrg7gcd64fykq41k-nss- source root is nss-3.31 setting SOURCEDATEEPOCH to timestamp of file nss- patching sources configuring building Traceback (most recent call last): File "", line 91, in <modulefor line in open('', 'r'): File "/nix/store/58kwrs1w21lxxk1d2v25k7wprmlrr6jj-python3-", line 26, in decode return codecs.asciidecode(input, )[0] UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 26: ordinal not in range(128) builder for ‘/nix/store/7vhrnv1pcfxvcgizzq71nnjywvsfg8mz-nss-cacert-’ failed with exit code 1 cannot build derivation ‘/nix/store/k8zah7rqdhqwgngqfqbskp71nj1612wm-ca-’: 1 dependencies couldn't be built cannot build derivation ‘/nix/store/6wnx6hr8lvbhsxr3iwk83fdcnr7h5wzm-’: 1 dependencies couldn't be built cannot build derivation ‘/nix/store/pkiyvngldjwycdc0afr89b70hnfmz2hd-nixos-system-node1-’: 1 dependencies couldn't be built error: build of ‘/nix/store/pkiyvngldjwycdc0afr89b70hnfmz2hd-nixos-system-node1-’ failed </preSame in the unstable. <pre09pre111970. (Hummingbird) building Nix... building the system configuration... these derivations will be built: /nix/store/zimpiznkj2npmz6sj8lqgfp4g3fq3lwp-nss-cacert- /nix/store/mvqwgyqx0c42288q0h12yv4w9rdpd51a-ca- /nix/store/6jmm24896k0qjqgi4dgx05sagzm3f664- /nix/store/c3sr5l7207s53k9p8342s6229y5v4wml-nixos-system-node1- these paths will be fetched (9.08 MiB download, 52.90 MiB unpacked): /nix/store/pdx46najk62akv5bw7yidnwxmw586aql-python3-3.6.2 fetching path ‘/nix/store/pdx46najk62akv5bw7yidnwxmw586aql-python3-3.6.2’... ** Downloading ‘’ (signed by ‘’) to ‘/nix/store/pdx46najk62akv5bw7yidnwxmw586aql-python3-3.6.2’... % Total % Received % Xferd Average Speed Time Time Time Current Dload Upload Total Spent Left Speed 100 9298k 100 9298k 0 0 5433k 0 0:00:01 0:00:01 --:--:-- 5437k building path(s) ‘/nix/store/skr6nccz5lp9l4n8mljrkzy4vn977mvb-nss-cacert-3.31’ unpacking sources unpacking source archive /nix/store/d7h29gyz2dlvvfjnsrg7gcd64fykq41k-nss- source root is nss-3.31 setting SOURCEDATEEPOCH to timestamp of file nss- patching sources configuring building Traceback (most recent call last): File "", line 91, in <modulefor line in open('', 'r'): File "/nix/store/pdx46najk62akv5bw7yidnwxmw586aql-python3-", line 26, in decode return codecs.asciidecode(input, )[0] UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 26: ordinal not in range(128) builder for ‘/nix/store/zimpiznkj2npmz6sj8lqgfp4g3fq3lwp-nss-cacert-’ failed with exit code 1 cannot build derivation ‘/nix/store/mvqwgyqx0c42288q0h12yv4w9rdpd51a-ca-’: 1 dependencies couldn't be built cannot build derivation ‘/nix/store/6jmm24896k0qjqgi4dgx05sagzm3f664-’: 1 dependencies couldn't be built cannot build derivation ‘/nix/store/c3sr5l7207s53k9p8342s6229y5v4wml-nixos-system-node1-’: 1 dependencies couldn't be built error: build of ‘/nix/store/c3sr5l7207s53k9p8342s6229y5v4wml-nixos-system-node1-’ failed </pre
I have the following, hope it helps. This works with nativeBuildInputs = [python]; <pre--- 2017-08-01 23:10:00. +0300 +++ 2017-08-01 23:08:21. +0300 -88,7 +88,7 # Read blacklist. blacklist = [] if (''): for line in open('', 'r'): for line in ('', 'r', encoding='utf-8'): line = () if line.startswith('#') or len(line) == 0: continue -101,7 +101,7 if obj['CKACLASS'] != 'CKONSSTRUST': continue if obj['CKALABEL'] in blacklist: print("Certificate %s blacklisted, ignoring." % obj['CKALABEL']) print("Certificate %s blacklisted, ignoring." % unicode(obj['CKALABEL']).encode('utf-8')) elif obj['CKATRUSTSERVERAUTH'] == 'CKTNSSTRUSTEDDELEGATOR': trust[obj['CKALABEL']] = True elif obj['CKATRUSTEMAILPROTECTION'] == 'CKTNSSTRUSTED_DELEGATOR': </pre
ping
Hmm, weird, I tested it with a CA that had special characters its name. Well, probably wasn't UTF-8 encoded after all. :) I will test and apply your patch. Thanks!
Works fine! Pushed and backported to 17.03. Thanks! :beers:

Discussion:
<ins> {stdenv, fetchurl, yacc, flex, pkgconfig, glib, xz}: stdenv.mkDerivation rec { version = "0.15.2"; name = "vala-${version}"; src = fetchurl { url = "mirror://gnome/sources/vala/0.15/${name}.tar.xz"; sha256 = "0g71zq6dpqrw2f40wfzdf18fdw41ymr17laqniy2kr622hkxdi8w"; }; buildNativeInputs = [ yacc flex pkgconfig xz ]; buildInputs = [ glib ]; meta = { description = "Compiler for the GObject type system"; homepage = "http://live.gnome.org/Vala"; license = "free-copyleft"; platforms = stdenv.lib.platforms.all; maintainers = [ stdenv.lib.maintainers.antono ]; }; } </ins>

<ins> {stdenv, fetchurl, yacc, flex, pkgconfig, glib, xz}: stdenv.mkDerivation rec { version = "0.16.1"; name = "vala-${version}"; src = fetchurl { url = "mirror://gnome/sources/vala/0.16/${name}.tar.xz"; sha256 = "1n708n9ixyy9qrzyv1wf4ybvcclx43ib9ki028wwpvkz6kv8zqlb"; }; buildNativeInputs = [ yacc flex pkgconfig xz ]; buildInputs = [ glib ]; meta = { description = "Compiler for the GObject type system"; homepage = "http://live.gnome.org/Vala"; license = "free-copyleft"; platforms = stdenv.lib.platforms.all; maintainers = [ stdenv.lib.maintainers.antono ]; }; } </ins>

{stdenv, fetchurl, yacc, flex, pkgconfig, glib, xz}: stdenv.mkDerivation rec { <del> name = "vala-0.14.2"; </del> <ins> version = "0.17.2"; name = "vala-${version}"; </ins> src = fetchurl { <del> url = mirror://gnome/sources/vala/0.14/vala-0.14.2.tar.xz; sha256 = "1l5kllw9vpwv24lzv9fp64l3sad46wpxgvsgryrwlrjg91w6jzl0"; </del> <ins> url = "mirror://gnome/sources/vala/0.17/${name}.tar.xz"; sha256 = "09i2s0dwmrk147ind2dx7nq845g12fp6fsjqrphhrr0dbi0zzgh3"; </ins> }; buildNativeInputs = [ yacc flex pkgconfig xz ];

meta = { description = "Compiler for the GObject type system"; homepage = "http://live.gnome.org/Vala"; <ins> license = "free-copyleft"; platforms = stdenv.lib.platforms.all; maintainers = [ stdenv.lib.maintainers.antono ]; </ins> }; }

urweb = callPackage ../development/compilers/urweb { }; <del> vala = callPackage ../development/compilers/vala { }; </del> <ins> vala = vala17; vala15 = callPackage ../development/compilers/vala/15.2.nix { }; vala16 = callPackage ../development/compilers/vala/16.1.nix { }; vala17 = callPackage ../development/compilers/vala/default.nix { }; </ins> visualcpp = callPackage ../development/compilers/visual-c++ { };