about summary refs log tree commit diff
path: root/pkgs/development/python-modules/mesonpep517/default.nix
blob: 4256dbe6ece471745b3e82b82b7bd677b81ebc24 (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
{
  lib,
  buildPythonPackage,
  fetchPypi,
  meson,
  ninja,
  setuptools,
  toml,
  wheel,
}:

# TODO: offer meson as a Python package so we have dist-info folder.

buildPythonPackage rec {
  pname = "mesonpep517";
  version = "0.2";
  pyproject = true;

  src = fetchPypi {
    inherit pname version;
    hash = "sha256-Fyo7JfLqHJqbahEjVDt/0xJxOfVLqLn3xNJ4lSB7KIw=";
  };

  # Applies the following merge request, which doesn't apply cleanly:
  # https://gitlab.com/thiblahute/mesonpep517/-/merge_requests/25
  #
  postPatch = ''
    substituteInPlace pyproject.toml \
      --replace-fail 'backend-path = "."' 'backend-path = ["."]'
  '';

  build-system = [
    setuptools
    wheel
  ];

  dependencies = [ toml ];

  propagatedNativeBuildInputs = [
    meson
    ninja
  ];

  meta = {
    description = "Create pep517 compliant packages from the meson build system";
    homepage = "https://gitlab.com/thiblahute/mesonpep517";
    license = lib.licenses.asl20;
  };
}