Nixpkgs failing to install due to python3.8-pycairo-1.20.1 failing tests

How would I provide an overlay for pycairo such that it doesn’t block installation of myPackages?
Any assistance much appreciated!

I’m assuming it’s something along these lines but I can’t quite figure out the right name:

self: super: {
  python38Packages.pycairo = super.python38Packages.pycairo.overrideAttrs(oa: {
    doCheck = false;
  });
}

The full log (without the above overlay)…

ld@caql-5qtsbg2 ~ % nix-env -iA nixpkgs.myPackages --show-trace
replacing old 'my-packages'
installing 'my-packages'
these derivations will be built:
  /nix/store/2dhd39xq7fyszcs47nfkcpxnnfxps24l-node_node2nix-1.9.0.drv
  /nix/store/bv79lp6vjfgzsjvv1c0d3rkf35qw69sx-python3.8-pycairo-1.20.1.drv
  /nix/store/khmv8nicmx8fwxm4ddg3sgwv2x83bd1c-python3.8-pygobject-3.40.1.drv
  /nix/store/f41l3hr4wpx6y2111nj4148ajig3bzhx-python3.8-dbus-python-1.2.16.drv
  /nix/store/9k286wx7kfyyvj1l1q5sq0wgiz5pd514-python3.8-keyring-23.0.1.drv
  /nix/store/2vpxvbh7njjz3qx105fbr0n3z8lq1b1z-python3.8-launchpadlib-1.10.13.drv
  /nix/store/3lsxldjzb9xsvbn3rq02iahrq0jwklvj-python3.8-breezy-3.2.0.drv
  /nix/store/c0w1bp1g5v49pi0m0qklzw4nnwdirw9v-nix-prefetch-bzr.drv
  /nix/store/80688pcn65wm1z0qpyy7kxixra2zxpq7-nix-prefetch-scripts.drv
  /nix/store/v0ffz6fqgwp0m3lzkdvfaz825yi691cz-emacs-emacsql-sqlite-20190727.1710.drv
  /nix/store/88kyxj1yz03h047gkynz2y7lys4ap9bk-emacs-closql-20210530.1136.drv
  /nix/store/by3gf6ja5xnz7f0ng3n5dm0rzvfqlz6w-emacs-forge-20210525.1345.drv
  /nix/store/hrjr55qlmpdnrzzj2krmd54wfrjhfjyz-emacs-packages-deps.drv
  /nix/store/hkiics3jqn0dr0d6xs0n56f1x6s5pfg9-emacs-with-packages-27.2.drv
  /nix/store/q5n5f2bycqjbbdms3v0mxzbj64znbylx-coreutils-8.32.drv
  /nix/store/679d4n6cckfzycgpnasl460lzr3nnnvz-my-packages.drv
building '/nix/store/q5n5f2bycqjbbdms3v0mxzbj64znbylx-coreutils-8.32.drv'...
building '/nix/store/2dhd39xq7fyszcs47nfkcpxnnfxps24l-node_node2nix-1.9.0.drv'...
building '/nix/store/v0ffz6fqgwp0m3lzkdvfaz825yi691cz-emacs-emacsql-sqlite-20190727.1710.drv'...
building '/nix/store/bv79lp6vjfgzsjvv1c0d3rkf35qw69sx-python3.8-pycairo-1.20.1.drv'...
unpacking sources
...
unpacking source archive /nix/store/db6n2ij06j27m203dk9qh3y1h8jpywzw-node2nix-1.9.0.tgz
unpacking source archive /nix/store/y9hfshsqd6vqfznv7a2w28rssw6aivsj-source
Sourcing python-remove-tests-dir-hook
Sourcing python-catch-conflicts-hook.sh
Sourcing python-remove-bin-bytecode-hook.sh
Sourcing python-imports-check-hook.sh
Using pythonImportsCheckPhase
Sourcing python-namespaces-hook
Sourcing pytest-check-hook
Using pytestCheckPhase
...
unpacking source archive /nix/store/m65bbbnd9d2yhdrvxhbksxmryy85d5ik-ansi-regex-2.1.1.tgz
setting SOURCE_DATE_EPOCH to timestamp 315619200 of file source/tests/test_typing.py
patching sources
configuring
meson flags: --buildtype=plain         --libdir=/nix/store/7d0ndlq5jzqg64fdhhn882s1mg38s7my-python3.8-pycairo-1.20.1/lib --libexecdir=/nix/store/7d0ndlq5jzqg64fdhhn882s1mg38s7my-python3.8-pycairo-1.20.1/libexec         --bindir=/nix/store/7d0ndlq5jzqg64fdhhn882s1mg38s7my-python3.8-pycairo-1.20.1/bin --sbindir=/nix/store/7d0ndlq5jzqg64fdhhn882s1mg38s7my-python3.8-pycairo-1.20.1/sbin         --includedir=/nix/store/7d0ndlq5jzqg64fdhhn882s1mg38s7my-python3.8-pycairo-1.20.1/include         --mandir=/nix/store/7d0ndlq5jzqg64fdhhn882s1mg38s7my-python3.8-pycairo-1.20.1/share/man --infodir=/nix/store/7d0ndlq5jzqg64fdhhn882s1mg38s7my-python3.8-pycairo-1.20.1/share/info         --localedir=/nix/store/7d0ndlq5jzqg64fdhhn882s1mg38s7my-python3.8-pycairo-1.20.1/share/locale         -Dauto_features=enabled         -Dwrap_mode=nodownload         --prefix=/nix/store/7d0ndlq5jzqg64fdhhn882s1mg38s7my-python3.8-pycairo-1.20.1 -Dpython=/nix/store/lcm6qi612273hm48pbfma3026fdizcc0-python3-3.8.9/bin/python3.8 
unpacking source archive /nix/store/xg3r2g2h86vbg93wx5qghx5m215kjzxx-aproba-1.2.0.tgz
unpacking source archive /nix/store/zz2jj6v1j15y2w8pmm639z5rm0w7q8y9-are-we-there-yet-1.1.5.tgz
unpacking source archive /nix/store/yr3qa1vis2wfbcw8874fi8rqnhrczkc1-asn1-0.2.4.tgz
unpacking source archive /nix/store/5491y092lgpnr7w847mp4nzfvp1vpnns-assert-plus-1.0.0.tgz
unpacking source archive /nix/store/n66ky048clbx6kilz6q3wms4pgbs0a76-asynckit-0.4.0.tgz
Copying files (->) and directories (=>)
  from /private/tmp/nix-build-emacs-emacsql-sqlite-20190727.1710.drv-0/working/emacsql-sqlite/
  to /private/tmp/nix-build-emacs-emacsql-sqlite-20190727.1710.drv-0/emacsql-sqlitePx7BuG/emacsql-sqlite-20190727.1710
    emacsql-sqlite.el -> emacsql-sqlite.el
    sqlite => sqlite
