summaryrefslogtreecommitdiffhomepage
path: root/README.md
diff options
context:
space:
mode:
authorRalph Amissah <ralph.amissah@gmail.com>2024-05-22 16:29:20 -0400
committerRalph Amissah <ralph.amissah@gmail.com>2024-05-22 16:29:20 -0400
commit672310fdcc768de1a824657cf391a4db998a9bed (patch)
tree123f7fb3b371bd332a2ce739d0cebe4926374ecd /README.md
parentspine search info (diff)
README, further note on using nix for installation
Diffstat (limited to 'README.md')
-rw-r--r--README.md65
1 files changed, 31 insertions, 34 deletions
diff --git a/README.md b/README.md
index fe1195d..711d75c 100644
--- a/README.md
+++ b/README.md
@@ -74,7 +74,10 @@ D projects tend to use dub as project manager
The default build tools used are dub with ldc2 (dub is also tested)
-## make a directory and clone the sisudoc-spine project
+## make a directory & clone the sisudoc-spine project
+
+Make a directory and clone the sisudoc-spine project (or just sisudoc-spine-
+search-cgi as needed)
Make a directory and clone the sisudoc-spine project
@@ -97,61 +100,55 @@ sisudoc-spine-search-cgi
cd sisudoc-spine-search-cgi
-## directly with dub
-### ldc2
- # on nix (get dependencies by setting your development environment):
- nix develop ".#dsh-nixpkgs-ldc-dub" --print-build-logs -c zsh
-
- dub run --compiler=ldmd2 --config=ldmd2 --combined --skip-registry=all
- dub --compiler=ldmd2 --config=ldmd2
-
- dub run --compiler=ldc2 --config=ldc2 --combined --skip-registry=all
- dub --compiler=ldc2 --config=ldc2
-
-### dmd
- # on nix (get dependencies by setting your development environment):
- nix develop ".#dsh-nixpkgs-dmd-dub" --print-build-logs -c zsh
+NOTE:
+- if dub is used to build, the resulting binary should be located in ./bin:
+- if "nix build" is used the resulting binary should be in ./result/bin
- dub run --compiler=dmd --config=dmd --combined --skip-registry=all
- dub --compiler=dmd --config=dmd
+cd sisudoc-spine
-## with make
+### build using nix flakes on linux (binary in ./result/bin)
-### ldc2
+you need to have nix installed on your system, and to have nix flakes enabled,
+on Debian for example, you would do the following:
- make ldc
+sudo apt install nix
-### dmd
+create the file in the given path & filename: ~/.config/nix/nix.conf
+with the following content: experimental-features = flakes nix-command
- make dmd
+which can be achieved thusly:
-## with nix on linux / nixos
+mkdir -p ~/.config/nix && echo "experimental-features = flakes nix-command" >> ~/.config/nix/nix.conf
-### ldc2
+- to use the D compiler ldc2:
nix build ".#spine-search-nixpkgs-ldc" --print-build-logs
# or
nix build ".#spine-search-overlay-ldc" --print-build-logs
-### dmd
+- to use the D compiler dmd:
nix build ".#spine-search-nixpkgs-dmd" --print-build-logs
# or
nix build ".#spine-search-overlay-dmd" --print-build-logs
-## the Meson build system was used briefly
+### build using dub directly (binary in ./bin)
-On recommendation at debconf-18 meson was used briefly. It has neither been
-tested nor used since the move to nix.
+- to use the D compiler ldc2:
+ # on nix (get dependencies by setting your development environment):
+ nix develop ".#dsh-nixpkgs-ldc-dub" --print-build-logs -c zsh
-- https://mesonbuild.com/
+ # assuming you have ldc2 & dub installed on your system:
+ dub run --compiler=ldmd2 --config=ldmd2 --combined --skip-registry=all
+ or
+ dub run --compiler=ldc2 --config=ldc2 --combined --skip-registry=all
- meson
- ninja -C build
- meson setup --wipe build && ninja -v -C build
- make meson
+- to use the D compiler dmd:
+ # on nix (get dependencies by setting your development environment):
+ nix develop ".#dsh-nixpkgs-dmd-dub" --print-build-logs -c zsh
-dub --force --compiler=ldc2 && sudo cp -v cgi-bin/spine-search /usr/lib/cgi-bin/.
+ # assuming you have dmd & dub installed on your system:
+ dub run --compiler=dmd --config=dmd --combined --skip-registry=all
# Commands