pythonPackages.cmd2: keep 0.8 version
...which is the last one with python2 support until ~ august 2018
This commit is contained in:
parent
bb47fd0fec
commit
65b15ba6a9
49
pkgs/development/python-modules/cmd2/old.nix
Normal file
49
pkgs/development/python-modules/cmd2/old.nix
Normal file
@ -0,0 +1,49 @@
|
|||||||
|
{ stdenv, fetchPypi, buildPythonPackage, pythonOlder
|
||||||
|
, pyperclip, six, pyparsing, vim
|
||||||
|
, contextlib2 ? null, subprocess32 ? null
|
||||||
|
, pytest, mock, which, fetchFromGitHub, glibcLocales
|
||||||
|
}:
|
||||||
|
buildPythonPackage rec {
|
||||||
|
pname = "cmd2";
|
||||||
|
version = "0.8.0";
|
||||||
|
|
||||||
|
src = fetchFromGitHub {
|
||||||
|
owner = "python-cmd2";
|
||||||
|
repo = "cmd2";
|
||||||
|
rev = version;
|
||||||
|
sha256 = "0nw2b7n7zg51bc3glxw0l9fn91mwjnjshklhmxhyvjbsg7khf64z";
|
||||||
|
};
|
||||||
|
|
||||||
|
LC_ALL="en_US.UTF-8";
|
||||||
|
|
||||||
|
postPatch = stdenv.lib.optional stdenv.isDarwin ''
|
||||||
|
# Fake the impure dependencies pbpaste and pbcopy
|
||||||
|
mkdir bin
|
||||||
|
echo '#/bin/sh' > bin/pbpaste
|
||||||
|
echo '#/bin/sh' > bin/pbcopy
|
||||||
|
chmod +x bin/{pbcopy,pbpaste}
|
||||||
|
export PATH=$(realpath bin):$PATH
|
||||||
|
'';
|
||||||
|
|
||||||
|
checkInputs= [ pytest mock which vim glibcLocales ];
|
||||||
|
checkPhase = ''
|
||||||
|
# test_path_completion_user_expansion might be fixed in the next release
|
||||||
|
py.test -k 'not test_path_completion_user_expansion'
|
||||||
|
'';
|
||||||
|
doCheck = !stdenv.isDarwin;
|
||||||
|
|
||||||
|
propagatedBuildInputs = [
|
||||||
|
pyperclip
|
||||||
|
six
|
||||||
|
pyparsing
|
||||||
|
]
|
||||||
|
++ stdenv.lib.optional (pythonOlder "3.5") contextlib2
|
||||||
|
++ stdenv.lib.optional (pythonOlder "3.0") subprocess32
|
||||||
|
;
|
||||||
|
|
||||||
|
meta = with stdenv.lib; {
|
||||||
|
description = "Enhancements for standard library's cmd module";
|
||||||
|
homepage = https://github.com/python-cmd2/cmd2;
|
||||||
|
maintainers = with maintainers; [ teto ];
|
||||||
|
};
|
||||||
|
}
|
@ -9142,7 +9142,9 @@ in {
|
|||||||
cachetools_1 = callPackage ../development/python-modules/cachetools/1.nix {};
|
cachetools_1 = callPackage ../development/python-modules/cachetools/1.nix {};
|
||||||
cachetools = callPackage ../development/python-modules/cachetools {};
|
cachetools = callPackage ../development/python-modules/cachetools {};
|
||||||
|
|
||||||
cmd2 = callPackage ../development/python-modules/cmd2 {};
|
cmd2_8 = callPackage ../development/python-modules/cmd2/old.nix {};
|
||||||
|
cmd2_9 = callPackage ../development/python-modules/cmd2 {};
|
||||||
|
cmd2 = if isPy27 then self.cmd2_8 else self.cmd2_9;
|
||||||
|
|
||||||
warlock = buildPythonPackage rec {
|
warlock = buildPythonPackage rec {
|
||||||
name = "warlock-${version}";
|
name = "warlock-${version}";
|
||||||
|
Loading…
x
Reference in New Issue
Block a user