aboutsummaryrefslogtreecommitdiffhomepage
path: root/flake.nix
diff options
context:
space:
mode:
Diffstat (limited to 'flake.nix')
-rw-r--r--flake.nix95
1 files changed, 69 insertions, 26 deletions
diff --git a/flake.nix b/flake.nix
index 3f7b609..968ad5f 100644
--- a/flake.nix
+++ b/flake.nix
@@ -52,7 +52,7 @@
in {
packages = forAllSystems (system: let
pkgs-ovl = pkgsForSystem system;
- pkgs = nixpkgsFor.${system};
+ pkgs-nix = nixpkgsFor.${system};
in
with pkgs-ovl; {
default = stdenv.mkDerivation {
@@ -73,7 +73,10 @@
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
+ buildCMD="dub build --cache=local --compiler=$DC --build=$DC_ --combined --skip-registry=all"
+ echo $buildCMD
+ $buildCMD
+ echo $buildCMD
runHook postBuild
'';
inherit preBuild;
@@ -81,7 +84,7 @@
inherit installPhase;
inherit postInstall;
};
- spine-search-ovlerlay-dmd = stdenv.mkDerivation {
+ spine-search-nixpkgs-dmd = stdenv.mkDerivation {
inherit pname;
inherit version;
meta.mainProgram = "spine_search-dmd";
@@ -89,11 +92,14 @@
src = self;
inherit shell;
inherit devEnv;
- buildInputs = [sqlite];
- nativeBuildInputs = [dub dmd gnumake];
+ buildInputs = with pkgs-nix; [sqlite];
+ nativeBuildInputs = with pkgs-nix; [dub dmd gnumake];
buildPhase = ''
runHook preBuild
- dub build --cache=local --compiler=$(type -P dmd) --build=dmd --combined --skip-registry=all
+ buildCMD="dub build --cache=local --compiler=$(type -P dmd) --build=dmd --combined --skip-registry=all"
+ echo $buildCMD
+ $buildCMD
+ echo $buildCMD
runHook postBuild
'';
inherit preBuild;
@@ -101,7 +107,7 @@
inherit installPhase;
inherit postInstall;
};
- spine-search-ovlerlay-ldc = stdenv.mkDerivation {
+ spine-search-nixpkgs-ldc = stdenv.mkDerivation {
inherit pname;
inherit version;
meta.mainProgram = "spine_search-ldc";
@@ -109,11 +115,37 @@
src = self;
inherit shell;
inherit devEnv;
+ buildInputs = with pkgs-nix; [sqlite];
+ nativeBuildInputs = with pkgs-nix; [dub ldc gnumake];
+ buildPhase = ''
+ runHook preBuild
+ buildCMD="dub build --cache=local --compiler=$(type -P ldc2) --build=ldc2 --combined --skip-registry=all"
+ echo $buildCMD
+ $buildCMD
+ echo $buildCMD
+ runHook postBuild
+ '';
+ inherit preBuild;
+ inherit checkPhase;
+ inherit installPhase;
+ inherit postInstall;
+ };
+ spine-search-overlay-dmd = stdenv.mkDerivation {
+ inherit pname;
+ inherit version;
+ meta.mainProgram = "spine_search-dmd";
+ executable = true;
+ src = self;
+ inherit shell;
+ inherit devEnv;
buildInputs = [sqlite];
- nativeBuildInputs = [dub ldc gnumake];
+ nativeBuildInputs = [dub dmd gnumake];
buildPhase = ''
runHook preBuild
- dub build --cache=local --compiler=$(type -P ldc2) --build=ldc2 --combined --skip-registry=all
+ buildCMD="dub build --cache=local --compiler=$(type -P dmd) --build=dmd --combined --skip-registry=all"
+ echo $buildCMD
+ $buildCMD
+ echo $buildCMD
runHook postBuild
'';
inherit preBuild;
@@ -121,7 +153,7 @@
inherit installPhase;
inherit postInstall;
};
- spine-search-nixpkgs-ldc = stdenv.mkDerivation {
+ spine-search-overlay-ldc = stdenv.mkDerivation {
inherit pname;
inherit version;
meta.mainProgram = "spine_search-ldc";
@@ -129,11 +161,14 @@
src = self;
inherit shell;
inherit devEnv;
- buildInputs = with pkgs; [sqlite];
- nativeBuildInputs = with pkgs; [dub ldc gnumake];
+ buildInputs = [sqlite];
+ nativeBuildInputs = [dub ldc gnumake];
buildPhase = ''
runHook preBuild
- dub build --cache=local --compiler=$(type -P ldc2) --build=ldc2 --combined --skip-registry=all
+ buildCMD="dub build --cache=local --compiler=$(type -P ldc2) --build=ldc2 --combined --skip-registry=all"
+ echo $buildCMD
+ $buildCMD
+ echo $buildCMD
runHook postBuild
'';
inherit preBuild;
@@ -141,7 +176,7 @@
inherit installPhase;
inherit postInstall;
};
- #spine-search-ovl-gdc = stdenv.mkDerivation {
+ #spine-search-overlay-gdc = stdenv.mkDerivation {
# inherit pname;
# inherit version;
# meta.mainProgram = "spine_search-gdc";
@@ -165,7 +200,7 @@
});
devShells = forAllSystems (system: let
pkgs-ovl = pkgsForSystem system;
- pkgs = nixpkgsFor.${system};
+ pkgs-nix = nixpkgsFor.${system};
shellHook = ''
export DFLAGS="-O2 -boundscheck=on"
export Date=`date "+%Y%m%d"`
@@ -177,25 +212,22 @@
name = "spine base dev shell";
inherit shell;
inherit devEnv;
- #nativeBuildInputs = [ ldc dub gnumake ];
- #buildInputs = [ sqlite ];
packages = [
- sqlite
ldc
#dmd
dub
gnumake
+ sqlite
];
inherit shellHook;
};
dsh-d-overlay = d-overlay.devShells.${system}.default;
- dsh-sqlite = mkShell {
- name = "spine dev shell for latex & pdf output";
+ dsh-overlay-dmd-dub = mkShell {
+ name = "spine base dev shell";
inherit shell;
inherit devEnv;
packages = [
- ldc
- #dmd
+ dmd
dub
gnumake
sqlite
@@ -206,17 +238,28 @@
name = "nixpkgs - ldc - dub";
inherit shell;
inherit devEnv;
- #nativeBuildInputs = [ ldc dub gnumake ];
- #buildInputs = [ sqlite ];
- packages = with pkgs; [
+ packages = with pkgs-nix; [
+ ldc
+ dub
+ gnumake
+ sqlite
+ ];
+ inherit shellHook;
+ };
+ dsh-sqlite = mkShell {
+ name = "spine dev shell for latex & pdf output";
+ inherit shell;
+ inherit devEnv;
+ packages = [
ldc
+ #dmd
dub
gnumake
sqlite
];
inherit shellHook;
};
- default = import ./shell.nix {inherit pkgs;};
+ default = import ./shell.nix {inherit pkgs-nix;};
});
};
}