From 5d70e696220d12ca4c99c1b776a337f806935620 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mihai-Drosi=20C=C3=A2ju?= Date: Sun, 31 Oct 2021 18:30:45 +0200 Subject: [PATCH] python3Packages.pyclip: init at 0.5.4 --- .../python-modules/pyclip/default.nix | 40 +++++++++++++++++++ pkgs/top-level/python-packages.nix | 2 + 2 files changed, 42 insertions(+) create mode 100644 pkgs/development/python-modules/pyclip/default.nix diff --git a/pkgs/development/python-modules/pyclip/default.nix b/pkgs/development/python-modules/pyclip/default.nix new file mode 100644 index 000000000000..ac79eb8293f4 --- /dev/null +++ b/pkgs/development/python-modules/pyclip/default.nix @@ -0,0 +1,40 @@ +{ lib +, stdenv +, fetchFromGitHub +, buildPythonPackage +, pytest +, xclip +, xvfb-run +}: + +buildPythonPackage rec { + pname = "pyclip"; + version = "0.5.4"; + + src = fetchFromGitHub { + owner = "spyoungtech"; + repo = pname; + rev = "v${version}"; + sha256 = "19ff9cgnfx03mbmy5zpbdi986ppx38a5jf97vkqnic4g5sd1qyrn"; + }; + + postPatch = '' + substituteInPlace setup.py \ + --replace docs/README.md README.md + ''; + + checkInputs = [ pytest ] ++ lib.optionals stdenv.isLinux [ xclip xvfb-run ]; + + checkPhase = '' + runHook preCheck + ${lib.optionalString stdenv.isLinux "xvfb-run -s '-screen 0 800x600x24'"} pytest tests + runHook postCheck + ''; + + meta = with lib; { + description = "Cross-platform clipboard utilities supporting both binary and text data"; + homepage = "https://github.com/spyoungtech/pyclip"; + license = licenses.asl20; + maintainers = with maintainers; [ mcaju ]; + }; +} diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index 702d88725fff..53db0da02e68 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -6176,6 +6176,8 @@ in { pyclimacell = callPackage ../development/python-modules/pyclimacell { }; + pyclip = callPackage ../development/python-modules/pyclip { }; + pyclipper = callPackage ../development/python-modules/pyclipper { }; pycm = callPackage ../development/python-modules/pycm { };