summaryrefslogtreecommitdiffhomepage
path: root/flake.nix
diff options
context:
space:
mode:
Diffstat (limited to 'flake.nix')
-rw-r--r--flake.nix17
1 files changed, 8 insertions, 9 deletions
diff --git a/flake.nix b/flake.nix
index 5ad88af..2d9f360 100644
--- a/flake.nix
+++ b/flake.nix
@@ -60,17 +60,16 @@
inherit shell;
inherit devEnv;
buildInputs = [sqlite];
- nativeBuildInputs = [dub ldc gnumake]; # [ dub dmd ]; [ dub ldc ]; [ dub gdc ];
+ nativeBuildInputs = [gnumake dub ldc];
+ preBuild = ''
+ export DCn=ldmd2
+ export DC=$(type -P $DCn || echo "")
+ if [ "$DC" == "" ]; then exit "Error: could not find D compiler"; fi
+ '';
buildPhase = ''
runHook preBuild
- for DC_ in dmd ldmd2 ldc2 gdc gdmd; do
- echo "- check for D compiler $DC_"
- DC=$(type -P $DC_ || echo "")
- if [ ! "$DC" == "" ]; then break; fi
- done
- if [ "$DC" == "" ]; then exit "Error: could not find D compiler"; fi
- echo "$DC_ used as D compiler to build $pname"
- dub build --cache=local --compiler=$DC --build=$DC_ --combined --skip-registry=all
+ echo "$DCn used as D compiler to build $pname"
+ dub build --cache=local --compiler=$DC --build=$DCn --combined --skip-registry=all
runHook postBuild
'';
inherit checkPhase;