nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{ lib, stdenv, fetchPypi, buildPythonPackage, packaging, toml }:
2
3buildPythonPackage rec {
4 pname = "sip";
5 version = "6.5.1";
6
7 src = fetchPypi {
8 pname = "sip";
9 inherit version;
10 sha256 = "sha256-IE8CQNuJmadJ1jiph7NRhhhD5pI5uBHsPRiBQSw3BqY=";
11 };
12
13 patches = [
14 # on non-x86 Linux platforms, sip incorrectly detects the manylinux version
15 # and PIP will refuse to install the resulting wheel.
16 # remove once upstream fixes this, hopefully in 6.5.2
17 ./fix-manylinux-version.patch
18 ];
19
20 propagatedBuildInputs = [ packaging toml ];
21
22 # There aren't tests
23 doCheck = false;
24
25 pythonImportsCheck = [ "sipbuild" ];
26
27 # FIXME: Why isn't this detected automatically?
28 # Needs to be specified in pyproject.toml, e.g.:
29 # [tool.sip.bindings.MODULE]
30 # tags = [PLATFORM_TAG]
31 platform_tag =
32 if stdenv.targetPlatform.isLinux then
33 "WS_X11"
34 else if stdenv.targetPlatform.isDarwin then
35 "WS_MACX"
36 else if stdenv.targetPlatform.isWindows then
37 "WS_WIN"
38 else
39 throw "unsupported platform";
40
41 meta = with lib; {
42 description = "Creates C++ bindings for Python modules";
43 homepage = "https://riverbankcomputing.com/";
44 license = licenses.gpl3Only;
45 maintainers = with maintainers; [ ];
46 };
47}