summary refs log tree commit diff
path: root/pkgs/tools/cd-dvd
diff options
context:
space:
mode:
authorEmily <vcs@emily.moe>2023-08-02 04:04:42 +0100
committerEmily <vcs@emily.moe>2023-08-02 04:05:03 +0100
commit58dff2378fec180a2d273bccfe10a6423fafcba5 (patch)
tree14e237100f5a7baf6d32b88cdade21a4d87af09a /pkgs/tools/cd-dvd
parent13e2cb64cfc4236c6b0f11076636b471d97ac0b0 (diff)
downloadnixpkgs-58dff2378fec180a2d273bccfe10a6423fafcba5.tar
nixpkgs-58dff2378fec180a2d273bccfe10a6423fafcba5.tar.gz
nixpkgs-58dff2378fec180a2d273bccfe10a6423fafcba5.tar.bz2
nixpkgs-58dff2378fec180a2d273bccfe10a6423fafcba5.tar.lz
nixpkgs-58dff2378fec180a2d273bccfe10a6423fafcba5.tar.xz
nixpkgs-58dff2378fec180a2d273bccfe10a6423fafcba5.tar.zst
nixpkgs-58dff2378fec180a2d273bccfe10a6423fafcba5.zip
{cdrdao,whipper}: support Darwin
Diffstat (limited to 'pkgs/tools/cd-dvd')
-rw-r--r--pkgs/tools/cd-dvd/cdrdao/default.nix19
1 files changed, 18 insertions, 1 deletions
diff --git a/pkgs/tools/cd-dvd/cdrdao/default.nix b/pkgs/tools/cd-dvd/cdrdao/default.nix
index a58754c0370..8d557993f9d 100644
--- a/pkgs/tools/cd-dvd/cdrdao/default.nix
+++ b/pkgs/tools/cd-dvd/cdrdao/default.nix
@@ -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;
   };
 })