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:
commit
028e98a8c9
3 changed files with 94 additions and 66 deletions
94
pkgs/by-name/li/libcdio/package.nix
Normal file
94
pkgs/by-name/li/libcdio/package.nix
Normal 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;
|
||||
};
|
||||
})
|
|
@ -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;
|
||||
};
|
||||
}
|
|
@ -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;
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue