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.org116
1 files changed, 80 insertions, 36 deletions
diff --git a/org/config_nix.org b/org/config_nix.org
index 60232a6..45dcb2c 100644
--- a/org/config_nix.org
+++ b/org/config_nix.org
@@ -79,7 +79,7 @@
in {
packages = forAllSystems (system: let
pkgs-ovl = pkgsForSystem system;
- pkgs = nixpkgsFor.${system};
+ pkgs-nix = nixpkgsFor.${system};
in
with pkgs-ovl; {
default = stdenv.mkDerivation {
@@ -100,7 +100,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;
@@ -108,7 +111,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";
@@ -116,11 +119,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;
@@ -128,7 +134,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";
@@ -136,11 +142,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;
@@ -148,7 +180,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";
@@ -156,11 +188,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;
@@ -168,7 +203,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";
@@ -192,7 +227,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"`
@@ -204,25 +239,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
@@ -233,17 +265,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;};
});
};
}
@@ -256,8 +299,8 @@
#+HEADER: :shebang "#!/usr/bin/env -S nix-shell --pure\n#!nix-shell -i bash"
#+HEADER: :noweb yes
#+BEGIN_SRC nix
-{pkgs ? import <nixpkgs> {}}:
-with pkgs;
+{pkgs-nix ? import <nixpkgs> {}}:
+with pkgs-nix;
mkShell {
buildInputs = [
# ❯❯❯ nix_related
@@ -268,17 +311,18 @@ with pkgs;
validatePkgConfig
nix-output-monitor
nix-tree
- jq
- alejandra
+ jq #gx
+ #alejandra
git
# ❯❯❯ dev
gnumake
ps
# ❯❯❯ d_build_related
# ❯❯ package manager
- dub
+ #dub
# ❯❯ compiler
- ldc
+ #dmd
+ #ldc
#rund
# ❯❯ linker
#lld
@@ -337,8 +381,8 @@ with pkgs;
validatePkgConfig
nix-output-monitor
nix-tree
- jq
- alejandra
+ jq #gx
+ #alejandra
git
# ❯❯❯ dev
gnumake
@@ -473,7 +517,7 @@ with (
buildInputs = [
pkgs.sqlite
(
- with pkgs; [
+ with pkgs-nix; [
nixVersions.unstable #nixFlakes
## package manager
dub
@@ -484,7 +528,7 @@ with (
]
)
];
- meta = with pkgs.lib; {
+ meta = with pkgs-nix.lib; {
pname = "spine-search";
version = "<<spine_version>>";
homepage = "https://sisudoc.org";