1{ lib
2, buildPythonPackage
3, fetchPypi
4, numpy
5, nose
6}:
7
8buildPythonPackage rec {
9 pname = "pyquaternion";
10 version = "0.9.9";
11
12 src = fetchPypi {
13 inherit pname version;
14 hash = "sha256-sfYa8hnLL+lmtft5oZISTy5jo/end6w8rfKVexqBvqg=";
15 };
16
17 # The VERSION.txt file is required for setup.py
18 # See: https://github.com/KieranWynn/pyquaternion/blob/master/setup.py#L14-L15
19 postPatch = ''
20 echo "${version}" > VERSION.txt
21 '';
22
23 propagatedBuildInputs = [ numpy ];
24
25 nativeCheckInputs = [ nose ];
26 pythonImportsCheck = [ "pyquaternion" ];
27
28 meta = with lib; {
29 description = "Library for representing and using quaternions.";
30 homepage = "http://kieranwynn.github.io/pyquaternion/";
31 license = licenses.mit;
32 maintainers = with maintainers; [ lucasew ];
33 };
34}