aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorRalph Amissah <ralph.amissah@gmail.com>2020-11-28 13:30:26 -0500
committerRalph Amissah <ralph.amissah@gmail.com>2020-11-28 13:30:30 -0500
commitde52a00258a1bd98ddba022da9ecb27ab8be50cc (patch)
tree76f54b5d4229aa20902f2ef8356087d7ea258b37
parentldc 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 )
-rw-r--r--.gitignore4
-rw-r--r--default.nix2
-rw-r--r--nixDevEnv/dub/mkDub-dmd.nix2
-rw-r--r--nixDevEnv/dub/mkDub-ldc.nix12
-rw-r--r--nixDevEnv/shells/packages-ldc.nix4
-rw-r--r--org/spine_build_scaffold.org36
-rw-r--r--project.nix2
l---------shell.nix2
8 files changed, 29 insertions, 35 deletions
diff --git a/.gitignore b/.gitignore
index 510501a..5706c86 100644
--- a/.gitignore
+++ b/.gitignore
@@ -6,8 +6,8 @@
!CHANGELOG
!makefile
!version.txt
-!dub.json
-!dub.sdl
+!*.json
+!*.sdl
!meson.build
!tangle
!*.org
diff --git a/default.nix b/default.nix
index 5ffb598..ebadd91 100644
--- a/default.nix
+++ b/default.nix
@@ -12,6 +12,6 @@ mkDubDerivation rec {
description = "a sisu like document parser";
license = licenses.agpl3Plus;
platforms = platforms.linux;
- maintainers = [ Ralph Amissah ];
+ maintainers = [ RalphAmissah ];
};
}
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
]
diff --git a/org/spine_build_scaffold.org b/org/spine_build_scaffold.org
index d5e8aa8..02a2dd5 100644
--- a/org/spine_build_scaffold.org
+++ b/org/spine_build_scaffold.org
@@ -1040,6 +1040,15 @@ gitsnapshot: distclean tangle
tangle gitsnapshot
#+END_SRC
+* dub.settings.json :dub:config:json:
+
+#+BEGIN_SRC json :NO-tangle ../dub.settings.json
+{
+ "defaultArchitecture": "x86_64",
+ "defaultCompiler": "ldc"
+}
+#+END_SRC
+
* dub.json :dub:config:json:
** dub.json
@@ -1777,6 +1786,7 @@ aria2c https://raw.githubusercontent.com/lionello/dub2nix/master/mkDub.nix
make modificatons if desired
- run: nix-build
+ nix-build -I nixpkgs=[path-to]/nixpkgs
** envrc :envrc:
@@ -1796,7 +1806,7 @@ if [ -e .envrc-local ]; then
fi
#+END_SRC
-** shells shell.nix :shell:
+** shells shell.nix SELECT :shell:
*** dmd shell :dmd:
- ln -sf nixDevEnv/shells/shell-dmd-verNix.nix shell.nix
@@ -1938,12 +1948,8 @@ let
in
with pkgs; [
nix
- dub
- ninja
ldc
- rdmd
sqlite
- dub2nix
nix-prefetch-git
validatePkgConfig
]
@@ -2012,7 +2018,7 @@ mkDubDerivation rec {
description = "a sisu like document parser";
license = licenses.agpl3Plus;
platforms = platforms.linux;
- maintainers = [ Ralph Amissah ];
+ maintainers = [ RalphAmissah ];
};
}
#+END_SRC
@@ -2117,7 +2123,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
'';
@@ -2156,9 +2162,6 @@ in {
#+BEGIN_SRC nix :tangle ../nixDevEnv/dub/mkDub-ldc.nix
{ pkgs ? import <nixpkgs> {},
stdenv ? pkgs.stdenv,
- rdmd ? pkgs.rdmd,
- #dmd ? pkgs.dmd,
- #gcc ? pkgs.gcc,
ldc ? pkgs.ldc,
dub ? pkgs.dub
}:
@@ -2179,7 +2182,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 = ''
@@ -2205,7 +2208,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}'';
@@ -2225,11 +2228,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 {
@@ -2247,7 +2250,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
'';
@@ -2381,8 +2383,8 @@ year = "2020";
!CHANGELOG
!makefile
!version.txt
-!dub.json
-!dub.sdl
+!*.json
+!*.sdl
!meson.build
!tangle
!*.org
diff --git a/project.nix b/project.nix
index 5ffb598..ebadd91 100644
--- a/project.nix
+++ b/project.nix
@@ -12,6 +12,6 @@ mkDubDerivation rec {
description = "a sisu like document parser";
license = licenses.agpl3Plus;
platforms = platforms.linux;
- maintainers = [ Ralph Amissah ];
+ maintainers = [ RalphAmissah ];
};
}
diff --git a/shell.nix b/shell.nix
index fa9f1e2..7653553 120000
--- a/shell.nix
+++ b/shell.nix
@@ -1 +1 @@
-nixDevEnv/shells/shell-ldc-verUser.nix \ No newline at end of file
+nixDevEnv/shells/shell-ldc-verNix.nix \ No newline at end of file