aboutsummaryrefslogtreecommitdiffhomepage
path: root/shell.nix
diff options
context:
space:
mode:
Diffstat (limited to 'shell.nix')
-rwxr-xr-xshell.nix88
1 files changed, 39 insertions, 49 deletions
diff --git a/shell.nix b/shell.nix
index e27e127..07031df 100755
--- a/shell.nix
+++ b/shell.nix
@@ -1,16 +1,17 @@
#!/usr/bin/env -S nix-shell --pure
+#!nix-shell -i bash
{ pkgs ? import <nixpkgs> {} }:
with pkgs;
mkShell {
buildInputs = [
### nix_related
direnv
- nixFlakes
+ nixVersions.unstable #nixFlakes
nix-prefetch-git
validatePkgConfig
- jq
+ nix-tree jq
git
- #ps
+ ps
### d_build_related
## package manager
dub
@@ -43,54 +44,43 @@ mkShell {
# ### i18n translation related
# perl534Packages.Po4a
### candy
- jq
starship
];
shellHook = ''
- if [[ -f ".envrc" ]]; then
- source .envrc
- fi
- eval "$(starship init bash)"
+ #if [[ -f ".envrc" ]]; then
+ # source .envrc
+ #fi
+ nix flake lock --update-input nixpkgs
+ echo ""
+ echo "nix flake metadata:"
+ nix flake metadata
+ echo ""
+ echo "nix flake check:"
+ nix flake check
+ echo ""
+ echo "nix flake show:"
+ nix flake show
+ echo ""
+ echo "nix build or nix develop? (suggestions):"
+ echo '- nix build'
+ echo ' nix build .#spine --print-build-logs'
+ echo ' nix build --print-build-logs'
+ echo '- nix run'
+ echo ' nix run .#spine --print-build-logs'
+ echo ' nix run default.nix --print-build-logs'
+ echo '- nix shell'
+ echo ' nix shell --print-build-logs --command spine -v'
+ echo '- nix develop'
+ echo ' nix develop --build .#spine --print-build-logs'
+ echo ' nix develop --build -f derivation.nix -I .envrc --print-build-logs'
+ echo ' nix develop ; eval "$buildPhase"'
+ echo ""
+ echo 'spine -v'
+ echo "examine"
+ echo ' nix-instantiate | nix show-derivation | jq'
+ echo ' nix-build . --no-out-link | xargs -o nix-tree'
+ echo ' nix-tree --derivation .#spine'
+ echo ""
+ #echo "ldc `${pkgs.ldc}/bin/ldc2 -v`"
'';
}
-
-# - shell.nix -I .envrc
-# - shell.nix -I .envrc --pure
-# - nix-shell -I nixpkgs=/nixpkgs-ra/nixpkgs --pure
-# - nix-shell -p "with import /nixpkgs-ra/nixpkgs {}; ldc" --pure
-# - nix-shell -p "with import /nixpkgs-ra/nixpkgs {}; [dub ldc]" --pure
-
-# - nix-shell -p nixFlakes
-# - nix-shell -p nixFlakes --pure
-# - nix-shell -p nixFlakes --pure -p "with import /nixpkgs-ra/nixpkgs {}; [dub ldc]"
-# - nix-shell shell.nix direnv: export +IN_NIX_SHELL
-# - nix-shell shell.nix
-
-# - nix-build -I nixpkgs=/nixpkgs-ra/nixpkgs --pure
-# - nix-build -I .envrc --pure
-# - nix-build default.nix -I .envrc && results/bin/spine -v
-
-# - nix-instantiate | nix show-derivation | jq
-# - nix-instantiate -I .envrc | nix show-derivation -f derivation.nix -I .envrc | jq
-# - nix-instantiate | nix show-derivation --recursive | jq
-# - nix-instantiate -I .envrc | nix show-derivation -f derivation.nix --recursive -I .envrc | jq
-# - nix-instantiate | nix-build
-# - nix-instantiate -I .envrc | nix-build -I .envrc
-
-# - nix shell -c default.nix
-
-# - 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 `nix-instantiate`
-# - nix build `nix-instantiate -I .envrc`
-
-# - nix build -f default.nix && ./result/bin/spine -v && noti -t "spine build" -m "see ./result/bin/spine"
-
-# - nix run default.nix --print-build-logs
-# - nix run -I .envrc default.nix --print-build-logs
-
-# - nix develop --build -f derivation.nix -I .envrc --print-build-logs