diff options
Diffstat (limited to 'cuda/python/devenv.nix')
-rw-r--r-- | cuda/python/devenv.nix | 89 |
1 files changed, 89 insertions, 0 deletions
diff --git a/cuda/python/devenv.nix b/cuda/python/devenv.nix new file mode 100644 index 0000000..c32e55f --- /dev/null +++ b/cuda/python/devenv.nix @@ -0,0 +1,89 @@ +{ + pkgs, + lib, + config, + inputs, + ... +}: let + cpkgs = import inputs.nixpkgs { + system = pkgs.system; + config = { + allowUnfree = true; + cudaSupport = true; + }; + }; +in { + # https://devenv.sh/basics/ + env.GREET = "devenv"; + + # env.LD_LIBRARY_PATH = "/run/opengl-driver/lib"; + # env.LD_LIBRARY_PATH = "${pkgs.glibc}/lib"; + # env.CUDA_HOME = pkgs.cudaPackages.cudatoolkit; + # env.CUDA_PATH = pkgs.cudaPackages.cudatoolkit; + + # env.LD_LIBRARY_PATH = "/run/opengl-driver/lib:" + lib.makeLibraryPath config.packages; + # env.LD_LIBRARY_PATH = "/run/opengl-driver/lib"; + # # # Ensure Nix packages are discoverable by Python + # env.PYTHONPATH = lib.makeSearchPath "lib/python3.13/site-packages" pythonPkgs; + + # https://devenv.sh/packages/ + packages = with cpkgs; [ + git + # glib + # glibc + # libGL + # libGLU + # cudaPackages.cudatoolkit + # cudaPackages.cuda_cccl + # cudaPackages.cudnn + # cudaPackages.cuda_nvcc + # stdenv.cc.cc.lib + # zlib + python3.withPackages + (ps: + with ps; [ + torch + ]) + ]; + + # https://devenv.sh/languages/ + # languages.rust.enable = true; + + languages.python = { + enable = true; + venv.enable = true; + }; + # https://devenv.sh/processes/ + # processes.dev.exec = "${lib.getExe pkgs.watchexec} -n -- ls -la"; + + # https://devenv.sh/services/ + # services.postgres.enable = true; + + # https://devenv.sh/scripts/ + scripts.hello.exec = '' + echo hello from $GREET + ''; + + # https://devenv.sh/basics/ + enterShell = '' + hello # Run scripts directly + git --version # Use packages + ''; + + # https://devenv.sh/tasks/ + # tasks = { + # "myproj:setup".exec = "mytool build"; + # "devenv:enterShell".after = [ "myproj:setup" ]; + # }; + + # https://devenv.sh/tests/ + enterTest = '' + echo "Running tests" + git --version | grep --color=auto "${pkgs.git.version}" + ''; + + # https://devenv.sh/git-hooks/ + # git-hooks.hooks.shellcheck.enable = true; + + # See full reference at https://devenv.sh/reference/options/ +} |