nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
at python-updates 71 lines 1.9 kB view raw
1{ 2 backendStdenv, 3 buildRedist, 4 cudaAtLeast, 5 expat, 6 gmp, 7 lib, 8 libxcrypt-legacy, 9 ncurses, 10 python3, 11}: 12let 13 python3MajorMinorVersion = lib.versions.majorMinor python3.version; 14in 15buildRedist { 16 redistName = "cuda"; 17 pname = "cuda_gdb"; 18 19 outputs = [ 20 "out" 21 "bin" 22 ]; 23 24 allowFHSReferences = true; 25 26 buildInputs = 27 # only needs gmp from 12.0 and on 28 lib.optionals (cudaAtLeast "12.0") [ gmp ] 29 # aarch64, sbsa needs expat 30 ++ lib.optionals backendStdenv.hostPlatform.isAarch64 [ expat ] 31 # From 12.5, cuda-gdb comes with Python TUI wrappers 32 ++ lib.optionals (cudaAtLeast "12.5") [ 33 libxcrypt-legacy 34 ncurses 35 python3 36 ]; 37 38 # Remove binaries requiring Python3 versions we do not have 39 postInstall = lib.optionalString (cudaAtLeast "12.5") '' 40 pushd "''${!outputBin}/bin" >/dev/null 41 nixLog "removing cuda-gdb-python*-tui binaries for Python 3 versions other than ${python3MajorMinorVersion}" 42 for pygdb in cuda-gdb-python*-tui; do 43 if [[ "$pygdb" == "cuda-gdb-python${python3MajorMinorVersion}-tui" ]]; then 44 continue 45 fi 46 nixLog "removing $pygdb" 47 rm -rf "$pygdb" 48 done 49 unset -v pygdb 50 popd >/dev/null 51 ''; 52 53 brokenAssertions = [ 54 { 55 # TODO(@connorbaker): Figure out which are supported. 56 message = "python 3 version is supported"; 57 assertion = true; 58 } 59 ]; 60 61 meta = { 62 description = "NVIDIA tool for debugging CUDA applications on Linux and QNX systems"; 63 longDescription = '' 64 CUDA-GDB is the NVIDIA tool for debugging CUDA applications running on Linux and QNX. CUDA-GDB is an extension 65 to GDB, the GNU Project debugger. The tool provides developers with a mechanism for debugging CUDA 66 applications running on actual hardware. 67 ''; 68 homepage = "https://docs.nvidia.com/cuda/cuda-gdb"; 69 changelog = "https://docs.nvidia.com/cuda/cuda-gdb#release-notes"; 70 }; 71}