summary refs log tree commit diff
path: root/pkgs/tools/cd-dvd/cdrdao/default.nix
blob: a17b03025032a4e64e20d0a72cb4254ff3f7e204 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
{stdenv, fetchurl, libvorbis, libmad, pkgconfig, libao}:

stdenv.mkDerivation {
  name = "cdrdao-1.2.3";

  src = fetchurl {
    url = mirror://sourceforge/cdrdao/cdrdao-1.2.3.tar.bz2;
    sha256 = "0pmpgx91j984snrsxbq1dgf3ximks2dfh1sqqmic72lrls7wp4w1";
  };

  makeFlags = "RM=rm LN=ln MV=mv";

  nativeBuildInputs = [ pkgconfig ];
  buildInputs = [ libvorbis libmad libao ];

  hardeningDisable = [ "format" ];

  # Adjust some headers to match glibc 2.12 ... patch is a diff between
  # the cdrdao CVS head and the 1.2.3 release.
  patches = [ ./adjust-includes-for-glibc-212.patch ];

  # 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.
  NIX_CFLAGS_COMPILE = "-Wno-narrowing";

  meta = with stdenv.lib; {
    description = "A tool for recording audio or data CD-Rs in disk-at-once (DAO) mode";
    homepage = http://cdrdao.sourceforge.net/;
    platforms = platforms.linux;
    license = licenses.gpl2;
  };
}