summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Com/Simatime/buildHaskellApp.nix22
-rw-r--r--default.nix2
2 files changed, 8 insertions, 16 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
diff --git a/default.nix b/default.nix
index 41a29df..c41199d 100644
--- a/default.nix
+++ b/default.nix
@@ -76,8 +76,6 @@ in {
} // (buildHaskellApp {
name = "Com.InfluencedByBooks";
nick = "ibb";
- apex = "Com.InfluencedByBooks.Apex";
- aero = "Com.InfluencedByBooks.Aero";
deps = {
both = [
"clay"