aboutsummaryrefslogtreecommitdiffhomepage
path: root/org/config_nix.org
diff options
context:
space:
mode:
authorRalph Amissah <ralph.amissah@gmail.com>2022-08-03 18:28:58 -0400
committerRalph Amissah <ralph.amissah@gmail.com>2022-09-28 13:21:40 -0400
commitace605ee4d96b7ee2891246655478f46862d357f (patch)
treee9e59800591255b168e73bd015762e2ba74da662 /org/config_nix.org
parentorg nix adjust (diff)
org noweb adjustments
Diffstat (limited to 'org/config_nix.org')
-rw-r--r--org/config_nix.org38
1 files changed, 28 insertions, 10 deletions
diff --git a/org/config_nix.org b/org/config_nix.org
index 719c378..d6df3aa 100644
--- a/org/config_nix.org
+++ b/org/config_nix.org
@@ -43,16 +43,19 @@ nix-build project.nix
- default.nix
+#+HEADER: :noweb yes
#+BEGIN_SRC sh
nix-shell --pure
nix-build -I nixpkgs=<<nixpkgs_local>>
-nix-build -I .envrc --pure
+nix-build -I .envrc
#+END_SRC
#+BEGIN_SRC sh
nix build -f default.nix --print-build-logs
nix build -f derivation.nix --print-build-logs
nix shell -f default.nix --print-build-logs
+# nix build -f project.nix
+# nix build -f spine.nix
nix develop --build -f derivation.nix -I .envrc --print-build-logs
#+END_SRC
@@ -72,7 +75,8 @@ nix show-derivation /nix/store/q7n14bm8j5vzm62qaraczdb4bpyf59vv-spine-0.11.1.drv
#+HEADER: :tangle ../.envrc
#+BEGIN_SRC sh
-NIX_ENFORCE_PURITY=0
+use flake
+NIX_ENFORCE_PURITY=1
NixDirEnvVersion="2.1.2"
if ! has nix_direnv_version || ! nix_direnv_version ${NixDirEnvVersion}; then
# https://github.com/nix-community/nix-direnv
@@ -137,6 +141,7 @@ fi
- bespoke modify appropriately and generate if needed
#+HEADER: :tangle ../.envrc-local_
+#+HEADER: :noweb yes
#+BEGIN_SRC nix
echo ".envrc called .envrc-local"
export NIX_PATH=<<nix_path_channel>>
@@ -190,6 +195,7 @@ echo '
,#+BEGIN_SRC sh
nix-shell --pure
+nix-build
nix build -f default.nix --print-build-logs
nix shell -f default.nix --print-build-logs
nix develop --build -f derivation.nix -I .envrc --print-build-logs
@@ -483,6 +489,7 @@ postInstall:
# nix-instantiate | nix-build
#+HEADER: :tangle ../flake.nix
+#+HEADER: :noweb yes
#+BEGIN_SRC nix
{
description = "A sisu like parser and document generator";
@@ -552,6 +559,7 @@ postInstall:
}
#+END_SRC
+#+HEADER: :noweb yes
#+BEGIN_SRC nix
{
description = "a sisu like parser & document generator";
@@ -577,6 +585,7 @@ postInstall:
}
#+END_SRC
+#+HEADER: :noweb yes
#+BEGIN_SRC nix
{
description = "a sisu like document parser";
@@ -671,6 +680,7 @@ postInstall:
#+HEADER: :tangle ../shell.nix
#+HEADER: :tangle-mode (identity #o755)
#+HEADER: :shebang "#!/usr/bin/env -S nix-shell --pure"
+#+HEADER: :noweb yes
#+BEGIN_SRC nix
{ pkgs ? import <nixpkgs> {} }:
with pkgs;
@@ -688,7 +698,6 @@ mkShell {
if [[ -f ".envrc" ]]; then
source .envrc
fi
- eval "$(starship init bash)"
'';
}
@@ -700,7 +709,7 @@ mkShell {
# - nix-shell -p nixFlakes
# - nix-shell -p nixFlakes --pure
-# - nix-shell -p nixFlakes --pure -p "with import <<nixpkgs_local>> {}; [dub ldc]"
+# - nix-shell -p nixFlakes --pure -p "with import <<nixpkgs_local>> {}; [nix dub ldc]"
# - nix-shell shell.nix direnv: export +IN_NIX_SHELL
# - nix-shell shell.nix
@@ -719,9 +728,9 @@ mkShell {
# - nix shell -f default.nix --print-build-logs
-# - nix build -I .envrc --print-build-logs --pure
-# - nix build -f default.nix --print-build-logs --pure
-# - nix build -f derivation.nix --print-build-logs --pure
+# - nix build -I .envrc --print-build-logs
+# - nix build -f default.nix --print-build-logs
+# - nix build -f derivation.nix --print-build-logs
# - nix build `nix-instantiate`
# - nix build `nix-instantiate -I .envrc`
@@ -731,6 +740,7 @@ mkShell {
# - nix run default.nix --print-build-logs
# - nix run -I .envrc default.nix --print-build-logs
+# - nix-shell -I .envrc --pure
# - nix develop --build -f derivation.nix -I .envrc --print-build-logs
#+END_SRC
@@ -746,7 +756,7 @@ nix-prefetch-git
validatePkgConfig
jq
git
-#ps
+ps
#+END_SRC
***** packages d build related
@@ -782,7 +792,6 @@ aria
#+NAME: shell_packages_candy
#+BEGIN_SRC nix
### candy
-jq
starship
#+END_SRC
@@ -859,6 +868,7 @@ pkgs.mkShell {
- nix-build -I nixpkgs=<provide local nix path>
e.g. nix-build -I nixpkgs=<<nixpkgs_local>>
+#+HEADER: :noweb yes
#+BEGIN_SRC sh
nix-build -I nixpkgs=<<nixpkgs_local>>
nix-build -I .envrc-local
@@ -887,6 +897,7 @@ pkgs.callPackage ./derivation.nix {}
#+HEADER: :tangle ../derivation.nix
#+HEADER: :tangle-mode (identity #o644)
+#+HEADER: :noweb yes
#+BEGIN_SRC nix
{ pkgs ? import <nixpkgs> {},
stdenv ? pkgs.stdenv,
@@ -1007,6 +1018,7 @@ installPhase = ''
*** project meta
#+NAME: nix_project_meta
+#+HEADER: :noweb yes
#+BEGIN_SRC nix
meta = with pkgs.lib; {
pname = "spine";
@@ -1097,6 +1109,7 @@ meta = with pkgs.lib; {
**** dub2nix with pkgs shared
#+NAME: nix_with_pkgs
+#+HEADER: :noweb yes
#+BEGIN_SRC nix
with pkgs; [
<<nix_shell_with_pkgs_list>>
@@ -1137,6 +1150,7 @@ fi
**** .envrc-local
#+HEADER: :tangle "../sundry/spine_search_cgi/.envrc-local_"
+#+HEADER: :noweb yes
#+BEGIN_SRC nix
export NIX_PATH=<<nix_path_channel>>
#export NIX_PATH=nixpkgs=<<nixpkgs_local>>
@@ -1289,6 +1303,7 @@ nix develop
nix flake update
#+HEADER: :tangle "../sundry/spine_search_cgi/flake.nix"
+#+HEADER: :noweb yes
#+BEGIN_SRC nix
{
description = "a sisu like document parser search form";
@@ -1319,6 +1334,7 @@ nix flake update
#+HEADER: :tangle "../sundry/spine_search_cgi/shell.nix"
#+HEADER: :tangle-mode (identity #o755)
#+HEADER: :shebang "#!/usr/bin/env -S nix-shell --pure"
+#+HEADER: :noweb yes
#+BEGIN_SRC nix
{ pkgs ? import <nixpkgs> {} }:
with pkgs;
@@ -1334,7 +1350,6 @@ mkShell {
if [[ -f ".envrc" ]]; then
source .envrc
fi
- eval "$(starship init bash)"
'';
}
#+END_SRC
@@ -1353,6 +1368,7 @@ pkgs.callPackage ./derivation.nix {}
#+HEADER: :tangle "../sundry/spine_search_cgi/derivation.nix"
#+HEADER: :tangle-mode (identity #o644)
+#+HEADER: :noweb yes
#+BEGIN_SRC nix
{ pkgs ? import <nixpkgs> {},
stdenv ? pkgs.stdenv,
@@ -1501,6 +1517,7 @@ spine_search
**** nixpkgs select path SELECT
#+NAME: nixpkgs_path
+#+HEADER: :noweb yes
#+BEGIN_SRC nix
<<nixpkgs_path_local>>
#+END_SRC
@@ -1581,6 +1598,7 @@ nixpkgs=<<nixpkgs_path_local>>
github:nixos/nixpkgs
#+END_SRC
+#+HEADER: :noweb yes
#+BEGIN_SRC nix
<<nixpkgs_path_local>>
#+END_SRC