unpacking source archive /nix/store/g7jrx0mfvsfb4knsrn3xdg2gy44k93cz-aws-sign2-0.7.0.tgz
source root is coreutils-8.32
unpacking source archive /nix/store/9250chipfa661c8xachrs61im4qf9ic0-aws4-1.11.0.tgz
setting SOURCE_DATE_EPOCH to timestamp 1583417031 of file coreutils-8.32/doc/coreutils.info
patching sources
applying patch /nix/store/lwmf70kpqsnnv9pssnl07dnbmsa06c3z-sys-getdents-undeclared.patch
unpacking source archive /nix/store/mwgc2dnzgxn3k69qabji5yd8vjhigzz6-balanced-match-1.0.2.tgz
patching file src/ls.c
patching file tests/ls/removed-directory.sh
clang -O2 -Wall -Wextra  -DSQLITE_THREADSAFE=0  -DSQLITE_DEFAULT_FOREIGN_KEYS=1  -DSQLITE_ENABLE_FTS5  -DSQLITE_ENABLE_FTS4  -DSQLITE_ENABLE_FTS3_PARENTHESIS  -DSQLITE_ENABLE_RTREE  -DSQLITE_ENABLE_JSON1  -DSQLITE_SOUNDEX  -o emacsql-sqlite emacsql.c sqlite3.c -ldl -lm
unpacking source archive /nix/store/49p15n3wx2lcvnyw9v4haq9hgawx4gjs-base64-js-1.5.1.tgz
configuring
...
unpacking source archive /nix/store/5qlhrr62sjj0zqj75121lzj8zhlfag8x-bcrypt-pbkdf-1.0.2.tgz
unpacking source archive /nix/store/x5jga3jrdl6cprja3w53cd3jrss6w28w-brace-expansion-1.1.11.tgz
unpacking source archive /nix/store/2ddj0jv3ylzpmz857nkgvhk38663ixmj-buffer-from-1.1.1.tgz
unpacking source archive /nix/store/wqrpa73zy3yanar702j77w2k1mx454ya-builtins-1.0.3.tgz
unpacking source archive /nix/store/7f6slvqx5ny5dmn2xrs5c8fc65ag4jhw-caseless-0.12.0.tgz
unpacking source archive /nix/store/r4dwbaxjz11nz3zb4258z1clhd147622-chownr-2.0.0.tgz
unpacking source archive /nix/store/2dkbwk84hxsqkjx0sj6sg2f828dymn7m-code-point-at-1.1.0.tgz
The Meson build system
Version: 0.57.1
Source dir: /private/tmp/nix-build-python3.8-pycairo-1.20.1.drv-0/source
Build dir: /private/tmp/nix-build-python3.8-pycairo-1.20.1.drv-0/source/build
Build type: native build
Project name: pycairo
Project version: 1.20.1
unpacking source archive /nix/store/w8z0ql2xqw7r8xy27faiyd2ly4244fv9-combined-stream-1.0.8.tgz
unpacking source archive /nix/store/v538mdl3px04xxhxjxkz2v9sq2psdna9-concat-map-0.0.1.tgz
unpacking source archive /nix/store/spfsxrv93sbd5k3blknlcsc0g2amrn3x-concat-stream-1.6.2.tgz
unpacking source archive /nix/store/kqa8y8vl12nnk2k9am601v3qxqk9drfg-config-chain-1.1.13.tgz
unpacking source archive /nix/store/0gx128x4cairqjybad8mzv351yi6zl83-console-control-strings-1.1.0.tgz
sqlite3.c:108894:7: warning: unused parameter 'argc' [-Wunused-parameter]
  int argc,
      ^
