criu: 3.15 -> 3.17.1

+21 -10
+21 -10
pkgs/os-specific/linux/criu/default.nix
··· 1 - { stdenv, lib, fetchurl, protobuf, protobufc, asciidoc, iptables 2 - , xmlto, docbook_xsl, libpaper, libnl, libcap, libnet, pkg-config 3 - , which, python3, makeWrapper, docbook_xml_dtd_45, perl }: 1 + { stdenv, lib, fetchFromGitHub, fetchpatch, protobuf, protobufc, asciidoc, iptables 2 + , xmlto, docbook_xsl, libpaper, libnl, libcap, libnet, pkg-config, iproute2 3 + , which, python3, makeWrapper, docbook_xml_dtd_45, perl, nftables, libbsd }: 4 4 5 5 stdenv.mkDerivation rec { 6 6 pname = "criu"; 7 - version = "3.15"; 7 + version = "3.17.1"; 8 8 9 - src = fetchurl { 10 - url = "https://download.openvz.org/criu/${pname}-${version}.tar.bz2"; 11 - sha256 = "09d0j24x0cyc7wkgi7cnxqgfjk7kbdlm79zxpj8d356sa3rw2z24"; 9 + src = fetchFromGitHub { 10 + owner = "checkpoint-restore"; 11 + repo = pname; 12 + rev = "v${version}"; 13 + hash = "sha256-0B0cdX5bemy4glF9iWjrQIXIqilyYcCcAN9x4Jjrwzk="; 12 14 }; 13 15 16 + patches = [ 17 + # Fixes redefinition of rseq headers 18 + (fetchpatch { 19 + url = "https://github.com/checkpoint-restore/criu/commit/1e6e826ffb7ac05f33fa123051c2fc2ddf0f68ea.patch"; 20 + hash = "sha256-LJjk0jQ5v5wqeprvBMpxhjLXn7v+lSPldEGgazGUM44="; 21 + }) 22 + ]; 23 + 14 24 enableParallelBuilding = true; 15 25 nativeBuildInputs = [ pkg-config docbook_xsl which makeWrapper docbook_xml_dtd_45 python3 python3.pkgs.wrapPython perl ]; 16 - buildInputs = [ protobuf protobufc asciidoc xmlto libpaper libnl libcap libnet iptables ]; 17 - propagatedBuildInputs = with python3.pkgs; [ python python3.pkgs.protobuf ]; 26 + buildInputs = [ protobuf asciidoc xmlto libpaper libnl libcap libnet nftables libbsd ]; 27 + propagatedBuildInputs = [ protobufc ] ++ (with python3.pkgs; [ python python3.pkgs.protobuf ]); 18 28 19 29 postPatch = '' 20 30 substituteInPlace ./Documentation/Makefile \ ··· 39 49 40 50 postFixup = '' 41 51 wrapProgram $out/bin/criu \ 42 - --prefix PATH : ${lib.makeBinPath [ iptables ]} 52 + --set-default CR_IPTABLES ${iptables}/bin/iptables \ 53 + --set-default CR_IP_TOOL ${iproute2}/bin/ip 43 54 wrapPythonPrograms 44 55 ''; 45 56