Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at devShellTools-shell 38 lines 969 B view raw
1{ 2 cudaAtLeast, 3 gmp, 4 expat, 5 libxcrypt-legacy, 6 ncurses6, 7 python310, 8 python311, 9 python312, 10 stdenv, 11 lib, 12}: 13prevAttrs: { 14 buildInputs = 15 prevAttrs.buildInputs or [ ] 16 # x86_64 only needs gmp from 12.0 and on 17 ++ lib.lists.optionals (cudaAtLeast "12.0") [ gmp ] 18 # Additional dependencies for CUDA 12.5 and later, which 19 # support multiple Python versions. 20 ++ lib.lists.optionals (cudaAtLeast "12.5") [ 21 libxcrypt-legacy 22 ncurses6 23 python310 24 python311 25 python312 26 ] 27 # aarch64,sbsa needs expat 28 ++ lib.lists.optionals (stdenv.hostPlatform.isAarch64) [ expat ]; 29 30 installPhase = 31 prevAttrs.installPhase or "" 32 # Python 3.8 is not in nixpkgs anymore, delete Python 3.8 cuda-gdb support 33 # to avoid autopatchelf failing to find libpython3.8.so. 34 + lib.optionalString (cudaAtLeast "12.5") '' 35 find $bin -name '*python3.8*' -delete 36 find $bin -name '*python3.9*' -delete 37 ''; 38}