summaryrefslogtreecommitdiffhomepage
path: root/org/config_nix.org
diff options
context:
space:
mode:
authorRalph Amissah <ralph.amissah@gmail.com>2023-01-24 19:08:13 -0500
committerRalph Amissah <ralph.amissah@gmail.com>2023-01-26 08:31:13 -0500
commit3f88e14031e46eb45b7842d9e806bce588c4f93f (patch)
tree45081ce1e6aba798ba03d21b8703bc4f556b7638 /org/config_nix.org
parentnix & build housekeeping, alternative D compilers (diff)
nix & build housekeeping
Diffstat (limited to 'org/config_nix.org')
-rw-r--r--org/config_nix.org30
1 files changed, 23 insertions, 7 deletions
diff --git a/org/config_nix.org b/org/config_nix.org
index 21aff72..9af553c 100644
--- a/org/config_nix.org
+++ b/org/config_nix.org
@@ -87,7 +87,6 @@ if ! has nix_direnv_version || ! nix_direnv_version ${NixDirEnvVersion}; then
# source_url "https://raw.githubusercontent.com/nix-community/nix-direnv/${NixDirEnvVersion}/direnvrc" "sha256-0000000000000000000000000000000000000000000="
source_url "https://raw.githubusercontent.com/nix-community/nix-direnv/${NixDirEnvVersion}/direnvrc" "sha256-5EwyKnkJNQeXrRkYbwwRBcXbibosCJqyIUuz9Xq+LRc="
fi
-# reload when these files change
watch_file flake.lock
watch_file flake.nix
nix flake update && nix flake check --show-trace && nix flake show
@@ -193,9 +192,12 @@ postInstall:
let
pname = "spine_search";
version = "<<spine_version_set>>";
+ shell = ./shell.nix; # ./default.nix;
+ devEnv = ./shell.nix; # ./default.nix;
supportedSystems = [ "x86_64-linux" ]; # [ "x86_64-linux" "x86_64-darwin" "aarch64-linux" "aarch64-darwin" ];
forAllSystems = nixpkgs.lib.genAttrs supportedSystems;
nixpkgsFor = forAllSystems (system: import nixpkgs { inherit system; }); # nixpkgs instantiated for supported system types.
+ <<flake_phases_other_than_buildPhase>>
in {
packages = forAllSystems (system:
let pkgs = nixpkgsFor.${system};
@@ -205,8 +207,8 @@ postInstall:
inherit version;
executable = true;
src = self;
- shell = ./default.nix;
- devEnv = ./devenv.nix;
+ inherit shell;
+ inherit devEnv;
buildInputs = [ sqlite ];
nativeBuildInputs = [ dub dmd ldc gdc gnumake ]; # [ dub dmd ]; [ dub ldc ]; [ dub gdc ];
buildPhase = ''
@@ -221,7 +223,9 @@ postInstall:
dub build --compiler=$DC --build=$DC_ --combined --skip-registry=all
runHook postBuild
'';
- <<flake_phases_other_than_buildPhase>>
+ inherit checkPhase;
+ inherit installPhase;
+ inherit postInstall;
};
spine-search-dmd = stdenv.mkDerivation {
inherit pname;
@@ -229,6 +233,8 @@ postInstall:
meta.mainProgram = "spine_search-dmd";
executable = true;
src = self;
+ inherit shell;
+ inherit devEnv;
buildInputs = [ sqlite ];
nativeBuildInputs = [ dub dmd gnumake ];
buildPhase = ''
@@ -236,7 +242,9 @@ postInstall:
dub build --compiler=$(type -P dmd) --build=dmd --combined --skip-registry=all
runHook postBuild
'';
- <<flake_phases_other_than_buildPhase>>
+ inherit checkPhase;
+ inherit installPhase;
+ inherit postInstall;
};
spine-search-ldc = stdenv.mkDerivation {
inherit pname;
@@ -244,6 +252,8 @@ postInstall:
meta.mainProgram = "spine_search-ldc";
executable = true;
src = self;
+ inherit shell;
+ inherit devEnv;
buildInputs = [ sqlite ];
nativeBuildInputs = [ dub ldc gnumake ];
buildPhase = ''
@@ -251,7 +261,9 @@ postInstall:
dub build --compiler=$(type -P ldc2) --build=ldc2 --combined --skip-registry=all
runHook postBuild
'';
- <<flake_phases_other_than_buildPhase>>
+ inherit checkPhase;
+ inherit installPhase;
+ inherit postInstall;
};
spine-search-gdc = stdenv.mkDerivation {
inherit pname;
@@ -259,6 +271,8 @@ postInstall:
meta.mainProgram = "spine_search-gdc";
executable = true;
src = self;
+ inherit shell;
+ inherit devEnv;
buildInputs = [ sqlite ];
nativeBuildInputs = [ dub gdc gnumake ];
buildPhase = ''
@@ -266,7 +280,9 @@ postInstall:
dub build --compiler=$(type -P gdc) --build=gdc --combined --skip-registry=all
runHook postBuild
'';
- <<flake_phases_other_than_buildPhase>>
+ inherit checkPhase;
+ inherit installPhase;
+ inherit postInstall;
};
#vendorSha256 = "sha256-0Q00000000000000000000000000000000000000000=";
});