diff options
Diffstat (limited to 'flake.nix')
| -rw-r--r-- | flake.nix | 95 |
1 files changed, 69 insertions, 26 deletions
@@ -1,15 +1,15 @@ { description = "a sisu like parser & document generator"; inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable"; - inputs.flake-utils.url = "github:numtide/flake-utils"; + #inputs.flake-utils.url = "github:numtide/flake-utils"; outputs = { self, nixpkgs, - flake-utils, + #flake-utils, ... }@inputs: let pname = "spine"; - version = "0.17.0"; + version = "0.18.0"; shell = ./shell.nix; devEnv = ./nixDevEnv.sh; supportedSystems = ["x86_64-linux"]; # [ "x86_64-linux" "x86_64-darwin" "aarch64-linux" "aarch64-darwin" ]; @@ -21,9 +21,10 @@ runHook postCheck ''; localOverlay = (final: prev: { - ldc = prev.callPackage ./nix-overlays/ldc { }; - dmd = prev.callPackage ./nix-overlays/dmd { }; - dub = prev.callPackage ./nix-overlays/dub { }; + ldc = prev.callPackage ./nix-overlays/ldc { }; # -> ok 1.41.0 + dmd = prev.callPackage ./nix-overlays/dmd { }; # -> ok 2.111.0 + dub = prev.callPackage ./nix-overlays/dub { }; # -> ? 1.40.0 + dtools = prev.callPackage ./nix-overlays/dtools { }; # -> ok 2.110.0 #gdc = prev.callPackage ./nix-overlays/gdc { }; }); pkgsForSystem = system: import nixpkgs { @@ -33,7 +34,8 @@ inherit system; }; preBuild = '' - export HOME=$(pwd) + export HOME=$TMPDIR + #export HOME=$(pwd) ''; installPhase = '' runHook preInstall @@ -42,7 +44,9 @@ runHook postInstall ''; postInstall = '' + echo "❯❯ ./result/bin/spine -v --source --pod --text --epub --html --html-link-pdf --html-link-curate --html-link-markup --curate --output=./OUTPUT_TEST_sisudocSpine ../sisu-spine-samples/markup/pod/*"; echo `ls -la $out/bin/spine` + echo "❯❯ spine-v${version} (rev: ${self.shortRev or "unknown"})" $out/bin/spine -v ''; in { @@ -89,8 +93,8 @@ src = self; inherit shell; inherit devEnv; - buildInputs = with pkgs-ovl; [sqlite]; - nativeBuildInputs = with pkgs-ovl; [dub dmd gnumake]; + buildInputs = with pkgs-nix; [sqlite]; + nativeBuildInputs = with pkgs-nix; [dub dmd gnumake]; buildPhase = '' runHook preBuild buildCMD="dub run --cache=local --compiler=$(type -P dmd) --build=dmd --combined --skip-registry=all" @@ -113,7 +117,7 @@ inherit shell; inherit devEnv; buildInputs = with pkgs-nix; [sqlite]; - nativeBuildInputs = with pkgs-ovl; [dub ldc gnumake]; + nativeBuildInputs = with pkgs-nix; [dub ldc gnumake]; buildPhase = '' runHook preBuild buildCMD="dub run --cache=local --compiler=$(type -P ldmd2) --build=ldmd2 --combined --skip-registry=all" @@ -130,6 +134,7 @@ spine-overlay-dmd = stdenv.mkDerivation { inherit pname; inherit version; + #name = "spine-0.18.0 dmd-2.111.0 dub-1.40.0"; meta.mainProgram = "spine-dmd"; executable = true; src = self; @@ -153,6 +158,7 @@ spine-overlay-ldc = stdenv.mkDerivation { inherit pname; inherit version; + #name = "spine-0.18.0 ldc-1.41.0 dub-1.40.0"; meta.mainProgram = "spine-ldc"; executable = true; src = self; @@ -205,81 +211,104 @@ pkgs-ovl = pkgsForSystem system; pkgs-nix = nixpkgsFor.${system}; shellHook = '' - export Date=`date "+%Y%m%d"` + #export Date=`date "+%Y%m%d"` ## set local values in .envrc-local (or here if you must) - echo " ❯❯ ./result/bin/spine -v --source --pod --epub --html --html-link-pdf --html-link-curate --html-link-markup --curate --output=./OUTPUT_TEST_sisudocSpine ../sisu-spine-samples/markup/pod/*"; + echo '❯❯ nix build'; + ## ImPure Nix environment + SpineGitVer=`git describe | sed "s/^[a-z_-]\+\([0-9.]\+\)/\1/" | sed "s/\([^-]*-g\)/r\1/" | sed "s/-/./g"` && \ + SpineGitBranch=`git branch --show-current` && \ + echo "❯❯ spine-v${version} - ($SpineGitBranch: $SpineGitVer)" + ## Pure Nix environment - version info from flake inputs + #echo "❯❯ spine-v${version} (rev: ${self.shortRev or "unknown"})" + echo '❯❯ $SpineBIN -v --source --pod --text --epub --html --html-link-pdf --html-link-curate --html-link-markup --curate --output=$SpineOUT $SpinePOD/*'; + echo "❯❯ $SpineBIN -v --source --pod --text --epub --html --html-link-pdf --html-link-curate --html-link-markup --curate --output=$SpineOUT $SpinePOD/*"; + echo '❯❯ nix flake update && nix flake check && nix flake show'; ''; in with pkgs-nix; { dsh-overlay = mkShell { - name = "spine base dev shell"; + name = "spine-0.18.0 base dev shell, ldc-1.41.0, dub-1.40.0 - dtools-2.110.0"; inherit shell; inherit devEnv; packages = with pkgs-ovl; [ ldc #dmd dub + dtools gnumake sqlite + gnugrep gnused + ripgrep ]; inherit shellHook; }; - dsh-nixpkgs-dmd-dub = mkShell { - name = "spine base dev shell"; + dsh-nixpkgs-dmd = mkShell { + name = "spine-0.18.0 base dev shell"; inherit shell; inherit devEnv; packages = [ dmd dub + dtools gnumake sqlite + gnugrep gnused + ripgrep ]; inherit shellHook; }; - dsh-nixpkgs-ldc-dub = mkShell { - name = "spine base dev shell"; + dsh-nixpkgs-ldc = mkShell { + name = "spine-0.18.0 base dev shell"; inherit shell; inherit devEnv; packages = [ ldc dub + dtools gnumake sqlite + gnugrep gnused + ripgrep ]; inherit shellHook; }; - dsh-overlay-dmd-dub = mkShell { - name = "spine base dev shell"; + dsh-overlay-dmd = mkShell { + name = "spine-0.18.0 base dev shell, dmd-2.111.0, dub-1.40.0 - dtools-2.110.0"; inherit shell; inherit devEnv; packages = with pkgs-ovl; [ dmd dub + dtools gnumake sqlite + gnugrep gnused + ripgrep ]; inherit shellHook; }; - dsh-overlay-ldc-dub = mkShell { - name = "spine base dev shell"; + dsh-overlay-ldc = mkShell { + name = "spine-0.18.0 base dev shell, ldc-1.41.0, dub-1.40.0 - dtools-2.110.0"; inherit shell; inherit devEnv; packages = with pkgs-ovl; [ ldc dub + dtools gnumake sqlite ]; inherit shellHook; }; dsh-epub = mkShell { - name = "spine dev shell for epub output"; + name = "spine-0.18.0 dev shell for epub output"; inherit shell; inherit devEnv; packages = [ ldc #dmd dub + dtools gnumake sqlite libxml2 @@ -297,17 +326,20 @@ calibre #(suite includes: ebook-viewer) koreader foliate + gnugrep gnused + ripgrep ]; inherit shellHook; }; dsh-html = mkShell { - name = "spine dev shell for html output"; + name = "spine-0.18.0 dev shell for html output"; inherit shell; inherit devEnv; packages = [ ldc #dmd dub + dtools gnumake sqlite # ❯❯ text-mode web browsers @@ -317,49 +349,60 @@ w3m # ❯❯ light graphical #dillo + gnugrep gnused + ripgrep ]; inherit shellHook; }; dsh-latex-pdf = mkShell { - name = "spine dev shell for latex & pdf output"; + name = "spine-0.18.0 dev shell for latex & pdf output"; inherit shell; inherit devEnv; packages = [ ldc #dmd dub + dtools gnumake source-sans-pro source-serif-pro source-code-pro texlive.combined.scheme-full + gnugrep gnused + ripgrep ]; inherit shellHook; }; dsh-sqlite = mkShell { - name = "spine dev shell for latex & pdf output"; + name = "spine-0.18.0 dev shell for sqlite3 output"; inherit shell; inherit devEnv; packages = [ ldc #dmd dub + dtools gnumake sqlite + gnugrep gnused + ripgrep ]; inherit shellHook; }; dsh-i18n = mkShell { - name = "spine dev shell internationalization, po4a"; + name = "spine-0.18.0 dev shell for internationalization, po4a"; inherit shell; inherit devEnv; packages = [ ldc #dmd dub + dtools gnumake sqlite perl538Packages.Po4a + gnugrep gnused + ripgrep ]; inherit shellHook; }; |