unpacking source archive /nix/store/1im5r97nmkjzvy0d9yavg8pqjmva0a4k-core-util-is-1.0.2.tgz
unpacking source archive /nix/store/1a1y5cdhkbk798cmrc7yxxr8zsrhs1wf-dashdash-1.14.1.tgz
checking for a BSD-compatible install... /nix/store/dz54dmgmg3gcmdp655balnn926vznqgz-coreutils-8.32/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /nix/store/dz54dmgmg3gcmdp655balnn926vznqgz-coreutils-8.32/bin/mkdir -p
checking for gawk... gawk
unpacking source archive /nix/store/0a6gsm39162g8gjfbcsswvl76cn7yhaa-delayed-stream-1.0.0.tgz
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking whether make supports nested variables... (cached) yes
unpacking source archive /nix/store/6305p3iwqwzc32wsi0g3xk6x1ki6w89f-delegates-1.0.0.tgz
checking whether make supports the include directive... yes (GNU style)
checking for gcc... clang
unpacking source archive /nix/store/d8f5j3k561b59l9qpqm4dmcmza05sif2-ecc-jsbn-0.1.2.tgz
unpacking source archive /nix/store/kjacn03x2c1hvcds5szzbjcqzyq8x95g-extend-3.0.2.tgz
C compiler for the host machine: clang (clang 7.1.0 "clang version 7.1.0 (tags/RELEASE_710/final)")
C linker for the host machine: clang ld64 530
unpacking source archive /nix/store/wnk95xfhag0wa1gl05qdcsc7hpay4f6f-extsprintf-1.3.0.tgz
unpacking source archive /nix/store/cjk54qlda58jydinf8aldn3f2a0y6bda-fast-deep-equal-3.1.3.tgz
unpacking source archive /nix/store/jgidxwahv01x3xzjgdzbv98nfmp4nj3w-fast-json-stable-stringify-2.1.0.tgz
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
unpacking source archive /nix/store/4vj4ca47n0gf5a5k55vq6f0nfhi19ncg-findit-2.0.0.tgz
checking for suffix of executables... 
unpacking source archive /nix/store/s7fadip23nzkh8zfj1pi21pmrahdda3n-foreachasync-3.0.0.tgz
Host machine cpu family: x86_64
Host machine cpu: x86_64
unpacking source archive /nix/store/nkkq9vs0ghzk9jlcs5k2nac7pbx4nz8j-forever-agent-0.6.1.tgz
Program python3 found: YES (/nix/store/lcm6qi612273hm48pbfma3026fdizcc0-python3-3.8.9/bin/python3.8)
unpacking source archive /nix/store/sfq4rallkn18jnll6vb9fm98psa3g7sb-form-data-2.3.3.tgz
unpacking source archive /nix/store/hkz5m68bv9nias0inz99ybv748lnl4h3-fs-extra-0.6.4.tgz
unpacking source archive /nix/store/sl0q5bahrf3y10x3x6hfqjr1a4vdkbqs-mkdirp-0.3.5.tgz
unpacking source archive /nix/store/1q37mwiyb95n977pymf7dbs5dj24mifp-rimraf-2.2.8.tgz
checking whether we are cross compiling... no
unpacking source archive /nix/store/cy79c1nicgy5nyipsiv7x97khldgcrha-fs-minipass-2.1.0.tgz
checking for suffix of object files... o
Compiler for C supports arguments -Wall: YES 
unpacking source archive /nix/store/46g1zp66cgyvpks3ipmll5ll3v0liv8b-fs.extra-1.3.2.tgz
checking whether we are using the GNU C compiler... yes
Compiler for C supports arguments -Warray-bounds: YES 
unpacking source archive /nix/store/sl0q5bahrf3y10x3x6hfqjr1a4vdkbqs-mkdirp-0.3.5.tgz
checking whether clang accepts -g... yes
Compiler for C supports arguments -Wcast-align: YES 
unpacking source archive /nix/store/ba8x7lli4r1aby1925daq01i9i9s8b32-fs.realpath-1.0.0.tgz
Compiler for C supports arguments -Wconversion: YES 
unpacking source archive /nix/store/9gxaxxjpyzsgjhqmzd2l1gilf6bya3z6-function-bind-1.1.1.tgz
Compiler for C supports arguments -Wextra: YES 
checking for clang option to enable C11 features... none needed
Compiler for C supports arguments -Wformat=2: YES 
unpacking source archive /nix/store/lxppif8nxpwwgkpb0zz747k4vpfxy4fn-gauge-2.7.4.tgz
checking whether the compiler is clang... yes
Compiler for C supports arguments -Wformat-nonliteral: YES 
unpacking source archive /nix/store/spzkhhyhpr583qy4w7gy8sjpfffpvklc-getpass-0.1.7.tgz
checking for compiler option needed when checking for declarations... -Werror=implicit-function-declaration
checking dependency style of clang... none
Compiler for C supports arguments -Wformat-security: YES 
unpacking source archive /nix/store/ydxp748jsy8a10f6b1mfjdbn2nw7ys2z-glob-7.1.7.tgz
Compiler for C supports arguments -Wimplicit-function-declaration: YES 
unpacking source archive /nix/store/ql97d8l4066x5pciaw45h77clfq00lcv-graceful-fs-4.2.6.tgz
checking how to run the C preprocessor... clang -E
Compiler for C supports arguments -Winit-self: YES 
unpacking source archive /nix/store/kjqkhwv9w3262i8idr3pns97pw5mjnay-har-schema-2.0.0.tgz
Compiler for C supports arguments -Winline: YES 
unpacking source archive /nix/store/h50r6svbpad6pyckkvhsknifswr0wvsq-har-validator-5.1.5.tgz
Compiler for C supports arguments -Wmissing-format-attribute: YES 
checking for grep that handles long lines and -e... /nix/store/ba3bf20z5rmd9vgyzsgamvwvb3i1idfn-gnugrep-3.6/bin/grep
checking for egrep... /nix/store/ba3bf20z5rmd9vgyzsgamvwvb3i1idfn-gnugrep-3.6/bin/grep -E
Compiler for C supports arguments -Wmissing-noreturn: YES 
unpacking source archive /nix/store/5mjkbd03nrb2qnf6jd7drhids88wl3ci-has-1.0.3.tgz
Compiler for C supports arguments -Wnested-externs: YES 
unpacking source archive /nix/store/avk9dk25vygk0v8jmkhans8dc9svagc9-has-unicode-2.0.1.tgz
checking whether clang needs -traditional... no
checking for ranlib... ranlib
checking whether ln -s works... yes
Compiler for C supports arguments -Wold-style-definition: YES 
unpacking source archive /nix/store/6vd2sbbhifvsl3idiks4nl0abq5j68jc-hosted-git-info-2.8.9.tgz
Compiler for C supports arguments -Wpacked: YES 
unpacking source archive /nix/store/g6sysxxy5gzl5z3l35g1747mn21b1lvp-http-signature-1.2.0.tgz
Compiler for C supports arguments -Wpointer-arith: YES 
unpacking source archive /nix/store/m5b3lxagv9x67kwz3mp0bfjpxi27ww57-inflight-1.0.6.tgz
Compiler for C supports arguments -Wreturn-type: YES 
unpacking source archive /nix/store/azvzr4mg5gc3av5b7jr3wzs20ldjrkxz-inherits-2.0.4.tgz
Compiler for C supports arguments -Wshadow: YES 
unpacking source archive /nix/store/2v0x126ysis5fgq1m9z34n6mfvxkn3vy-ini-1.3.8.tgz
Compiler for C supports arguments -Wsign-compare: YES 
unpacking source archive /nix/store/q1kb85y1qavqsrd989s827693hwlia1d-is-core-module-2.4.0.tgz
Compiler for C supports arguments -Wstrict-aliasing: YES 
Compiler for C supports arguments -Wundef: YES 
unpacking source archive /nix/store/9p2wzfiin11k8shmhyqmzab3cy3w9qkl-is-fullwidth-code-point-1.0.0.tgz
Compiler for C supports arguments -Wunused-but-set-variable: NO 
unpacking source archive /nix/store/2q3bvx58jcpr1ksmmf1wj88wla39wa48-is-typedarray-1.0.0.tgz
Compiler for C supports arguments -Wswitch-default: YES 
unpacking source archive /nix/store/mxcs504nxhjx3hyjb63z0cfswh85r5k9-isarray-1.0.0.tgz
Compiler for C supports arguments -Wno-missing-field-initializers: YES 
unpacking source archive /nix/store/adl3mb4i8415wpf7fzhgkiswi84hf92k-isstream-0.1.2.tgz
Compiler for C supports arguments -Wno-unused-parameter: YES 
unpacking source archive /nix/store/djk0njynha44jbg9wy4jk5lkjj61g3gb-jsbn-0.1.1.tgz
Compiler for C supports arguments -fno-strict-aliasing: YES 
checking for ANSI C header files... yes
unpacking source archive /nix/store/4pa80kjjkwd41ya0j20r2hhdm9zchmx2-json-schema-0.2.3.tgz
Compiler for C supports arguments -fvisibility=hidden: YES 
Configuring pycairo-1.20.1.egg-info using configuration
Found pkg-config: /nix/store/azb40fb4ib9kj7g5i8vb9wr2wci7cgl7-pkg-config-wrapper-0.29.2/bin/pkg-config (0.29.2)
checking for sys/types.h... yes
Dependency python found: YES (pkgconfig)
unpacking source archive /nix/store/qygc146r018a0dg6pq3y854fq75p7czq-json-schema-traverse-0.4.1.tgz
checking for sys/stat.h... yes
unpacking source archive /nix/store/zmlhkym8qc63w98csia5mfp1nyirqgy0-json-stringify-safe-5.0.1.tgz
unpacking source archive /nix/store/4mdccygdmi1jp8pn3lfpk5kv7zxqzw4c-jsonfile-1.0.1.tgz
checking for stdlib.h... yes
unpacking source archive /nix/store/jrvhviygv1is89b7icqpsbbdf906acp3-jsprim-1.4.1.tgz
unpacking source archive /nix/store/fn9vj7k5mkmj1mp9z1r3ghgsyi84ajd2-lru-cache-6.0.0.tgz
checking for string.h... yes
unpacking source archive /nix/store/6897al3h8wpbfl5zra41krlk291zdv81-mime-db-1.48.0.tgz
checking for memory.h... yes
unpacking source archive /nix/store/axgqpn6ya3nwxy5ayjkk0v64kpn6dmcp-mime-types-2.1.31.tgz
unpacking source archive /nix/store/9xm69v2r4kddrkdv7q8if4c4jyhpra0w-minimatch-3.0.4.tgz
Run-time dependency cairo found: YES 1.16.0
checking for strings.h... yes
Build targets in project: 2

