From 4ac0cdbd06c0c4783815d22274fb88dcf7fff278 Mon Sep 17 00:00:00 2001 From: tdro Date: Thu, 7 Jul 2022 06:27:22 -0400 Subject: .config/nixpkgs/shells/cake: Use __noChroot option Fails on newer versions of nix. --- .config/nixpkgs/shells/cake.nix | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/.config/nixpkgs/shells/cake.nix b/.config/nixpkgs/shells/cake.nix index 401a967..1649559 100644 --- a/.config/nixpkgs/shells/cake.nix +++ b/.config/nixpkgs/shells/cake.nix @@ -1,6 +1,7 @@ let # nix-shell -E 'import (builtins.fetchurl "$url")' + # NIX_CONFIG="sandbox = relaxed" nix-shell --option builders '' cake.nix name = "nix-shell.cake"; @@ -17,6 +18,7 @@ let }; cook = { name, src, contents ? [ ], path ? [ ], script ? "", prepare ? "", cleanup ? "", sha256 ? pkgs.lib.fakeSha256 }: pkgs.stdenvNoCC.mkDerivation { + __noChroot = true; inherit name src contents; phases = [ "unpackPhase" "installPhase" ]; buildInputs = [ pkgs.proot pkgs.rsync pkgs.tree pkgs.kmod ]; @@ -50,9 +52,6 @@ let printf '\n%s\n\n' "$(du --all --max-depth 1 --human-readable rootfs | sort --human-numeric-sort)" cp -rT rootfs $out/rootfs ''; - outputHashAlgo = "sha256"; - outputHashMode = "recursive"; - outputHash = sha256; }; bake = { name, image, size ? "1G", debug ? false, kernel ? pkgs.linux, options ? [ ], modules ? [ ], uuid ? "99999999-9999-9999-9999-999999999999", sha256 ? pkgs.lib.fakeSha256 }: let @@ -178,11 +177,6 @@ let /usr/bin/env - /bin/sh -c '. /etc/profile && sh' ''; - # doas ${alpine-machine} - # sudo ${alpine-machine} - # qemu-system-x86_64 -nographic -drive if=virtio,file=./${alpine-machine.name}.img,format=raw - # qemu-system-x86_64 -curses -drive if=virtio,file=./${alpine-machine.name}.img,format=raw - in pkgs.mkShell { inherit name; @@ -191,6 +185,12 @@ in pkgs.mkShell { shellHook = '' export PS1='\h (${name}) \W \$ ' + + # sudo ${alpine-machine} + # doas ${alpine-machine} + # qemu-system-x86_64 -nographic -drive if=virtio,file=./${alpine-machine.name}.img,format=raw + # qemu-system-x86_64 -curses -drive if=virtio,file=./${alpine-machine.name}.img,format=raw + ${container { rootfs = "${alpine}/rootfs"; binds = [ "/proc" "/dev" ]; -- cgit v1.2.3