diff options
-rw-r--r-- | .envrc | 7 | ||||
-rwxr-xr-x | default.nix | 2 | ||||
-rw-r--r-- | dub.json | 6 | ||||
-rw-r--r-- | flake.nix | 2 | ||||
-rw-r--r-- | makefile | 16 | ||||
-rw-r--r-- | org/spine_build_scaffold.org | 154 | ||||
-rwxr-xr-x | project.nix | 2 | ||||
-rwxr-xr-x | shell.nix | 3 | ||||
-rwxr-xr-x | spine.nix | 2 | ||||
-rw-r--r-- | src/build_depends/dub2nix.meta | 3 | ||||
-rw-r--r-- | src/ext_depends/D-YAML.meta | 3 | ||||
-rw-r--r-- | src/ext_depends/D-YAML/source/dyaml/tinyendian.d | 213 | ||||
-rw-r--r-- | src/ext_depends/d2sqlite3.meta | 3 | ||||
-rw-r--r-- | src/ext_depends/imageformats.meta | 3 | ||||
-rw-r--r-- | src/ext_depends/shaHEADdep_D-YAML | 2 | ||||
-rw-r--r-- | src/ext_depends/shaHEADdep_d2sqlite3 | 1 | ||||
-rw-r--r-- | src/ext_depends/shaHEADdep_imageformats | 1 | ||||
-rw-r--r-- | src/ext_depends/shaHEADdep_tinyendian | 1 | ||||
-rw-r--r-- | src/ext_depends/tinyendian.meta | 3 | ||||
-rw-r--r-- | subprojects/README | 4 | ||||
-rw-r--r-- | subprojects/d2sqlite3.wrap | 2 |
21 files changed, 125 insertions, 308 deletions
@@ -1,13 +1,10 @@ if type lorri &>/dev/null; then echo "direnv: using lorri from PATH ($(type -p lorri))" eval "$(lorri direnv)" -else - # fall back to using direnv's builtin nix support - # to prevent bootstrapping problems. +else # fallback prevent bootstrapping problems by using direnv's builtin nix support use nix NIX_ENFORCE_PURITY=0 fi -# source an additional user-specific .envrc in ./.envrc-local -if [ -e .envrc-local ]; then +if [ -e .envrc-local ]; then # source an additional user-specific .envrc in ./.envrc-local source .envrc-local fi diff --git a/default.nix b/default.nix index 1db6ad0..f3ad1cd 100755 --- a/default.nix +++ b/default.nix @@ -13,7 +13,7 @@ mkDubDerivation rec { # echo "built $out/bin/spine" # ''; meta = with pkgs.lib; { - homepage = http://sisudoc.org; + homepage = https://sisudoc.org; description = "a sisu like document parser"; license = licenses.agpl3Plus; platforms = platforms.linux; @@ -6,7 +6,7 @@ "name": "spine", "version": "0.11.3", "description": "a sisu like document parser", - "homepage": "http://sisudoc.org", + "homepage": "https://sisudoc.org", "license": "AGPL-3.0+", "targetPath": "./bin", "sourcePaths": [ "./src/doc_reform" ], @@ -69,11 +69,11 @@ "copyright": "Copyright © 2011-2018, Ferdinand Majerech", "sourcePaths": [ "./src/ext_depends/D-YAML/source/dyaml", - "./src/ext_depends/D-YAML/source/tinyendian" + "./src/ext_depends/tinyendian/source" ], "importPaths": [ "./src/ext_depends/D-YAML/source/dyaml", - "./src/ext_depends/D-YAML/source/tinyendian" + "./src/ext_depends/tinyendian/source" ], "preGenerateCommands": [ "rm -rf ./src/ext_depends/D-YAML/examples", @@ -2,7 +2,7 @@ description = "a sisu like document parser"; inputs = { flake-utils.url = "github:numtide/flake-utils"; - nixpkgs.url = "/nixpkgs-ra/nixpkgs/.gitworktree/ra/nixpkgs"; + nixpkgs.url = "/nixpkgs-ra/nixpkgs"; dub2nix-src = { url = "github:lionello/dub2nix"; flake = false; @@ -100,6 +100,7 @@ get_depends: hwd=$$(echo `pwd`) && \ gwd="$${hwd}/src/ext_depends" && \ dirs=$$(echo `ls -gx $${gwd}`) && \ + license_bsl="Boost Software License 1.0 (BSL-1.0)" && \ echo $${hwd} && \ echo $${gwd} && \ echo $${dirs} && \ @@ -113,7 +114,9 @@ get_depends: git clone --depth=1 https://github.com/tjhann/$${dir} && \ cd $${dir} && \ echo $$PWD && \ - echo "`git rev-parse HEAD | cut -c 1-8` - $${dir}" > ../shaHEADdep_$${dir} && \ + echo "$${dir} `git rev-parse HEAD | cut -c 1-8`" > ../$${dir}.meta && \ + echo "https://github.com/tjhann/$${dir}" >> ../$${dir}.meta && \ + echo "$${license_bsl}" >> ../$${dir}.meta && \ cd $${gwd} && \ rm -rf $${dir}/.git; \ elif [[ "d2sqlite3" == $${dir} || "D-YAML" == $${dir} || "tinyendian" == $${dir} ]]; then \ @@ -121,7 +124,9 @@ get_depends: rm -rf $${dir} && \ git clone --depth=1 https://github.com/dlang-community/$${dir} && \ cd $${dir} && \ - echo "`git rev-parse HEAD | cut -c 1-8` - $${dir}" > ../shaHEADdep_$${dir} && \ + echo "$${dir} `git rev-parse HEAD | cut -c 1-8`" > ../$${dir}.meta && \ + echo "https://github.com/dlang-community/$${dir}" >> ../$${dir}.meta && \ + echo "$${license_bsl}" >> ../$${dir}.meta && \ cd $${gwd} && \ rm -rf $${dir}/.git; \ fi; \ @@ -138,16 +143,15 @@ get_depends: rm -rf $${dir} && \ git clone --depth=1 https://github.com/lionello/$${dir} && \ cd $${dir} && \ - echo "`git rev-parse HEAD | cut -c 1-8` - $${dir}" > ../shaHEADdep_$${dir} && \ + echo "$${dir} `git rev-parse HEAD | cut -c 1-8`" > ../$${dir}.meta && \ + echo "https://github.com/lionello/$${dir}" >> ../$${dir}.meta && \ + echo "MIT License" >> ../$${dir}.meta && \ cd $${ewd} && \ rm -rf $${dir}/.git; \ fi; \ fi; \ done; \ cd $${hwd} -set_depends: get_depends - cp -vi src/ext_depends/tinyendian/source/tinyendian.d src/ext_depends/D-YAML/source/dyaml/tinyendian.d && \ - echo "`cat src/ext_depends/shaHEADdep_tinyendian` - dyaml/tinyendian.d" >> src/ext_depends/shaHEADdep_D-YAML dub_upgrade: $(DUB) upgrade default: ldc diff --git a/org/spine_build_scaffold.org b/org/spine_build_scaffold.org index f476485..fe30f53 100644 --- a/org/spine_build_scaffold.org +++ b/org/spine_build_scaffold.org @@ -357,6 +357,7 @@ get_depends: hwd=$$(echo `pwd`) && \ gwd="$${hwd}/src/ext_depends" && \ dirs=$$(echo `ls -gx $${gwd}`) && \ + license_bsl="Boost Software License 1.0 (BSL-1.0)" && \ echo $${hwd} && \ echo $${gwd} && \ echo $${dirs} && \ @@ -370,7 +371,9 @@ get_depends: git clone --depth=1 https://github.com/tjhann/$${dir} && \ cd $${dir} && \ echo $$PWD && \ - echo "`git rev-parse HEAD | cut -c 1-8` - $${dir}" > ../shaHEADdep_$${dir} && \ + echo "$${dir} `git rev-parse HEAD | cut -c 1-8`" > ../$${dir}.meta && \ + echo "https://github.com/tjhann/$${dir}" >> ../$${dir}.meta && \ + echo "$${license_bsl}" >> ../$${dir}.meta && \ cd $${gwd} && \ rm -rf $${dir}/.git; \ elif [[ "d2sqlite3" == $${dir} || "D-YAML" == $${dir} || "tinyendian" == $${dir} ]]; then \ @@ -378,7 +381,9 @@ get_depends: rm -rf $${dir} && \ git clone --depth=1 https://github.com/dlang-community/$${dir} && \ cd $${dir} && \ - echo "`git rev-parse HEAD | cut -c 1-8` - $${dir}" > ../shaHEADdep_$${dir} && \ + echo "$${dir} `git rev-parse HEAD | cut -c 1-8`" > ../$${dir}.meta && \ + echo "https://github.com/dlang-community/$${dir}" >> ../$${dir}.meta && \ + echo "$${license_bsl}" >> ../$${dir}.meta && \ cd $${gwd} && \ rm -rf $${dir}/.git; \ fi; \ @@ -395,16 +400,15 @@ get_depends: rm -rf $${dir} && \ git clone --depth=1 https://github.com/lionello/$${dir} && \ cd $${dir} && \ - echo "`git rev-parse HEAD | cut -c 1-8` - $${dir}" > ../shaHEADdep_$${dir} && \ + echo "$${dir} `git rev-parse HEAD | cut -c 1-8`" > ../$${dir}.meta && \ + echo "https://github.com/lionello/$${dir}" >> ../$${dir}.meta && \ + echo "MIT License" >> ../$${dir}.meta && \ cd $${ewd} && \ rm -rf $${dir}/.git; \ fi; \ fi; \ done; \ cd $${hwd} -set_depends: get_depends - cp -vi src/ext_depends/tinyendian/source/tinyendian.d src/ext_depends/D-YAML/source/dyaml/tinyendian.d && \ - echo "`cat src/ext_depends/shaHEADdep_tinyendian` - dyaml/tinyendian.d" >> src/ext_depends/shaHEADdep_D-YAML #+END_SRC gitDir=dub2nix; git clone --depth=1 https://github.com/lionello/${gitDir} | rm -rf ${gitDir}/.git @@ -1136,7 +1140,7 @@ gitsnapshot: distclean tangle "name": "spine", "version": "<<version_spine>>", "description": "a sisu like document parser", - "homepage": "http://sisudoc.org", + "homepage": "https://sisudoc.org", "license": "AGPL-3.0+", "targetPath": "./bin", "sourcePaths": [ "./src/doc_reform" ], @@ -1199,11 +1203,11 @@ gitsnapshot: distclean tangle "copyright": "Copyright © 2011-2018, Ferdinand Majerech", "sourcePaths": [ "./src/ext_depends/D-YAML/source/dyaml", - "./src/ext_depends/D-YAML/source/tinyendian" + "./src/ext_depends/tinyendian/source" ], "importPaths": [ "./src/ext_depends/D-YAML/source/dyaml", - "./src/ext_depends/D-YAML/source/tinyendian" + "./src/ext_depends/tinyendian/source" ], "preGenerateCommands": [ "rm -rf ./src/ext_depends/D-YAML/examples", @@ -1242,7 +1246,7 @@ gitsnapshot: distclean tangle "name": "spine", "version": "<<version_spine>>", "description": "a sisu like document parser", - "homepage": "http://sisudoc.org", + "homepage": "https://sisudoc.org", "license": "AGPL-3.0+", "targetPath": "./bin", "sourcePaths": [ "./src/doc_reform" ], @@ -1357,7 +1361,7 @@ gitsnapshot: distclean tangle "name": "spine", "version": "<<version_spine>>", "description": "a sisu like document parser", - "homepage": "http://sisudoc.org", + "homepage": "https://sisudoc.org", "license": "AGPL-3.0+", "targetPath": "./bin", "sourcePaths": [ "./src/doc_reform" ], @@ -1413,7 +1417,7 @@ gitsnapshot: distclean tangle "copyright": "Copyright © 2015 - 2020 Ralph Amissah", "name": "spine", "description": "a sisu like document parser", - "homepage": "http://sisudoc.org", + "homepage": "https://sisudoc.org", "license": "AGPL-3.0+", "targetPath": "./bin", "sourcePaths": [ "./src/doc_reform" ], @@ -1460,7 +1464,7 @@ gitsnapshot: distclean tangle #+END_SRC * dub.sdl REFERENCE :dub:config:sdl: -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]]) +Every DUB package should contain a [[https://code.dlang.org/package-format?lang=json][dub.json]] (or [[https://code.dlang.org/package-format?lang=sdl][dub.sdl]]) not configured here using dub.json for the moment @@ -1469,7 +1473,7 @@ not configured here using dub.json for the moment #+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" +homepage "https://sisudoc.org" authors "Ralph Amissah" copyright "Copyright (C) 2016 - 2020 Ralph Amissah" license "AGPL-3.0+" @@ -1479,11 +1483,11 @@ stringImportPaths "./views" buildRequirements "allowWarnings" targetType "executable" platforms "posix" -dependency "d2sqlite3" version="~><<version_d2sqlite3>>" # https://code.dlang.org/packages/d2sqlite3 http://biozic.github.io/d2sqlite3/d2sqlite3 +dependency "d2sqlite3" version="~><<version_d2sqlite3>>" # https://code.dlang.org/packages/d2sqlite3 https://github.com/dlang-community/d2sqlite3 subconfiguration "d2sqlite3" "all-included" dependency "imageformats" version="~><<version_imageformats>>" # https://code.dlang.org/packages/imageformats https://github.com/lgvz/imageformats dependency "dyaml" version="~><<version_dyaml>>" # https://code.dlang.org/packages/dyaml https://github.com/dlang-community/D-YAML -dependency "tinyendian" version="~><<version_tinyendian>>" # http://code.dlang.org/packages/tinyendian https://github.com/dlang-community/tinyendian // dyaml dependency +dependency "tinyendian" version="~><<version_tinyendian>>" # https://code.dlang.org/packages/tinyendian https://github.com/dlang-community/tinyendian // dyaml dependency #+END_SRC ** default @@ -1610,8 +1614,8 @@ configuration "build" { * meson REVISIT :meson:build: ** notes -http://mesonbuild.com/D.html -http://mesonbuild.com/Dependencies.html#Dub +https://mesonbuild.com/D.html +https://mesonbuild.com/Dependencies.html#Dub - create and move to subdirectory rm -r build; mkdir build && cd build @@ -1723,7 +1727,7 @@ spine_exe = executable('spine', - dub - https://code.dlang.org/packages/d2sqlite3 - upstream - - https://github.com/biozic/d2sqlite3 + - https://github.com/dlang-community/d2sqlite3 - dyaml - dub - https://code.dlang.org/packages/dyaml @@ -1738,7 +1742,7 @@ spine_exe = executable('spine', - https://github.com/lgvz/imageformats - tinyendian (dyaml dependency) - dub - - http://code.dlang.org/packages/tinyendian + - https://code.dlang.org/packages/tinyendian - upstream git clone - https://github.com/dlang-community/tinyendian.git #+END_SRC @@ -1749,7 +1753,7 @@ spine_exe = executable('spine', #+BEGIN_SRC sh :tangle ../subprojects/d2sqlite3.wrap [wrap-git] directory = d2sqlite3 -url = https://github.com/biozic/d2sqlite3.git +url = https://github.com/dlang-community/d2sqlite3.git revision = head #+END_SRC @@ -2079,14 +2083,11 @@ make modificatons if desired if type lorri &>/dev/null; then echo "direnv: using lorri from PATH ($(type -p lorri))" eval "$(lorri direnv)" -else - # fall back to using direnv's builtin nix support - # to prevent bootstrapping problems. +else # fallback prevent bootstrapping problems by using direnv's builtin nix support use nix NIX_ENFORCE_PURITY=0 fi -# source an additional user-specific .envrc in ./.envrc-local -if [ -e .envrc-local ]; then +if [ -e .envrc-local ]; then # source an additional user-specific .envrc in ./.envrc-local source .envrc-local fi #+END_SRC @@ -2127,9 +2128,15 @@ fi - bespoke modify appropriately and generate if needed -#+BEGIN_SRC nix :NO-tangle ../.envrc-local +#+BEGIN_SRC nix :tangle ../.envrc-local_ export NIX_PATH=nixpkgs=<<nixpkgs_path>> -nix-instantiate --find-file nixpkgs +## reload when these files change +watch_file flake.nix +# watch_file flake.lock +## load the flake devShell +eval "$(nix print-dev-env)" +# echo $NIX_BUILD_TOP +echo "<nixpkgs> `nix-instantiate --find-file nixpkgs`" #+END_SRC **** nixpkgs_path SETUP @@ -2137,7 +2144,7 @@ nix-instantiate --find-file nixpkgs #+NAME: nixpkgs_path #+BEGIN_SRC nix -<<nixpkgs_path_default>> +<<nixpkgs_path_local>> #+END_SRC ***** nixpkgs path options @@ -2149,17 +2156,17 @@ nix-instantiate --find-file nixpkgs <nixpkgs> #+END_SRC -- local path +- local path SET WARN #+NAME: nixpkgs_path_local #+BEGIN_SRC nix -/nixpkgs-ra/nixpkgs/.gitworktree/ra/nixpkgs +/nixpkgs-ra/nixpkgs #+END_SRC ** flake :flake: - flake.nix - /nixpkgs-ra/nixpkgs/.gitworktree/ra/nixpkgs + /nixpkgs-ra/nixpkgs ./shell.nix - shell.nix ./pkgs/shell-pkgs.nix @@ -2179,7 +2186,7 @@ nix flake update --recreate-lock-file description = "a sisu like document parser"; inputs = { flake-utils.url = "github:numtide/flake-utils"; - nixpkgs.url = "/nixpkgs-ra/nixpkgs/.gitworktree/ra/nixpkgs"; + nixpkgs.url = "/nixpkgs-ra/nixpkgs"; dub2nix-src = { url = "github:lionello/dub2nix"; flake = false; @@ -2208,7 +2215,7 @@ nix flake update --recreate-lock-file description = "a sisu like document parser"; inputs = { flake-utils.url = "github:numtide/flake-utils"; - nixpkgs.url = "/nixpkgs-ra/nixpkgs/.gitworktree/ra/nixpkgs"; + nixpkgs.url = "/nixpkgs-ra/nixpkgs"; d2sqlite3 = { url = "github:dlang-community/d2sqlite3"; flake = false; @@ -2253,8 +2260,8 @@ nix flake update --recreate-lock-file description = "a sisu like document parser"; inputs = { flake-utils.url = "github:numtide/flake-utils"; - nixpkgs.url = "/nixpkgs-ra/nixpkgs/.gitworktree/ra/nixpkgs"; - # pkgs /nixpkgs-ra/nixpkgs/.gitworktree/ra/nixpkgs {} + nixpkgs.url = "/nixpkgs-ra/nixpkgs"; + # pkgs /nixpkgs-ra/nixpkgs {} #spine.url = "/grotto-ra/repo/git.repo/projects/project-spine/doc-reform"; #spine.url = "./."; }; @@ -2287,13 +2294,13 @@ nix flake update --recreate-lock-file nix-shell --pure -I nixpkgs=/nixpkgs-ra/nixpkgs nix-shell --pure -p "with import /nixpkgs-ra/nixpkgs {}; ldc" - nix-shell --pure -p "with import /nixpkgs-ra/nixpkgs/.gitworktree/ra/nixpkgs {}; [dub ldc]" + nix-shell --pure -p "with import /nixpkgs-ra/nixpkgs {}; [dub ldc]" shell.nix direnv: export +IN_NIX_SHELL nix-shell -p nixFlakes nix-shell -p nixFlakes --pure - nix-shell -p nixFlakes --pure -p "with import /nixpkgs-ra/nixpkgs/.gitworktree/ra/nixpkgs {}; [dub ldc]" + nix-shell -p nixFlakes --pure -p "with import /nixpkgs-ra/nixpkgs {}; [dub ldc]" shell.nix -I .envrc shell.nix @@ -2303,7 +2310,8 @@ nix flake update --recreate-lock-file nix-build -I .envrc nix build - nix build -f default.nix + nix build -f default.nix && noti + nix build -f default.nix && noti -t "spine built" -m "see ./result/bin/spine" nix build -f project.nix nix build -f spine.nix @@ -2317,16 +2325,30 @@ pkgs.mkShell { buildInputs = with pkgs; [ (import ./nix/pkglst/shell-pkgs.nix { inherit pkgs; }) ]; + shellHook = '' + if [[ -e ".envrc" ]]; then + source .envrc + fi + ''; +} +#+END_SRC + + +#+BEGIN_SRC nix :NO-tangle ../shell.nix :tangle-mode (identity #o755) :-shebang "#!/usr/bin/env -S nix-shell" +{ pkgs ? import <nixpkgs> {} }: +pkgs.mkShell { + buildInputs = with pkgs; [ + (import ./nix/pkglst/shell-pkgs.nix { inherit pkgs; }) + ]; buildPhase = "nix build -f default.nix"; shellHook = '' echo "built spine @ ./result/bin/spine" if [[ -e ".envrc" ]]; then source .envrc fi - #nix-instantiate | nix show-derivation | jq + nix-instantiate | nix show-derivation | jq ''; } -#+END_SRC nix-shell nix/shell/shell_spine.nix --pure @@ -2366,7 +2388,7 @@ mkDubDerivation rec { { inherit pkgs; } )]; meta = with pkgs.lib; { - homepage = http://sisudoc.org; + homepage = https://sisudoc.org; description = "a sisu like document parser"; license = licenses.agpl3Plus; platforms = platforms.linux; @@ -2415,7 +2437,7 @@ mkDubDerivation rec { echo "built $out/bin/spine" ''; meta = with pkgs.lib; { - homepage = http://sisudoc.org; + homepage = https://sisudoc.org; description = "a sisu like document parser"; license = licenses.agpl3Plus; platforms = platforms.linux; @@ -2432,7 +2454,7 @@ mkDubDerivation rec { - nix-build -I nixpkgs=<provide local nix path> e.g. nix-build -I nixpkgs=/nixpkgs-ra/nixpkgs - nix-build -I nixpkgs=/nixpkgs-ra/nixpkgs/.gitworktree/ra/nixpkgs + nix-build -I nixpkgs=/nixpkgs-ra/nixpkgs nix-build -I .envrc-local nix-build -I .envrc default.nix -I .envrc @@ -2535,7 +2557,7 @@ installPhase = '' #+NAME: nix_project_meta #+BEGIN_SRC nix meta = with pkgs.lib; { - homepage = http://sisudoc.org; + homepage = https://sisudoc.org; description = "a sisu like document parser"; license = licenses.agpl3Plus; platforms = platforms.linux; @@ -2796,7 +2818,7 @@ jq #+BEGIN_SRC sh :tangle ../.gitignore # git ls-files --others --exclude-from=.git/info/exclude -* +,* !.gitignore !README.md !COPYRIGHT @@ -2851,18 +2873,18 @@ notes/** !notes/reminders !notes/reminders/** .dub/** -**/.dub/** -**/cgi-bin/** +,**/.dub/** +,**/cgi-bin/** tmp/** -*_.org -*_.d -*_.txt -*_ -*.swp -*~ -*~ +,*_.org +,*_.d +,*_.txt +,*_ +,*.swp +,*~ +,*~ \#* -*.\#* +,*.\#* #!*/ #\#* #*.\#* @@ -2871,7 +2893,7 @@ tmp/** * misc ** sh script to batch process _emacs org babel tangle_ :shell_script:tangle: - [[http://orgmode.org/manual/Batch-execution.html]] + [[https://orgmode.org/manual/Batch-execution.html]] creates a shell batch script called "tangle", that will tangle (emacs org babel tangle) org files in ./org/ to create .d source files in ./src/doc_reform/ (similar functionality is contained within the "makefile" created by this @@ -2928,14 +2950,14 @@ nix-build project.nix #+BEGIN_SRC sh nix-shell --pure -nix-build -I nixpkgs=/nixpkgs-ra/nixpkgs/.gitworktree/ra/nixpkgs +nix-build -I nixpkgs=/nixpkgs-ra/nixpkgs #+END_SRC - project.nix #+BEGIN_SRC sh nix-shell --pure -nix-build -I nixpkgs=/nixpkgs-ra/nixpkgs/.gitworktree/ra/nixpkgs project.nix +nix-build -I nixpkgs=/nixpkgs-ra/nixpkgs #+END_SRC #+BEGIN_SRC sh @@ -3090,8 +3112,8 @@ time make ldc_testrun_filelist_dir_pod - [X] Set D_COMPILER (one of DMD LDC or GDC) - [X] Set debug flags (using DMD standard flag -deb -[[http://wiki.dlang.org/Compilers][D Compilers wiki https://wiki.dlang.org/Compilers]] -[[http://dlang.org/download.html][D Compilers download http://dlang.org/download.html]] +[[https://wiki.dlang.org/Compilers][D Compilers wiki https://wiki.dlang.org/Compilers]] +[[https://dlang.org/download.html][D Compilers download https://dlang.org/download.html]] ** version info REVIEW :version: @@ -3120,19 +3142,19 @@ sha256 = "0g5svf55i0kq55q49awmwqj9qi1n907cyrn1vjdjgs8nx6nn35gx"; - https://dlang.org/changelog/index.html - https://dlang.org/changelog/pending.html -- http://downloads.dlang.org/releases/ -- http://downloads.dlang.org/releases/2.x/ +- https://downloads.dlang.org/releases/ +- https://downloads.dlang.org/releases/2.x/ ** dub :dub: https://github.com/dlang/dub/ -http://code.dlang.org/getting_started -http://code.dlang.org/docs/commandline +https://code.dlang.org/getting_started +https://code.dlang.org/docs/commandline *** setup **** dub json or sdlang -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]] +Every DUB package should contain a [[https://code.dlang.org/package-format?lang=json][dub.json]] or [[https://code.dlang.org/package-format?lang=sdl][dub.sdl]] https://code.dlang.org/package-format?lang=sdl https://code.dlang.org/packages/sdlang-d https://github.com/Abscissa/SDLang-D/blob/master/HOWTO.md diff --git a/project.nix b/project.nix index 5776186..7377bc6 100755 --- a/project.nix +++ b/project.nix @@ -30,7 +30,7 @@ mkDubDerivation rec { echo "built $out/bin/spine" ''; meta = with pkgs.lib; { - homepage = http://sisudoc.org; + homepage = https://sisudoc.org; description = "a sisu like document parser"; license = licenses.agpl3Plus; platforms = platforms.linux; @@ -3,12 +3,9 @@ pkgs.mkShell { buildInputs = with pkgs; [ (import ./nix/pkglst/shell-pkgs.nix { inherit pkgs; }) ]; - buildPhase = "nix build -f default.nix"; shellHook = '' - echo "built spine @ ./result/bin/spine" if [[ -e ".envrc" ]]; then source .envrc fi - #nix-instantiate | nix show-derivation | jq ''; } @@ -139,7 +139,7 @@ mkDubDerivation rec { echo "built $out/bin/spine" ''; meta = with pkgs.lib; { - homepage = http://sisudoc.org; + homepage = https://sisudoc.org; description = "a sisu like document parser"; license = licenses.agpl3Plus; platforms = platforms.linux; diff --git a/src/build_depends/dub2nix.meta b/src/build_depends/dub2nix.meta new file mode 100644 index 0000000..211a6f0 --- /dev/null +++ b/src/build_depends/dub2nix.meta @@ -0,0 +1,3 @@ +dub2nix 8f68d27c +https://github.com/lionello/dub2nix +MIT License diff --git a/src/ext_depends/D-YAML.meta b/src/ext_depends/D-YAML.meta new file mode 100644 index 0000000..4a9839a --- /dev/null +++ b/src/ext_depends/D-YAML.meta @@ -0,0 +1,3 @@ +D-YAML ecbd63ed +https://github.com/dlang-community/D-YAML +Boost Software License 1.0 (BSL-1.0) diff --git a/src/ext_depends/D-YAML/source/dyaml/tinyendian.d b/src/ext_depends/D-YAML/source/dyaml/tinyendian.d deleted file mode 100644 index 731b048..0000000 --- a/src/ext_depends/D-YAML/source/dyaml/tinyendian.d +++ /dev/null @@ -1,213 +0,0 @@ -// Copyright Ferdinand Majerech 2014. -// Distributed under the Boost Software License, Version 1.0. -// (See accompanying file LICENSE_1_0.txt or copy at -// http://www.boost.org/LICENSE_1_0.txt) - -/// A minimal library providing functionality for changing the endianness of data. -module tinyendian; - -import std.system : Endian, endian; - -/// Unicode UTF encodings. -enum UTFEncoding : ubyte -{ - UTF_8, - UTF_16, - UTF_32 -} -/// -@safe unittest -{ - const ints = [314, -101]; - int[2] intsSwapBuffer = ints; - swapByteOrder(intsSwapBuffer[]); - swapByteOrder(intsSwapBuffer[]); - assert(ints == intsSwapBuffer, "Lost information when swapping byte order"); - - const floats = [3.14f, 10.1f]; - float[2] floatsSwapBuffer = floats; - swapByteOrder(floatsSwapBuffer[]); - swapByteOrder(floatsSwapBuffer[]); - assert(floats == floatsSwapBuffer, "Lost information when swapping byte order"); -} - -/** Swap byte order of items in an array in place. - * - * Params: - * - * T = Item type. Must be either 2 or 4 bytes long. - * array = Buffer with values to fix byte order of. - */ -void swapByteOrder(T)(T[] array) @trusted @nogc pure nothrow -if (T.sizeof == 2 || T.sizeof == 4) -{ - // Swap the byte order of all read characters. - foreach (ref item; array) - { - static if (T.sizeof == 2) - { - import std.algorithm.mutation : swap; - swap(*cast(ubyte*)&item, *(cast(ubyte*)&item + 1)); - } - else static if (T.sizeof == 4) - { - import core.bitop : bswap; - const swapped = bswap(*cast(uint*)&item); - item = *cast(const(T)*)&swapped; - } - else static assert(false, "Unsupported T: " ~ T.stringof); - } -} - -/// See fixUTFByteOrder. -struct FixUTFByteOrderResult -{ - ubyte[] array; - UTFEncoding encoding; - Endian endian; - uint bytesStripped = 0; -} - -/** Convert byte order of an array encoded in UTF(8/16/32) to system endianness in place. - * - * Uses the UTF byte-order-mark (BOM) to determine UTF encoding. If there is no BOM - * at the beginning of array, UTF-8 is assumed (this is compatible with ASCII). The - * BOM, if any, will be removed from the buffer. - * - * If the encoding is determined to be UTF-16 or UTF-32 and there aren't enough bytes - * for the last code unit (i.e. if array.length is odd for UTF-16 or not divisible by - * 4 for UTF-32), the extra bytes (1 for UTF-16, 1-3 for UTF-32) are stripped. - * - * Note that this function does $(B not) check if the array is a valid UTF string. It - * only works with the BOM and 1,2 or 4-byte items. - * - * Params: - * - * array = The array with UTF-data. - * - * Returns: - * - * A struct with the following members: - * - * $(D ubyte[] array) A slice of the input array containing data in correct - * byte order, without BOM and in case of UTF-16/UTF-32, - * without stripped bytes, if any. - * $(D UTFEncoding encoding) Encoding of the result (UTF-8, UTF-16 or UTF-32) - * $(D std.system.Endian endian) Endianness of the original array. - * $(D uint bytesStripped) Number of bytes stripped from a UTF-16/UTF-32 array, if - * any. This is non-zero only if array.length was not - * divisible by 2 or 4 for UTF-16 and UTF-32, respectively. - * - * Complexity: (BIGOH array.length) - */ -auto fixUTFByteOrder(ubyte[] array) @safe @nogc pure nothrow -{ - // Enumerates UTF BOMs, matching indices to byteOrderMarks/bomEndian. - enum BOM: ubyte - { - UTF_8 = 0, - UTF_16_LE = 1, - UTF_16_BE = 2, - UTF_32_LE = 3, - UTF_32_BE = 4, - None = ubyte.max - } - - // These 2 are from std.stream - static immutable ubyte[][5] byteOrderMarks = [ [0xEF, 0xBB, 0xBF], - [0xFF, 0xFE], - [0xFE, 0xFF], - [0xFF, 0xFE, 0x00, 0x00], - [0x00, 0x00, 0xFE, 0xFF] ]; - static immutable Endian[5] bomEndian = [ endian, - Endian.littleEndian, - Endian.bigEndian, - Endian.littleEndian, - Endian.bigEndian ]; - - // Documented in function ddoc. - - FixUTFByteOrderResult result; - - // Detect BOM, if any, in the bytes we've read. -1 means no BOM. - // Need the last match: First 2 bytes of UTF-32LE BOM match the UTF-16LE BOM. If we - // used the first match, UTF-16LE would be detected when we have a UTF-32LE BOM. - import std.algorithm.searching : startsWith; - BOM bomId = BOM.None; - foreach (i, bom; byteOrderMarks) - if (array.startsWith(bom)) - bomId = cast(BOM)i; - - result.endian = (bomId != BOM.None) ? bomEndian[bomId] : Endian.init; - - // Start of UTF data (after BOM, if any) - size_t start = 0; - // If we've read more than just the BOM, put the rest into the array. - with(BOM) final switch(bomId) - { - case None: result.encoding = UTFEncoding.UTF_8; break; - case UTF_8: - start = 3; - result.encoding = UTFEncoding.UTF_8; - break; - case UTF_16_LE, UTF_16_BE: - result.bytesStripped = array.length % 2; - start = 2; - result.encoding = UTFEncoding.UTF_16; - break; - case UTF_32_LE, UTF_32_BE: - result.bytesStripped = array.length % 4; - start = 4; - result.encoding = UTFEncoding.UTF_32; - break; - } - - // If there's a BOM, we need to move data back to ensure it starts at array[0] - if (start != 0) - { - array = array[start .. $ - result.bytesStripped]; - } - - // We enforce above that array.length is divisible by 2/4 for UTF-16/32 - if (endian != result.endian) - { - if (result.encoding == UTFEncoding.UTF_16) - swapByteOrder(cast(wchar[])array); - else if (result.encoding == UTFEncoding.UTF_32) - swapByteOrder(cast(dchar[])array); - } - - result.array = array; - return result; -} -/// -@safe unittest -{ - { - ubyte[] s = [0xEF, 0xBB, 0xBF, 'a']; - FixUTFByteOrderResult r = fixUTFByteOrder(s); - assert(r.encoding == UTFEncoding.UTF_8); - assert(r.array.length == 1); - assert(r.array == ['a']); - assert(r.endian == Endian.littleEndian); - } - - { - ubyte[] s = ['a']; - FixUTFByteOrderResult r = fixUTFByteOrder(s); - assert(r.encoding == UTFEncoding.UTF_8); - assert(r.array.length == 1); - assert(r.array == ['a']); - assert(r.endian == Endian.bigEndian); - } - - { - // strip 'a' b/c not complete unit - ubyte[] s = [0xFE, 0xFF, 'a']; - FixUTFByteOrderResult r = fixUTFByteOrder(s); - assert(r.encoding == UTFEncoding.UTF_16); - assert(r.array.length == 0); - assert(r.endian == Endian.bigEndian); - } - -} diff --git a/src/ext_depends/d2sqlite3.meta b/src/ext_depends/d2sqlite3.meta new file mode 100644 index 0000000..9623dc7 --- /dev/null +++ b/src/ext_depends/d2sqlite3.meta @@ -0,0 +1,3 @@ +d2sqlite3 36ed18ac +https://github.com/dlang-community/d2sqlite3 +Boost Software License 1.0 (BSL-1.0) diff --git a/src/ext_depends/imageformats.meta b/src/ext_depends/imageformats.meta new file mode 100644 index 0000000..58a8b8b --- /dev/null +++ b/src/ext_depends/imageformats.meta @@ -0,0 +1,3 @@ +imageformats cc45fdfb +https://github.com/tjhann/imageformats +Boost Software License 1.0 (BSL-1.0) diff --git a/src/ext_depends/shaHEADdep_D-YAML b/src/ext_depends/shaHEADdep_D-YAML deleted file mode 100644 index 327da42..0000000 --- a/src/ext_depends/shaHEADdep_D-YAML +++ /dev/null @@ -1,2 +0,0 @@ -ecbd63ed - D-YAML -7b67bd43 - tinyendian - dyaml/tinyendian.d diff --git a/src/ext_depends/shaHEADdep_d2sqlite3 b/src/ext_depends/shaHEADdep_d2sqlite3 deleted file mode 100644 index 1080181..0000000 --- a/src/ext_depends/shaHEADdep_d2sqlite3 +++ /dev/null @@ -1 +0,0 @@ -36ed18ac - d2sqlite3 diff --git a/src/ext_depends/shaHEADdep_imageformats b/src/ext_depends/shaHEADdep_imageformats deleted file mode 100644 index c436098..0000000 --- a/src/ext_depends/shaHEADdep_imageformats +++ /dev/null @@ -1 +0,0 @@ -cc45fdfb - imageformats diff --git a/src/ext_depends/shaHEADdep_tinyendian b/src/ext_depends/shaHEADdep_tinyendian deleted file mode 100644 index 629089c..0000000 --- a/src/ext_depends/shaHEADdep_tinyendian +++ /dev/null @@ -1 +0,0 @@ -7b67bd43 - tinyendian diff --git a/src/ext_depends/tinyendian.meta b/src/ext_depends/tinyendian.meta new file mode 100644 index 0000000..d46e1f5 --- /dev/null +++ b/src/ext_depends/tinyendian.meta @@ -0,0 +1,3 @@ +tinyendian 7b67bd43 +https://github.com/dlang-community/tinyendian +Boost Software License 1.0 (BSL-1.0) diff --git a/subprojects/README b/subprojects/README index c4d9dcc..f973809 100644 --- a/subprojects/README +++ b/subprojects/README @@ -2,7 +2,7 @@ - dub - https://code.dlang.org/packages/d2sqlite3 - upstream - - https://github.com/biozic/d2sqlite3 + - https://github.com/dlang-community/d2sqlite3 - dyaml - dub - https://code.dlang.org/packages/dyaml @@ -17,6 +17,6 @@ - https://github.com/lgvz/imageformats - tinyendian (dyaml dependency) - dub - - http://code.dlang.org/packages/tinyendian + - https://code.dlang.org/packages/tinyendian - upstream git clone - https://github.com/dlang-community/tinyendian.git diff --git a/subprojects/d2sqlite3.wrap b/subprojects/d2sqlite3.wrap index 78643b5..ff86cc3 100644 --- a/subprojects/d2sqlite3.wrap +++ b/subprojects/d2sqlite3.wrap @@ -1,4 +1,4 @@ [wrap-git] directory = d2sqlite3 -url = https://github.com/biozic/d2sqlite3.git +url = https://github.com/dlang-community/d2sqlite3.git revision = head |