Part of: https://github.com/NixOS/nixpkgs/issues/108938 meta = with stdenv.lib; is a widely used pattern. We want to slowly remove the `stdenv.lib` indirection and encourage people to use `lib` directly. Thus let’s start with the meta field. This used a rewriting script to mostly automatically replace all occurances of this pattern, and add the `lib` argument to the package header if it doesn’t exist yet. The script in its current form is available at https://cs.tvl.fyi/depot@2f807d7f141068d2d60676a89213eaa5353ca6e0/-/blob/users/Profpatsch/nixpkgs-rewriter/default.nix
		
			
				
	
	
		
			40 lines
		
	
	
		
			778 B
		
	
	
	
		
			Nix
		
	
	
	
	
	
			
		
		
	
	
			40 lines
		
	
	
		
			778 B
		
	
	
	
		
			Nix
		
	
	
	
	
	
{ lib, stdenv
 | 
						|
, buildPythonPackage
 | 
						|
, fetchPypi
 | 
						|
, notebook
 | 
						|
, jsonschema
 | 
						|
, pythonOlder
 | 
						|
, requests
 | 
						|
, pytest
 | 
						|
, pyjson5
 | 
						|
}:
 | 
						|
 | 
						|
buildPythonPackage rec {
 | 
						|
  pname = "jupyterlab_server";
 | 
						|
  version = "1.2.0";
 | 
						|
  disabled = pythonOlder "3.5";
 | 
						|
 | 
						|
  src = fetchPypi {
 | 
						|
    inherit pname version;
 | 
						|
    sha256 = "5431d9dde96659364b7cc877693d5d21e7b80cea7ae3959ecc2b87518e5f5d8c";
 | 
						|
  };
 | 
						|
 | 
						|
  checkInputs = [ requests pytest ];
 | 
						|
  propagatedBuildInputs = [ notebook jsonschema pyjson5 ];
 | 
						|
 | 
						|
  # test_listing test fails
 | 
						|
  # this is a new package and not all tests pass
 | 
						|
  doCheck = false;
 | 
						|
 | 
						|
  checkPhase = ''
 | 
						|
    pytest
 | 
						|
  '';
 | 
						|
 | 
						|
  meta = with lib; {
 | 
						|
    description = "JupyterLab Server";
 | 
						|
    homepage = "https://jupyter.org";
 | 
						|
    license = licenses.bsdOriginal;
 | 
						|
    maintainers = [ maintainers.costrouc ];
 | 
						|
  };
 | 
						|
}
 |