unpacking source archive /nix/store/a7q03i4w91sq8jrlbq7c7jcr36mxk5y6-minimist-1.2.5.tgz
Option buildtype is: plain [default: debugoptimized]
Found ninja-1.10.2 at /nix/store/fz01nfk8ai1cscy4blbb6mjj6bmv9wis-ninja-1.10.2/bin/ninja
checking for inttypes.h... yes
unpacking source archive /nix/store/k86y5i6r378dm9gfx5scj3vhpygcamia-minipass-3.1.3.tgz
meson: enabled parallel building
building
build flags: -j1 -l1
unpacking source archive /nix/store/an2zb9533x860cwcxlv8j3fblxxzpybv-minizlib-2.1.2.tgz
checking for stdint.h... yes
unpacking source archive /nix/store/gn2lywnsvwk4yhganypsdrlk6ix47qf6-mkdirp-0.5.5.tgz
unpacking source archive /nix/store/bmy4id0mkmni28md72yd5qkxpnq92cq7-ncp-0.4.2.tgz
checking for unistd.h... yes
unpacking source archive /nix/store/w960ris8yd02g0lalv12g95dr5sms0rv-nijs-0.0.25.tgz
checking minix/config.h usability... no
checking minix/config.h presence... no
checking for minix/config.h... no
unpacking source archive /nix/store/jwh2c9akzjflqsp001q812fhwvwhnkk9-nopt-3.0.6.tgz
checking whether it is safe to define __EXTENSIONS__... yes
unpacking source archive /nix/store/73x10m7z7lqya10paf3c3lvgvsph13mr-normalize-package-data-2.5.0.tgz
checking whether _XOPEN_SOURCE should be defined... no
unpacking source archive /nix/store/gll14kwxsz9ggfhngafafh64rv4a02fr-semver-5.7.1.tgz
checking for Minix Amsterdam compiler... no
checking for ar... ar
unpacking source archive /nix/store/2xl4104ag3nq32n19r0876d19bfsiczk-npm-package-arg-6.1.1.tgz
unpacking source archive /nix/store/gll14kwxsz9ggfhngafafh64rv4a02fr-semver-5.7.1.tgz
checking build system type... x86_64-apple-darwin19.6.0
checking host system type... x86_64-apple-darwin19.6.0
unpacking source archive /nix/store/bb994bg0l6a5pyw1hkhjppwj9vnsj0g5-npm-registry-client-8.6.0.tgz
unpacking source archive /nix/store/gll14kwxsz9ggfhngafafh64rv4a02fr-semver-5.7.1.tgz
unpacking source archive /nix/store/3yhw8yf2bycpr917fbhd07wf9r4jm444-npmconf-2.1.3.tgz
checking for _LARGEFILE_SOURCE value needed for large files... no
checking for special C compiler options needed for large files... no
unpacking source archive /nix/store/6z5xz7n0kdvz31hrm7xpdy1pkl1mk0xh-once-1.3.3.tgz
checking for _FILE_OFFSET_BITS value needed for large files... no
configure: autobuild project... GNU coreutils
configure: autobuild revision... 8.32
./configure: line 7930: hostname: command not found
configure: autobuild timestamp... 20210701T040846Z
unpacking source archive /nix/store/6qf9hzq73am92851wkinnzsi6ri7zya4-semver-4.3.6.tgz
unpacking source archive /nix/store/w7cmdggngxvpnnkmchhkrja345p0895a-npmlog-4.1.2.tgz
checking for fchmod... yes
unpacking source archive /nix/store/83zwk28al8ww5ghcq8dzx5b2gbb1h2y8-number-is-nan-1.0.1.tgz
unpacking source archive /nix/store/q5sa43383532yxjf24jshvp92nxlcgyl-oauth-sign-0.9.0.tgz
checking for pathconf... yes
unpacking source archive /nix/store/qz6hsjrr7x7c531a4s4kv95zs3g3wpjk-object-assign-4.1.1.tgz
unpacking source archive /nix/store/99vx2fb0np7kj6kk2srccv8lh5fgqsx6-once-1.4.0.tgz
unpacking source archive /nix/store/dm588wlp9xfnv0sv7q7ma7iia118d8v4-optparse-1.0.5.tgz
checking for btowc... yes
unpacking source archive /nix/store/f1fn2m42ggp614ancs42s9x7llsxvfw5-os-homedir-1.0.2.tgz
unpacking source archive /nix/store/sxmx46fkdhxh55h3ga1w5sv2pdq5jyz1-os-tmpdir-1.0.2.tgz
checking for uselocale... yes
unpacking source archive /nix/store/5di597pxka3kh3zaf60ajys8vk56id71-osenv-0.1.5.tgz
unpacking source archive /nix/store/c9w6bjbsqfvchm7l6xbs30lhak7pp1jh-path-is-absolute-1.0.1.tgz
unpacking source archive /nix/store/6g5nyrn5b42i9dpq1f5d60s1rci1mc56-path-parse-1.0.7.tgz
checking for canonicalize_file_name... no
unpacking source archive /nix/store/9x49bgly8qi39gvm56lf9ngisjpvzl2l-performance-now-2.1.0.tgz
unpacking source archive /nix/store/cqb735d0x1imja100fk540rjdks3gva1-process-nextick-args-2.0.1.tgz
checking for realpath... yes
unpacking source archive /nix/store/4n5f4zanc62ihn4n8m3lrgcl5knxhpy5-proto-list-1.2.4.tgz
unpacking source archive /nix/store/4l10a4w9q33jmn2wghyqch6mwwjdrm95-psl-1.8.0.tgz
checking for readlinkat... yes
unpacking source archive /nix/store/z2miz6wmxdh97qw3z88d352rg11lzgf7-punycode-2.1.1.tgz
unpacking source archive /nix/store/qwhb24khl7r5qd21qc0wgcvmd0k2b27k-qs-6.5.2.tgz
checking for chown... yes
unpacking source archive /nix/store/5par4h9y4c0ck9irv8hh3196m8w1n3nj-readable-stream-2.3.7.tgz
unpacking source archive /nix/store/aazscwmbmx7n91nx2rr118iq4a0a6h9v-safe-buffer-5.1.2.tgz
checking for fchown... yes
unpacking source archive /nix/store/il3zzc4hx3yrhbfc8sp7gl9xi9crglyl-request-2.88.2.tgz
unpacking source archive /nix/store/db8jad8zpz5f7l7a220hqzpdkmfb8i0k-resolve-1.20.0.tgz
checking for _set_invalid_parameter_handler... no
checking for fchdir... yes
unpacking source archive /nix/store/98677jh3bybjnbaphipkyl2rpc81yccp-retry-0.10.1.tgz
unpacking source archive /nix/store/x1shp9gk8rnp0iqrj6irzz2j0wnm1p08-rimraf-2.6.3.tgz
checking for fdopendir... yes
unpacking source archive /nix/store/9cnrb44a4pgbfjpnc9v1045972vnndmw-safe-buffer-5.2.1.tgz
unpacking source archive /nix/store/p2a55pi17q2i9dnwlcbfc9mk0iwmw9dl-safer-buffer-2.1.2.tgz
checking for faccessat... yes
unpacking source archive /nix/store/0myh8vmpaqlrsihjv0aaxc5svsiffa9m-semver-7.3.5.tgz
unpacking source archive /nix/store/sjqck3fv26i35yv035iq3yjcfhd3lwyk-set-blocking-2.0.0.tgz
checking for explicit_bzero... no
unpacking source archive /nix/store/8dmpyww617dbribl9514fb4bkr0mvr3h-signal-exit-3.0.3.tgz
unpacking source archive /nix/store/8vza0acqccc31dmsm8aqqa94z45ywyp8-slasp-0.0.4.tgz
checking for posix_fadvise... no
unpacking source archive /nix/store/kq6a19rnry3pr9rxwig99478w95dliqw-slide-1.1.6.tgz
checking for fchmodat... yes
unpacking source archive /nix/store/cnkin3w45976wprwxajq5fcj8584sgh1-spdx-correct-3.1.1.tgz
unpacking source archive /nix/store/0qcxaz1ic0bmzgxizrqja6i31lndls21-spdx-exceptions-2.3.0.tgz
checking for lchmod... yes
unpacking source archive /nix/store/pjx8888cd9cp2vzli93zd3d0zikfn7c8-spdx-expression-parse-3.0.1.tgz
unpacking source archive /nix/store/v05kwypmwy6s0bhcnbn5ghch7w4fxzd7-spdx-license-ids-3.0.9.tgz
checking for fcntl... yes
unpacking source archive /nix/store/38s551sc6kx6j616fi1nnj228hq3i3b2-sshpk-1.16.1.tgz
unpacking source archive /nix/store/29wwyi3kqbfqlqi8lhnslzd94viv78bp-ssri-5.3.0.tgz
checking for symlink... yes
unpacking source archive /nix/store/1jck18q560xam2sjpk4z8c55myci7ah0-string-width-1.0.2.tgz
unpacking source archive /nix/store/hkdfsf6gmzslax6v0izh15aw9s6kw2zm-string_decoder-1.1.1.tgz
unpacking source archive /nix/store/aazscwmbmx7n91nx2rr118iq4a0a6h9v-safe-buffer-5.1.2.tgz
checking for mempcpy... no
unpacking source archive /nix/store/37b62b693d5d0ds793hz13hnh051rbhv-strip-ansi-3.0.1.tgz
unpacking source archive /nix/store/3gcz8pfj0b9hys1ji7i8f3qmghjisrc7-tar-6.1.0.tgz
checking for fnmatch... yes
unpacking source archive /nix/store/ixdkf8jy5n5c5ccpqrmd3iwjslid3asm-mkdirp-1.0.4.tgz
unpacking source archive /nix/store/m5y6mj4d2nplp53np4bgq19960a50zz5-temp-0.9.4.tgz
checking for isblank... yes
unpacking source archive /nix/store/cird676vgzsbbgnfskd0larg5x88ybga-tough-cookie-2.5.0.tgz
[21/21] Linking target tests/cmod.cpython-38-darwin.soo.p/cmodule_cmodulelib.c.o
glibPreInstallPhase
installing
install flags: install
unpacking source archive /nix/store/s1dyvar6kxm4gdkn6wm4lv8y5vha4yyq-tunnel-agent-0.6.0.tgz
[0/1] Installing files.
unpacking source archive /nix/store/s3g883kwf6q8f9rm3c7dd0sqs0ldcbg6-tweetnacl-0.14.5.tgz
checking for iswctype... yes
unpacking source archive /nix/store/pjma93pkqdyjybpgmmyhyz0glpx5sw8y-typedarray-0.0.6.tgz
unpacking source archive /nix/store/fkvrdb9p2ja0l6dpag6pfcj6f2f3nz6r-uid-number-0.0.5.tgz
checking for mbsrtowcs... yes
unpacking source archive /nix/store/j0x8f0sm1k9danimblbxwscffkg75z04-uri-js-4.4.1.tgz
unpacking source archive /nix/store/35w0c1f0rw19x6p1b4b9lvbc3x23w8cs-util-deprecate-1.0.2.tgz
checking for wmemchr... yes
unpacking source archive /nix/store/55pgalf5ns389wb9nzy70swrhwrg3w2s-uuid-3.4.0.tgz
unpacking source archive /nix/store/r61i5zm99a0z4y5n2lm5fpjklpyby676-validate-npm-package-license-3.0.4.tgz
unpacking source archive /nix/store/4i46j42nx3qcp9picmiym2nrr6brj3jg-validate-npm-package-name-3.0.0.tgz
checking for wmemcpy... yes
unpacking source archive /nix/store/x7jm3cmy61528gb9m92cpmdwk3s8zag6-verror-1.10.0.tgz
unpacking source archive /nix/store/3s8sa8ryq6lbvw44xp344dyl5zm60iqr-walk-2.3.14.tgz
checking for wmempcpy... no
Installing cairo/_cairo.cpython-38-darwin.so to /nix/store/7d0ndlq5jzqg64fdhhn882s1mg38s7my-python3.8-pycairo-1.20.1/lib/python3.8/site-packages/cairo
Installing /private/tmp/nix-build-python3.8-pycairo-1.20.1.drv-0/source/build/cairo/py3cairo.h to /nix/store/7d0ndlq5jzqg64fdhhn882s1mg38s7my-python3.8-pycairo-1.20.1/lib/python3.8/site-packages/cairo/include
Installing /private/tmp/nix-build-python3.8-pycairo-1.20.1.drv-0/source/build/cairo/py3cairo.h to /nix/store/7d0ndlq5jzqg64fdhhn882s1mg38s7my-python3.8-pycairo-1.20.1/include/pycairo
Installing /private/tmp/nix-build-python3.8-pycairo-1.20.1.drv-0/source/build/pycairo-1.20.1.egg-info to /nix/store/7d0ndlq5jzqg64fdhhn882s1mg38s7my-python3.8-pycairo-1.20.1/lib/python3.8/site-packages
Installing /private/tmp/nix-build-python3.8-pycairo-1.20.1.drv-0/source/cairo/__init__.py to /nix/store/7d0ndlq5jzqg64fdhhn882s1mg38s7my-python3.8-pycairo-1.20.1/lib/python3.8/site-packages/cairo
Installing /private/tmp/nix-build-python3.8-pycairo-1.20.1.drv-0/source/cairo/__init__.pyi to /nix/store/7d0ndlq5jzqg64fdhhn882s1mg38s7my-python3.8-pycairo-1.20.1/lib/python3.8/site-packages/cairo
Installing /private/tmp/nix-build-python3.8-pycairo-1.20.1.drv-0/source/cairo/py.typed to /nix/store/7d0ndlq5jzqg64fdhhn882s1mg38s7my-python3.8-pycairo-1.20.1/lib/python3.8/site-packages/cairo
Installing /private/tmp/nix-build-python3.8-pycairo-1.20.1.drv-0/source/build/meson-private/py3cairo.pc to /nix/store/7d0ndlq5jzqg64fdhhn882s1mg38s7my-python3.8-pycairo-1.20.1/lib/pkgconfig
unpacking source archive /nix/store/4aqg86gbd2zwrhpm4gvik9ab7w33pnc6-wide-align-1.1.3.tgz
glibPreFixupPhase
post-installation fixup
strip is /nix/store/bk80xfmnyv85jv4cvz81kgd77h7vljnl-cctools-binutils-darwin-949.0.1/bin/strip
stripping (with command strip and flags -S) in /nix/store/7d0ndlq5jzqg64fdhhn882s1mg38s7my-python3.8-pycairo-1.20.1/lib 
unpacking source archive /nix/store/wa4iwdsy5dsa4fpgkmfb3wbkln886im5-wrappy-1.0.2.tgz
patching script interpreter paths in /nix/store/7d0ndlq5jzqg64fdhhn882s1mg38s7my-python3.8-pycairo-1.20.1
Executing pythonRemoveTestsDir
checking for fpurge... yes
Finished executing pythonRemoveTestsDir
running install tests
no Makefile or custom installCheckPhase, doing nothing
pythonCatchConflictsPhase
unpacking source archive /nix/store/4aznbgn0ysywd3yxbhnan1x9mzn4lvq0-yallist-4.0.0.tgz
pinpointing versions of dependencies...
checking for __fpurge... no
checking for __freadahead... no
checking for __freading... no
checking for __freadptr... no
pythonRemoveBinBytecodePhase
pythonImportsCheckPhase
Executing pythonImportsCheckPhase
pytestCheckPhase
Executing pytestCheckPhase
checking for __freadptrinc... no
checking for __fseterr... no
checking for fstatat... yes
checking for fsync... yes
checking for strtof... yes
============================= test session starts ==============================
platform darwin -- Python 3.8.9, pytest-6.2.4, py-1.10.0, pluggy-0.13.1
rootdir: /private/tmp/nix-build-python3.8-pycairo-1.20.1.drv-0/source
checking for ftruncate... yes
checking for openat... yes
checking for fstatfs... yes
checking for futimens... no
checking for getdelim... yes
checking for getdtablesize... yes
checking for microuptime... no
checking for nanouptime... no
collected 262 items / 3 skipped / 259 selected                                 

