python312Packages.units-llnl: init at 0.13.1
This commit is contained in:
		
							parent
							
								
									ff6e587dbd
								
							
						
					
					
						commit
						ce41489714
					
				
							
								
								
									
										56
									
								
								pkgs/development/python-modules/units-llnl/default.nix
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										56
									
								
								pkgs/development/python-modules/units-llnl/default.nix
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,56 @@ | |||||||
|  | { | ||||||
|  |   lib, | ||||||
|  |   buildPythonPackage, | ||||||
|  |   units-llnl, | ||||||
|  | 
 | ||||||
|  |   # build-system | ||||||
|  |   nanobind, | ||||||
|  |   scikit-build-core, | ||||||
|  | 
 | ||||||
|  |   # nativeBuildInputs | ||||||
|  |   cmake, | ||||||
|  |   # NOTE that if top-level units-llnl package uses cmakeFlags other then | ||||||
|  |   # Nixpkgs' default, the build might fail, and you'd want to pick only the | ||||||
|  |   # cmakeFlags that don't cause a failure. See also: | ||||||
|  |   # https://github.com/scipp/scipp/issues/3705 | ||||||
|  |   cmakeFlags ? units-llnl.cmakeFlags, | ||||||
|  |   ninja, | ||||||
|  | }: | ||||||
|  | 
 | ||||||
|  | buildPythonPackage { | ||||||
|  |   inherit (units-llnl) | ||||||
|  |     pname | ||||||
|  |     version | ||||||
|  |     src | ||||||
|  |     meta | ||||||
|  |     ; | ||||||
|  |   pyproject = true; | ||||||
|  | 
 | ||||||
|  |   build-system = [ | ||||||
|  |     nanobind | ||||||
|  |     scikit-build-core | ||||||
|  |   ]; | ||||||
|  | 
 | ||||||
|  |   nativeBuildInputs = [ | ||||||
|  |     cmake | ||||||
|  |     ninja | ||||||
|  |   ]; | ||||||
|  |   dontUseCmakeConfigure = true; | ||||||
|  |   env = { | ||||||
|  |     SKBUILD_CMAKE_ARGS = lib.strings.concatStringsSep ";" ( | ||||||
|  |       cmakeFlags | ||||||
|  |       ++ [ | ||||||
|  |         (lib.cmakeBool "UNITS_BUILD_PYTHON_LIBRARY" true) | ||||||
|  |       ] | ||||||
|  |     ); | ||||||
|  |   }; | ||||||
|  | 
 | ||||||
|  |   # Also upstream turns off testing for the python build so it seems, see: | ||||||
|  |   # https://github.com/LLNL/units/blob/v0.13.1/pyproject.toml#L65-L66 However | ||||||
|  |   # they do seem to use pytest for their CI, but in our case it fails due to | ||||||
|  |   # missing googletest Python modules, which we don't know how to build. | ||||||
|  |   doCheck = false; | ||||||
|  |   passthru = { | ||||||
|  |     top-level = units-llnl; | ||||||
|  |   }; | ||||||
|  | } | ||||||
| @ -18748,6 +18748,10 @@ self: super: with self; { | |||||||
| 
 | 
 | ||||||
|   unique-log-filter = callPackage ../development/python-modules/unique-log-filter { }; |   unique-log-filter = callPackage ../development/python-modules/unique-log-filter { }; | ||||||
| 
 | 
 | ||||||
|  |   units-llnl = callPackage ../development/python-modules/units-llnl { | ||||||
|  |     inherit (pkgs) units-llnl; | ||||||
|  |   }; | ||||||
|  | 
 | ||||||
|   unittest-data-provider = callPackage ../development/python-modules/unittest-data-provider { }; |   unittest-data-provider = callPackage ../development/python-modules/unittest-data-provider { }; | ||||||
| 
 | 
 | ||||||
|   unittest-xml-reporting = callPackage ../development/python-modules/unittest-xml-reporting { }; |   unittest-xml-reporting = callPackage ../development/python-modules/unittest-xml-reporting { }; | ||||||
|  | |||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user
	 Doron Behar
						Doron Behar