1 { lib, stdenv, fetchFromGitHub, ncurses, readline, autoreconfHook }:
3 stdenv.mkDerivation rec {
6 src = fetchFromGitHub {
10 sha256 = "0mz04h3rki6ljwfs15z83gf4vv816w7xgz923waiqgmfj9xpvx87";
13 buildInputs = [ ncurses readline ];
14 nativeBuildInputs = [ autoreconfHook ];
16 hardeningDisable = [ "fortify" ];
18 NIX_CFLAGS_COMPILE = "-std=gnu90";
21 sed -e '1i#include <limits.h>' -i cdrwtool/cdrwtool.c -i pktsetup/pktsetup.c
22 sed -e 's@[(]char[*][)]spm [+]=@spm = ((char*) spm) + @' -i wrudf/wrudf.c
23 sed -e '27i#include <string.h>' -i include/udf_endian.h
24 sed -e '38i#include <string.h>' -i wrudf/wrudf-cdrw.c
25 sed -e '12i#include <string.h>' -i wrudf/wrudf-cdr.c
26 sed -e '37i#include <stdlib.h>' -i wrudf/ide-pc.c
27 sed -e '46i#include <sys/sysmacros.h>' -i mkudffs/main.c
29 sed -e "s@\$(DESTDIR)/lib/udev/rules.d@$out/lib/udev/rules.d@" -i pktsetup/Makefile.am
33 sed -i -e "s@/usr/sbin/pktsetup@$out/sbin/pktsetup@" $out/lib/udev/rules.d/80-pktsetup.rules
37 description = "UDF tools";
38 maintainers = with maintainers; [ raskin ];
39 platforms = platforms.linux;
40 license = licenses.gpl2Plus;