tests/test_api.py .................                                      [  6%]
tests/test_cmod.py .                                                     [  6%]
tests/test_context.py .................................................. [ 25%]
.................                                                        [ 32%]
tests/test_device.py ...........                                         [ 36%]
checking for getlogin... yes
tests/test_enums.py .......                                              [ 39%]
tests/test_error.py ....                                                 [ 40%]
tests/test_font.py ..............................                        [ 52%]
tests/test_glyph.py ..                                                   [ 53%]
tests/test_matrix.py ...........                                         [ 57%]
tests/test_path.py ....                                                  [ 58%]
tests/test_pattern.py ..............................                     [ 70%]
tests/test_rectangle.py ...                                              [ 71%]
tests/test_region.py ...........                                         [ 75%]
checking for flockfile... yes
tests/test_surface.py .....s............................................ [ 94%]
..........                                                               [ 98%]
tests/test_textcluster.py .                                              [ 98%]
tests/test_textextents.py ..                                             [ 99%]
checking for funlockfile... yes
tests/test_typing.py F                                                   [100%]

=================================== FAILURES ===================================
_________________________________ test_typing __________________________________

    def test_typing():
        mod = types.ModuleType("cairo")
        stub = os.path.join(cairo.__path__[0], "__init__.pyi")
        with io.open(stub, "r", encoding="utf-8") as h:
            code = compile(h.read(), stub, "exec")
            exec(code, mod.__dict__)
    
        def collect_names(t):
            names = set()
            for key, value in vars(t).items():
                if key in ["XlibSurface", "XCBSurface", "Win32PrintingSurface",
                           "Win32Surface"]:
                    continue
                if key.startswith("_"):
                    continue
                if key.startswith("__") and key.endswith("__"):
                    continue
                if getattr(value, "__module__", "") == "typing" or key == "Text":
                    continue
                if isinstance(value, type):
                    names.add(key)
    
                    for k, v in vars(value).items():
                        name = key + "." + k
                        if k.startswith("_"):
                            continue
                        names.add(name)
                else:
                    names.add(key)
            return names
    
        # We expose all potential API in the typing stubs, so only check
        # if it exactly matches the Python module with a new enough cairo
        cairo_version = tuple(map(int, cairo.cairo_version_string().split(".")))
        if cairo_version >= (1, 16, 0):
