1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5 setuptools,
6 pkg-config,
7 swig,
8 libcdio,
9 libiconv,
10 pytestCheckHook,
11}:
12
13buildPythonPackage rec {
14 pname = "pycdio";
15 version = "2.1.1-unstable-2024-02-26";
16 pyproject = true;
17
18 src = fetchFromGitHub {
19 owner = "rocky";
20 repo = "pycdio";
21 rev = "806c6a2eeeeb546055ce2ac9a0ae6a14ea53ae35"; # no tag for this version (yet)
22 hash = "sha256-bOm82mBUIaw4BGHj3Y24Fv5+RfAew+Ma1u4QENXoRiU=";
23 };
24
25 preConfigure = ''
26 patchShebangs .
27 '';
28
29 build-system = [ setuptools ];
30
31 nativeBuildInputs = [
32 pkg-config
33 swig
34 ];
35
36 buildInputs = [
37 libcdio
38 libiconv
39 ];
40
41 nativeCheckInputs = [ pytestCheckHook ];
42
43 pytestFlagsArray = [ "test/test-*.py" ];
44
45 meta = {
46 homepage = "https://www.gnu.org/software/libcdio/";
47 changelog = "https://github.com/rocky/pycdio/blob/${src.rev}/ChangeLog";
48 description = "Wrapper around libcdio (CD Input and Control library)";
49 license = lib.licenses.gpl3Plus;
50 maintainers = with lib.maintainers; [ sigmanificient ];
51 };
52}