diff options
author | Ben Sima <ben@bsima.me> | 2019-11-23 16:07:45 -0800 |
---|---|---|
committer | Ben Sima <ben@bsima.me> | 2019-11-23 16:30:01 -0800 |
commit | c99c5de03e5e7b45c2fcf81433c8ff4df8e5cfc4 (patch) | |
tree | c93b7feda26e60ac717460867cbd5fae24b399e1 /Com/Simatime | |
parent | 21926fe1bcb5c6fb9ca76b763049aeea7f7f9163 (diff) |
Remove apex and aero arguments
Diffstat (limited to 'Com/Simatime')
-rw-r--r-- | Com/Simatime/buildHaskellApp.nix | 22 |
1 files changed, 8 insertions, 14 deletions
diff --git a/Com/Simatime/buildHaskellApp.nix b/Com/Simatime/buildHaskellApp.nix index 0d0aa74..c9011e0 100644 --- a/Com/Simatime/buildHaskellApp.nix +++ b/Com/Simatime/buildHaskellApp.nix @@ -1,25 +1,19 @@ nixpkgs: -{ - # the namespace. We can't figure this out with Nix code, but when we port to - # guix/scheme we should be able to - name -, nick # a short name, for the executable -, apex # compiled with ghc -, aero # compiled with ghcjs - # deps get passed to the compilers -, deps - +{ name # the namespace +, nick # a short name, for the executable +, deps # deps get passed to the compilers }: with nixpkgs; let nsToPath = ns: builtins.toString (builtins.replaceStrings ["."] ["/"] ns); - aeroPath = nsToPath aero; - apexPath = nsToPath apex; + pathToNs = p: builtins.replaceStrings ["/"] ["."] p; basePath = nsToPath name; + apexPath = basePath + "/Apex"; # compiled with ghc + aeroPath = basePath + "/Aero"; # compiled with ghcjs depsToPackageSet = packageSet: deps: map (s: builtins.getAttr s packageSet) deps; @@ -65,12 +59,12 @@ in { # # compile with ghc # - ${ghc}/bin/ghc -i. --make ${apexPath}.hs -main-is ${apex} \ + ${ghc}/bin/ghc -i. --make ${apexPath}.hs -main-is ${pathToNs apexPath} \ -o $out/bin/${nick} # # compile with ghcjs # - ${ghcjs}/bin/ghcjs -i. --make ${aeroPath}.hs -main-is ${aero} \ + ${ghcjs}/bin/ghcjs -i. --make ${aeroPath}.hs -main-is ${pathToNs aeroPath} \ -o ${aeroPath} # # optimize js output |