0
0
Fork 0
mirror of https://github.com/NixOS/nixpkgs.git synced 2025-07-14 06:00:33 +03:00

libcdio: refactor (#393134)

This commit is contained in:
jopejoe1 2025-04-05 00:05:05 +02:00 committed by GitHub
commit 028e98a8c9
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 94 additions and 66 deletions

View file

@ -0,0 +1,94 @@
{
lib,
stdenv,
fetchFromGitHub,
nix-update-script,
autoreconfHook,
testers,
texinfo,
libcddb,
pkg-config,
ncurses,
help2man,
libiconv,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "libcdio";
version = "2.2.0";
src = fetchFromGitHub {
owner = "libcdio";
repo = "libcdio";
tag = finalAttrs.version;
hash = "sha256-izjZk2kz9PkLm9+INUdl1e7jMz3nUsQKdplKI9Io+CM=";
};
env = lib.optionalAttrs stdenv.is32bit {
NIX_CFLAGS_COMPILE = "-D_LARGEFILE64_SOURCE";
};
postPatch = ''
patchShebangs .
echo "
@set UPDATED 1 January 1970
@set UPDATED-MONTH January 1970
@set EDITION ${finalAttrs.version}
@set VERSION ${finalAttrs.version}
" > doc/version.texi
'';
configureFlags = [
(lib.enableFeature true "maintainer-mode")
];
nativeBuildInputs = [
pkg-config
help2man
autoreconfHook
texinfo
];
buildInputs = [
libcddb
libiconv
ncurses
];
enableParallelBuilding = true;
doCheck = !stdenv.hostPlatform.isDarwin;
outputs = [
"out"
"lib"
"dev"
"info"
"man"
];
passthru = {
tests.pkg-config = testers.testMetaPkgConfig finalAttrs.finalPackage;
updateScript = nix-update-script { };
};
meta = {
description = "Library for OS-independent CD-ROM and CD image access";
longDescription = ''
GNU libcdio is a library for OS-independent CD-ROM and
CD image access. It includes a library for working with
ISO-9660 filesystems (libiso9660), as well as utility
programs such as an audio CD player and an extractor.
'';
homepage = "https://www.gnu.org/software/libcdio/";
license = lib.licenses.gpl2Plus;
pkgConfigModules = [
"libcdio"
"libcdio++"
"libiso9660"
"libiso9660++"
"libudf"
];
platforms = lib.platforms.unix;
};
})

View file

@ -1,62 +0,0 @@
{
lib,
stdenv,
fetchurl,
libcddb,
pkg-config,
ncurses,
help2man,
libiconv,
Carbon,
IOKit,
}:
stdenv.mkDerivation rec {
pname = "libcdio";
version = "2.2.0";
src = fetchurl {
url = "https://github.com/libcdio/libcdio/releases/download/${version}/${pname}-${version}.tar.bz2";
hash = "sha256-b4+99NGJz2Pyp6FUnFFs1yDHsiLHqq28kkom50WkhTk=";
};
env = lib.optionalAttrs stdenv.is32bit {
NIX_CFLAGS_COMPILE = "-D_LARGEFILE64_SOURCE";
};
postPatch = ''
patchShebangs .
'';
nativeBuildInputs = [
pkg-config
help2man
];
buildInputs =
[
libcddb
libiconv
ncurses
]
++ lib.optionals stdenv.hostPlatform.isDarwin [
Carbon
IOKit
];
enableParallelBuilding = true;
doCheck = !stdenv.hostPlatform.isDarwin;
meta = with lib; {
description = "Library for OS-independent CD-ROM and CD image access";
longDescription = ''
GNU libcdio is a library for OS-independent CD-ROM and
CD image access. It includes a library for working with
ISO-9660 filesystems (libiso9660), as well as utility
programs such as an audio CD player and an extractor.
'';
homepage = "https://www.gnu.org/software/libcdio/";
license = licenses.gpl2Plus;
platforms = platforms.unix;
};
}

View file

@ -10067,10 +10067,6 @@ with pkgs;
libcef = callPackage ../development/libraries/libcef { };
libcdio = callPackage ../development/libraries/libcdio {
inherit (darwin.apple_sdk.frameworks) Carbon IOKit;
};
libcdio-paranoia = callPackage ../development/libraries/libcdio-paranoia {
inherit (darwin.apple_sdk.frameworks) DiskArbitration IOKit;
};