Added an error message when using enableFakechroot on Darwin (#327336)
* Added an error message when using enableFakechroot on Darwin Co-authored-by: Valentin Gagarin <valentin@gagarin.work>
This commit is contained in:
parent
6cb2304c5f
commit
e18d3b4894
@ -24,6 +24,7 @@
|
|||||||
, runtimeShell
|
, runtimeShell
|
||||||
, shadow
|
, shadow
|
||||||
, skopeo
|
, skopeo
|
||||||
|
, stdenv
|
||||||
, storeDir ? builtins.storeDir
|
, storeDir ? builtins.storeDir
|
||||||
, substituteAll
|
, substituteAll
|
||||||
, symlinkJoin
|
, symlinkJoin
|
||||||
@ -922,6 +923,13 @@ rec {
|
|||||||
assert
|
assert
|
||||||
(lib.assertMsg (maxLayers > 1)
|
(lib.assertMsg (maxLayers > 1)
|
||||||
"the maxLayers argument of dockerTools.buildLayeredImage function must be greather than 1 (current value: ${toString maxLayers})");
|
"the maxLayers argument of dockerTools.buildLayeredImage function must be greather than 1 (current value: ${toString maxLayers})");
|
||||||
|
assert
|
||||||
|
(lib.assertMsg (enableFakechroot -> !stdenv.isDarwin) ''
|
||||||
|
cannot use `enableFakechroot` because `proot` is not portable to Darwin. Workarounds:
|
||||||
|
- use `fakeRootCommands` with the restricted `fakeroot` environment
|
||||||
|
- cross-compile your packages
|
||||||
|
- run your packages in a virtual machine
|
||||||
|
Discussion: https://github.com/NixOS/nixpkgs/issues/327311'');
|
||||||
let
|
let
|
||||||
baseName = baseNameOf name;
|
baseName = baseNameOf name;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user