diff options
Diffstat (limited to 'flake.nix')
| -rw-r--r-- | flake.nix | 17 | 
1 files changed, 8 insertions, 9 deletions
| @@ -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; | 
