aboutsummaryrefslogtreecommitdiffhomepage
path: root/org/spine_build_scaffold.org
diff options
context:
space:
mode:
Diffstat (limited to 'org/spine_build_scaffold.org')
-rw-r--r--org/spine_build_scaffold.org121
1 files changed, 58 insertions, 63 deletions
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";