Added python skeleton

This commit is contained in:
Jan-Bulthuis 2025-02-08 23:06:32 +01:00
parent 74ddbc24bb
commit 47c7b69afa
3 changed files with 30 additions and 33 deletions

View File

@ -17,10 +17,12 @@
url = "gitlab:doronbehar/nix-matlab"; url = "gitlab:doronbehar/nix-matlab";
inputs.nixpkgs.follows = "nixpkgs"; inputs.nixpkgs.follows = "nixpkgs";
}; };
flake-utils.url = "github:numtide/flake-utils";
}; };
outputs = outputs =
{ {
self,
nixpkgs, nixpkgs,
home-manager, home-manager,
stylix, stylix,
@ -67,6 +69,6 @@
}; };
}; };
}; };
devenv = ./shell-modules/default.nix; lib = import ./shell-modules/default.nix self.inputs;
}; };
} }

View File

@ -1,35 +1,30 @@
{ pkgs, ... }: { nixpkgs, flake-utils, ... }:
pkgs.mkShell { let
packages = with pkgs; [ imports = [
(python312.withPackages (p: [ ./languags/python.nix
p.numpy
p.scikit-learn
p.scipy
p.pandas
p.matplotlib
p.torch-bin
# p.torchvision
]))
libffi
openssl
stdenv.cc.cc
linuxPackages.nvidia_x11
binutils
cudatoolkit
libGLU
libGL
]; ];
LD_LIBRARY_PATH = pkgs.lib.makeLibraryPath ( in
with pkgs; {
[
stdenv.cc.cc mkShell =
linuxPackages.nvidia_x11 attrs:
binutils (flake-utils.lib.eachDefaultSystem (
cudatoolkit system:
libGLU let
libGL pkgs = import nixpkgs {
] inherit system;
); config.allowUnfree = true;
CUDA_PATH = pkgs.cudatoolkit; };
modules = [
attrs
] ++ imports;
evaluated = nixpkgs.lib.evalModules { inherit modules; };
in
{
devShells.default = pkgs.mkShell {
TEST_ENV = builtins.trace evaluated.config "HELLO";
};
}
));
} }

View File