about summary refs log tree commit diff
path: root/pkgs/development/python-modules/faster-fifo/default.nix
blob: a3b8f491a9dab51bae3c1c2289538f764d516e80 (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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
{ lib
, buildPythonPackage
, fetchFromGitHub
, stdenv
, gcc12Stdenv

# build-system
, cython
, setuptools

# tests
, numpy
, unittestCheckHook
}:

let
  stdenv' = if stdenv.isLinux then gcc12Stdenv else stdenv;
in
buildPythonPackage rec {
  pname = "faster-fifo";
  version = "1.4.5";
  format = "pyproject";

  # https://github.com/alex-petrenko/faster-fifo/issues/47\
  stdenv = stdenv';

  src = fetchFromGitHub {
    owner = "alex-petrenko";
    repo = "faster-fifo";
    rev = "v${version}";
    hash = "sha256-35kD+RWXwUXHG5leTVj4wY6hJAjDka69YczgSTIbCeg=";
  };

  nativeBuildInputs = [
    cython
    setuptools
  ];

  pythonImportsCheck = [
    "faster_fifo"
  ];

  nativeCheckInputs = [
    numpy
    unittestCheckHook
  ];

  meta = with lib; {
    description = "Faster alternative to Python's multiprocessing.Queue (IPC FIFO queue";
    homepage = "https://github.com/alex-petrenko/faster-fifo";
    license = licenses.mit;
    maintainers = with maintainers; [ hexa ];
  };
}