nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5 nix-update-script,
6 setuptools,
7 pkg-config,
8 swig,
9 libcdio,
10 libiconv,
11 pytestCheckHook,
12}:
13
14buildPythonPackage (finalAttrs: {
15 pname = "pycdio";
16 version = "2.1.1-unstable-2024-02-26";
17 pyproject = true;
18
19 src = fetchFromGitHub {
20 owner = "rocky";
21 repo = "pycdio";
22 rev = "806c6a2eeeeb546055ce2ac9a0ae6a14ea53ae35"; # no tag for this version (yet)
23 hash = "sha256-bOm82mBUIaw4BGHj3Y24Fv5+RfAew+Ma1u4QENXoRiU=";
24 };
25
26 preConfigure = ''
27 patchShebangs .
28 '';
29
30 build-system = [ setuptools ];
31
32 nativeBuildInputs = [
33 pkg-config
34 swig
35 ];
36
37 buildInputs = [
38 libcdio
39 libiconv
40 ];
41
42 postPatch = ''
43 substituteInPlace {data,test}/isofs-m1.cue \
44 --replace-fail "ISOFS-M1.BIN" "isofs-m1.bin"
45 '';
46
47 nativeCheckInputs = [ pytestCheckHook ];
48
49 enabledTestPaths = [ "test/test-*.py" ];
50
51 disabledTests = [
52 # Test are depending on image files that are not there
53 "test_bincue"
54 "test_cdda"
55 ];
56
57 passthru.updateScript = nix-update-script {
58 extraArgs = [ "--version=branch" ];
59 };
60
61 meta = {
62 homepage = "https://www.gnu.org/software/libcdio/";
63 changelog = "https://github.com/rocky/pycdio/blob/${finalAttrs.src.rev}/ChangeLog";
64 description = "Wrapper around libcdio (CD Input and Control library)";
65 license = lib.licenses.gpl3Plus;
66 maintainers = with lib.maintainers; [ sigmanificient ];
67 };
68})