Skip to content

Commit 6f615c0

Browse files
committed
Add direnv, nix configs, and uv lock file
1 parent b2c419a commit 6f615c0

File tree

6 files changed

+2042
-0
lines changed

6 files changed

+2042
-0
lines changed

.envrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
use flake

.python-version

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
/nix/store/qrc496n6fsqp4p5m5h8wmw5d5jwyw5mr-python3-3.12.8/bin/python3

flake.lock

Lines changed: 96 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: 15 additions & 0 deletions
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

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
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 = [ gcc openssl pkg-config python3 uv ];
14+
shellHook = ''
15+
source .venv/bin/activate
16+
'';
17+
}

0 commit comments

Comments
 (0)