77, gmp
88} :
99let
10- inherit ( lib . attrsets ) recursiveUpdate ;
1110 inherit ( lib . lists ) optionals ;
12- inherit ( lib . strings ) optionalString versionAtLeast versionOlder ;
1311 inherit ( lib . versions ) majorMinor ;
1412 python3MajorMinorVersion = majorMinor python3 . version ;
1513in
@@ -26,19 +24,25 @@ prevAttrs: {
2624 postInstall =
2725 prevAttrs . postInstall or ""
2826 # Remove binaries requiring Python3 versions we do not have
29- + optionalString ( cudaAtLeast "12.5" ) ''
30- echo "removing cuda-gdb-python*-tui binaries for Python 3 versions we do not have"
31- find "'' ${!outputBin:?}/bin" \
32- -name cuda-gdb-python\*-tui \
33- \( ! -name "cuda-gdb-python${ python3MajorMinorVersion } -tui" \) \
34- -print -delete
27+ + lib . optionalString ( cudaAtLeast "12.5" ) ''
28+ pushd "'' ${!outputBin}/bin" >/dev/null
29+ nixLog "removing cuda-gdb-python*-tui binaries for Python 3 versions other than ${ python3MajorMinorVersion } "
30+ for pygdb in cuda-gdb-python*-tui; do
31+ if [[ "$pygdb" == "cuda-gdb-python${ python3MajorMinorVersion } -tui" ]]; then
32+ continue
33+ fi
34+ nixLog "removing $pygdb"
35+ rm -rf "$pygdb"
36+ done
37+ unset -v pygdb
38+ popd >/dev/null
3539 '' ;
3640
37- passthru = recursiveUpdate ( prevAttrs . passthru or { } ) {
38- brokenConditions = {
39- "Unsupported Python 3 version" =
40- ( cudaAtLeast "12.5" )
41- && ( versionOlder python3MajorMinorVersion "3.8" || versionAtLeast python3MajorMinorVersion "3.13" ) ;
42- } ;
43- } ;
41+ brokenAssertions = [
42+ {
43+ # TODO(@connorbaker): Figure out which are supported.
44+ message = "python 3 version is supported" ;
45+ assertion = true ;
46+ }
47+ ] ;
4448}
0 commit comments