Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

lib/systems: add emulator for mmix #108021

Merged
merged 1 commit into from
Dec 31, 2020
Merged

Conversation

siraben
Copy link
Member

@siraben siraben commented Dec 31, 2020

Motivation for this change

Would be a good example to show when the emulators feature is documented (#106375). Try it out by creating a test.nix file at nixpkgs root with the following contents

{ pkgs ? import ./. {}}:
with pkgs;

let
  hello-cross = pkgsCross.mmix.hello;
  emul = pkgsCross.mmix.stdenv.hostPlatform.emulator pkgs;
in
rec {
  runit = writeScript "runit" ''
    #!/usr/bin/env sh
    ${emul} ${hello-cross}/bin/hello
  '';
}

then run

$ nix-build test.nix -A runit && ./result
Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Ensured that relevant documentation is up to date
  • Fits CONTRIBUTING.md.

@ofborg ofborg bot added 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild 10.rebuild-linux: 0 This PR does not cause any packages to rebuild labels Dec 31, 2020
@Ericson2314 Ericson2314 merged commit 487141b into NixOS:master Dec 31, 2020
@siraben siraben deleted the mmix-emulator branch December 31, 2020 18:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
10.rebuild-darwin: 0 This PR does not cause any packages to rebuild 10.rebuild-linux: 0 This PR does not cause any packages to rebuild
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants