Nix 2.0.4 build issue with custom store

I’m trying to build a package with setting a custom store. This is nix 18.03 stable packages channel

TMPDIR=$PWD/tmp
NIX_STORE_DIR=/opt/rhodecode/store
NIX_STATE_DIR=/opt/rhodecode/var/nix
NIX_DB_DIR=/opt/rhodecode/var/nix/db nix-build build.nix

Then i’m getting an odd failure in the tests of nix-2.0.4. Is this a bug ? Or we’re doing something wrong here.

building '/opt/rhodecode/store/4ypna246mnlcz0drljyf84465fil19v1-nix-2.0.4.drv'...
unpacking sources
unpacking source archive /opt/rhodecode/store/5kmjkhyslfbqx2j1l4drdmh39pwdam1k-nix-2.0.4.tar.xz
source root is nix-2.0.4
setting SOURCE_DATE_EPOCH to timestamp 1527696660 of file nix-2.0.4/src/libexpr/parser-tab.hh
patching sources
configuring
configure flags: --prefix=/opt/rhodecode/store/lz2sg8m2rk16dqpim90dxhsn6ayr88ba-nix-2.0.4 --bindir=/opt/rhodecode/store/lz2sg8m2rk16dqpim90dxhsn6ayr88ba-nix-2.0.4/bin --sbindir=/opt/rhodecode/store/lz2sg8m2rk16dqpim90dxhsn6ayr88ba-nix-2.0.4/sbin --includedir=/opt/rhodecode/store/p7r17pzh5a9xql6dia100shxp116iw7p-nix-2.0.4-dev/include --oldincludedir=/opt/rhodecode/store/p7r17pzh5a9xql6dia100shxp116iw7p-nix-2.0.4-dev/include --mandir=/opt/rhodecode/store/gc17y5blf097bjmr9byfqfxlqwqmdz8j-nix-2.0.4-man/share/man --infodir=/opt/rhodecode/store/lz2sg8m2rk16dqpim90dxhsn6ayr88ba-nix-2.0.4/share/info --docdir=/opt/rhodecode/store/019spr7vj34l3wpqj9zskchzf35sxcxp-nix-2.0.4-doc/share/doc/nix --libdir=/opt/rhodecode/store/lz2sg8m2rk16dqpim90dxhsn6ayr88ba-nix-2.0.4/lib --libexecdir=/opt/rhodecode/store/lz2sg8m2rk16dqpim90dxhsn6ayr88ba-nix-2.0.4/libexec --localedir=/opt/rhodecode/store/lz2sg8m2rk16dqpim90dxhsn6ayr88ba-nix-2.0.4/share/locale --with-store-dir=/nix/store --localstatedir=/nix/var --sysconfdir=/etc --disable-init-state --enable-gc --with-sandbox-shell=/opt/rhodecode/store/s2zzp0sqig29f03kfar1h0xs8pmw7jg1-busybox-1.28.1/bin/busybox
checking for a sed that does not truncate output... /opt/rhodecode/store/16n9xk9scqxg8iclq4wg1hnarz3kkw9h-gnused-4.4/bin/sed
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking for the canonical Nix system name... x86_64-linux
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking for dirent.h that defines DIR... yes
checking for library containing opendir... none required
checking for struct dirent.d_type... yes
checking for gcc... (cached) gcc
checking whether we are using the GNU C compiler... (cached) yes
checking whether gcc accepts -g... (cached) yes
checking for gcc option to accept ISO C89... (cached) none needed
checking whether we are using the GNU C++ compiler... yes
checking whether g++ accepts -g... yes
checking how to run the C preprocessor... gcc -E
checking whether g++ supports C++11 features by default... yes
checking for special C compiler options needed for large files... no
checking for _FILE_OFFSET_BITS value needed for large files... no
checking for pubsetbuf... yes
checking for statvfs... yes
checking for pipe2... yes
checking for lutimes... yes
checking whether it is possible to create a link to a symlink... yes
checking how to run the C++ preprocessor... g++ -E
checking for grep that handles long lines and -e... /opt/rhodecode/store/fm97a53v0pxsrj2q8b5xj6x4vz6frqvn-gnugrep-3.1/bin/grep
checking for egrep... /opt/rhodecode/store/fm97a53v0pxsrj2q8b5xj6x4vz6frqvn-gnugrep-3.1/bin/grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking locale usability... yes
checking locale presence... yes
checking for locale... yes
checking for bash... /opt/rhodecode/store/arwnrdxkhff4hzkpygd58shxy15zgm7j-bash-4.4-p12/bin/bash
checking for patch... /opt/rhodecode/store/6gvgpfw88c2l05sv67s52fm8kk3ml3az-patch-2.7.6/bin/patch
checking for xmllint... false
checking for xsltproc... false
checking for flex... false
checking for bison... false
checking for sed... /opt/rhodecode/store/16n9xk9scqxg8iclq4wg1hnarz3kkw9h-gnused-4.4/bin/sed
checking for tar... /opt/rhodecode/store/ji0fckhca7sph16pxdw76vwjhlzy48mx-gnutar-1.30/bin/tar
checking for bzip2... /opt/rhodecode/store/j8iv1a1463w1s5nhdhmb8sf80vkic5rb-bzip2-1.0.6.0.1-bin/bin/bzip2
checking for gzip... /opt/rhodecode/store/74jh9s5wxp54xkcjf0xxwsjqamik1jdy-gzip-1.9/bin/gzip
checking for xz... /opt/rhodecode/store/0q2rppbbf8l75vi7bcxhipkc7zj4ka81-xz-5.2.3-bin/bin/xz
checking for dot... no
checking for pv... pv
checking for brotli... /opt/rhodecode/store/3pgm0x222i4wggrgl2jid05igarjas22-brotli-1.0.3/bin/brotli
checking for lsof... lsof
checking for cat... /opt/rhodecode/store/5f09pv1i4nn9afhwrzpf2p7156vbl19y-coreutils-8.29/bin/cat
checking for tr... /opt/rhodecode/store/5f09pv1i4nn9afhwrzpf2p7156vbl19y-coreutils-8.29/bin/tr
checking for pkg-config... /opt/rhodecode/store/ahym6x0w5dchlym4v772zclwcmrajpw9-pkg-config-0.29.2/bin/pkg-config
checking pkg-config is at least version 0.9.0... yes
checking for libcrypto... yes
checking for BZ2_bzWriteOpen in -lbz2... yes
checking bzlib.h usability... yes
checking bzlib.h presence... yes
checking for bzlib.h... yes
checking for sqlite3 >= 3.6.19... yes
checking for libcurl... yes
checking for libsodium... yes
checking for liblzma... yes
checking for lzma_stream_encoder_mt in -llzma... yes
checking for libbrotlienc libbrotlidec... yes
checking for libseccomp... yes
checking aws/s3/S3Client.h usability... yes
checking aws/s3/S3Client.h presence... yes
checking for aws/s3/S3Client.h... yes
checking for bdw-gc... yes
checking for setresuid... yes
checking for setreuid... yes
checking for lchown... yes
checking for strsignal... yes
checking for posix_fallocate... yes
checking for sysconf... yes
checking if you have a recent GNU tar... yes
configure: creating ./config.status
config.status: creating config.h
building
build flags: -j8 -l8 SHELL=/opt/rhodecode/store/arwnrdxkhff4hzkpygd58shxy15zgm7j-bash-4.4-p12/bin/bash profiledir=\$\(out\)/etc/profile.d
  GEN    Makefile.config
  CXX    src/linenoise/linenoise.o
 ... CUT ...
  LD     src/nix-instantiate/nix-instantiate
  LD     src/nix-env/nix-env
  LD     src/nix-prefetch-url/nix-prefetch-url
  LD     src/nix-build/nix-build
