summaryrefslogtreecommitdiffhomepage
path: root/org/config_nix.org
diff options
context:
space:
mode:
Diffstat (limited to 'org/config_nix.org')
-rw-r--r--org/config_nix.org75
1 files changed, 49 insertions, 26 deletions
diff --git a/org/config_nix.org b/org/config_nix.org
index 0bf2362..3eb9498 100644
--- a/org/config_nix.org
+++ b/org/config_nix.org
@@ -56,7 +56,7 @@
ldc = prev.callPackage ./nix-overlays/ldc { };
dmd = prev.callPackage ./nix-overlays/dmd { };
dub = prev.callPackage ./nix-overlays/dub { };
- #gdc = prev.callPackage ./nix-overlays/gdc { }; # empty
+ #gdc = prev.callPackage ./nix-overlays/gdc { };
});
pkgsForSystem = system: import nixpkgs {
overlays = [
@@ -81,7 +81,7 @@
pkgs-ovl = pkgsForSystem system;
pkgs-nix = nixpkgsFor.${system};
in
- with pkgs-ovl; {
+ with pkgs-nix; {
default = stdenv.mkDerivation {
inherit pname;
inherit version;
@@ -100,7 +100,7 @@
done
if [ "$DC" == "" ]; then exit "Error: could not find D compiler"; fi
echo "$DC_ used as D compiler to build $pname"
- buildCMD="dub build --cache=local --compiler=$DC --build=$DC_ --combined --skip-registry=all"
+ buildCMD="dub run --cache=local --compiler=$DC --build=$DC_ --combined --skip-registry=all"
echo $buildCMD
$buildCMD
echo $buildCMD
@@ -119,11 +119,11 @@
src = self;
inherit shell;
inherit devEnv;
- buildInputs = with pkgs-nix; [sqlite];
- nativeBuildInputs = with pkgs-nix; [dub dmd gnumake];
+ buildInputs = [sqlite];
+ nativeBuildInputs = [dub dmd gnumake];
buildPhase = ''
runHook preBuild
- buildCMD="dub build --cache=local --compiler=$(type -P dmd) --build=dmd --combined --skip-registry=all"
+ buildCMD="dub run --cache=local --compiler=$(type -P dmd) --build=dmd --combined --skip-registry=all"
echo $buildCMD
$buildCMD
echo $buildCMD
@@ -142,11 +142,11 @@
src = self;
inherit shell;
inherit devEnv;
- buildInputs = with pkgs-nix; [sqlite];
- nativeBuildInputs = with pkgs-nix; [dub ldc gnumake];
+ buildInputs = [sqlite];
+ nativeBuildInputs = [dub ldc gnumake];
buildPhase = ''
runHook preBuild
- buildCMD="dub build --cache=local --compiler=$(type -P ldc2) --build=ldc2 --combined --skip-registry=all"
+ buildCMD="dub run --cache=local --compiler=$(type -P ldmd2) --build=ldmd2 --combined --skip-registry=all"
echo $buildCMD
$buildCMD
echo $buildCMD
@@ -165,11 +165,11 @@
src = self;
inherit shell;
inherit devEnv;
- buildInputs = [sqlite];
- nativeBuildInputs = [dub dmd gnumake];
+ buildInputs = with pkgs-ovl; [sqlite];
+ nativeBuildInputs = with pkgs-ovl; [dub dmd gnumake];
buildPhase = ''
runHook preBuild
- buildCMD="dub build --cache=local --compiler=$(type -P dmd) --build=dmd --combined --skip-registry=all"
+ buildCMD="dub run --cache=local --compiler=$(type -P dmd) --build=dmd --combined --skip-registry=all"
echo $buildCMD
$buildCMD
echo $buildCMD
@@ -188,11 +188,11 @@
src = self;
inherit shell;
inherit devEnv;
- buildInputs = [sqlite];
- nativeBuildInputs = [dub ldc gnumake];
+ buildInputs = with pkgs-ovl; [sqlite];
+ nativeBuildInputs = with pkgs-ovl; [dub ldc gnumake];
buildPhase = ''
runHook preBuild
- buildCMD="dub build --cache=local --compiler=$(type -P ldc2) --build=ldc2 --combined --skip-registry=all"
+ buildCMD="dub run --cache=local --compiler=$(type -P ldmd2) --build=ldmd2 --combined --skip-registry=all"
echo $buildCMD
$buildCMD
echo $buildCMD
@@ -211,11 +211,11 @@
# src = self;
# inherit shell;
# inherit devEnv;
- # buildInputs = [ sqlite ];
- # nativeBuildInputs = [ dub gdc gnumake ];
+ # buildInputs = with pkgs-ovl; [ sqlite ];
+ # nativeBuildInputs = with pkgs-ovl; [ dub gdc gnumake ];
# buildPhase = ''
# runHook preBuild
- # dub build --cache=local --compiler=$(type -P gdc) --build=gdc --combined --skip-registry=all
+ # dub run --cache=local --compiler=$(type -P gdc) --build=gdc --combined --skip-registry=all
# runHook postBuild
# '';
# inherit preBuild;
@@ -229,17 +229,17 @@
pkgs-ovl = pkgsForSystem system;
pkgs-nix = nixpkgsFor.${system};
shellHook = ''
- export DFLAGS="-O2 -boundscheck=on"
export Date=`date "+%Y%m%d"`
## set local values in .envrc-local (or here if you must)
'';
in
- with pkgs-ovl; {
+ with pkgs-nix; {
+ dsh-d-overlay = d-overlay.devShells.${system}.default;
dsh-overlay = mkShell {
name = "spine base dev shell";
inherit shell;
inherit devEnv;
- packages = [
+ packages = with pkgs-ovl; [
ldc
#dmd
dub
@@ -248,8 +248,7 @@
];
inherit shellHook;
};
- dsh-d-overlay = d-overlay.devShells.${system}.default;
- dsh-overlay-dmd-dub = mkShell {
+ dsh-nixpkgs-dmd-dub = mkShell {
name = "spine base dev shell";
inherit shell;
inherit devEnv;
@@ -262,10 +261,34 @@
inherit shellHook;
};
dsh-nixpkgs-ldc-dub = mkShell {
- name = "nixpkgs - ldc - dub";
+ name = "spine base dev shell";
+ inherit shell;
+ inherit devEnv;
+ packages = [
+ ldc
+ dub
+ gnumake
+ sqlite
+ ];
+ inherit shellHook;
+ };
+ dsh-overlay-dmd-dub = mkShell {
+ name = "spine base dev shell";
+ inherit shell;
+ inherit devEnv;
+ packages = with pkgs-ovl; [
+ dmd
+ dub
+ gnumake
+ sqlite
+ ];
+ inherit shellHook;
+ };
+ dsh-overlay-ldc-dub = mkShell {
+ name = "spine base dev shell";
inherit shell;
inherit devEnv;
- packages = with pkgs-nix; [
+ packages = with pkgs-ovl; [
ldc
dub
gnumake
@@ -480,7 +503,7 @@ with (
exit "Error: could not find D compiler"
fi
echo "$DC_ used as D compiler to build $pname"
- dub build --compiler=$DC --build=release --combined --skip-registry=all
+ dub run --compiler=$DC --build=release --combined --skip-registry=all
runHook postBuild
'';
checkPhase = ''