diff --git a/pkgs/by-name/li/libcdio/package.nix b/pkgs/by-name/li/libcdio/package.nix new file mode 100644 index 000000000000..73f1f6de7667 --- /dev/null +++ b/pkgs/by-name/li/libcdio/package.nix @@ -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; + }; +}) diff --git a/pkgs/development/libraries/libcdio/default.nix b/pkgs/development/libraries/libcdio/default.nix deleted file mode 100644 index 85a3fbbcd33a..000000000000 --- a/pkgs/development/libraries/libcdio/default.nix +++ /dev/null @@ -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; - }; -} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index ca38a0b02f96..6d1242559fc3 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -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; };