aboutsummaryrefslogtreecommitdiffhomepage
path: root/shell.nix
blob: e27e127264994c0a26d1e0105c107aff1af0755c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
#!/usr/bin/env -S nix-shell --pure
{ pkgs ? import <nixpkgs> {} }:
with pkgs;
mkShell {
  buildInputs = [
    ### nix_related
    direnv
    nixFlakes
    nix-prefetch-git
    validatePkgConfig
    jq
    git
    #ps
    ### d_build_related
    ## package manager
    dub
    ## compiler
    ldc
    rund
    ## linker
    #lld
    #mold
    ## builder
    #ninja
    #meson
    ### sqlite search related
    sqlite
    # ### pdf_latex_related
    # source-sans-pro
    # source-serif-pro
    # source-code-pro
    # texlive.combined.scheme-full
    # ### xml_and_epub_related
    # libxml2
    # html-tidy
    # xmlstarlet
    # epubcheck
    # ebook_tools
    # epr
    # sigil
    # calibre #(suite includes: ebook-viewer)
    # foliate
    # ### i18n translation related
    # perl534Packages.Po4a
    ### candy
    jq
    starship
  ];
  shellHook = ''
    if [[ -f ".envrc" ]]; then
      source .envrc
    fi
    eval "$(starship init bash)"
  '';
}

# - 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