diff options
author | Tuomas Tynkkynen <tuomas@tuxera.com> | 2018-02-28 20:52:49 +0200 |
---|---|---|
committer | Tuomas Tynkkynen <tuomas@tuxera.com> | 2018-02-28 20:52:49 +0200 |
commit | 34f95d92a2ca033fa25ae7ddcc7f5cb4b9e1f852 (patch) | |
tree | d3e3546a41a812d151d1980cb8ee6808a8b8c7c6 /pkgs/development/python-modules/cmd2/default.nix | |
parent | ad17db3562766979371f0ae9cc0d2428f44a9d58 (diff) | |
parent | f1dd205c4e5ac28931ae8cdcde9d3c9a8ed2a0f5 (diff) | |
download | nixlib-34f95d92a2ca033fa25ae7ddcc7f5cb4b9e1f852.tar nixlib-34f95d92a2ca033fa25ae7ddcc7f5cb4b9e1f852.tar.gz nixlib-34f95d92a2ca033fa25ae7ddcc7f5cb4b9e1f852.tar.bz2 nixlib-34f95d92a2ca033fa25ae7ddcc7f5cb4b9e1f852.tar.lz nixlib-34f95d92a2ca033fa25ae7ddcc7f5cb4b9e1f852.tar.xz nixlib-34f95d92a2ca033fa25ae7ddcc7f5cb4b9e1f852.tar.zst nixlib-34f95d92a2ca033fa25ae7ddcc7f5cb4b9e1f852.zip |
Merge remote-tracking branch 'upstream/master' into staging
Conflicts: pkgs/applications/misc/pytrainer/default.nix pkgs/development/tools/pew/default.nix pkgs/tools/misc/you-get/default.nix
Diffstat (limited to 'pkgs/development/python-modules/cmd2/default.nix')
-rw-r--r-- | pkgs/development/python-modules/cmd2/default.nix | 49 |
1 files changed, 49 insertions, 0 deletions
diff --git a/pkgs/development/python-modules/cmd2/default.nix b/pkgs/development/python-modules/cmd2/default.nix new file mode 100644 index 000000000000..5ffa51def0d2 --- /dev/null +++ b/pkgs/development/python-modules/cmd2/default.nix @@ -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 ]; + }; +} |