summaryrefslogtreecommitdiffhomepage
path: root/org
diff options
context:
space:
mode:
Diffstat (limited to 'org')
-rw-r--r--org/config_make.org41
-rw-r--r--org/config_nix.org30
2 files changed, 53 insertions, 18 deletions
diff --git a/org/config_make.org b/org/config_make.org
index 92e5155..4f91db4 100644
--- a/org/config_make.org
+++ b/org/config_make.org
@@ -54,15 +54,6 @@ SpineSearchAction := 'https://sisudoc.org/spine_search'
SpineCGIform := 'spine_search'
SpineSQLdb := 'spine.search.db'
-# nix build
-build:
- nix-build
-
-# cp cgi search form
-cp-cgi:
- sudo cp -vi /var/www/cgi/cgi-bin/spine_search /var/www/cgi/cgi-bin/spine_search_old && \
- sudo cp -vi result/share/cgi-bin/spine_search /var/www/cgi/cgi-bin/spine_search
-
get_depends:
hwd=$$(echo `pwd`) && \
gwd="$${hwd}/src/ext_depends" && \
@@ -657,7 +648,9 @@ gitsnapshot: distclean tangle
#+HEADER: :noweb yes
#+BEGIN_SRC makefile
<<make_cgi_search_makefile>>
+<<make_set_nix>>
<<make_get_project_cgi_search_dependencies_github>>
+<<make_copy_cgi_search>>
#+END_SRC
*** make
@@ -671,10 +664,38 @@ SpineSearchAction := 'https://sisudoc.org/spine_search'
SpineCGIform := 'spine_search'
SpineSQLdb := 'spine.search.db'
+#+END_SRC
+
+**** nix
+
+#+NAME: make_set_nix
+#+BEGIN_SRC makefile
+nix-devshell:
+ echo -ne "\n- nix flake update && nix flake check --show-trace && nix flake show && nix develop .#devShell\n\n- nix build .#default --print-build-logs\n- nix build .#spine-search-dmd --print-build-logs\n- nix build .#spine-search-ldc --print-build-logs\n- nix build .#spine-search-gdc --print-build-logs\n\n"; \
+ nix flake update && nix flake check --show-trace && nix flake show && nix develop .#devShell
+
# nix build
build:
nix-build
+nix-build-default:
+ nix build .#default --print-build-logs
+
+nix-build-dmd:
+ nix build .#spine-dmd --print-build-logs
+
+nix-build-ldc:
+ nix build .#spine-ldc --print-build-logs
+
+nix-build-gdc:
+ nix build .#spine-gdc --print-build-logs
+
+#+END_SRC
+
+**** post build copy
+
+#+NAME: make_copy_cgi_search
+#+BEGIN_SRC makefile
# cp cgi search form
cp-cgi:
sudo cp -vi /var/www/cgi/cgi-bin/spine_search /var/www/cgi/cgi-bin/spine_search_old && \
@@ -736,8 +757,6 @@ export NIX_PATH=/nix/var/nix/profiles/per-user/root/channels/nixos
- /srv/www/spine/latex
-** make
-
** notes
- vim {the_wealth_of_networks.yochai_benkler,two_bits.christopher_kelty,viral_spiral.david_bollier}.en.a4.portrait.tex
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=";
});