Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at devShellTools-shell 53 lines 1.3 kB view raw
1{ 2 lib, 3 stdenv, 4 fetchFromGitHub, 5 ncurses, 6 readline, 7 autoreconfHook, 8 pkg-config, 9}: 10 11stdenv.mkDerivation rec { 12 pname = "udftools"; 13 version = "2.3"; 14 15 src = fetchFromGitHub { 16 owner = "pali"; 17 repo = "udftools"; 18 tag = version; 19 hash = "sha256-SUdwJpJfbs6LhcyNMPJUhhpp/3htwT/EVep7+4PRgto="; 20 }; 21 22 nativeBuildInputs = [ 23 autoreconfHook 24 pkg-config 25 ]; 26 27 buildInputs = [ 28 ncurses 29 readline 30 ]; 31 32 hardeningDisable = [ "fortify" ]; 33 34 env.NIX_CFLAGS_COMPILE = "-std=gnu99"; 35 36 preConfigure = '' 37 sed -e '1i#include <limits.h>' -i cdrwtool/cdrwtool.c -i pktsetup/pktsetup.c 38 sed -e 's@[(]char[*][)]spm [+]=@spm = ((char*) spm) + @' -i wrudf/wrudf.c 39 sed -e '38i#include <string.h>' -i wrudf/wrudf-cdrw.c 40 sed -e '12i#include <string.h>' -i wrudf/wrudf-cdr.c 41 sed -e '37i#include <stdlib.h>' -i wrudf/ide-pc.c 42 sed -e '46i#include <sys/sysmacros.h>' -i mkudffs/main.c 43 sed -e "s@\$(DESTDIR)/lib/udev/rules.d@$out/lib/udev/rules.d@" -i pktsetup/Makefile.am 44 ''; 45 46 meta = { 47 description = "UDF tools"; 48 homepage = "https://github.com/pali/udftools"; 49 maintainers = with lib.maintainers; [ raskin ]; 50 platforms = lib.platforms.linux; 51 license = lib.licenses.gpl2Plus; 52 }; 53}