2018-08-27 11:15:23 +03:00
|
|
|
{ stdenv, fetchFromGitHub, ncurses, readline, autoreconfHook }:
|
2011-01-10 14:04:20 +03:00
|
|
|
|
2015-04-03 17:36:56 +03:00
|
|
|
stdenv.mkDerivation rec {
|
2019-08-15 15:41:18 +03:00
|
|
|
pname = "udftools";
|
2018-08-27 11:15:23 +03:00
|
|
|
version = "2.0";
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "pali";
|
|
|
|
repo = "udftools";
|
2019-09-09 02:38:31 +03:00
|
|
|
rev = version;
|
2018-08-27 11:15:23 +03:00
|
|
|
sha256 = "0mz04h3rki6ljwfs15z83gf4vv816w7xgz923waiqgmfj9xpvx87";
|
2011-01-10 14:04:20 +03:00
|
|
|
};
|
|
|
|
|
2015-04-03 17:36:56 +03:00
|
|
|
buildInputs = [ ncurses readline ];
|
2018-08-27 11:15:23 +03:00
|
|
|
nativeBuildInputs = [ autoreconfHook ];
|
2011-01-10 14:04:20 +03:00
|
|
|
|
2016-02-26 20:38:15 +03:00
|
|
|
hardeningDisable = [ "fortify" ];
|
2016-02-08 02:27:47 +03:00
|
|
|
|
2016-03-26 18:47:46 +03:00
|
|
|
NIX_CFLAGS_COMPILE = "-std=gnu90";
|
|
|
|
|
2015-04-03 17:36:56 +03:00
|
|
|
preConfigure = ''
|
2011-01-10 14:04:20 +03:00
|
|
|
sed -e '1i#include <limits.h>' -i cdrwtool/cdrwtool.c -i pktsetup/pktsetup.c
|
|
|
|
sed -e 's@[(]char[*][)]spm [+]=@spm = ((char*) spm) + @' -i wrudf/wrudf.c
|
2016-03-26 18:47:46 +03:00
|
|
|
sed -e '27i#include <string.h>' -i include/udf_endian.h
|
|
|
|
sed -e '38i#include <string.h>' -i wrudf/wrudf-cdrw.c
|
|
|
|
sed -e '12i#include <string.h>' -i wrudf/wrudf-cdr.c
|
|
|
|
sed -e '37i#include <stdlib.h>' -i wrudf/ide-pc.c
|
2020-01-25 21:45:54 +03:00
|
|
|
sed -e '46i#include <sys/sysmacros.h>' -i mkudffs/main.c
|
2018-08-27 11:15:23 +03:00
|
|
|
|
|
|
|
sed -e "s@\$(DESTDIR)/lib/udev/rules.d@$out/lib/udev/rules.d@" -i pktsetup/Makefile.am
|
|
|
|
'';
|
|
|
|
|
|
|
|
postFixup = ''
|
|
|
|
sed -i -e "s@/usr/sbin/pktsetup@$out/sbin/pktsetup@" $out/lib/udev/rules.d/80-pktsetup.rules
|
2015-04-03 17:36:56 +03:00
|
|
|
'';
|
2011-01-10 14:04:20 +03:00
|
|
|
|
2015-04-03 17:36:56 +03:00
|
|
|
meta = with stdenv.lib; {
|
2011-01-10 14:04:20 +03:00
|
|
|
description = "UDF tools";
|
2015-04-03 17:36:56 +03:00
|
|
|
maintainers = with maintainers; [ raskin ];
|
2015-11-26 01:04:57 +03:00
|
|
|
platforms = platforms.linux;
|
2015-04-03 17:36:56 +03:00
|
|
|
license = licenses.gpl2Plus;
|
2011-01-10 14:04:20 +03:00
|
|
|
};
|
2015-04-03 17:36:56 +03:00
|
|
|
}
|