Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: NixOS/nixpkgs
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: a979486bb546
Choose a base ref
...
head repository: NixOS/nixpkgs
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: e8338c9c1df9
Choose a head ref
  • 2 commits
  • 1 file changed
  • 1 contributor

Commits on Jan 25, 2021

  1. nixos/binfmt: add bash to sandboxPaths

    bash is needed to run the new binfmt shell script.
    
    Fixes #110540
    matthewbauer committed Jan 25, 2021
    Copy the full SHA
    35bd8f1 View commit details
  2. Merge pull request #110739 from matthewbauer/fix-binfmt-nix-sandbox

    nixos/binfmt: add bash to sandboxPaths
    matthewbauer authored Jan 25, 2021
    Copy the full SHA
    e8338c9 View commit details
Showing with 2 additions and 2 deletions.
  1. +2 −2 nixos/modules/system/boot/binfmt.nix
4 changes: 2 additions & 2 deletions nixos/modules/system/boot/binfmt.nix
Original file line number Diff line number Diff line change
@@ -23,7 +23,7 @@ let
activationSnippet = name: { interpreter, ... }: ''
rm -f /run/binfmt/${name}
cat > /run/binfmt/${name} << 'EOF'
#!/usr/bin/env sh
#!${pkgs.bash}/bin/sh
exec -- ${interpreter} "$@"
EOF
chmod +x /run/binfmt/${name}
@@ -266,7 +266,7 @@ in {
extra-platforms = ${toString (cfg.emulatedSystems ++ lib.optional pkgs.stdenv.hostPlatform.isx86_64 "i686-linux")}
'';
nix.sandboxPaths = lib.mkIf (cfg.emulatedSystems != [])
([ "/run/binfmt" ] ++ (map (system: dirOf (dirOf (getEmulator system))) cfg.emulatedSystems));
([ "/run/binfmt" "${pkgs.bash}" ] ++ (map (system: dirOf (dirOf (getEmulator system))) cfg.emulatedSystems));

environment.etc."binfmt.d/nixos.conf".source = builtins.toFile "binfmt_nixos.conf"
(lib.concatStringsSep "\n" (lib.mapAttrsToList makeBinfmtLine config.boot.binfmt.registrations));