buildStackProject: Set __noChroot to make it fail without sandbox

Building such a derivation will result in

  error: derivation '/nix/store/nk4wms3hk4mp9lc86k30vc8w44fcq0rj-foo.drv' has '__noChroot' set, but that's not allowed when 'sandbox' is 'true'

when attempting to build it without --option sandbox false
This commit is contained in:
Silvan Mosberger 2019-11-13 21:23:46 +01:00
parent e3b76760e3
commit b31a8f7a90
No known key found for this signature in database
GPG key ID: E8F1E9EAD284E17D

View file

@ -20,6 +20,10 @@ let
in stdenv.mkDerivation (args // {
# Doesn't work in the sandbox. Pass `--option sandbox relaxed` or
# `--option sandbox false` to be able to build this
__noChroot = true;
buildInputs = buildInputs
++ lib.optional (stdenv.hostPlatform.libc == "glibc") glibcLocales;