installing
install flags: install SHELL=/opt/rhodecode/store/arwnrdxkhff4hzkpygd58shxy15zgm7j-bash-4.4-p12/bin/bash profiledir=\$\(out\)/etc/profile.d pkgconfigdir=/opt/rhodecode/store/p7r17pzh5a9xql6dia100shxp116iw7p-nix-2.0.4-dev/lib/pkgconfig m4datadir=/opt/rhodecode/store/p7r17pzh5a9xql6dia100shxp116iw7p-nix-2.0.4-dev/share/aclocal aclocaldir=/opt/rhodecode/store/p7r17pzh5a9xql6dia100shxp116iw7p-nix-2.0.4-dev/share/aclocal sysconfdir=\$\(out\)/etc
  MKDIR  /opt/rhodecode/store/p7r17pzh5a9xql6dia100shxp116iw7p-nix-2.0.4-dev/include/nix/
... CUT ...
  MKDIR  /opt/rhodecode/store/p7r17pzh5a9xql6dia100shxp116iw7p-nix-2.0.4-dev/include/nix/boost/
  INST   /opt/rhodecode/store/p7r17pzh5a9xql6dia100shxp116iw7p-nix-2.0.4-dev/include/nix/boost/assert.hpp
  INST   /opt/rhodecode/store/p7r17pzh5a9xql6dia100shxp116iw7p-nix-2.0.4-dev/include/nix/boost/format.hpp
  INST   /opt/rhodecode/store/p7r17pzh5a9xql6dia100shxp116iw7p-nix-2.0.4-dev/include/nix/boost/throw_exception.hpp
  MKDIR  /opt/rhodecode/store/p7r17pzh5a9xql6dia100shxp116iw7p-nix-2.0.4-dev/include/nix/boost/format/
  INST   /opt/rhodecode/store/p7r17pzh5a9xql6dia100shxp116iw7p-nix-2.0.4-dev/include/nix/boost/format/internals.hpp
  INST   /opt/rhodecode/store/p7r17pzh5a9xql6dia100shxp116iw7p-nix-2.0.4-dev/include/nix/boost/format/feed_args.hpp
  INST   /opt/rhodecode/store/p7r17pzh5a9xql6dia100shxp116iw7p-nix-2.0.4-dev/include/nix/boost/format/format_class.hpp
  INST   /opt/rhodecode/store/p7r17pzh5a9xql6dia100shxp116iw7p-nix-2.0.4-dev/include/nix/boost/format/exceptions.hpp
  INST   /opt/rhodecode/store/p7r17pzh5a9xql6dia100shxp116iw7p-nix-2.0.4-dev/include/nix/boost/format/group.hpp
  INST   /opt/rhodecode/store/p7r17pzh5a9xql6dia100shxp116iw7p-nix-2.0.4-dev/include/nix/boost/format/internals_fwd.hpp
  INST   /opt/rhodecode/store/p7r17pzh5a9xql6dia100shxp116iw7p-nix-2.0.4-dev/include/nix/boost/format/format_fwd.hpp
  INST   /opt/rhodecode/store/p7r17pzh5a9xql6dia100shxp116iw7p-nix-2.0.4-dev/include/nix/boost/format/macros_default.hpp
  MKDIR  /opt/rhodecode/store/lz2sg8m2rk16dqpim90dxhsn6ayr88ba-nix-2.0.4/share/nix/sandbox/
  INST   /opt/rhodecode/store/lz2sg8m2rk16dqpim90dxhsn6ayr88ba-nix-2.0.4/share/nix/sandbox/sandbox-defaults.sb
  INST   /opt/rhodecode/store/lz2sg8m2rk16dqpim90dxhsn6ayr88ba-nix-2.0.4/share/nix/sandbox/sandbox-minimal.sb
  INST   /opt/rhodecode/store/lz2sg8m2rk16dqpim90dxhsn6ayr88ba-nix-2.0.4/share/nix/sandbox/sandbox-network.sb
  GEN    src/libstore/nix-store.pc
  MKDIR  /opt/rhodecode/store/lz2sg8m2rk16dqpim90dxhsn6ayr88ba-nix-2.0.4/lib/pkgconfig/
  INST   /opt/rhodecode/store/lz2sg8m2rk16dqpim90dxhsn6ayr88ba-nix-2.0.4/lib/pkgconfig/nix-store.pc
  GEN    src/libmain/nix-main.pc
  INST   /opt/rhodecode/store/lz2sg8m2rk16dqpim90dxhsn6ayr88ba-nix-2.0.4/lib/pkgconfig/nix-main.pc
  GEN    src/libexpr/nix-expr.pc
  INST   /opt/rhodecode/store/lz2sg8m2rk16dqpim90dxhsn6ayr88ba-nix-2.0.4/lib/pkgconfig/nix-expr.pc
  MKDIR  /opt/rhodecode/store/lz2sg8m2rk16dqpim90dxhsn6ayr88ba-nix-2.0.4/bin/
  INST   /opt/rhodecode/store/lz2sg8m2rk16dqpim90dxhsn6ayr88ba-nix-2.0.4/bin/nix-hash
  INST   /opt/rhodecode/store/lz2sg8m2rk16dqpim90dxhsn6ayr88ba-nix-2.0.4/bin/nix-shell
  MKDIR  /opt/rhodecode/store/lz2sg8m2rk16dqpim90dxhsn6ayr88ba-nix-2.0.4/etc/profile.d/
  INST   /opt/rhodecode/store/lz2sg8m2rk16dqpim90dxhsn6ayr88ba-nix-2.0.4/etc/profile.d/nix.sh
  GEN    scripts/nix-profile-daemon.sh
  INST   /opt/rhodecode/store/lz2sg8m2rk16dqpim90dxhsn6ayr88ba-nix-2.0.4/etc/profile.d/nix-daemon.sh
  GEN    corepkgs/config.nix
  MKDIR  /opt/rhodecode/store/lz2sg8m2rk16dqpim90dxhsn6ayr88ba-nix-2.0.4/share/nix/corepkgs/
  INST   /opt/rhodecode/store/lz2sg8m2rk16dqpim90dxhsn6ayr88ba-nix-2.0.4/share/nix/corepkgs/config.nix
  INST   /opt/rhodecode/store/lz2sg8m2rk16dqpim90dxhsn6ayr88ba-nix-2.0.4/share/nix/corepkgs/buildenv.nix
  INST   /opt/rhodecode/store/lz2sg8m2rk16dqpim90dxhsn6ayr88ba-nix-2.0.4/share/nix/corepkgs/unpack-channel.nix
  INST   /opt/rhodecode/store/lz2sg8m2rk16dqpim90dxhsn6ayr88ba-nix-2.0.4/share/nix/corepkgs/derivation.nix
  INST   /opt/rhodecode/store/lz2sg8m2rk16dqpim90dxhsn6ayr88ba-nix-2.0.4/share/nix/corepkgs/fetchurl.nix
  INST   /opt/rhodecode/store/lz2sg8m2rk16dqpim90dxhsn6ayr88ba-nix-2.0.4/share/nix/corepkgs/imported-drv-to-derivation.nix
  GEN    misc/systemd/nix-daemon.socket
  MKDIR  /opt/rhodecode/store/lz2sg8m2rk16dqpim90dxhsn6ayr88ba-nix-2.0.4/lib/systemd/system/
  INST   /opt/rhodecode/store/lz2sg8m2rk16dqpim90dxhsn6ayr88ba-nix-2.0.4/lib/systemd/system/nix-daemon.socket
  GEN    misc/systemd/nix-daemon.service
  INST   /opt/rhodecode/store/lz2sg8m2rk16dqpim90dxhsn6ayr88ba-nix-2.0.4/lib/systemd/system/nix-daemon.service
  GEN    misc/upstart/nix-daemon.conf
  MKDIR  /opt/rhodecode/store/lz2sg8m2rk16dqpim90dxhsn6ayr88ba-nix-2.0.4/etc/init/
  INST   /opt/rhodecode/store/lz2sg8m2rk16dqpim90dxhsn6ayr88ba-nix-2.0.4/etc/init/nix-daemon.conf
  MKDIR  /opt/rhodecode/store/019spr7vj34l3wpqj9zskchzf35sxcxp-nix-2.0.4-doc/share/doc/nix/manual/
  INST   /opt/rhodecode/store/019spr7vj34l3wpqj9zskchzf35sxcxp-nix-2.0.4-doc/share/doc/nix/manual/manual.html
  INST   /opt/rhodecode/store/019spr7vj34l3wpqj9zskchzf35sxcxp-nix-2.0.4-doc/share/doc/nix/manual/style.css
  MKDIR  /opt/rhodecode/store/019spr7vj34l3wpqj9zskchzf35sxcxp-nix-2.0.4-doc/share/doc/nix/manual/figures/
  INST   /opt/rhodecode/store/019spr7vj34l3wpqj9zskchzf35sxcxp-nix-2.0.4-doc/share/doc/nix/manual/figures/user-environments.png
  MKDIR  /opt/rhodecode/store/019spr7vj34l3wpqj9zskchzf35sxcxp-nix-2.0.4-doc/share/doc/nix/manual/images/callouts/
  INST   /opt/rhodecode/store/019spr7vj34l3wpqj9zskchzf35sxcxp-nix-2.0.4-doc/share/doc/nix/manual/images/callouts/7.gif
  INST   /opt/rhodecode/store/019spr7vj34l3wpqj9zskchzf35sxcxp-nix-2.0.4-doc/share/doc/nix/manual/images/callouts/6.gif
  INST   /opt/rhodecode/store/019spr7vj34l3wpqj9zskchzf35sxcxp-nix-2.0.4-doc/share/doc/nix/manual/images/callouts/12.gif
  INST   /opt/rhodecode/store/019spr7vj34l3wpqj9zskchzf35sxcxp-nix-2.0.4-doc/share/doc/nix/manual/images/callouts/1.gif
  INST   /opt/rhodecode/store/019spr7vj34l3wpqj9zskchzf35sxcxp-nix-2.0.4-doc/share/doc/nix/manual/images/callouts/10.gif
  INST   /opt/rhodecode/store/019spr7vj34l3wpqj9zskchzf35sxcxp-nix-2.0.4-doc/share/doc/nix/manual/images/callouts/15.gif
  INST   /opt/rhodecode/store/019spr7vj34l3wpqj9zskchzf35sxcxp-nix-2.0.4-doc/share/doc/nix/manual/images/callouts/9.gif
  INST   /opt/rhodecode/store/019spr7vj34l3wpqj9zskchzf35sxcxp-nix-2.0.4-doc/share/doc/nix/manual/images/callouts/14.gif
  INST   /opt/rhodecode/store/019spr7vj34l3wpqj9zskchzf35sxcxp-nix-2.0.4-doc/share/doc/nix/manual/images/callouts/5.gif
  INST   /opt/rhodecode/store/019spr7vj34l3wpqj9zskchzf35sxcxp-nix-2.0.4-doc/share/doc/nix/manual/images/callouts/13.gif
  INST   /opt/rhodecode/store/019spr7vj34l3wpqj9zskchzf35sxcxp-nix-2.0.4-doc/share/doc/nix/manual/images/callouts/3.gif
  INST   /opt/rhodecode/store/019spr7vj34l3wpqj9zskchzf35sxcxp-nix-2.0.4-doc/share/doc/nix/manual/images/callouts/4.gif
  INST   /opt/rhodecode/store/019spr7vj34l3wpqj9zskchzf35sxcxp-nix-2.0.4-doc/share/doc/nix/manual/images/callouts/2.gif
  INST   /opt/rhodecode/store/019spr7vj34l3wpqj9zskchzf35sxcxp-nix-2.0.4-doc/share/doc/nix/manual/images/callouts/11.gif
  INST   /opt/rhodecode/store/019spr7vj34l3wpqj9zskchzf35sxcxp-nix-2.0.4-doc/share/doc/nix/manual/images/callouts/8.gif
  INST   /opt/rhodecode/store/019spr7vj34l3wpqj9zskchzf35sxcxp-nix-2.0.4-doc/share/doc/nix/manual/index.html
  LD     /opt/rhodecode/store/lz2sg8m2rk16dqpim90dxhsn6ayr88ba-nix-2.0.4/lib/libnixformat.so
  LD     /opt/rhodecode/store/lz2sg8m2rk16dqpim90dxhsn6ayr88ba-nix-2.0.4/lib/libnixutil.so
  LD     /opt/rhodecode/store/lz2sg8m2rk16dqpim90dxhsn6ayr88ba-nix-2.0.4/lib/libnixstore.so
  LD     /opt/rhodecode/store/lz2sg8m2rk16dqpim90dxhsn6ayr88ba-nix-2.0.4/lib/libnixexpr.so
  LD     /opt/rhodecode/store/lz2sg8m2rk16dqpim90dxhsn6ayr88ba-nix-2.0.4/lib/libnixmain.so
  LD     /opt/rhodecode/store/lz2sg8m2rk16dqpim90dxhsn6ayr88ba-nix-2.0.4/bin/nix
  LD     /opt/rhodecode/store/lz2sg8m2rk16dqpim90dxhsn6ayr88ba-nix-2.0.4/bin/nix-store
  LD     /opt/rhodecode/store/lz2sg8m2rk16dqpim90dxhsn6ayr88ba-nix-2.0.4/bin/nix-instantiate
  LD     /opt/rhodecode/store/lz2sg8m2rk16dqpim90dxhsn6ayr88ba-nix-2.0.4/bin/nix-env
  LD     /opt/rhodecode/store/lz2sg8m2rk16dqpim90dxhsn6ayr88ba-nix-2.0.4/bin/nix-daemon
  LD     /opt/rhodecode/store/lz2sg8m2rk16dqpim90dxhsn6ayr88ba-nix-2.0.4/bin/nix-collect-garbage
  LD     /opt/rhodecode/store/lz2sg8m2rk16dqpim90dxhsn6ayr88ba-nix-2.0.4/bin/nix-copy-closure
  LD     /opt/rhodecode/store/lz2sg8m2rk16dqpim90dxhsn6ayr88ba-nix-2.0.4/bin/nix-prefetch-url
  MKDIR  /opt/rhodecode/store/lz2sg8m2rk16dqpim90dxhsn6ayr88ba-nix-2.0.4/libexec/nix/
  LD     /opt/rhodecode/store/lz2sg8m2rk16dqpim90dxhsn6ayr88ba-nix-2.0.4/libexec/nix/buildenv
  LD     /opt/rhodecode/store/lz2sg8m2rk16dqpim90dxhsn6ayr88ba-nix-2.0.4/bin/nix-channel
  LD     /opt/rhodecode/store/lz2sg8m2rk16dqpim90dxhsn6ayr88ba-nix-2.0.4/bin/nix-build
  LD     /opt/rhodecode/store/lz2sg8m2rk16dqpim90dxhsn6ayr88ba-nix-2.0.4/libexec/nix/build-remote
  MKDIR  /opt/rhodecode/store/gc17y5blf097bjmr9byfqfxlqwqmdz8j-nix-2.0.4-man/share/man/man1/
  INST   /opt/rhodecode/store/gc17y5blf097bjmr9byfqfxlqwqmdz8j-nix-2.0.4-man/share/man/man1/nix-env.1
  INST   /opt/rhodecode/store/gc17y5blf097bjmr9byfqfxlqwqmdz8j-nix-2.0.4-man/share/man/man1/nix-build.1
  INST   /opt/rhodecode/store/gc17y5blf097bjmr9byfqfxlqwqmdz8j-nix-2.0.4-man/share/man/man1/nix-shell.1
  INST   /opt/rhodecode/store/gc17y5blf097bjmr9byfqfxlqwqmdz8j-nix-2.0.4-man/share/man/man1/nix-store.1
  INST   /opt/rhodecode/store/gc17y5blf097bjmr9byfqfxlqwqmdz8j-nix-2.0.4-man/share/man/man1/nix-instantiate.1
  INST   /opt/rhodecode/store/gc17y5blf097bjmr9byfqfxlqwqmdz8j-nix-2.0.4-man/share/man/man1/nix-collect-garbage.1
  INST   /opt/rhodecode/store/gc17y5blf097bjmr9byfqfxlqwqmdz8j-nix-2.0.4-man/share/man/man1/nix-prefetch-url.1
  INST   /opt/rhodecode/store/gc17y5blf097bjmr9byfqfxlqwqmdz8j-nix-2.0.4-man/share/man/man1/nix-channel.1
  INST   /opt/rhodecode/store/gc17y5blf097bjmr9byfqfxlqwqmdz8j-nix-2.0.4-man/share/man/man1/nix-hash.1
  INST   /opt/rhodecode/store/gc17y5blf097bjmr9byfqfxlqwqmdz8j-nix-2.0.4-man/share/man/man1/nix-copy-closure.1
  MKDIR  /opt/rhodecode/store/gc17y5blf097bjmr9byfqfxlqwqmdz8j-nix-2.0.4-man/share/man/man5/
  INST   /opt/rhodecode/store/gc17y5blf097bjmr9byfqfxlqwqmdz8j-nix-2.0.4-man/share/man/man5/nix.conf.5
  MKDIR  /opt/rhodecode/store/gc17y5blf097bjmr9byfqfxlqwqmdz8j-nix-2.0.4-man/share/man/man8/
  INST   /opt/rhodecode/store/gc17y5blf097bjmr9byfqfxlqwqmdz8j-nix-2.0.4-man/share/man/man8/nix-daemon.8
post-installation fixup
Moving /opt/rhodecode/store/lz2sg8m2rk16dqpim90dxhsn6ayr88ba-nix-2.0.4/lib/pkgconfig to /opt/rhodecode/store/p7r17pzh5a9xql6dia100shxp116iw7p-nix-2.0.4-dev/lib/pkgconfig
rmdir: failed to remove '/opt/rhodecode/store/lz2sg8m2rk16dqpim90dxhsn6ayr88ba-nix-2.0.4/lib': Directory not empty
Patching '/opt/rhodecode/store/p7r17pzh5a9xql6dia100shxp116iw7p-nix-2.0.4-dev/lib/pkgconfig/nix-expr.pc' includedir to output /opt/rhodecode/store/p7r17pzh5a9xql6dia100shxp116iw7p-nix-2.0.4-dev
Patching '/opt/rhodecode/store/p7r17pzh5a9xql6dia100shxp116iw7p-nix-2.0.4-dev/lib/pkgconfig/nix-main.pc' includedir to output /opt/rhodecode/store/p7r17pzh5a9xql6dia100shxp116iw7p-nix-2.0.4-dev
Patching '/opt/rhodecode/store/p7r17pzh5a9xql6dia100shxp116iw7p-nix-2.0.4-dev/lib/pkgconfig/nix-store.pc' includedir to output /opt/rhodecode/store/p7r17pzh5a9xql6dia100shxp116iw7p-nix-2.0.4-dev
separating debug info from /opt/rhodecode/store/lz2sg8m2rk16dqpim90dxhsn6ayr88ba-nix-2.0.4/lib/libnixutil.so (build ID c09f5e0d4acdd19c07fad5fbc55c652ba56b8e6c)
separating debug info from /opt/rhodecode/store/lz2sg8m2rk16dqpim90dxhsn6ayr88ba-nix-2.0.4/lib/libnixstore.so (build ID 001e000889f7ce13dc4e4418dc296483d3c0364e)
separating debug info from /opt/rhodecode/store/lz2sg8m2rk16dqpim90dxhsn6ayr88ba-nix-2.0.4/lib/libnixexpr.so (build ID 10751eefe9b550d3c652700a416a43e8f2bbb691)
separating debug info from /opt/rhodecode/store/lz2sg8m2rk16dqpim90dxhsn6ayr88ba-nix-2.0.4/lib/libnixmain.so (build ID 470e02044926ceb7e626dafe7f4cbf8f16fd7456)
separating debug info from /opt/rhodecode/store/lz2sg8m2rk16dqpim90dxhsn6ayr88ba-nix-2.0.4/lib/libnixformat.so (build ID 54eb1241cc3f9b31cdd8388857ec85261cdf57fb)
separating debug info from /opt/rhodecode/store/lz2sg8m2rk16dqpim90dxhsn6ayr88ba-nix-2.0.4/bin/nix-store (build ID 2d33716739410ea187470bcc7f4670d6a2d7323a)
separating debug info from /opt/rhodecode/store/lz2sg8m2rk16dqpim90dxhsn6ayr88ba-nix-2.0.4/bin/nix-env (build ID 24f891e69baf1c64faea6541f142599bd425bc21)
separating debug info from /opt/rhodecode/store/lz2sg8m2rk16dqpim90dxhsn6ayr88ba-nix-2.0.4/bin/nix-copy-closure (build ID 8d36b6026a21c789fc3735a831e91bcd6ed2d83e)
separating debug info from /opt/rhodecode/store/lz2sg8m2rk16dqpim90dxhsn6ayr88ba-nix-2.0.4/bin/nix-channel (build ID 4c274eafc5a728bcc1c1f4a872e3e13443f13830)
separating debug info from /opt/rhodecode/store/lz2sg8m2rk16dqpim90dxhsn6ayr88ba-nix-2.0.4/bin/nix-instantiate (build ID 17b2ac6cf4a09a5704b82e07770e9aa3c5e17d69)
separating debug info from /opt/rhodecode/store/lz2sg8m2rk16dqpim90dxhsn6ayr88ba-nix-2.0.4/bin/nix-daemon (build ID 6eed200f577044d06291c17c2996090e68327463)
separating debug info from /opt/rhodecode/store/lz2sg8m2rk16dqpim90dxhsn6ayr88ba-nix-2.0.4/bin/nix-build (build ID 108003140dbed466f9870e8190663b9c8e62a140)
separating debug info from /opt/rhodecode/store/lz2sg8m2rk16dqpim90dxhsn6ayr88ba-nix-2.0.4/bin/nix-prefetch-url (build ID d90dbb7bbc58fa87ae2d6f08b96bea69ead9080b)
separating debug info from /opt/rhodecode/store/lz2sg8m2rk16dqpim90dxhsn6ayr88ba-nix-2.0.4/bin/nix (build ID bebc2c87eec648a61e645289178c0eab33ded6d6)
separating debug info from /opt/rhodecode/store/lz2sg8m2rk16dqpim90dxhsn6ayr88ba-nix-2.0.4/bin/nix-collect-garbage (build ID 60aaf6295148142344a5deeffeb885c2bb2a6e05)
separating debug info from /opt/rhodecode/store/lz2sg8m2rk16dqpim90dxhsn6ayr88ba-nix-2.0.4/libexec/nix/buildenv (build ID 003b228145cce62377f558a22170d3fec12d7e77)
separating debug info from /opt/rhodecode/store/lz2sg8m2rk16dqpim90dxhsn6ayr88ba-nix-2.0.4/libexec/nix/build-remote (build ID 56b7586408942c510ff39d9ebbda0b221d728825)
shrinking RPATHs of ELF executables and libraries in /opt/rhodecode/store/lz2sg8m2rk16dqpim90dxhsn6ayr88ba-nix-2.0.4
shrinking /opt/rhodecode/store/lz2sg8m2rk16dqpim90dxhsn6ayr88ba-nix-2.0.4/lib/libnixutil.so
shrinking /opt/rhodecode/store/lz2sg8m2rk16dqpim90dxhsn6ayr88ba-nix-2.0.4/lib/libnixstore.so
shrinking /opt/rhodecode/store/lz2sg8m2rk16dqpim90dxhsn6ayr88ba-nix-2.0.4/lib/libnixexpr.so
shrinking /opt/rhodecode/store/lz2sg8m2rk16dqpim90dxhsn6ayr88ba-nix-2.0.4/lib/libnixmain.so
shrinking /opt/rhodecode/store/lz2sg8m2rk16dqpim90dxhsn6ayr88ba-nix-2.0.4/lib/libnixformat.so
shrinking /opt/rhodecode/store/lz2sg8m2rk16dqpim90dxhsn6ayr88ba-nix-2.0.4/bin/nix-store
shrinking /opt/rhodecode/store/lz2sg8m2rk16dqpim90dxhsn6ayr88ba-nix-2.0.4/bin/nix-env
shrinking /opt/rhodecode/store/lz2sg8m2rk16dqpim90dxhsn6ayr88ba-nix-2.0.4/bin/nix-copy-closure
shrinking /opt/rhodecode/store/lz2sg8m2rk16dqpim90dxhsn6ayr88ba-nix-2.0.4/bin/nix-channel
shrinking /opt/rhodecode/store/lz2sg8m2rk16dqpim90dxhsn6ayr88ba-nix-2.0.4/bin/nix-instantiate
shrinking /opt/rhodecode/store/lz2sg8m2rk16dqpim90dxhsn6ayr88ba-nix-2.0.4/bin/nix-daemon
shrinking /opt/rhodecode/store/lz2sg8m2rk16dqpim90dxhsn6ayr88ba-nix-2.0.4/bin/nix-build
shrinking /opt/rhodecode/store/lz2sg8m2rk16dqpim90dxhsn6ayr88ba-nix-2.0.4/bin/nix-prefetch-url
shrinking /opt/rhodecode/store/lz2sg8m2rk16dqpim90dxhsn6ayr88ba-nix-2.0.4/bin/nix
shrinking /opt/rhodecode/store/lz2sg8m2rk16dqpim90dxhsn6ayr88ba-nix-2.0.4/bin/nix-collect-garbage
shrinking /opt/rhodecode/store/lz2sg8m2rk16dqpim90dxhsn6ayr88ba-nix-2.0.4/libexec/nix/buildenv
shrinking /opt/rhodecode/store/lz2sg8m2rk16dqpim90dxhsn6ayr88ba-nix-2.0.4/libexec/nix/build-remote
patching script interpreter paths in /opt/rhodecode/store/lz2sg8m2rk16dqpim90dxhsn6ayr88ba-nix-2.0.4
checking for references to /home/jenkins/rcpkgs-internal/tmp/nix-build-nix-2.0.4.drv-0 in /opt/rhodecode/store/lz2sg8m2rk16dqpim90dxhsn6ayr88ba-nix-2.0.4...
shrinking RPATHs of ELF executables and libraries in /opt/rhodecode/store/p7r17pzh5a9xql6dia100shxp116iw7p-nix-2.0.4-dev
patching script interpreter paths in /opt/rhodecode/store/p7r17pzh5a9xql6dia100shxp116iw7p-nix-2.0.4-dev
checking for references to /home/jenkins/rcpkgs-internal/tmp/nix-build-nix-2.0.4.drv-0 in /opt/rhodecode/store/p7r17pzh5a9xql6dia100shxp116iw7p-nix-2.0.4-dev...
shrinking RPATHs of ELF executables and libraries in /opt/rhodecode/store/gc17y5blf097bjmr9byfqfxlqwqmdz8j-nix-2.0.4-man
gzipping man pages under /opt/rhodecode/store/gc17y5blf097bjmr9byfqfxlqwqmdz8j-nix-2.0.4-man/share/man/
patching script interpreter paths in /opt/rhodecode/store/gc17y5blf097bjmr9byfqfxlqwqmdz8j-nix-2.0.4-man
checking for references to /home/jenkins/rcpkgs-internal/tmp/nix-build-nix-2.0.4.drv-0 in /opt/rhodecode/store/gc17y5blf097bjmr9byfqfxlqwqmdz8j-nix-2.0.4-man...
shrinking RPATHs of ELF executables and libraries in /opt/rhodecode/store/019spr7vj34l3wpqj9zskchzf35sxcxp-nix-2.0.4-doc
patching script interpreter paths in /opt/rhodecode/store/019spr7vj34l3wpqj9zskchzf35sxcxp-nix-2.0.4-doc
checking for references to /home/jenkins/rcpkgs-internal/tmp/nix-build-nix-2.0.4.drv-0 in /opt/rhodecode/store/019spr7vj34l3wpqj9zskchzf35sxcxp-nix-2.0.4-doc...
shrinking RPATHs of ELF executables and libraries in /opt/rhodecode/store/m99hy2sjw19wxn5yihznzcab3ybyjnbk-nix-2.0.4-debug
patching script interpreter paths in /opt/rhodecode/store/m99hy2sjw19wxn5yihznzcab3ybyjnbk-nix-2.0.4-debug
checking for references to /home/jenkins/rcpkgs-internal/tmp/nix-build-nix-2.0.4.drv-0 in /opt/rhodecode/store/m99hy2sjw19wxn5yihznzcab3ybyjnbk-nix-2.0.4-debug...
running install tests
installcheck flags: -j8 -l8 SHELL=/opt/rhodecode/store/arwnrdxkhff4hzkpygd58shxy15zgm7j-bash-4.4-p12/bin/bash profiledir=\$\(out\)/etc/profile.d installcheck
  GEN    tests/common.sh
  CXX    tests/plugins/plugintest.o
  LD     tests/plugins/libplugintest.so
