1{ 2 lib, 3 stdenv, 4 fetchurl, 5 autoreconfHook, 6 7 # for passthru.tests 8 git, 9 libguestfs, 10 nixosTests, 11 rpm, 12}: 13 14stdenv.mkDerivation rec { 15 pname = "cpio"; 16 version = "2.15"; 17 18 src = fetchurl { 19 url = "mirror://gnu/cpio/cpio-${version}.tar.bz2"; 20 hash = "sha256-k3YQuXwymh7JJoVT+3gAN7z/8Nz/6XJevE/ZwaqQdds="; 21 }; 22 23 nativeBuildInputs = [ autoreconfHook ]; 24 25 separateDebugInfo = true; 26 27 preConfigure = lib.optionalString stdenv.hostPlatform.isCygwin '' 28 sed -i gnu/fpending.h -e 's,include <stdio_ext.h>,,' 29 ''; 30 31 enableParallelBuilding = true; 32 33 passthru.tests = { 34 inherit libguestfs rpm; 35 git = git.tests.withInstallCheck; 36 initrd = nixosTests.systemd-initrd-simple; 37 }; 38 39 meta = with lib; { 40 homepage = "https://www.gnu.org/software/cpio/"; 41 description = "Program to create or extract from cpio archives"; 42 license = licenses.gpl3; 43 platforms = platforms.all; 44 priority = 6; # resolves collision with gnutar's "libexec/rmt" 45 mainProgram = "cpio"; 46 }; 47}