Created
May 30, 2021 12:58
-
-
Save prithvihv/45b3f8dbbe7bbd54350600cc7a0c23c3 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
let | |
pathToFile = if pkgs.stdenv.isLinux then | |
"./location1" | |
else | |
"./location2"; | |
someFile = import pathToFile; | |
in rec { | |
somePkgsWithPlatformSupport = someFile; | |
} | |
# General recommendation for problems like this is to have a different main Nix file for each platform that just imports a Nix file containing the common code. | |
# (phv) Or have a nix file that imports all platform specific software. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment