1{
2 lib,
3 buildPythonPackage,
4 fetchPypi,
5 python,
6 cffi,
7 setuptools,
8 pythonOlder,
9}:
10
11buildPythonPackage rec {
12 pname = "xattr";
13 version = "1.2.0";
14 pyproject = true;
15
16 disabled = pythonOlder "3.8";
17
18 src = fetchPypi {
19 inherit pname version;
20 hash = "sha256-pkyOIe/xvhQ6zPgP07j94+KKR4w32imHQq9kesPl4Kc=";
21 };
22
23 nativeBuildInputs = [
24 cffi
25 setuptools
26 ];
27
28 # https://github.com/xattr/xattr/issues/43
29 doCheck = false;
30
31 propagatedBuildInputs = [ cffi ];
32
33 postBuild = ''
34 ${python.pythonOnBuildForHost.interpreter} -m compileall -f xattr
35 '';
36
37 pythonImportsCheck = [ "xattr" ];
38
39 meta = with lib; {
40 description = "Python wrapper for extended filesystem attributes";
41 mainProgram = "xattr";
42 homepage = "https://github.com/xattr/xattr";
43 changelog = "https://github.com/xattr/xattr/blob/v${version}/CHANGES.txt";
44 license = licenses.mit;
45 maintainers = [ ];
46 };
47}