-
Notifications
You must be signed in to change notification settings - Fork 0
/
flake.nix
65 lines (63 loc) · 1.72 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
{
description = "Leptos + Axum + Sqlx + Tailwindcss development flake";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
nixpkgs_daisyui.url = "github:NixOS/nixpkgs/dc763d353cdf5c5cd7bf2c7af4b750960e66cce7";
flake-utils.url = "github:numtide/flake-utils";
rust-overlay = {
url = "github:oxalica/rust-overlay";
inputs.nixpkgs.follows = "nixpkgs";
};
};
outputs = {
self,
nixpkgs,
nixpkgs_daisyui,
flake-utils,
rust-overlay,
}:
flake-utils.lib.eachDefaultSystem (system: let
overlays = [(import rust-overlay)];
pkgs = import nixpkgs {
inherit system overlays;
};
pkgs_daisyui = import nixpkgs_daisyui {
inherit system;
};
my-tailwindcss = pkgs.nodePackages.tailwindcss.overrideAttrs (oa: {
plugins = [pkgs_daisyui.daisyui];
});
in
with pkgs; {
devShells.default = mkShell {
shellHook = ''
export PKG_CONFIG_PATH="${pkgs.openssl.dev}/lib/pkgconfig";
'';
nativeBuildInputs = [
pkg-config
];
buildInputs = [
git
openssl
(rust-bin.stable.latest.default.override {
extensions = ["rust-src" "rust-std" "rust-analyzer" "rustfmt" "clippy"];
targets = ["x86_64-unknown-linux-gnu" "wasm32-unknown-unknown"];
})
binaryen
trunk
cargo-leptos
leptosfmt
sqlite
sqlx-cli
nil
alejandra
statix
deadnix
taplo
sass
my-tailwindcss
tailwindcss-language-server
];
};
});
}