diff options
Diffstat (limited to 'org')
-rw-r--r-- | org/spine_build_scaffold.org | 222 |
1 files changed, 196 insertions, 26 deletions
diff --git a/org/spine_build_scaffold.org b/org/spine_build_scaffold.org index f998647..6a00b30 100644 --- a/org/spine_build_scaffold.org +++ b/org/spine_build_scaffold.org @@ -962,11 +962,67 @@ gitsnapshot: distclean tangle tangle gitsnapshot #+END_SRC +* dub.json TODO (subproject versions) :dub:json:config: + +#+BEGIN_SRC sh :tangle ../dub.json +{ + "authors": [ + "Ralph Amissah" + ], + "copyright": "Copyright © 2015 - 2020 Ralph Amissah", + "name": "spine", + "description": "a sisu like document parser", + "homepage": "http://sisudoc.org", + "license": "AGPL-3.0+", + "targetPath": "./bin", + "sourcePaths": [ "./src/doc_reform" ], + "stringImportPaths": [ "./views" ], + "buildRequirements": [ "allowWarnings" ], + "targetType": "executable", + "platforms": [ "posix" ], + "dependencies": { + "d2sqlite3": "~>0.19.1", + "imageformats": "~>7.0.2", + "dyaml": "~>0.8.0", + "tinyendian": "~>0.2.0" + }, + "subConfigurations": { + "d2sqlite3": "all-included" + }, + "configurations": [ + { + "name": "default", + "targetName": "spine" + }, + { + "name": "ldc", + "targetName": "spine-ldc" + }, + { + "name": "dmd", + "targetName": "spine-dmd" + } + ], + "buildTypes": { + "dmd": { + "dflags": [ "-J=views", "-I=src/doc_reform" ], + "buildOptions": [ "verbose", "inline" ], + "buildRequirements": [ "allowWarnings" ] + }, + "ldc": { + "dflags": [ "-O2", "-J=views", "-I=src/doc_reform" ], + "buildOptions": [ "verbose", "optimize", "inline" ], + "buildRequirements": [ "allowWarnings" ] + } + } +} +#+END_SRC + * dub.sdl :dub:sdl:config: Every DUB package should contain a [[http://code.dlang.org/package-format?lang=json][dub.json]] (or [[http://code.dlang.org/package-format?lang=sdl][dub.sdl]]) ** header (including dependencies) :header: -#+BEGIN_SRC sh :tangle ../dub.sdl :tangle-mode (identity #o755) :shebang #!/usr/bin/env dub +#+BEGIN_SRC sh :NO-tangle ../dub.sdl :tangle-mode (identity #o755) :shebang #!/usr/bin/env dub name "spine" description "sisu document parser" homepage "http://sisudoc.org" @@ -992,7 +1048,7 @@ time (dub --compiler=dmd --build=release) time (dub --compiler=ldc2 --build=release) time (dub --compiler=gdc --build=release) -#+BEGIN_SRC sh :tangle ../dub.sdl +#+BEGIN_SRC sh :NO-tangle ../dub.sdl configuration "default" { targetName "spine" #postGenerateCommands "notify-send -t 0 'D executable ready' 'spine'" @@ -1001,10 +1057,10 @@ configuration "default" { ** dmd -time (dub --compiler=dmd --config=dmd --build=dmd) -time (dub --compiler=dmd --config=dmd --build=dmd-release) +time (dub --compiler=dmd -color --config=dmd --build=dmd) +time (dub --compiler=dmd -color --config=dmd --build=dmd-release) -#+BEGIN_SRC sh :tangle ../dub.sdl +#+BEGIN_SRC sh :NO-tangle ../dub.sdl configuration "dmd" { targetName "spine-dmd" #postGenerateCommands "notify-send -t 0 'D executable ready' 'spine-dmd'" @@ -1032,10 +1088,10 @@ configuration "dmd-version" { ** ldc -time (dub --compiler=ldc2 --config=ldc --build=ldc) -time (dub --compiler=ldc2 --config=ldc --build=ldc-release) +time (dub --compiler=ldc2 -color --config=ldc --build=ldc) +time (dub --compiler=ldc2 -color --config=ldc --build=ldc-release) -#+BEGIN_SRC sh :tangle ../dub.sdl +#+BEGIN_SRC sh :NO-tangle ../dub.sdl configuration "ldc" { targetName "spine-ldc" #postGenerateCommands "notify-send -t 0 'D executable ready' 'spine-ldc'" @@ -1067,7 +1123,7 @@ configuration "ldc-version" { time (dub --compiler=gdc --config=gdc --build=gdc) time (dub --compiler=gdc --config=gdc --build=gdc-release) -#+BEGIN_SRC sh :tangle ../dub.sdl +#+BEGIN_SRC sh :NO-tangle ../dub.sdl configuration "gdc" { targetName "spine-gdc" #postGenerateCommands "notify-send -t 0 'D executable ready' 'spine-gdc'" @@ -1507,8 +1563,69 @@ tinyendian_dep = declare_dependency( #+END_SRC * nix +** envrc + +#+BEGIN_SRC nix :tangle ../.envrc +use nix +NIX_ENFORCE_PURITY=0 +#+END_SRC + +** shells +*** nix-shell shell.nix #+BEGIN_SRC nix :tangle ../shell.nix +{ pkgs ? import <nixpkgs> { + overlays = [ + (import ./nixDevEnv/overlays/ldcVersion.nix) + (import ./nixDevEnv/overlays/dmdVersion.nix) + ]; } +}: + pkgs.mkShell { + buildInputs = with pkgs; [ + dub + ninja + #meson + dmd + ldc + sqlite + validatePkgConfig + ]; +} +#+END_SRC + +*** ldc shell + +#+BEGIN_SRC nix :tangle ../nixDevEnv/shells/ldc.nix +{ pkgs ? import <nixpkgs> { overlays = [ (import ../overlays/ldcVersion.nix) ]; } }: + pkgs.mkShell { + buildInputs = with pkgs; [ + dub + ninja + ldc + sqlite + validatePkgConfig + ]; +} +#+END_SRC + +*** dmd shell + +#+BEGIN_SRC nix :tangle ../nixDevEnv/shells/dmd.nix +{ pkgs ? import <nixpkgs> { overlays = [ (import ../overlays/dmdVersion.nix) ]; } }: + pkgs.mkShell { + buildInputs = with pkgs; [ + dub + ninja + dmd + sqlite + validatePkgConfig + ]; +} +#+END_SRC + +**** OLD nix-shell shell.nix + +#+BEGIN_SRC nix :NO-tangle ../shell.nix { pkgs ? import <nixpkgs> {} }: with pkgs; @@ -1521,6 +1638,7 @@ mkShell { sqlite validatePkgConfig #gnumake gcc gdc cmake + #clang #dzen2 ]; shellHook = '' @@ -1530,19 +1648,76 @@ mkShell { } #+END_SRC -#% ldc -dub --compiler=ldc2 -color --config=ldc --build=release -make ldc +** overlays +*** ldcVersion.nix overlay + +#+BEGIN_SRC nix :tangle ../nixDevEnv/overlays/ldcVersion.nix +self: super: rec { + <<ldc_version_info>> + ldc = super.ldc.overrideAttrs(oldAttrs: rec { + inherit version sha256; + pname = oldAttrs.pname; + name = "${pname}-${version}"; + src = super.fetchurl { + url = "https://github.com/ldc-developers/ldc/releases/download/v${version}/ldc-${version}-src.tar.gz"; + sha256 = sha256; + }; + postUnpack = '' + patchShebangs . + ''; + }); +} +#+END_SRC + +*** dmdVersion.nix overlay + +#+BEGIN_SRC nix :tangle ../nixDevEnv/overlays/dmdVersion.nix +self: super: rec { + <<dmd_version_info>> + dmd = super.dmd.overrideAttrs(oldAttrs: rec { + inherit year version sha256; + pname = oldAttrs.pname; + name = "${pname}-${version}"; + src = super.fetchurl { + url = "http://downloads.dlang.org/releases/${year}/dmd.${version}.linux.tar.xz"; + sha256 = sha256; + }; + # postUnpack = '' + # patchShebangs . + # ''; + }); +} +#+END_SRC + +** version info TODO +https://dlang.org/download.html -#% dmd -dub --compiler=dmd -color --config=dmd --build=release -make dmd +*** ldc TODO +https://github.com/ldc-developers/ldc/releases + +#+NAME: ldc_version_info +#+BEGIN_SRC nix +version = "1.23.0"; +sha256 = "1fdgj222x29as466vdxy9c0m82zzlsb7vnvvh89n2riszcrx463d"; +#+END_SRC + +*** dmd TODO +https://dlang.org/changelog/index.html +https://dlang.org/changelog/pending.html +http://downloads.dlang.org/releases/ +http://downloads.dlang.org/releases/2.x/ + +#+NAME: dmd_version_info +#+BEGIN_SRC nix +version = "2.094.0"; +sha256 = "0xhm8m46ahfx3hcibi3vws02zaplny3226f3x8cd8584gzfqyzxp"; +year = "2020"; +#+END_SRC * .gitignore :gitignore: #+BEGIN_SRC sh :tangle ../.gitignore # git ls-files --others --exclude-from=.git/info/exclude -#./.dub/** * !.gitignore !README.md @@ -1558,7 +1733,6 @@ make dmd !*.d !*.rb !conf.sdl -!shell.nix !doc !doc/** !man @@ -1566,12 +1740,10 @@ make dmd !org !misc !misc/** -#!*.nix -#!nix -#!nix/** -#!nix-devEnv -#!nix-devEnv/** -#!.envrc +!*.nix +!nixDevEnv +!nixDevEnv/** +!.envrc !src !src/** !data @@ -1610,14 +1782,12 @@ tmp/** *_ *.swp *~ +*~ \#* *.\#* #!*/ -#*~ #\#* #*.\#* -#!debian -#!debian/** #.reggae/** #+END_SRC |