From c99c5de03e5e7b45c2fcf81433c8ff4df8e5cfc4 Mon Sep 17 00:00:00 2001 From: Ben Sima Date: Sat, 23 Nov 2019 16:07:45 -0800 Subject: Remove apex and aero arguments --- Com/Simatime/buildHaskellApp.nix | 22 ++++++++-------------- 1 file changed, 8 insertions(+), 14 deletions(-) (limited to 'Com/Simatime/buildHaskellApp.nix') 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 -- cgit v1.2.3