Merge pull request #185177 from fpletz/pkgs/criu-1.17.1

criu: 3.15 -> 3.17.1
This commit is contained in:
adisbladis 2022-08-07 20:32:00 +08:00 committed by GitHub
commit e2046f64fb
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1,20 +1,30 @@
{ stdenv, lib, fetchurl, protobuf, protobufc, asciidoc, iptables
, xmlto, docbook_xsl, libpaper, libnl, libcap, libnet, pkg-config
, which, python3, makeWrapper, docbook_xml_dtd_45, perl }:
{ stdenv, lib, fetchFromGitHub, fetchpatch, protobuf, protobufc, asciidoc, iptables
, xmlto, docbook_xsl, libpaper, libnl, libcap, libnet, pkg-config, iproute2
, which, python3, makeWrapper, docbook_xml_dtd_45, perl, nftables, libbsd }:
stdenv.mkDerivation rec {
pname = "criu";
version = "3.15";
version = "3.17.1";
src = fetchurl {
url = "https://download.openvz.org/criu/${pname}-${version}.tar.bz2";
sha256 = "09d0j24x0cyc7wkgi7cnxqgfjk7kbdlm79zxpj8d356sa3rw2z24";
src = fetchFromGitHub {
owner = "checkpoint-restore";
repo = pname;
rev = "v${version}";
hash = "sha256-0B0cdX5bemy4glF9iWjrQIXIqilyYcCcAN9x4Jjrwzk=";
};
patches = [
# Fixes redefinition of rseq headers
(fetchpatch {
url = "https://github.com/checkpoint-restore/criu/commit/1e6e826ffb7ac05f33fa123051c2fc2ddf0f68ea.patch";
hash = "sha256-LJjk0jQ5v5wqeprvBMpxhjLXn7v+lSPldEGgazGUM44=";
})
];
enableParallelBuilding = true;
nativeBuildInputs = [ pkg-config docbook_xsl which makeWrapper docbook_xml_dtd_45 python3 python3.pkgs.wrapPython perl ];
buildInputs = [ protobuf protobufc asciidoc xmlto libpaper libnl libcap libnet iptables ];
propagatedBuildInputs = with python3.pkgs; [ python python3.pkgs.protobuf ];
buildInputs = [ protobuf asciidoc xmlto libpaper libnl libcap libnet nftables libbsd ];
propagatedBuildInputs = [ protobufc ] ++ (with python3.pkgs; [ python python3.pkgs.protobuf ]);
postPatch = ''
substituteInPlace ./Documentation/Makefile \
@ -39,7 +49,8 @@ stdenv.mkDerivation rec {
postFixup = ''
wrapProgram $out/bin/criu \
--prefix PATH : ${lib.makeBinPath [ iptables ]}
--set-default CR_IPTABLES ${iptables}/bin/iptables \
--set-default CR_IP_TOOL ${iproute2}/bin/ip
wrapPythonPrograms
'';