Last active
June 16, 2024 11:51
-
-
Save risicle/18c5d0aed51ad0c45dd4a015a00bec00 to your computer and use it in GitHub Desktop.
nixpkgs overlay for supplying extra flags to the qemu used in nixos' `boot.binfmt.emulatedSystems`. Note these specific flags used in this example are architecture-specific, but the flags are applied globally so this wouldn't work if emulating multiple architectures at once on the same system.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(final: prev: { | |
wrapQemuBinfmtP = name: emulator: | |
prev.wrapQemuBinfmtP name ( | |
pkgs.runCommand "${name}-arg-wrapper" { | |
nativeBuildInputs = [ final.pkgsStatic.makeBinaryWrapper ]; | |
} '' | |
makeWrapper ${emulator} $out --add-flags '-cpu max,pauth-impdef=on' | |
'' | |
); | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment