summaryrefslogtreecommitdiff
path: root/pkgs/development/python-modules/reflink-copy/default.nix
blob: 714b19bac5cd723bec3359096af5fd7432e6052a (plain)
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
{
  lib,
  buildPythonPackage,
  fetchFromGitHub,
  rustPlatform,
  pytestCheckHook,
}:

buildPythonPackage (finalAttrs: {
  pname = "reflink-copy";
  version = "0.3.3";
  pyproject = true;

  src = fetchFromGitHub {
    owner = "iterative";
    repo = "reflink-copy";
    tag = finalAttrs.version;
    hash = "sha256-HxUAsqV5kjstfBfY/nEGJ3epUVT5WXoTqKerUggKDyo=";
  };

  cargoDeps = rustPlatform.fetchCargoVendor {
    inherit (finalAttrs) pname version src;
    hash = "sha256-TBKVf0kRRYn+1aYvhQHCHmJEsT0khFxp8iuyEWX9xyI=";
  };

  nativeBuildInputs = with rustPlatform; [
    cargoSetupHook
    maturinBuildHook
  ];

  nativeCheckInputs = [ pytestCheckHook ];

  pythonImportsCheck = [ "reflink_copy" ];

  meta = {
    description = "Python wrapper for reflink_copy Rust library";
    homepage = "https://github.com/iterative/reflink-copy";
    license = lib.licenses.asl20;
    maintainers = with lib.maintainers; [ ambroisie ];
  };
})