Created
December 20, 2017 05:25
-
-
Save ajmcmiddlin/63a0ea1a75501734f239c23461efc3f1 to your computer and use it in GitHub Desktop.
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
{ nixpkgsFun ? <nixpkgs>, compiler ? "default", cross ? "" }: | |
let | |
pkgs = import nixpkgsFun {}; | |
rpi = pkgs.lib.systems.examples.raspberryPi; | |
localSystem = pkgs.lib.systems.elaborate { system = builtins.currentSystem; }; | |
crossSystem = if cross == "pi1" then rpi | |
else if cross == "" then null | |
else throw "Unknown cross target: " ++ cross; | |
pkgsCross = import nixpkgsFun { inherit localSystem crossSystem; }; | |
in | |
pkgsCross.hello |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment