blob: 9ff43bce084321f1c052efdfb356dad2d919d468 (
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
|
{ lib
, buildPythonPackage
, fetchFromGitHub
, pythonOlder
, setuptools-rust
, rustPlatform
, pytestCheckHook
, libiconv
}:
buildPythonPackage rec {
pname = "rtoml";
version = "0.7";
disabled = pythonOlder "3.7";
src = fetchFromGitHub {
owner = "samuelcolvin";
repo = pname;
rev = "v${version}";
sha256 = "sha256-h4vY63pDkrMHt2X244FssLxHsphsfjNd6gnVFUeZZTY=";
};
cargoDeps = rustPlatform.fetchCargoTarball {
inherit src;
name = "${pname}-${version}";
sha256 = "05fwcs6w023ihw3gyihzbnfwjaqy40d6h0z2yas4kqkkvz9x4f8j";
};
nativeBuildInputs = with rustPlatform; [
setuptools-rust
rust.rustc
rust.cargo
cargoSetupHook
];
buildInputs = [ libiconv ];
pythonImportsCheck = [ "rtoml" ];
checkInputs = [ pytestCheckHook ];
preCheck = ''
cd tests
'';
meta = with lib; {
description = "Rust based TOML library for python";
homepage = "https://github.com/samuelcolvin/rtoml";
license = licenses.mit;
maintainers = with maintainers; [ evils ];
};
}
|