running test tests/init.sh... [PASS]
running test tests/hash.sh... [PASS]
running test tests/lang.sh... [PASS]
running test tests/add.sh... [PASS]
running test tests/simple.sh... [PASS]
running test tests/dependencies.sh... [PASS]
running test tests/gc.sh... [PASS]
running test tests/gc-concurrent.sh... [PASS]
running test tests/referrers.sh... [PASS]
running test tests/user-envs.sh... [PASS]
running test tests/logging.sh... [PASS]
running test tests/nix-build.sh... [PASS]
running test tests/misc.sh... [PASS]
running test tests/fixed.sh... [PASS]
running test tests/gc-runtime.sh... [PASS]
running test tests/check-refs.sh... [PASS]
running test tests/filter-source.sh... [PASS]
running test tests/remote-store.sh... [PASS]
running test tests/export.sh... [PASS]
running test tests/export-graph.sh... [PASS]
running test tests/timeout.sh... [PASS]
running test tests/secure-drv-outputs.sh... [PASS]
running test tests/nix-channel.sh... [PASS]
running test tests/multiple-outputs.sh... [PASS]
running test tests/import-derivation.sh... [PASS]
running test tests/fetchurl.sh... [PASS]
running test tests/optimise-store.sh... [PASS]
running test tests/binary-cache.sh... [PASS]
running test tests/nix-profile.sh... [PASS]
running test tests/repair.sh... [PASS]
running test tests/dump-db.sh... [PASS]
running test tests/case-hack.sh... [PASS]
running test tests/check-reqs.sh... [PASS]
running test tests/pass-as-file.sh... [PASS]
running test tests/tarball.sh... [PASS]
running test tests/restricted.sh... [PASS]
running test tests/placeholders.sh... [PASS]
running test tests/nix-shell.sh... [PASS]
running test tests/linux-sandbox.sh... [PASS]
running test tests/build-dry.sh... [PASS]
running test tests/build-remote.sh... [PASS]
running test tests/nar-access.sh... [PASS]
running test tests/structured-attrs.sh... [PASS]
running test tests/fetchGit.sh... [SKIP]
running test tests/fetchMercurial.sh... [SKIP]
running test tests/signing.sh... [PASS]
running test tests/run.sh... [FAIL]
    + clearStore
    + echo 'clearing store...'
    clearing store...
    + chmod -R +w /home/jenkins/rcpkgs-internal/tmp/nix-build-nix-2.0.4.drv-0/nix-test/store
    + rm -rf /home/jenkins/rcpkgs-internal/tmp/nix-build-nix-2.0.4.drv-0/nix-test/store
    + mkdir /home/jenkins/rcpkgs-internal/tmp/nix-build-nix-2.0.4.drv-0/nix-test/store
    + rm -rf /home/jenkins/rcpkgs-internal/tmp/nix-build-nix-2.0.4.drv-0/nix-test/var/nix
    + mkdir /home/jenkins/rcpkgs-internal/tmp/nix-build-nix-2.0.4.drv-0/nix-test/var/nix
    + nix-store --init
    + clearProfiles
    + profiles=/home/jenkins/rcpkgs-internal/tmp/nix-build-nix-2.0.4.drv-0/nix-test/var/nix/profiles
    + rm -rf /home/jenkins/rcpkgs-internal/tmp/nix-build-nix-2.0.4.drv-0/nix-test/var/nix/profiles
    + clearCache
    + rm -rf /home/jenkins/rcpkgs-internal/tmp/nix-build-nix-2.0.4.drv-0/nix-test/binary-cache
    + nix run -f run.nix hello -c hello
    + grep 'Hello World'
    Hello World from /home/jenkins/rcpkgs-internal/tmp/nix-build-nix-2.0.4.drv-0/nix-test/store/xnlxrbwjppgzk7xbrxib6vfkdgv2ry1f-hello/bin/hello
    + nix run -f run.nix hello -c hello NixOS
    + grep 'Hello NixOS'
    Hello NixOS from /home/jenkins/rcpkgs-internal/tmp/nix-build-nix-2.0.4.drv-0/nix-test/store/xnlxrbwjppgzk7xbrxib6vfkdgv2ry1f-hello/bin/hello
    + canUseSandbox
    ++ uname
    + [[ Linux != Linux ]]
    + '[' '!' -L /proc/self/ns/user ']'
    + '[' -e /proc/sys/kernel/unprivileged_userns_clone ']'
    + return 0
    + chmod -R u+w /home/jenkins/rcpkgs-internal/tmp/nix-build-nix-2.0.4.drv-0/nix-test/store0
    + rm -rf /home/jenkins/rcpkgs-internal/tmp/nix-build-nix-2.0.4.drv-0/nix-test/store0
    + clearStore
    + echo 'clearing store...'
    clearing store...
    + chmod -R +w /home/jenkins/rcpkgs-internal/tmp/nix-build-nix-2.0.4.drv-0/nix-test/store
    + rm -rf /home/jenkins/rcpkgs-internal/tmp/nix-build-nix-2.0.4.drv-0/nix-test/store
    + mkdir /home/jenkins/rcpkgs-internal/tmp/nix-build-nix-2.0.4.drv-0/nix-test/store
    + rm -rf /home/jenkins/rcpkgs-internal/tmp/nix-build-nix-2.0.4.drv-0/nix-test/var/nix
    + mkdir /home/jenkins/rcpkgs-internal/tmp/nix-build-nix-2.0.4.drv-0/nix-test/var/nix
    + nix-store --init
    + clearProfiles
    + profiles=/home/jenkins/rcpkgs-internal/tmp/nix-build-nix-2.0.4.drv-0/nix-test/var/nix/profiles
    + rm -rf /home/jenkins/rcpkgs-internal/tmp/nix-build-nix-2.0.4.drv-0/nix-test/var/nix/profiles
    ++ nix eval --raw -f run.nix hello
    + path=/home/jenkins/rcpkgs-internal/tmp/nix-build-nix-2.0.4.drv-0/nix-test/store/xnlxrbwjppgzk7xbrxib6vfkdgv2ry1f-hello
    + nix run --sandbox-build-dir /build-tmp --sandbox-paths '/nix? /bin? /lib? /lib64? /usr?' --store /home/jenkins/rcpkgs-internal/tmp/nix-build-nix-2.0.4.drv-0/nix-test/store0 -f run.nix hello -c hello
    + grep 'Hello World'
    builder for '/home/jenkins/rcpkgs-internal/tmp/nix-build-nix-2.0.4.drv-0/nix-test/store/fn8gkp36jvxx3mfw6ia1x6a25cjxh9l4-hello.drv' failed with exit code 1; last 1 log lines:
      while setting up the build environment: executing '/opt/rhodecode/store/arwnrdxkhff4hzkpygd58shxy15zgm7j-bash-4.4-p12/bin/bash': No such file or directory
    error: build of '/home/jenkins/rcpkgs-internal/tmp/nix-build-nix-2.0.4.drv-0/nix-test/store/fn8gkp36jvxx3mfw6ia1x6a25cjxh9l4-hello.drv' failed
running test tests/brotli.sh... [PASS]
running test tests/pure-eval.sh... [PASS]
running test tests/check.sh... [PASS]
running test tests/plugins.sh... [PASS]
1 out of 51 tests failed
make: *** [mk/tests.mk:12: installcheck] Error 1
builder for '/opt/rhodecode/store/4ypna246mnlcz0drljyf84465fil19v1-nix-2.0.4.drv' failed with exit code 2

I recall having had failing tests with custom stores in the past as well, but chose to ignore them. Can’t say what’s going on here.

There’s a lot of packages there, is there anyway to skip those tests ? Should using --keep-going would be the best option here ?

something like:

(nix.overrideAttrs (old: { doInstallCheck = false;}))

should work

1 Like

I end up using an overlay.

Here’s the fix that actually worked for our whole build nix defenition files.

    mkdir -p ~/.config/nixpkgs/overlays
    cat > ~/.config/nixpkgs/overlays/01-nix-tests.nix <<EOF
    self: super: {
        nix = super.nix.overrideAttrs (oa: {
          doCheck = false;
          doInstallCheck = false;
        });
    }
    EOF

Thanks for the help !