Skip to content

Commit f08d62a

Browse files
yvan-srakarlouf
authored andcommitted
Add nix configs, and uv lock files
1 parent 33d6deb commit f08d62a

File tree

5 files changed

+2038
-0
lines changed

5 files changed

+2038
-0
lines changed

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ __pycache__
44
.coverage
55
.direnv
66
.env
7+
.envrc
78
.idea
89
.pytest_cache
910
.venv

flake.lock

+96
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

flake.nix

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
{
2+
inputs = {
3+
flake-utils.url = "github:numtide/flake-utils";
4+
nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
5+
rust-overlay.url = "github:oxalica/rust-overlay";
6+
};
7+
outputs = { flake-utils, nixpkgs, rust-overlay, ... }:
8+
flake-utils.lib.eachDefaultSystem (system:
9+
let
10+
overlays = [ (import rust-overlay) ];
11+
pkgs = import nixpkgs { inherit system overlays; };
12+
in {
13+
devShell = import ./shell.nix { inherit pkgs system; };
14+
});
15+
}

shell.nix

+14
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# If you plan to use `nix-shell` you have first to:
2+
#
3+
# $ nix-channel --add https://github.com/oxalica/rust-overlay/archive/master.tar.gz rust-overlay
4+
# $ nix-channel --update
5+
{ pkgs ? import <nixpkgs> { overlays = [ (import <rust-overlay>) ]; }
6+
, system ? builtins.currentSystem }:
7+
with pkgs;
8+
let
9+
toolchain = (rust-bin.fromRustupToolchainFile ./rust-toolchain).override {
10+
extensions = [ "rust-src" "rust-analyzer" "clippy" ];
11+
};
12+
in mkShell {
13+
buildInputs = [ toolchain openssl pre-commit pkg-config python3 uv ];
14+
}

0 commit comments

Comments
 (0)