about summary refs log tree commit diff
path: root/pkgs/development/python-modules/pyquaternion/default.nix
blob: ac374c9572bb4787dbacec1b4079c8e88362eaeb (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
{
  lib,
  buildPythonPackage,
  fetchPypi,
  numpy,
  nose,
}:

buildPythonPackage rec {
  pname = "pyquaternion";
  version = "0.9.9";
  format = "setuptools";

  src = fetchPypi {
    inherit pname version;
    hash = "sha256-sfYa8hnLL+lmtft5oZISTy5jo/end6w8rfKVexqBvqg=";
  };

  # The VERSION.txt file is required for setup.py
  # See: https://github.com/KieranWynn/pyquaternion/blob/master/setup.py#L14-L15
  postPatch = ''
    echo "${version}" > VERSION.txt
  '';

  propagatedBuildInputs = [ numpy ];

  nativeCheckInputs = [ nose ];
  pythonImportsCheck = [ "pyquaternion" ];

  meta = with lib; {
    description = "Library for representing and using quaternions";
    homepage = "http://kieranwynn.github.io/pyquaternion/";
    license = licenses.mit;
    maintainers = with maintainers; [ lucasew ];
  };
}