Skip to content

Commit

Permalink
update flake with other python versions
Browse files Browse the repository at this point in the history
  • Loading branch information
Michael-J-Ward committed Jun 12, 2024
1 parent 96d8012 commit 705ba38
Showing 1 changed file with 53 additions and 3 deletions.
56 changes: 53 additions & 3 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
pkgs.openssl
pkgs.protobuf
];
rust-toolchain = pkgs.symlinkJoin {
rust-toolchain = python: pkgs.symlinkJoin {
name = "rust-toolchain";
paths = [
pkgs.rustc
Expand All @@ -33,7 +33,7 @@
pkgs.cargo-watch
pkgs.rust-analyzer
pkgs.rustPlatform.rustcSrc
(pkgs.python3.withPackages (python-pkgs: [
(python.withPackages (python-pkgs: [
python-pkgs.numpy
python-pkgs.pyarrow
]))
Expand Down Expand Up @@ -118,14 +118,64 @@
buildInputs = nonRustDeps;
nativeBuildInputs = with pkgs; [
just
rust-toolchain
(rust-toolchain python311)
(pkgs.hiPrio pkgs.bashInteractive) # needed so it doesn't mangle terminal in vscode
python311
pre-commit
];
# RUST_BACKTRACE = 1;
};

# Rust dev environment - python310
devShells.py310 = pkgs.mkShell {
inherit NIX_LD_LIBRARY_PATH;
inputsFrom = [
config.treefmt.build.devShell
];
shellHook = ''
# For rust-analyzer 'hover' tooltips to work.
export RUST_SRC_PATH=${pkgs.rustPlatform.rustLibSrc}
echo
echo "🍎🍎 Run 'just <recipe>' to get started"
just
'';
buildInputs = nonRustDeps;
nativeBuildInputs = with pkgs; [
just
(rust-toolchain python310)
(pkgs.hiPrio pkgs.bashInteractive) # needed so it doesn't mangle terminal in vscode
python310
pre-commit
];
# RUST_BACKTRACE = 1;
};

# Rust dev environment - python37
devShells.py37 = pkgs.mkShell {
inherit NIX_LD_LIBRARY_PATH;
inputsFrom = [
config.treefmt.build.devShell
];
shellHook = ''
# For rust-analyzer 'hover' tooltips to work.
export RUST_SRC_PATH=${pkgs.rustPlatform.rustLibSrc}
echo
echo "🍎🍎 Run 'just <recipe>' to get started"
just
'';
buildInputs = nonRustDeps;
nativeBuildInputs = with pkgs; [
just
(rust-toolchain python37)
(pkgs.hiPrio pkgs.bashInteractive) # needed so it doesn't mangle terminal in vscode
python37
pre-commit
];
# RUST_BACKTRACE = 1;
};

# NIXPKGS_ALLOW_UNFREE=1 nix develop '.#conda' --impure
# conda install -c conda-forge boa conda-verify
# NOTE: conda env create fails probably because I am not on nvidia
Expand Down

0 comments on commit 705ba38

Please sign in to comment.