Commit 58dff237 authored by Emily's avatar Emily
Browse files

{cdrdao,whipper}: support Darwin

parent 13e2cb64
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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;
  };
}
+18 −1
Original line number Diff line number Diff line
@@ -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;
  };
})
+3 −1
Original line number Diff line number Diff line
@@ -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 { };