From 0e61cff58d4623f3bed6f4d340b475a8f326cf15 Mon Sep 17 00:00:00 2001 From: Nikolay Amiantov Date: Mon, 29 Apr 2019 18:10:05 +0300 Subject: [PATCH] criu: 3.9 -> 3.11 --- pkgs/os-specific/linux/criu/default.nix | 27 +++++++++++++++---------- 1 file changed, 16 insertions(+), 11 deletions(-) diff --git a/pkgs/os-specific/linux/criu/default.nix b/pkgs/os-specific/linux/criu/default.nix index 832167b6f26a..aa08160871e0 100644 --- a/pkgs/os-specific/linux/criu/default.nix +++ b/pkgs/os-specific/linux/criu/default.nix @@ -1,19 +1,19 @@ -{ stdenv, fetchurl, protobuf, protobufc, asciidoc +{ stdenv, lib, fetchurl, protobuf, protobufc, asciidoc, iptables , xmlto, docbook_xsl, libpaper, libnl, libcap, libnet, pkgconfig -, python }: +, which, python, makeWrapper, docbook_xml_dtd_45 }: stdenv.mkDerivation rec { name = "criu-${version}"; - version = "3.9"; + version = "3.11"; src = fetchurl { url = "https://download.openvz.org/criu/${name}.tar.bz2"; - sha256 = "0l71lmklr42pc2bj37pkp7y8va8bx42n9f6i4q4idsx4wrdd75fx"; + sha256 = "03nimyn3wy5mlw30gq7bvlzvvprqjv8f25240yj5arzlld8mhsw8"; }; enableParallelBuilding = true; - nativeBuildInputs = [ pkgconfig docbook_xsl ]; - buildInputs = [ protobuf protobufc asciidoc xmlto libpaper libnl libcap libnet python ]; + nativeBuildInputs = [ pkgconfig docbook_xsl which makeWrapper docbook_xml_dtd_45 ]; + buildInputs = [ protobuf protobufc asciidoc xmlto libpaper libnl libcap libnet python iptables ]; postPatch = '' substituteInPlace ./Documentation/Makefile --replace "2>/dev/null" "" @@ -23,17 +23,22 @@ stdenv.mkDerivation rec { ln -sf ${protobuf}/include/google/protobuf/descriptor.proto ./images/google/protobuf/descriptor.proto ''; - buildPhase = "make PREFIX=$out"; + makeFlags = [ "PREFIX=$(out)" "ASCIIDOC=${asciidoc}/bin/asciidoc" "XMLTO=${xmlto}/bin/xmlto" ]; - makeFlags = "PREFIX=$(out)"; + outputs = [ "out" "dev" "man" ]; + + preBuild = '' + # No idea why but configure scripts break otherwise. + export SHELL="" + ''; hardeningDisable = [ "stackprotector" "fortify" ]; # dropping fortify here as well as package uses it by default: # command-line>:0:0: error: "_FORTIFY_SOURCE" redefined [-Werror] - installPhase = '' - mkdir -p $out/etc/logrotate.d - make install PREFIX=$out LIBDIR=$out/lib ASCIIDOC=${asciidoc}/bin/asciidoc XMLTO=${xmlto}/bin/xmlto + postFixup = '' + wrapProgram $out/bin/criu \ + --prefix PATH : ${lib.makeBinPath [ iptables ]} ''; meta = with stdenv.lib; {