Skip to content

Commit c908190

Browse files
authored
chore: introduce nix configuration (#72)
1 parent ab643e1 commit c908190

File tree

3 files changed

+149
-0
lines changed

3 files changed

+149
-0
lines changed

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,3 @@
11
/target
2+
.direnv
3+
.envrc

flake.lock

Lines changed: 100 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

flake.nix

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
{
2+
description = "Development environment flake";
3+
4+
inputs = {
5+
nixpkgs.url = "github:NixOS/nixpkgs/nixos-24.11";
6+
fenix = {
7+
url = "github:nix-community/fenix";
8+
inputs.nixpkgs.follows = "nixpkgs";
9+
};
10+
flake-utils.url = "github:numtide/flake-utils";
11+
};
12+
13+
outputs = { self, nixpkgs, fenix, flake-utils }:
14+
flake-utils.lib.eachDefaultSystem (system:
15+
let
16+
pkgs = nixpkgs.legacyPackages.${system};
17+
pythonEnv = pkgs.python3.withPackages (ps: with ps; [
18+
psycopg
19+
]);
20+
buildInputs = with pkgs; [
21+
];
22+
in
23+
{
24+
devShells.default = pkgs.mkShell {
25+
nativeBuildInputs = with pkgs; [
26+
pkg-config
27+
git
28+
mold
29+
(fenix.packages.${system}.stable.withComponents [
30+
"cargo"
31+
"clippy"
32+
"rust-src"
33+
"rustc"
34+
"rustfmt"
35+
"rust-analyzer"
36+
])
37+
cargo-nextest
38+
curl
39+
gnuplot ## for cargo bench
40+
pythonEnv
41+
postgresql
42+
];
43+
44+
LD_LIBRARY_PATH = pkgs.lib.makeLibraryPath buildInputs;
45+
};
46+
});
47+
}

0 commit comments

Comments
 (0)