diff options
author | github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com> | 2021-01-21 01:19:31 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-01-21 01:19:31 +0000 |
commit | e5fef074d63de524cb40ebc609eabe51db90d80e (patch) | |
tree | e8fc60c5bcc0b8fef14d2923b515c52d27da714c /nixos/modules/system/boot/binfmt.nix | |
parent | 49d7c98041f2298b79b5118d816d7215c6a49524 (diff) | |
parent | 3617a771ca43a34e1b3a97f1bc046f7be2aac92a (diff) |
Merge staging-next into staging
Diffstat (limited to 'nixos/modules/system/boot/binfmt.nix')
-rw-r--r-- | nixos/modules/system/boot/binfmt.nix | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/nixos/modules/system/boot/binfmt.nix b/nixos/modules/system/boot/binfmt.nix index 9eeae0c3ef44..5bcc95be324a 100644 --- a/nixos/modules/system/boot/binfmt.nix +++ b/nixos/modules/system/boot/binfmt.nix @@ -20,8 +20,14 @@ let optionalString fixBinary "F"; in ":${name}:${type}:${offset'}:${magicOrExtension}:${mask'}:${interpreter}:${flags}"; - activationSnippet = name: { interpreter, ... }: - "ln -sf ${interpreter} /run/binfmt/${name}"; + activationSnippet = name: { interpreter, ... }: '' + rm -f /run/binfmt/${name} + cat > /run/binfmt/${name} << 'EOF' + #!/usr/bin/env sh + exec -- ${interpreter} "$@" + EOF + chmod +x /run/binfmt/${name} + ''; getEmulator = system: (lib.systems.elaborate { inherit system; }).emulator pkgs; |