Merge branch 'master' into staging-next
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
, setuptools_scm
|
||||
, cheroot, portend, more-itertools, zc_lockfile, routes
|
||||
, objgraph, pytest, pytestcov, pathpy, requests_toolbelt, pytest-services
|
||||
, fetchpatch
|
||||
}:
|
||||
|
||||
buildPythonPackage rec {
|
||||
@@ -16,6 +17,22 @@ buildPythonPackage rec {
|
||||
sha256 = "1w3hpsg7q8shdmscmbqk00w90lcw3brary7wl1a56k5h7nx33pj8";
|
||||
};
|
||||
|
||||
# Remove patches once 96b34df and 14c12d2
|
||||
# become part of a release - they're currently only present in master.
|
||||
# ref: https://github.com/cherrypy/cherrypy/pull/1791
|
||||
patches = [
|
||||
(fetchpatch {
|
||||
name = "pytest5-1.patch";
|
||||
url = "https://github.com/cherrypy/cherrypy/commit/96b34dfea7853b0189bc0a3878b6ddff0d4e505c.patch";
|
||||
sha256 = "0zy53mahffgkpd844118b42lsk5lkjmig70d60x1i46w6gnr61mi";
|
||||
})
|
||||
(fetchpatch {
|
||||
name = "pytest5-2.patch";
|
||||
url = "https://github.com/cherrypy/cherrypy/commit/14c12d2420a4b3765bb241250bd186e93b2f25eb.patch";
|
||||
sha256 = "0ihcz7b5myn923rq5665b98pz52hnf6fcys2y2inf23r3i07scyz";
|
||||
})
|
||||
];
|
||||
|
||||
propagatedBuildInputs = [
|
||||
# required
|
||||
cheroot portend more-itertools zc_lockfile
|
||||
|
||||
17
pkgs/development/python-modules/openrazer/common.nix
Normal file
17
pkgs/development/python-modules/openrazer/common.nix
Normal file
@@ -0,0 +1,17 @@
|
||||
{ stdenv
|
||||
, fetchFromGitHub
|
||||
}: rec {
|
||||
version = "2.6.0";
|
||||
src = fetchFromGitHub {
|
||||
owner = "openrazer";
|
||||
repo = "openrazer";
|
||||
rev = "v${version}";
|
||||
sha256 = "1s5irs3avrlp891mxan3z8p55ias9rq26rqp2qrlcc6i4vl29di0";
|
||||
};
|
||||
meta = with stdenv.lib; {
|
||||
homepage = https://openrazer.github.io/;
|
||||
license = licenses.gpl2;
|
||||
maintainers = with maintainers; [ roelvandijk ];
|
||||
platforms = platforms.linux;
|
||||
};
|
||||
}
|
||||
45
pkgs/development/python-modules/openrazer/daemon.nix
Normal file
45
pkgs/development/python-modules/openrazer/daemon.nix
Normal file
@@ -0,0 +1,45 @@
|
||||
{ buildPythonApplication
|
||||
, daemonize
|
||||
, dbus-python
|
||||
, fetchFromGitHub
|
||||
, fetchpatch
|
||||
, gobject-introspection
|
||||
, gtk3
|
||||
, makeWrapper
|
||||
, pygobject3
|
||||
, pyudev
|
||||
, setproctitle
|
||||
, stdenv
|
||||
, wrapGAppsHook
|
||||
}:
|
||||
|
||||
let
|
||||
common = import ./common.nix { inherit stdenv fetchFromGitHub; };
|
||||
in
|
||||
buildPythonApplication (common // rec {
|
||||
pname = "openrazer_daemon";
|
||||
|
||||
sourceRoot = "source/daemon";
|
||||
|
||||
outputs = [ "out" "man" ];
|
||||
|
||||
nativeBuildInputs = [ makeWrapper wrapGAppsHook ];
|
||||
|
||||
propagatedBuildInputs = [
|
||||
daemonize
|
||||
dbus-python
|
||||
gobject-introspection
|
||||
gtk3
|
||||
pygobject3
|
||||
pyudev
|
||||
setproctitle
|
||||
];
|
||||
|
||||
postBuild = ''
|
||||
DESTDIR="$out" PREFIX="" make install manpages
|
||||
'';
|
||||
|
||||
meta = common.meta // {
|
||||
description = "An entirely open source user-space daemon that allows you to manage your Razer peripherals on GNU/Linux";
|
||||
};
|
||||
})
|
||||
26
pkgs/development/python-modules/openrazer/pylib.nix
Normal file
26
pkgs/development/python-modules/openrazer/pylib.nix
Normal file
@@ -0,0 +1,26 @@
|
||||
{ buildPythonPackage
|
||||
, dbus-python
|
||||
, fetchFromGitHub
|
||||
, numpy
|
||||
, stdenv
|
||||
, openrazer-daemon
|
||||
}:
|
||||
|
||||
let
|
||||
common = import ./common.nix { inherit stdenv fetchFromGitHub; };
|
||||
in
|
||||
buildPythonPackage (common // rec {
|
||||
pname = "openrazer";
|
||||
|
||||
sourceRoot = "source/pylib";
|
||||
|
||||
propagatedBuildInputs = [
|
||||
dbus-python
|
||||
numpy
|
||||
openrazer-daemon
|
||||
];
|
||||
|
||||
meta = common.meta // {
|
||||
description = "An entirely open source Python library that allows you to manage your Razer peripherals on GNU/Linux";
|
||||
};
|
||||
})
|
||||
@@ -1,5 +1,13 @@
|
||||
{ stdenv, fetchPypi, fetchpatch, buildPythonPackage, swig, pcsclite, PCSC }:
|
||||
|
||||
let
|
||||
# Package does not support configuring the pcsc library.
|
||||
withApplePCSC = stdenv.isDarwin;
|
||||
|
||||
inherit (stdenv.lib) getLib getDev optionalString optionals;
|
||||
inherit (stdenv.hostPlatform.extensions) sharedLibrary;
|
||||
in
|
||||
|
||||
buildPythonPackage rec {
|
||||
version = "1.9.8";
|
||||
pname = "pyscard";
|
||||
@@ -9,24 +17,28 @@ buildPythonPackage rec {
|
||||
sha256 = "15fh00z1an6r5j7hrz3jlq0rb3jygwf3x4jcwsa008bv8vpcg7gm";
|
||||
};
|
||||
|
||||
postPatch = ''
|
||||
sed -e 's!"libpcsclite\.so\.1"!"${stdenv.lib.getLib pcsclite}/lib/libpcsclite.so.1"!' \
|
||||
-i smartcard/scard/winscarddll.c
|
||||
postPatch = if withApplePCSC then ''
|
||||
substituteInPlace smartcard/scard/winscarddll.c \
|
||||
--replace "/System/Library/Frameworks/PCSC.framework/PCSC" \
|
||||
"${PCSC}/Library/Frameworks/PCSC.framework/PCSC"
|
||||
'' else ''
|
||||
substituteInPlace smartcard/scard/winscarddll.c \
|
||||
--replace "libpcsclite.so.1" \
|
||||
"${getLib pcsclite}/lib/libpcsclite${sharedLibrary}"
|
||||
'';
|
||||
|
||||
NIX_CFLAGS_COMPILE = "-isystem ${stdenv.lib.getDev pcsclite}/include/PCSC/";
|
||||
NIX_CFLAGS_COMPILE = optionalString (! withApplePCSC)
|
||||
"-I ${getDev pcsclite}/include/PCSC";
|
||||
|
||||
patches = [
|
||||
# Fixes darwin tests
|
||||
# See: https://github.com/LudovicRousseau/pyscard/issues/77
|
||||
(fetchpatch {
|
||||
url = "https://github.com/LudovicRousseau/pyscard/commit/62e675028086c75656444cc21d563d9f08ebf8e7.patch";
|
||||
sha256 = "1lr55npcpc8j750vf7vaisqyk18d5f00l7nii2lvawg4sssjaaf7";
|
||||
})
|
||||
];
|
||||
# The error message differs depending on the macOS host version.
|
||||
# Since Nix reports a constant host version, but proxies to the
|
||||
# underlying library, it's not possible to determine the correct
|
||||
# expected error message. This patch allows both errors to be
|
||||
# accepted.
|
||||
# See: https://github.com/LudovicRousseau/pyscard/issues/77
|
||||
patches = optionals withApplePCSC [ ./ignore-macos-bug.patch ];
|
||||
|
||||
propagatedBuildInputs = [ pcsclite ];
|
||||
buildInputs = stdenv.lib.optional stdenv.isDarwin PCSC;
|
||||
propagatedBuildInputs = if withApplePCSC then [ PCSC ] else [ pcsclite ];
|
||||
nativeBuildInputs = [ swig ];
|
||||
|
||||
meta = {
|
||||
|
||||
@@ -0,0 +1,22 @@
|
||||
diff --git a/test/test_SCardGetErrorMessage.py b/test/test_SCardGetErrorMessage.py
|
||||
old mode 100644
|
||||
new mode 100755
|
||||
index c6fe755..c1217f5
|
||||
--- a/test/test_SCardGetErrorMessage.py
|
||||
+++ b/test/test_SCardGetErrorMessage.py
|
||||
@@ -29,12 +29,10 @@ class TestError(unittest.TestCase):
|
||||
self.assertEqual(res, expected)
|
||||
|
||||
res = SCardGetErrorMessage(1)
|
||||
+ expected = "Unknown error: 0x00000001"
|
||||
# macOS bug not yet fixed
|
||||
- if get_platform().startswith('macosx-') and get_platform() < 'macosx-10.13':
|
||||
- expected = "Unkown error: 0x00000001"
|
||||
- else:
|
||||
- expected = "Unknown error: 0x00000001"
|
||||
- self.assertEqual(res, expected)
|
||||
+ macos_bug_expected = "Unkown error: 0x00000001"
|
||||
+ self.assertIn(res, [expected, macos_bug_expected])
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
27
pkgs/development/python-modules/python-pipedrive/default.nix
Normal file
27
pkgs/development/python-modules/python-pipedrive/default.nix
Normal file
@@ -0,0 +1,27 @@
|
||||
{ stdenv
|
||||
, buildPythonPackage
|
||||
, fetchPypi
|
||||
, python
|
||||
, httplib2
|
||||
}:
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "python-pipedrive";
|
||||
version = "0.4.0";
|
||||
|
||||
src = fetchPypi {
|
||||
inherit pname version;
|
||||
sha256 = "0f8qiyl82bpwxwjw2746vdvkps2010mvn1x9b6j6ppmifff2d4pl";
|
||||
};
|
||||
|
||||
propagatedBuildInputs = [ httplib2 ];
|
||||
|
||||
doCheck = false; # Tests are not provided.
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
description = "Python library for interacting with the pipedrive.com API";
|
||||
homepage = "https://github.com/jscott1989/python-pipedrive";
|
||||
license = licenses.unfree;
|
||||
maintainers = with maintainers; [ mrmebelman ];
|
||||
};
|
||||
}
|
||||
@@ -7,12 +7,12 @@
|
||||
}:
|
||||
|
||||
buildPythonPackage rec {
|
||||
version = "3.3.0";
|
||||
version = "3.4.0";
|
||||
pname = "robotframework-sshlibrary";
|
||||
|
||||
src = fetchPypi {
|
||||
inherit pname version;
|
||||
sha256 = "fc5b5db63cf63a937bd4ada1a8b7508ec8a75d9454fa75e6410cbe72fd718de9";
|
||||
sha256 = "21fa0183776e6061366f517765db479aaa634b707f3dd9d90ef6972adae6a755";
|
||||
};
|
||||
|
||||
# unit tests are impure
|
||||
|
||||
@@ -8,6 +8,8 @@
|
||||
, mnemonic
|
||||
, keepkey
|
||||
, semver
|
||||
, wheel
|
||||
, pinentry
|
||||
}:
|
||||
|
||||
buildPythonPackage rec{
|
||||
@@ -19,13 +21,13 @@ buildPythonPackage rec{
|
||||
sha256 = "e82bf000c1178b1a7612f2a90487eb34c6234d2edb15dc8e310ad875d8298690";
|
||||
};
|
||||
|
||||
propagatedBuildInputs = [ trezor libagent ecdsa ed25519 mnemonic keepkey semver ];
|
||||
propagatedBuildInputs = [ trezor libagent ecdsa ed25519 mnemonic keepkey semver wheel pinentry ];
|
||||
|
||||
meta = with stdenv.lib; {
|
||||
description = "Using Trezor as hardware SSH agent";
|
||||
homepage = https://github.com/romanz/trezor-agent;
|
||||
homepage = "https://github.com/romanz/trezor-agent";
|
||||
license = licenses.gpl3;
|
||||
maintainers = with maintainers; [ np ];
|
||||
maintainers = with maintainers; [ np mmahut ];
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user