diff options
author | Ralph Amissah <ralph.amissah@gmail.com> | 2020-11-13 22:58:26 -0500 |
---|---|---|
committer | Ralph Amissah <ralph.amissah@gmail.com> | 2020-11-13 23:19:57 -0500 |
commit | 0de4f2c1f970d911cf413bab89ec91896b12c30b (patch) | |
tree | cb7b95cd325aed9c85949d0fa22a270c26eb012c | |
parent | org tags (diff) |
ldc in need of newer dub
-rw-r--r-- | nixDevEnv/overlays/ldcVersion.nix | 7 | ||||
-rw-r--r-- | nixDevEnv/shells/packages-ldc.nix | 18 | ||||
-rw-r--r-- | nixDevEnv/shells/shell-dmd-verNix.nix | 11 | ||||
-rw-r--r-- | nixDevEnv/shells/shell-dmd-verUser.nix | 7 | ||||
-rw-r--r-- | nixDevEnv/shells/shell-ldc-verNix.nix | 22 | ||||
-rw-r--r-- | nixDevEnv/shells/shell-ldc-verUser.nix | 22 | ||||
-rw-r--r-- | org/spine_build_scaffold.org | 121 |
7 files changed, 92 insertions, 116 deletions
diff --git a/nixDevEnv/overlays/ldcVersion.nix b/nixDevEnv/overlays/ldcVersion.nix index 5990004..5bc7f7a 100644 --- a/nixDevEnv/overlays/ldcVersion.nix +++ b/nixDevEnv/overlays/ldcVersion.nix @@ -1,9 +1,8 @@ self: super: rec { - pname = "ldc"; - version = "1.24.0"; - sha256 = "0g5svf55i0kq55q49awmwqj9qi1n907cyrn1vjdjgs8nx6nn35gx"; ldc = super.ldc.overrideAttrs(oldAttrs: rec { - inherit pname version sha256; + pname = "ldc"; + version = "1.24.0"; + sha256 = "0g5svf55i0kq55q49awmwqj9qi1n907cyrn1vjdjgs8nx6nn35gx"; name = "${pname}-${version}"; src = super.fetchurl { url = "https://github.com/ldc-developers/ldc/releases/download/v${version}/ldc-${version}-src.tar.gz"; diff --git a/nixDevEnv/shells/packages-ldc.nix b/nixDevEnv/shells/packages-ldc.nix new file mode 100644 index 0000000..9874b74 --- /dev/null +++ b/nixDevEnv/shells/packages-ldc.nix @@ -0,0 +1,18 @@ +{ pkgs ? import <nixpkgs> {} }: +let + dub2nix-src = fetchTarball { + url = "https://github.com/lionello/dub2nix/archive/master.tar.gz"; + }; + dub2nix = (import dub2nix-src) { inherit pkgs; }; +in +with pkgs; [ + nix + dub + ninja + ldc + rdmd + sqlite + dub2nix + nix-prefetch-git + validatePkgConfig +] diff --git a/nixDevEnv/shells/shell-dmd-verNix.nix b/nixDevEnv/shells/shell-dmd-verNix.nix index a673c35..7f16efe 100644 --- a/nixDevEnv/shells/shell-dmd-verNix.nix +++ b/nixDevEnv/shells/shell-dmd-verNix.nix @@ -1,12 +1,5 @@ -{ pkgs ? import <nixpkgs> - { overlays = [ ]; } -}: -let - dub2nix-src = fetchTarball { - url = "https://github.com/lionello/dub2nix/archive/master.tar.gz"; - }; - dub2nix = (import dub2nix-src) { inherit pkgs; }; -in pkgs.mkShell { +{ pkgs ? import <nixpkgs> {} }: +pkgs.mkShell { buildInputs = with pkgs; [ nix dub diff --git a/nixDevEnv/shells/shell-dmd-verUser.nix b/nixDevEnv/shells/shell-dmd-verUser.nix index a673c35..334aece 100644 --- a/nixDevEnv/shells/shell-dmd-verUser.nix +++ b/nixDevEnv/shells/shell-dmd-verUser.nix @@ -1,12 +1,7 @@ { pkgs ? import <nixpkgs> { overlays = [ ]; } }: -let - dub2nix-src = fetchTarball { - url = "https://github.com/lionello/dub2nix/archive/master.tar.gz"; - }; - dub2nix = (import dub2nix-src) { inherit pkgs; }; -in pkgs.mkShell { +pkgs.mkShell { buildInputs = with pkgs; [ nix dub diff --git a/nixDevEnv/shells/shell-ldc-verNix.nix b/nixDevEnv/shells/shell-ldc-verNix.nix index 094bfa7..0a6aa9a 100644 --- a/nixDevEnv/shells/shell-ldc-verNix.nix +++ b/nixDevEnv/shells/shell-ldc-verNix.nix @@ -1,19 +1,5 @@ -{ pkgs ? import <nixpkgs> - { overlays = [ ]; } -}: -let - dub2nix-src = fetchTarball { - url = "https://github.com/lionello/dub2nix/archive/master.tar.gz"; - }; - dub2nix = (import dub2nix-src) { inherit pkgs; }; -in pkgs.mkShell { - buildInputs = with pkgs; [ - nix - dub - ldc - rdmd - sqlite - dub2nix - nix-prefetch-git - ]; +{ pkgs ? import <nixpkgs> {} }: +pkgs.mkShell { + buildInputs = with pkgs; + [ (import ./packages-ldc.nix { inherit pkgs; }) ]; } diff --git a/nixDevEnv/shells/shell-ldc-verUser.nix b/nixDevEnv/shells/shell-ldc-verUser.nix index 9d2c3e1..1c9c092 100644 --- a/nixDevEnv/shells/shell-ldc-verUser.nix +++ b/nixDevEnv/shells/shell-ldc-verUser.nix @@ -1,17 +1,7 @@ -{ pkgs ? import <nixpkgs> {}, }: -let - dub2nix-src = fetchTarball { - url = "https://github.com/lionello/dub2nix/archive/master.tar.gz"; - }; - dub2nix = (import dub2nix-src) { inherit pkgs; }; -in pkgs.mkShell { - buildInputs = with pkgs; [ - nix - dub - ldc - rdmd - sqlite - dub2nix - nix-prefetch-git - ]; +{ pkgs ? import <nixpkgs> { + overlays = [ (import ../overlays/ldcVersion.nix) ]; +} }: +pkgs.mkShell { + buildInputs = with pkgs; + [ (import ./packages-ldc.nix { inherit pkgs; }) ]; } diff --git a/org/spine_build_scaffold.org b/org/spine_build_scaffold.org index 39c275f..d5e8aa8 100644 --- a/org/spine_build_scaffold.org +++ b/org/spine_build_scaffold.org @@ -1810,14 +1810,8 @@ fi - ln -sf nixDevEnv/dub/mkDub-dmd.nix mkDub.nix #+BEGIN_SRC nix :tangle ../nixDevEnv/shells/shell-dmd-verNix.nix -{ pkgs ? import <nixpkgs> - <<nix_shell_overlay_none>> -}: -let - <<nix_shell_dub2nix>> -in pkgs.mkShell { - <<nix_shell_buildInputs_dmd>> -} +{ pkgs ? import <nixpkgs> {} }: +<<nix_shell_mkshell_with_buildInputs_dmd>> #+END_SRC **** user @@ -1826,14 +1820,8 @@ in pkgs.mkShell { - ln -sf nixDevEnv/dub/mkDub-dmd.nix mkDub.nix #+BEGIN_SRC nix :tangle ../nixDevEnv/shells/shell-dmd-verUser.nix -{ pkgs ? import <nixpkgs> - <<nix_shell_overlay_user_version_dmd>> -}: -let - <<nix_shell_dub2nix>> -in pkgs.mkShell { - <<nix_shell_buildInputs_dmd>> -} +<<nix_shell_overlay_user_version_dmd>> +<<nix_shell_mkshell_with_buildInputs_dmd>> #+END_SRC *** ldc shell :ldc: @@ -1849,14 +1837,8 @@ in pkgs.mkShell { - ln -sf nixDevEnv/dub/mkDub-ldc.nix mkDub.nix #+BEGIN_SRC nix :tangle ../nixDevEnv/shells/shell-ldc-verNix.nix -{ pkgs ? import <nixpkgs> - <<nix_shell_overlay_none>> -}: -let - <<nix_shell_dub2nix>> -in pkgs.mkShell { - <<nix_shell_buildInputs_ldc>> -} +{ pkgs ? import <nixpkgs> {} }: +<<nix_shell_mkshell_with_buildInputs_ldc>> #+END_SRC **** user @@ -1865,22 +1847,31 @@ in pkgs.mkShell { - ln -sf nixDevEnv/dub/mkDub-ldc.nix mkDub.nix #+BEGIN_SRC nix :tangle ../nixDevEnv/shells/shell-ldc-verUser.nix -{ pkgs ? import <nixpkgs> {}, }: -let - <<nix_shell_dub2nix>> -in pkgs.mkShell { - <<nix_shell_buildInputs_ldc>> -} +<<nix_shell_overlay_user_version_ldc>> +<<nix_shell_mkshell_with_buildInputs_ldc>> #+END_SRC -- overlay header +***** (import ./nixDevEnv/overlays/ldcVersion.nix) +#+NAME: nix_shell_overlay_user_version_ldc #+BEGIN_SRC nix -{ pkgs ? import <nixpkgs> - <<nix_shell_overlay_user_version_ldc>> -}: +{ pkgs ? import <nixpkgs> { + overlays = [ (import ../overlays/ldcVersion.nix) ]; +} }: #+END_SRC +**** mkShell with build inputs + +#+NAME: nix_shell_mkshell_with_buildInputs_ldc +#+BEGIN_SRC nix +pkgs.mkShell { + buildInputs = with pkgs; + [ (import ./packages-ldc.nix { inherit pkgs; }) ]; +} +#+END_SRC + +- overlay header + *** parts **** dub2nix @@ -1905,7 +1896,9 @@ no working overlay, default none: #+NAME: nix_shell_overlay_user_version_dmd #+BEGIN_SRC nix -{ overlays = [ ]; } +{ pkgs ? import <nixpkgs> + { overlays = [ ]; } +}: #+END_SRC use if working overlay: @@ -1916,41 +1909,44 @@ use if working overlay: ]; } #+END_SRC -***** (import ./nixDevEnv/overlays/ldcVersion.nix) - -#+NAME: nix_shell_overlay_user_version_ldc -#+BEGIN_SRC nix -{ overlays = [ - (import ../overlays/ldcVersion.nix) -]; } -#+END_SRC - **** build inputs -#+NAME: nix_shell_buildInputs_dmd +#+NAME: nix_shell_mkshell_with_buildInputs_dmd #+BEGIN_SRC nix -buildInputs = with pkgs; [ - nix - dub - dmd - rdmd - sqlite - dub2nix - nix-prefetch-git -]; +pkgs.mkShell { + buildInputs = with pkgs; [ + nix + dub + dmd + rdmd + sqlite + dub2nix + nix-prefetch-git + ]; +} #+END_SRC -#+NAME: nix_shell_buildInputs_ldc -#+BEGIN_SRC nix -buildInputs = with pkgs; [ +**** build inputs ldc + +#+BEGIN_SRC nix :tangle ../nixDevEnv/shells/packages-ldc.nix +{ pkgs ? import <nixpkgs> {} }: +let + dub2nix-src = fetchTarball { + url = "https://github.com/lionello/dub2nix/archive/master.tar.gz"; + }; + dub2nix = (import dub2nix-src) { inherit pkgs; }; +in +with pkgs; [ nix dub + ninja ldc rdmd sqlite dub2nix nix-prefetch-git -]; + validatePkgConfig +] #+END_SRC *** shell with dmd & ldc :shell: @@ -2291,10 +2287,9 @@ in { #+BEGIN_SRC nix :tangle ../nixDevEnv/overlays/ldcVersion.nix self: super: rec { - pname = "ldc"; - <<ldc_version_info>> ldc = super.ldc.overrideAttrs(oldAttrs: rec { - inherit pname version sha256; + pname = "ldc"; + <<ldc_version_info>> name = "${pname}-${version}"; src = super.fetchurl { url = "https://github.com/ldc-developers/ldc/releases/download/v${version}/ldc-${version}-src.tar.gz"; @@ -2313,10 +2308,10 @@ no working overlay, tangle to work on #+BEGIN_SRC nix :NO-tangle ../nixDevEnv/overlays/dmdVersion.nix self: super: rec { + pname = "dmd"; <<dmd_version_info>> dmd = super.dmd.overrideAttrs(oldAttrs: rec { - inherit year version sha256; - pname = oldAttrs.pname; + inherit pname year version sha256; name = "${pname}-${version}"; src = super.fetchurl { url = "http://downloads.dlang.org/releases/${year}/dmd.${version}.linux.tar.xz"; |