Semi-automatic update generated by https://github.com/ryantm/nixpkgs-update tools. This update was made based on information from https://repology.org/metapackage/python3.7-cmd2/versions
		
			
				
	
	
		
			61 lines
		
	
	
		
			1.5 KiB
		
	
	
	
		
			Nix
		
	
	
	
	
	
			
		
		
	
	
			61 lines
		
	
	
		
			1.5 KiB
		
	
	
	
		
			Nix
		
	
	
	
	
	
{ stdenv, fetchPypi, buildPythonPackage, pythonOlder, isPy3k
 | 
						|
, pyperclip, six, pyparsing, vim, wcwidth, colorama, attrs
 | 
						|
, contextlib2 ? null, typing ? null, setuptools_scm
 | 
						|
, pytest, mock ? null, pytest-mock
 | 
						|
, which, glibcLocales
 | 
						|
}:
 | 
						|
buildPythonPackage rec {
 | 
						|
  pname = "cmd2";
 | 
						|
  version = "0.9.14";
 | 
						|
 | 
						|
  src = fetchPypi {
 | 
						|
    inherit pname version;
 | 
						|
    sha256 = "0rllwc4h89xdivy85nmgqdi2s0sk1zw31mlvrnlr9gz2902cnq93";
 | 
						|
  };
 | 
						|
 | 
						|
  LC_ALL="en_US.UTF-8";
 | 
						|
 | 
						|
  postPatch = stdenv.lib.optional stdenv.isDarwin ''
 | 
						|
    # Fake the impure dependencies pbpaste and pbcopy
 | 
						|
    mkdir bin
 | 
						|
    echo '#${stdenv.shell}' > bin/pbpaste
 | 
						|
    echo '#${stdenv.shell}' > bin/pbcopy
 | 
						|
    chmod +x bin/{pbcopy,pbpaste}
 | 
						|
    export PATH=$(realpath bin):$PATH
 | 
						|
  '';
 | 
						|
 | 
						|
  disabled = !isPy3k;
 | 
						|
 | 
						|
  buildInputs = [
 | 
						|
    setuptools_scm
 | 
						|
  ];
 | 
						|
 | 
						|
  propagatedBuildInputs = [
 | 
						|
    colorama
 | 
						|
    pyperclip
 | 
						|
    six
 | 
						|
    pyparsing
 | 
						|
    wcwidth
 | 
						|
    attrs
 | 
						|
  ]
 | 
						|
  ++ stdenv.lib.optionals (pythonOlder "3.5") [contextlib2 typing]
 | 
						|
  ;
 | 
						|
 | 
						|
 | 
						|
  doCheck = !stdenv.isDarwin;
 | 
						|
  # pytest-cov
 | 
						|
  # argcomplete  will generate errors
 | 
						|
  checkInputs= [ pytest mock which vim glibcLocales pytest-mock ]
 | 
						|
        ++ stdenv.lib.optional (pythonOlder "3.6") [ mock ];
 | 
						|
  checkPhase = ''
 | 
						|
    # test_path_completion_user_expansion might be fixed in the next release
 | 
						|
    py.test -k 'not test_path_completion_user_expansion'
 | 
						|
  '';
 | 
						|
 | 
						|
  meta = with stdenv.lib; {
 | 
						|
    description = "Enhancements for standard library's cmd module";
 | 
						|
    homepage = https://github.com/python-cmd2/cmd2;
 | 
						|
    maintainers = with maintainers; [ teto ];
 | 
						|
  };
 | 
						|
}
 |