nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
at python-updates 103 lines 2.9 kB view raw
1{ 2 lib, 3 stdenv, 4 fetchFromGitLab, 5 cmake, 6 libcap, 7 zlib, 8 bzip2, 9 perl, 10 quilt, 11}: 12 13stdenv.mkDerivation (finalAttrs: { 14 pname = "cdrkit"; 15 version = "1.1.11-4"; 16 17 src = fetchFromGitLab { 18 domain = "salsa.debian.org"; 19 owner = "debian"; 20 repo = "cdrkit"; 21 rev = "debian/9%${finalAttrs.version}"; 22 hash = "sha256-oOqvSA2MAURf0YOrWM5Ft6Ln43gXw7SEvNxxRrDs8sI="; 23 }; 24 25 patches = [ 26 ./cmake-4.patch 27 ]; 28 29 nativeBuildInputs = [ 30 cmake 31 quilt 32 ]; 33 buildInputs = [ 34 zlib 35 bzip2 36 perl 37 ] 38 ++ lib.optionals stdenv.hostPlatform.isLinux [ libcap ]; 39 40 env.NIX_CFLAGS_COMPILE = toString ( 41 lib.optionals stdenv.hostPlatform.isMusl [ 42 "-D__THROW=" 43 ] 44 ++ lib.optionals stdenv.cc.isClang [ 45 "-Wno-error=int-conversion" 46 ] 47 ); 48 49 postPatch = '' 50 QUILT_PATCHES=debian/patches quilt push -a 51 '' 52 + lib.optionalString stdenv.hostPlatform.isDarwin '' 53 substituteInPlace libusal/scsi-mac-iokit.c \ 54 --replace "IOKit/scsi-commands/SCSITaskLib.h" "IOKit/scsi/SCSITaskLib.h" 55 substituteInPlace genisoimage/sha256.c \ 56 --replace "<endian.h>" "<machine/endian.h>" 57 substituteInPlace genisoimage/sha512.c \ 58 --replace "<endian.h>" "<machine/endian.h>" 59 substituteInPlace genisoimage/sha256.h \ 60 --replace "__THROW" "" 61 substituteInPlace genisoimage/sha512.h \ 62 --replace "__THROW" "" 63 ''; 64 65 preConfigure = lib.optionalString stdenv.hostPlatform.isMusl '' 66 substituteInPlace include/xconfig.h.in \ 67 --replace "#define HAVE_RCMD 1" "#undef HAVE_RCMD" 68 ''; 69 70 postConfigure = lib.optionalString stdenv.hostPlatform.isDarwin '' 71 substituteInPlace */CMakeFiles/*.dir/link.txt \ 72 --replace-warn "-lrt" "-framework IOKit -framework CoreFoundation" 73 ''; 74 75 postInstall = '' 76 # file name compatibility with the old cdrecord (growisofs wants this name) 77 ln -s $out/bin/genisoimage $out/bin/mkisofs 78 ln -s $out/bin/wodim $out/bin/cdrecord 79 ''; 80 81 cmakeFlags = lib.optionals (stdenv.buildPlatform != stdenv.hostPlatform) [ "-DBITFIELDS_HTOL=0" ]; 82 83 makeFlags = [ "PREFIX=\$(out)" ]; 84 85 meta = { 86 description = "Portable command-line CD/DVD recorder software, mostly compatible with cdrtools"; 87 88 longDescription = '' 89 Cdrkit is a suite of programs for recording CDs and DVDs, 90 blanking CD-RW media, creating ISO-9660 filesystem images, 91 extracting audio CD data, and more. The programs included in 92 the cdrkit package were originally derived from several sources, 93 most notably mkisofs by Eric Youngdale and others, cdda2wav by 94 Heiko Eissfeldt, and cdrecord by Jörg Schilling. However, 95 cdrkit is not affiliated with any of these authors; it is now an 96 independent project. 97 ''; 98 99 homepage = "http://cdrkit.org/"; 100 license = lib.licenses.gpl2Plus; 101 platforms = lib.platforms.unix; 102 }; 103})