-
-
Notifications
You must be signed in to change notification settings - Fork 18.6k
Cross Compiling Haskell to Windows #36200
Copy link
Copy link
Open
Labels
6.topic: cross-compilationBuilding packages on a different platform than they will be used onBuilding packages on a different platform than they will be used on6.topic: haskellGeneral-purpose, statically typed, purely functional programming languageGeneral-purpose, statically typed, purely functional programming language6.topic: windowsRunning, or buiding, packages on WindowsRunning, or buiding, packages on Windows
Metadata
Metadata
Assignees
Labels
6.topic: cross-compilationBuilding packages on a different platform than they will be used onBuilding packages on a different platform than they will be used on6.topic: haskellGeneral-purpose, statically typed, purely functional programming languageGeneral-purpose, statically typed, purely functional programming language6.topic: windowsRunning, or buiding, packages on WindowsRunning, or buiding, packages on Windows
Fields
Give feedbackNo fields configured for issues without a type.
As some may already know, I'm working on cross compiling Haskell to Windows using nix.
I'll try to keep track of the issues I run into, and then add the relevant PRs as I manage to
clean them up.
Minor
targetPlatform.isDarwin, which fails.stdenv.targetPlatform == stdenv.hostPlatform, which fails during validation.buildMKin the ghc expressions is wrong and needs to also include the relevant$flavour.mkhsc2hsfrom thenativeGhc, but should use$targetPrefix-hsc2hs.haskellSetupDependsshould come from thebuildPackagespackage set as they are compiled and run by the native compiler.Major
packageOverridesandbuildPackagesdon't play nice together. Injecting a customghcviaconfigdoesn't work anymore, asbuildPackagesis fixed prior to the overrides being applied, andbuildPackagesdoesn't see any added packages from thepackageOverrides.I might be missing some philosophical foundation with respect to nix here. Please bear with me and help me better understand.
/cc @Ericson2314