diff options
author | Ralph Amissah <ralph.amissah@gmail.com> | 2020-12-01 21:15:47 -0500 |
---|---|---|
committer | Ralph Amissah <ralph.amissah@gmail.com> | 2020-12-04 15:26:04 -0500 |
commit | adba030111af3de18c9ad41b5ee389b140811fbb (patch) | |
tree | 8778ba8ebbf95e2dea76b5ef7d754dbae6529dbd | |
parent | directory nixEnv (renamed from nixDevEnv) (diff) |
nix shebangs, consider
-rwxr-xr-x[-rw-r--r--] | default.nix | 5 | ||||
-rwxr-xr-x[-rw-r--r--] | nixEnv/shells/shell-dmd-verNix.nix | 1 | ||||
-rwxr-xr-x[-rw-r--r--] | nixEnv/shells/shell-dmd-verUser.nix | 1 | ||||
-rwxr-xr-x[-rw-r--r--] | nixEnv/shells/shell-ldc-verNix.nix | 11 | ||||
-rwxr-xr-x[-rw-r--r--] | nixEnv/shells/shell-ldc-verUser.nix | 11 | ||||
-rw-r--r-- | org/spine_build_scaffold.org | 40 | ||||
-rw-r--r-- | project.nix | 4 |
7 files changed, 57 insertions, 16 deletions
diff --git a/default.nix b/default.nix index ebadd91..bf5940a 100644..100755 --- a/default.nix +++ b/default.nix @@ -1,3 +1,4 @@ +#!/usr/bin/env -S nix-build { pkgs ? import <nixpkgs> {}, stdenv ? pkgs.stdenv, }: @@ -6,7 +7,9 @@ mkDubDerivation rec { name = "spine-${version}"; version = "0.11.1"; src = ./.; - buildInputs = [ pkgs.sqlite ]; + buildInputs = [ + pkgs.sqlite + ]; meta = with stdenv.lib; { homepage = http://sisudoc.org; description = "a sisu like document parser"; diff --git a/nixEnv/shells/shell-dmd-verNix.nix b/nixEnv/shells/shell-dmd-verNix.nix index 7f16efe..cac08f4 100644..100755 --- a/nixEnv/shells/shell-dmd-verNix.nix +++ b/nixEnv/shells/shell-dmd-verNix.nix @@ -1,3 +1,4 @@ +#!/usr/bin/env -S nix-shell { pkgs ? import <nixpkgs> {} }: pkgs.mkShell { buildInputs = with pkgs; [ diff --git a/nixEnv/shells/shell-dmd-verUser.nix b/nixEnv/shells/shell-dmd-verUser.nix index 334aece..4e40c0b 100644..100755 --- a/nixEnv/shells/shell-dmd-verUser.nix +++ b/nixEnv/shells/shell-dmd-verUser.nix @@ -1,3 +1,4 @@ +#!/usr/bin/env -S nix-shell { pkgs ? import <nixpkgs> { overlays = [ ]; } }: diff --git a/nixEnv/shells/shell-ldc-verNix.nix b/nixEnv/shells/shell-ldc-verNix.nix index 0a6aa9a..748f553 100644..100755 --- a/nixEnv/shells/shell-ldc-verNix.nix +++ b/nixEnv/shells/shell-ldc-verNix.nix @@ -1,5 +1,12 @@ +#!/usr/bin/env -S nix-shell { pkgs ? import <nixpkgs> {} }: pkgs.mkShell { - buildInputs = with pkgs; - [ (import ./packages-ldc.nix { inherit pkgs; }) ]; + buildInputs = with pkgs; [ + (import ./packages-ldc.nix { inherit pkgs; }) + ]; + shellHook = '' + # nix-build + ## nix-build -I nixpkgs=<provide local nix path> + ## nix-build -I nixpkgs=/nixpkgs-ra/nixpkgs + ''; } diff --git a/nixEnv/shells/shell-ldc-verUser.nix b/nixEnv/shells/shell-ldc-verUser.nix index 1c9c092..d7f3267 100644..100755 --- a/nixEnv/shells/shell-ldc-verUser.nix +++ b/nixEnv/shells/shell-ldc-verUser.nix @@ -1,7 +1,14 @@ +#!/usr/bin/env -S nix-shell { pkgs ? import <nixpkgs> { overlays = [ (import ../overlays/ldcVersion.nix) ]; } }: pkgs.mkShell { - buildInputs = with pkgs; - [ (import ./packages-ldc.nix { inherit pkgs; }) ]; + buildInputs = with pkgs; [ + (import ./packages-ldc.nix { inherit pkgs; }) + ]; + shellHook = '' + # nix-build + ## nix-build -I nixpkgs=<provide local nix path> + ## nix-build -I nixpkgs=/nixpkgs-ra/nixpkgs + ''; } diff --git a/org/spine_build_scaffold.org b/org/spine_build_scaffold.org index a646763..dd043e2 100644 --- a/org/spine_build_scaffold.org +++ b/org/spine_build_scaffold.org @@ -1773,7 +1773,9 @@ in mkShell { with import ./mkDub.nix { inherit pkgs; }; mkDubDerivation { src = ./.; - buildInputs = [ pkgs.sqlite ]; + buildInputs = [ + pkgs.sqlite + ]; } #+END_SRC @@ -1807,6 +1809,11 @@ fi #+END_SRC ** shells shell.nix SELECT :shell: + + nix-shell + nix-shell --pure -I nixpkgs=/nixpkgs-ra/nixpkgs + nix-shell --pure -p "with import /nixpkgs-ra/nixpkgs {}; ldc" + *** dmd shell :dmd: - ln -sf nixEnv/shells/shell-dmd-verNix.nix shell.nix @@ -1819,7 +1826,7 @@ fi - ln -sf nixEnv/shells/shell-dmd-verNix.nix shell.nix - ln -sf nixEnv/dub/mkDub-dmd.nix mkDub.nix -#+BEGIN_SRC nix :tangle ../nixEnv/shells/shell-dmd-verNix.nix +#+BEGIN_SRC nix :tangle ../nixEnv/shells/shell-dmd-verNix.nix :tangle-mode (identity #o755) :shebang "#!/usr/bin/env -S nix-shell" { pkgs ? import <nixpkgs> {} }: <<nix_shell_mkshell_with_buildInputs_dmd>> #+END_SRC @@ -1829,7 +1836,7 @@ fi - ln -sf nixEnv/shells/shell-dmd-verUser.nix shell.nix - ln -sf nixEnv/dub/mkDub-dmd.nix mkDub.nix -#+BEGIN_SRC nix :tangle ../nixEnv/shells/shell-dmd-verUser.nix +#+BEGIN_SRC nix :tangle ../nixEnv/shells/shell-dmd-verUser.nix :tangle-mode (identity #o755) :shebang "#!/usr/bin/env -S nix-shell" <<nix_shell_overlay_user_version_dmd>> <<nix_shell_mkshell_with_buildInputs_dmd>> #+END_SRC @@ -1846,7 +1853,7 @@ fi - ln -sf nixEnv/shells/shell-ldc-verNix.nix shell.nix - ln -sf nixEnv/dub/mkDub-ldc.nix mkDub.nix -#+BEGIN_SRC nix :tangle ../nixEnv/shells/shell-ldc-verNix.nix +#+BEGIN_SRC nix :tangle ../nixEnv/shells/shell-ldc-verNix.nix :tangle-mode (identity #o755) :shebang "#!/usr/bin/env -S nix-shell" { pkgs ? import <nixpkgs> {} }: <<nix_shell_mkshell_with_buildInputs_ldc>> #+END_SRC @@ -1856,7 +1863,7 @@ fi - ln -sf nixEnv/shells/shell-ldc-verUser.nix shell.nix - ln -sf nixEnv/dub/mkDub-ldc.nix mkDub.nix -#+BEGIN_SRC nix :tangle ../nixEnv/shells/shell-ldc-verUser.nix +#+BEGIN_SRC nix :tangle ../nixEnv/shells/shell-ldc-verUser.nix :tangle-mode (identity #o755) :shebang "#!/usr/bin/env -S nix-shell" <<nix_shell_overlay_user_version_ldc>> <<nix_shell_mkshell_with_buildInputs_ldc>> #+END_SRC @@ -1875,8 +1882,14 @@ fi #+NAME: nix_shell_mkshell_with_buildInputs_ldc #+BEGIN_SRC nix pkgs.mkShell { - buildInputs = with pkgs; - [ (import ./packages-ldc.nix { inherit pkgs; }) ]; + buildInputs = with pkgs; [ + (import ./packages-ldc.nix { inherit pkgs; }) + ]; + shellHook = '' + # nix-build + ## nix-build -I nixpkgs=<provide local nix path> + ## nix-build -I nixpkgs=/nixpkgs-ra/nixpkgs + ''; } #+END_SRC @@ -1994,7 +2007,12 @@ in pkgs.mkShell { ** default.nix :default: -#+BEGIN_SRC txt :tangle ../default.nix +- default.nix -I nixpkgs=<provide local nix path> + e.g. default.nix -I nixpkgs=/nixpkgs-ra/nixpkgs +- nix-build -I nixpkgs=<provide local nix path> + e.g. nix-build -I nixpkgs=/nixpkgs-ra/nixpkgs + +#+BEGIN_SRC txt :tangle ../default.nix :tangle-mode (identity #o755) :shebang "#!/usr/bin/env -S nix-build" <<nix_project>> #+END_SRC @@ -2012,7 +2030,9 @@ mkDubDerivation rec { name = "spine-${version}"; version = "<<version_spine>>"; src = ./.; - buildInputs = [ pkgs.sqlite ]; + buildInputs = [ + pkgs.sqlite + ]; meta = with stdenv.lib; { homepage = http://sisudoc.org; description = "a sisu like document parser"; @@ -2456,7 +2476,7 @@ 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 "dr_build_scaffold.org" file make tangle) -#+BEGIN_SRC sh :tangle ../tangle :tangle-mode (identity #o755) :shebang #!/bin/sh +#+BEGIN_SRC sh :tangle ../tangle :tangle-mode (identity #o755) :shebang "#!/bin/sh" # -*- mode: shell-script -*- # tangle files with org-mode DIR=`pwd` diff --git a/project.nix b/project.nix index ebadd91..9b335e3 100644 --- a/project.nix +++ b/project.nix @@ -6,7 +6,9 @@ mkDubDerivation rec { name = "spine-${version}"; version = "0.11.1"; src = ./.; - buildInputs = [ pkgs.sqlite ]; + buildInputs = [ + pkgs.sqlite + ]; meta = with stdenv.lib; { homepage = http://sisudoc.org; description = "a sisu like document parser"; |