{cdrdao,whipper}: support Darwin

This commit is contained in:
Emily 2023-08-02 04:04:42 +01:00
parent 13e2cb64cf
commit 58dff2378f
3 changed files with 22 additions and 3 deletions

View File

@ -95,6 +95,6 @@ in python3.pkgs.buildPythonApplication rec {
description = "A CD ripper aiming for accuracy over speed";
maintainers = with maintainers; [ emily ];
license = licenses.gpl3Plus;
platforms = platforms.linux;
platforms = platforms.unix;
};
}

View File

@ -2,10 +2,14 @@
lib,
stdenv,
fetchurl,
fetchpatch,
pkg-config,
libiconv,
libvorbis,
libmad,
libao,
CoreServices,
IOKit,
}:
stdenv.mkDerivation (finalAttrs: {
@ -24,13 +28,26 @@ stdenv.mkDerivation (finalAttrs: {
];
buildInputs = [
libiconv
libvorbis
libmad
libao
] ++ lib.optionals stdenv.isDarwin [
CoreServices
IOKit
];
hardeningDisable = [ "format" ];
patches = [
# Fix build on macOS SDK < 12
# https://github.com/cdrdao/cdrdao/pull/19
(fetchpatch {
url = "https://github.com/cdrdao/cdrdao/commit/105d72a61f510e3c47626476f9bbc9516f824ede.patch";
hash = "sha256-NVIw59CSrc/HcslhfbYQNK/qSmD4QbfuV8hWYhWelX4=";
})
];
# we have glibc/include/linux as a symlink to the kernel headers,
# and the magic '..' points to kernelheaders, and not back to the glibc/include
postPatch = ''
@ -43,7 +60,7 @@ stdenv.mkDerivation (finalAttrs: {
meta = {
description = "A tool for recording audio or data CD-Rs in disk-at-once (DAO) mode";
homepage = "https://cdrdao.sourceforge.net/";
platforms = lib.platforms.linux;
platforms = lib.platforms.unix;
license = lib.licenses.gpl2;
};
})

View File

@ -6547,7 +6547,9 @@ with pkgs;
cdpr = callPackage ../tools/networking/cdpr { };
cdrdao = callPackage ../tools/cd-dvd/cdrdao { };
cdrdao = callPackage ../tools/cd-dvd/cdrdao {
inherit (darwin.apple_sdk.frameworks) CoreServices IOKit;
};
cdrkit = callPackage ../tools/cd-dvd/cdrkit { };