@@ -65,7 +65,7 @@ assert (buildConfig ? xpuVersion) -> xpuSupport;
6565assert ( buildConfig . metal or false ) -> stdenv . hostPlatform . isDarwin ;
6666
6767let
68- extensionName = builtins . replaceStrings [ "-" ] [ "_" ] kernelName ;
68+ moduleName = builtins . replaceStrings [ "-" ] [ "_" ] kernelName ;
6969
7070 # On Darwin, we need the host's xcrun for `xcrun metal` to compile Metal shaders.
7171 # It's not supported by the nixpkgs shim.
8080in
8181
8282stdenv . mkDerivation ( prevAttrs : {
83- name = "${ extensionName } -torch-ext" ;
83+ name = "${ kernelName } -torch-ext" ;
8484
8585 inherit
8686 doAbiCheck
87- extensionName
87+ moduleName
8888 nvccThreads
8989 src
9090 ;
@@ -232,15 +232,15 @@ stdenv.mkDerivation (prevAttrs: {
232232 postInstall = ''
233233 (
234234 cd ..
235- cp -r torch-ext/${ extensionName } /* $out/
235+ cp -r torch-ext/${ moduleName } /* $out/
236236 )
237- mv $out/_${ extensionName } _*/* $out/
238- rm -d $out/_${ extensionName } _${ rev }
237+ mv $out/_${ moduleName } _*/* $out/
238+ rm -d $out/_${ moduleName } _${ rev }
239239
240240 # Set up a compatibility module for older kernels versions, remove when
241241 # the updated kernels has been around for a while.
242- mkdir $out/${ extensionName }
243- cp ${ ./compat.py } $out/${ extensionName } /__init__.py
242+ mkdir $out/${ moduleName }
243+ cp ${ ./compat.py } $out/${ moduleName } /__init__.py
244244 ''
245245 + ( lib . optionalString ( stripRPath && stdenv . hostPlatform . isLinux ) ) ''
246246 find $out/ -name '*.so' \
0 commit comments