forked from PRQL/prql
-
Notifications
You must be signed in to change notification settings - Fork 0
/
flake.nix
113 lines (100 loc) · 2.81 KB
/
flake.nix
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
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
{
description = "PRQL development environment";
inputs = {
nixpkgs.url = "github:nixos/nixpkgs";
flake-utils.url = "github:numtide/flake-utils";
naersk.url = "github:nix-community/naersk";
mdbook-footnote = {
url = "github:aljazerzen/mdbook-footnote";
inputs.nixpkgs.follows = "nixpkgs";
inputs.flake-utils.follows = "flake-utils";
inputs.naersk.follows = "naersk";
};
hyperlink = {
url = "github:aljazerzen/hyperlink";
inputs.nixpkgs.follows = "nixpkgs";
inputs.flake-utils.follows = "flake-utils";
inputs.naersk.follows = "naersk";
};
fenix = {
url = "github:nix-community/fenix";
inputs.nixpkgs.follows = "nixpkgs";
};
};
outputs = { self, nixpkgs, flake-utils, mdbook-footnote, hyperlink, fenix, naersk }:
flake-utils.lib.eachDefaultSystem (system:
let
pkgs = nixpkgs.legacyPackages.${system};
fenix_pkgs = fenix.packages.${system};
essentials = with pkgs; [
# rust toolchain
(fenix_pkgs.stable.withComponents [
"cargo"
"clippy"
"rust-src"
"rustc"
"rustfmt"
"rust-analyzer"
"llvm-tools-preview"
])
# tooling
clang # for llvm debugger in VSCode
# tools
cargo-nextest
bacon
cargo-audit
cargo-insta
cargo-release
pkg-config
openssl
cargo-llvm-cov
# actions
go-task
sd
ripgrep
nodePackages.prettier
#nodePackages.prettier-plugin-go-template
#nixpkgs-fmt
rsync
];
web = with pkgs; [
# book
mdbook
mdbook-admonish
mdbook-footnote.defaultPackage.${system}
# website
hugo
# playground
nodejs
nodePackages.npm
# link check
hyperlink.defaultPackage.${system}
];
bindings = with pkgs; [
# bindings
python311
zlib
maturin
ruff
black
wasm-bindgen-cli
wasm-pack
];
in
{
devShells.default = pkgs.mkShell {
buildInputs = essentials;
};
devShells.web = pkgs.mkShell {
buildInputs = essentials ++ web;
};
devShells.full = pkgs.mkShell {
buildInputs = essentials ++ web ++ bindings;
# needed for running wheels produced by Python maturin builds that are not manylinux
# shellHook = ''
# export LD_LIBRARY_PATH="${pkgs.lib.makeLibraryPath bindings}:$LD_LIBRARY_PATH"
# export LD_LIBRARY_PATH="${pkgs.stdenv.cc.cc.lib.outPath}/lib:$LD_LIBRARY_PATH"
# '';
};
});
}