diff options
author | Ralph Amissah <ralph.amissah@gmail.com> | 2020-11-28 13:30:26 -0500 |
---|---|---|
committer | Ralph Amissah <ralph.amissah@gmail.com> | 2020-11-28 13:30:30 -0500 |
commit | de52a00258a1bd98ddba022da9ecb27ab8be50cc (patch) | |
tree | 76f54b5d4229aa20902f2ef8356087d7ea258b37 /nixDevEnv | |
parent | ldc in need of newer dub (diff) |
nix derivation, dub & dub2nix using ldc2 1.24.0 ok
- dmd 2.091.1 & dub 1.14.0 broken in nix unstable
- dmd 2.094.2 & dub 1.23.0 current dlang
- built using modified local nixpkgs
dub modified to use ldc (without calls to dmd)
- provide overlay for current( dub using ldc )
Diffstat (limited to 'nixDevEnv')
-rw-r--r-- | nixDevEnv/dub/mkDub-dmd.nix | 2 | ||||
-rw-r--r-- | nixDevEnv/dub/mkDub-ldc.nix | 12 | ||||
-rw-r--r-- | nixDevEnv/shells/packages-ldc.nix | 4 |
3 files changed, 5 insertions, 13 deletions
diff --git a/nixDevEnv/dub/mkDub-dmd.nix b/nixDevEnv/dub/mkDub-dmd.nix index 2600d30..a35f2d5 100644 --- a/nixDevEnv/dub/mkDub-dmd.nix +++ b/nixDevEnv/dub/mkDub-dmd.nix @@ -87,7 +87,7 @@ in { export HOME=$PWD ${lib.concatMapStringsSep "\n" dub-add-local deps} - dub build -b release --combined --skip-registry=all + dub build --build=release --combined --skip-registry=all runHook postBuild ''; diff --git a/nixDevEnv/dub/mkDub-ldc.nix b/nixDevEnv/dub/mkDub-ldc.nix index 8fe20a3..a9cbb82 100644 --- a/nixDevEnv/dub/mkDub-ldc.nix +++ b/nixDevEnv/dub/mkDub-ldc.nix @@ -1,8 +1,5 @@ { pkgs ? import <nixpkgs> {}, stdenv ? pkgs.stdenv, - rdmd ? pkgs.rdmd, - #dmd ? pkgs.dmd, - #gcc ? pkgs.gcc, ldc ? pkgs.ldc, dub ? pkgs.dub }: @@ -23,7 +20,7 @@ let fromDub = dubDep: mkDerivation rec { name = "${src.name}-${version}"; version = rev-to-version dubDep.fetch.rev; - nativeBuildInputs = [ rdmd ldc dub ]; + nativeBuildInputs = [ ldc dub ]; src = dep2src dubDep; buildPhase = '' @@ -49,7 +46,7 @@ let targetOf = package: "${package.targetPath or "."}/${package.targetName or package.name}"; # Remove reference to build tools and library sources - disallowedReferences = deps: [ ldc rdmd dub ] ++ builtins.map dep2src deps; + disallowedReferences = deps: [ ldc dub ] ++ builtins.map dep2src deps; removeExpr = refs: ''remove-references-to ${lib.concatMapStrings (ref: " -t ${ref}") refs}''; @@ -69,11 +66,11 @@ in { pname = package.name; - nativeBuildInputs = [ rdmd ldc dub pkgs.removeReferencesTo ] ++ nativeBuildInputs; + nativeBuildInputs = [ ldc dub pkgs.removeReferencesTo ] ++ nativeBuildInputs; disallowedReferences = disallowedReferences deps; passthru = passthru // { - inherit dub ldc rdmd pkgs; + inherit dub ldc pkgs; }; src = lib.cleanSourceWith { @@ -91,7 +88,6 @@ in { export HOME=$PWD ${lib.concatMapStringsSep "\n" dub-add-local deps} dub build --compiler=ldc2 --build=release --combined --skip-registry=all - #dub build -b optimize -b inline --combined --skip-registry=all runHook postBuild ''; diff --git a/nixDevEnv/shells/packages-ldc.nix b/nixDevEnv/shells/packages-ldc.nix index 9874b74..bcef059 100644 --- a/nixDevEnv/shells/packages-ldc.nix +++ b/nixDevEnv/shells/packages-ldc.nix @@ -7,12 +7,8 @@ let in with pkgs; [ nix - dub - ninja ldc - rdmd sqlite - dub2nix nix-prefetch-git validatePkgConfig ] |