15 stdenv.mkDerivation (finalAttrs: {
20 url = "mirror://sourceforge/cdrdao/cdrdao-${finalAttrs.version}.tar.bz2";
21 hash = "sha256-0ZtnyFPF26JAavqrbNeI53817r5jTKxGeVKEd8e+AbY=";
24 makeFlags = [ "RM=rm" "LN=ln" "MV=mv" ];
35 ] ++ lib.optionals stdenv.hostPlatform.isDarwin [
40 hardeningDisable = [ "format" ];
43 # Fix build on macOS SDK < 12
44 # https://github.com/cdrdao/cdrdao/pull/19
46 url = "https://github.com/cdrdao/cdrdao/commit/105d72a61f510e3c47626476f9bbc9516f824ede.patch";
47 hash = "sha256-NVIw59CSrc/HcslhfbYQNK/qSmD4QbfuV8hWYhWelX4=";
50 # Fix undefined behaviour caused by uninitialized variable
51 # https://github.com/cdrdao/cdrdao/pull/21
53 url = "https://github.com/cdrdao/cdrdao/commit/251a40ab42305c412674c7c2d391374d91e91c95.patch";
54 hash = "sha256-+nGlWw5rgc5Ns2l+6fQ4Hp2LbhO4R/I95h9WGIh/Ebw=";
58 # we have glibc/include/linux as a symlink to the kernel headers,
59 # and the magic '..' points to kernelheaders, and not back to the glibc/include
61 sed -i 's,linux/../,,g' dao/sg_err.h
65 env.NIX_CFLAGS_COMPILE = "-Wno-narrowing";
68 description = "Tool for recording audio or data CD-Rs in disk-at-once (DAO) mode";
69 homepage = "https://cdrdao.sourceforge.net/";
70 platforms = lib.platforms.unix;
71 license = lib.licenses.gpl2Plus;