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