aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--org/spine_build_scaffold.org37
-rwxr-xr-xproject.nix6
-rwxr-xr-xshell.nix4
-rwxr-xr-xspine.nix6
4 files changed, 29 insertions, 24 deletions
diff --git a/org/spine_build_scaffold.org b/org/spine_build_scaffold.org
index 79ecff7..0863822 100644
--- a/org/spine_build_scaffold.org
+++ b/org/spine_build_scaffold.org
@@ -1953,16 +1953,25 @@ nix flake update --recreate-lock-file
nix-build -I nixpkgs=<provide local nix path>
nix-build -I .envrc
+ nix build
+ nix build -f default.nix
+ nix build -f project.nix
+ nix build -f spine.nix
+
+ nix-shell shell.nix --pure
+ nix build -f default.nix
+ ./result/bin/spine
+
#+BEGIN_SRC nix :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 = ''
- nix-build
echo "built spine @ ./result/bin/spine"
- nix-instantiate | nix show-derivation | jq
+ #nix-instantiate | nix show-derivation | jq
'';
}
#+END_SRC
@@ -2056,6 +2065,11 @@ mkDubDerivation rec {
default.nix -I .envrc
default.nix
+ nix build
+ nix build -f default.nix
+ nix build -f project.nix
+ nix build -f spine.nix
+
#+BEGIN_SRC nix :tangle ../default.nix :tangle-mode (identity #o755) :shebang "#!/usr/bin/env -S nix-build"
{ pkgs ? import <nixpkgs> {},
stdenv ? pkgs.stdenv,
@@ -2094,11 +2108,7 @@ mkDubDerivation rec {
<<nix_dub2nix_with_pkgs>>
)
];
- shellHook = ''
- # nix-build -I nixpkgs=<provide local nix path>
- nix-build
- echo "built spine"
- '';
+ # buildPhase = [ ];
installPhase = ''
install -m755 -D spine $out/bin/spine
echo "built $out/bin/spine"
@@ -2131,11 +2141,7 @@ mkDubDerivation rec {
<<nix_dub2nix_with_pkgs>>
)
];
- shellHook = ''
- # nix-build -I nixpkgs=<provide local nix path>
- nix-build
- echo "built spine"
- '';
+ # buildPhase = [ ];
installPhase = ''
install -m755 -D spine $out/bin/spine
echo "built $out/bin/spine"
@@ -2484,6 +2490,13 @@ nix-shell --pure
nix-build -I nixpkgs=/nixpkgs-ra/nixpkgs/.gitworktree/ra/nixpkgs project.nix
#+END_SRC
+#+BEGIN_SRC sh
+nix build
+nix build -f default.nix
+nix build -f project.nix
+nix build -f spine.nix
+#+END_SRC
+
**** derivation .drv
#+BEGIN_SRC sh
diff --git a/project.nix b/project.nix
index 8acb093..6dbafcd 100755
--- a/project.nix
+++ b/project.nix
@@ -27,11 +27,7 @@ mkDubDerivation rec {
]
)
];
- shellHook = ''
- # nix-build -I nixpkgs=<provide local nix path>
- nix-build
- echo "built spine"
- '';
+ # buildPhase = [ ];
installPhase = ''
install -m755 -D spine $out/bin/spine
echo "built $out/bin/spine"
diff --git a/shell.nix b/shell.nix
index 941a217..17ccd5b 100755
--- a/shell.nix
+++ b/shell.nix
@@ -4,9 +4,9 @@ pkgs.mkShell {
buildInputs = with pkgs; [
(import ./nix/pkglst/shell-pkgs.nix { inherit pkgs; })
];
+ buildPhase = "nix build -f default.nix";
shellHook = ''
- nix-build
echo "built spine @ ./result/bin/spine"
- nix-instantiate | nix show-derivation | jq
+ #nix-instantiate | nix show-derivation | jq
'';
}
diff --git a/spine.nix b/spine.nix
index 690fb09..7a2d7d1 100755
--- a/spine.nix
+++ b/spine.nix
@@ -134,11 +134,7 @@ mkDubDerivation rec {
]
)
];
- shellHook = ''
- # nix-build -I nixpkgs=<provide local nix path>
- nix-build
- echo "built spine"
- '';
+ # buildPhase = [ ];
installPhase = ''
install -m755 -D spine $out/bin/spine
echo "built $out/bin/spine"