2021-10-04 12:37:57 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
2023-03-04 12:14:45 +00:00
|
|
|
, fetchFromGitHub
|
|
|
|
, pytestCheckHook
|
2022-02-20 05:27:41 +00:00
|
|
|
, pythonOlder
|
2021-05-28 09:39:13 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "puremagic";
|
2024-02-29 20:09:43 +00:00
|
|
|
version = "1.21";
|
2022-02-20 05:27:41 +00:00
|
|
|
format = "setuptools";
|
|
|
|
|
|
|
|
disabled = pythonOlder "3.7";
|
2021-05-28 09:39:13 +00:00
|
|
|
|
2023-03-04 12:14:45 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "cdgriffith";
|
|
|
|
repo = pname;
|
|
|
|
rev = "refs/tags/${version}";
|
2024-02-29 20:09:43 +00:00
|
|
|
hash = "sha256-ObJp3+gk1tf1+9wBpvzs0wwP7ptDlfGwX9b4wlCb1RI=";
|
2021-05-28 09:39:13 +00:00
|
|
|
};
|
|
|
|
|
2023-03-04 12:14:45 +00:00
|
|
|
nativeCheckInputs = [
|
|
|
|
pytestCheckHook
|
|
|
|
];
|
2021-05-28 09:39:13 +00:00
|
|
|
|
2022-02-20 05:27:41 +00:00
|
|
|
pythonImportsCheck = [
|
|
|
|
"puremagic"
|
|
|
|
];
|
2021-05-28 09:39:13 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
2022-02-20 05:27:41 +00:00
|
|
|
description = "Implementation of magic file detection";
|
2021-05-28 09:39:13 +00:00
|
|
|
homepage = "https://github.com/cdgriffith/puremagic";
|
2023-03-04 12:14:45 +00:00
|
|
|
changelog = "https://github.com/cdgriffith/puremagic/blob/${version}/CHANGELOG.md";
|
2022-02-20 05:27:41 +00:00
|
|
|
license = licenses.mit;
|
2021-05-28 09:39:13 +00:00
|
|
|
maintainers = with maintainers; [ globin ];
|
|
|
|
};
|
|
|
|
}
|