2023-08-04 22:07:22 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
stdenv,
|
|
|
|
fetchurl,
|
|
|
|
fetchpatch,
|
|
|
|
pkg-config,
|
|
|
|
libiconv,
|
|
|
|
libvorbis,
|
|
|
|
libmad,
|
|
|
|
libao,
|
|
|
|
CoreServices,
|
|
|
|
IOKit,
|
|
|
|
}:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2023-08-04 22:07:22 +00:00
|
|
|
stdenv.mkDerivation (finalAttrs: {
|
2021-08-18 13:19:15 +00:00
|
|
|
pname = "cdrdao";
|
2023-05-24 13:37:59 +00:00
|
|
|
version = "1.2.5";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
2023-08-04 22:07:22 +00:00
|
|
|
url = "mirror://sourceforge/cdrdao/cdrdao-${finalAttrs.version}.tar.bz2";
|
2023-05-24 13:37:59 +00:00
|
|
|
hash = "sha256-0ZtnyFPF26JAavqrbNeI53817r5jTKxGeVKEd8e+AbY=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
makeFlags = [ "RM=rm" "LN=ln" "MV=mv" ];
|
|
|
|
|
2023-08-04 22:07:22 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
pkg-config
|
|
|
|
];
|
|
|
|
|
|
|
|
buildInputs = [
|
|
|
|
libiconv
|
|
|
|
libvorbis
|
|
|
|
libmad
|
|
|
|
libao
|
2024-09-26 11:04:55 +00:00
|
|
|
] ++ lib.optionals stdenv.hostPlatform.isDarwin [
|
2023-08-04 22:07:22 +00:00
|
|
|
CoreServices
|
|
|
|
IOKit
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
hardeningDisable = [ "format" ];
|
|
|
|
|
2023-08-04 22:07:22 +00:00
|
|
|
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=";
|
|
|
|
})
|
|
|
|
|
|
|
|
# Fix undefined behaviour caused by uninitialized variable
|
|
|
|
# https://github.com/cdrdao/cdrdao/pull/21
|
|
|
|
(fetchpatch {
|
|
|
|
url = "https://github.com/cdrdao/cdrdao/commit/251a40ab42305c412674c7c2d391374d91e91c95.patch";
|
|
|
|
hash = "sha256-+nGlWw5rgc5Ns2l+6fQ4Hp2LbhO4R/I95h9WGIh/Ebw=";
|
|
|
|
})
|
|
|
|
];
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
# 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 = ''
|
|
|
|
sed -i 's,linux/../,,g' dao/sg_err.h
|
|
|
|
'';
|
|
|
|
|
|
|
|
# Needed on gcc >= 6.
|
2023-03-04 12:14:45 +00:00
|
|
|
env.NIX_CFLAGS_COMPILE = "-Wno-narrowing";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2023-08-04 22:07:22 +00:00
|
|
|
meta = {
|
2024-06-20 14:57:18 +00:00
|
|
|
description = "Tool for recording audio or data CD-Rs in disk-at-once (DAO) mode";
|
2023-02-02 18:25:31 +00:00
|
|
|
homepage = "https://cdrdao.sourceforge.net/";
|
2023-08-04 22:07:22 +00:00
|
|
|
platforms = lib.platforms.unix;
|
2024-05-15 15:35:15 +00:00
|
|
|
license = lib.licenses.gpl2Plus;
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
2023-08-04 22:07:22 +00:00
|
|
|
})
|