>           assert collect_names(cairo) == collect_names(mod)
E           AssertionError: assert {'ANTIALIAS_B...AS_NONE', ...} == {'ANTIALIAS_B...AS_NONE', ...}
E             Extra items in the right set:
E             'TeeSurface'
E             'TeeSurface.remove'
E             'TeeSurface.index'
E             'TeeSurface.add'
E             Use -v to get the full diff

tests/test_typing.py:43: AssertionError
=========================== short test summary info ============================
FAILED tests/test_typing.py::test_typing - AssertionError: assert {'ANTIALIAS...
=================== 1 failed, 260 passed, 4 skipped in 1.82s ===================
builder for '/nix/store/bv79lp6vjfgzsjvv1c0d3rkf35qw69sx-python3.8-pycairo-1.20.1.drv' failed with exit code 1
cannot build derivation '/nix/store/khmv8nicmx8fwxm4ddg3sgwv2x83bd1c-python3.8-pygobject-3.40.1.drv': 1 dependencies couldn't be built
cannot build derivation '/nix/store/f41l3hr4wpx6y2111nj4148ajig3bzhx-python3.8-dbus-python-1.2.16.drv': 1 dependencies couldn't be built
cannot build derivation '/nix/store/9k286wx7kfyyvj1l1q5sq0wgiz5pd514-python3.8-keyring-23.0.1.drv': 1 dependencies couldn't be built
cannot build derivation '/nix/store/2vpxvbh7njjz3qx105fbr0n3z8lq1b1z-python3.8-launchpadlib-1.10.13.drv': 1 dependencies couldn't be built
cannot build derivation '/nix/store/3lsxldjzb9xsvbn3rq02iahrq0jwklvj-python3.8-breezy-3.2.0.drv': 1 dependencies couldn't be built
cannot build derivation '/nix/store/c0w1bp1g5v49pi0m0qklzw4nnwdirw9v-nix-prefetch-bzr.drv': 1 dependencies couldn't be built
cannot build derivation '/nix/store/80688pcn65wm1z0qpyy7kxixra2zxpq7-nix-prefetch-scripts.drv': 1 dependencies couldn't be built
cannot build derivation '/nix/store/679d4n6cckfzycgpnasl460lzr3nnnvz-my-packages.drv': 1 dependencies couldn't be built
error: build of '/nix/store/679d4n6cckfzycgpnasl460lzr3nnnvz-my-packages.drv' failed
ld@caql-5qtsbg2 ~ % 

Should work if you update your channel

[22:44:05] jon@nixos ~/projects/nixpkgs (nixpkgs-unstable)
$ nix-build -A python3Packages.pycairo
/nix/store/rvgffp4nb467k3baimxa41wszspjkbw5-python3.8-pycairo-1.20.1
[22:44:53] jon@nixos ~/projects/nixpkgs (nixos-21.05)
$ nix-build -A python3Packages.pycairo
/nix/store/pj6i6d20zpcmakcjcsxsl1qwigjd3m1k-python3.8-pycairo-1.20.0

Hi @jonringer . I had updated actually, but trying again…

% nix-channel --update && nix-env -iA nixpkgs.nix nixpkgs.cacert;
unpacking channels...
created 1 symlinks in user environment
replacing old 'nix-2.3.12'
replacing old 'nss-cacert-3.66'
installing 'nix-2.3.12'
installing 'nss-cacert-3.66'
building '/nix/store/5f46p6fzvyk5rfqk8dbgn9ddg72aywpc-user-environment.drv'...
created 1051 symlinks in user environment

Then trying custom buildEnvs again:

% nix-env -iA nixpkgs.myNix
replacing old 'my-nix'
installing 'my-nix'
building '/nix/store/0irjbc5dsyj476ynwa062qlbb37bw73m-user-environment.drv'...
created 1051 symlinks in user environment

% nix-env -iA nixpkgs.myPackages
...
        # We expose all potential API in the typing stubs, so only check
        # if it exactly matches the Python module with a new enough cairo
        cairo_version = tuple(map(int, cairo.cairo_version_string().split(".")))
        if cairo_version >= (1, 16, 0):
>           assert collect_names(cairo) == collect_names(mod)
E           AssertionError: assert {'ANTIALIAS_B...AS_NONE', ...} == {'ANTIALIAS_B...AS_NONE', ...}
E             Extra items in the right set:
E             'TeeSurface'
E             'TeeSurface.remove'
E             'TeeSurface.index'
E             'TeeSurface.add'
E             Use -v to get the full diff

tests/test_typing.py:43: AssertionError
=========================== short test summary info ============================
FAILED tests/test_typing.py::test_typing - AssertionError: assert {'ANTIALIAS...
=================== 1 failed, 260 passed, 4 skipped in 1.92s ===================
checking for __fsetlocking... no
builder for '/nix/store/bv79lp6vjfgzsjvv1c0d3rkf35qw69sx-python3.8-pycairo-1.20.1.drv' failed with exit code 1
cannot build derivation '/nix/store/khmv8nicmx8fwxm4ddg3sgwv2x83bd1c-python3.8-pygobject-3.40.1.drv': 1 dependencies couldn't be built
cannot build derivation '/nix/store/f41l3hr4wpx6y2111nj4148ajig3bzhx-python3.8-dbus-python-1.2.16.drv': 1 dependencies couldn't be built
cannot build derivation '/nix/store/9k286wx7kfyyvj1l1q5sq0wgiz5pd514-python3.8-keyring-23.0.1.drv': 1 dependencies couldn't be built
cannot build derivation '/nix/store/2vpxvbh7njjz3qx105fbr0n3z8lq1b1z-python3.8-launchpadlib-1.10.13.drv': 1 dependencies couldn't be built
cannot build derivation '/nix/store/3lsxldjzb9xsvbn3rq02iahrq0jwklvj-python3.8-breezy-3.2.0.drv': 1 dependencies couldn't be built
cannot build derivation '/nix/store/c0w1bp1g5v49pi0m0qklzw4nnwdirw9v-nix-prefetch-bzr.drv': 1 dependencies couldn't be built
cannot build derivation '/nix/store/80688pcn65wm1z0qpyy7kxixra2zxpq7-nix-prefetch-scripts.drv': 1 dependencies couldn't be built
cannot build derivation '/nix/store/679d4n6cckfzycgpnasl460lzr3nnnvz-my-packages.drv': 1 dependencies couldn't be built
error: build of '/nix/store/679d4n6cckfzycgpnasl460lzr3nnnvz-my-packages.drv' failed
ld

What am I missing?

Btw @jonringer

nix-shell -p nix-info --run "nix-info -m"
these paths will be fetched (0.01 MiB download, 0.03 MiB unpacked):
  /nix/store/xycwyp06s3hjafaiplh1f87jsn36mwps-nix-info
  /nix/store/yca7h9lyacs16sk44jsw987jhrdqsdmr-DarwinTools-1
copying path '/nix/store/yca7h9lyacs16sk44jsw987jhrdqsdmr-DarwinTools-1' from 'https://cache.nixos.org'...
copying path '/nix/store/xycwyp06s3hjafaiplh1f87jsn36mwps-nix-info' from 'https://cache.nixos.org'...
 - system: `"x86_64-darwin"`
 - host os: `Darwin 19.6.0, macOS 10.15.7`
 - multi-user?: `no`
 - sandbox: `no`
 - version: `nix-env (Nix) 2.3.12`
 - channels(ld): `"nixpkgs-21.11pre299378.db6e089456c"`
 - nixpkgs: `/Users/ld/.nix-defexpr/channels/nixpkgs`

Ah, yes, this failure.

I remember seeing this exact output. And I believe there is a fix for this here: https://github.com/NixOS/nixpkgs/commit/6102c4a326636fe653aad42b9e5cc79db826afa4

Unfortunately it will be a little while for the fix to come (it’s in staging-next)

2 Likes

If you’re impatient, you can create an overlay adding the --enable-tee configure flag to pycairo.

Thanks @jonringer .

For others coming here:

self: super: {
  cairo = super.cairo.overrideAttrs(oa: rec {
    configureFlags = [
      "--enable-tee"
    ] ++ oa.configureFlags;
  });
}
1 Like

FYI, that fix is in NixPkgs master now.

2 Likes