2023-07-15 17:15:38 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, fetchurl
|
2024-01-13 08:15:51 +00:00
|
|
|
, autoreconfHook
|
2023-07-15 17:15:38 +00:00
|
|
|
|
|
|
|
# for passthru.tests
|
|
|
|
, git
|
|
|
|
, libguestfs
|
|
|
|
, nixosTests
|
|
|
|
, rpm
|
|
|
|
}:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-09-26 12:46:18 +00:00
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "cpio";
|
2024-02-29 20:09:43 +00:00
|
|
|
version = "2.15";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
2021-09-26 12:46:18 +00:00
|
|
|
url = "mirror://gnu/cpio/cpio-${version}.tar.bz2";
|
2024-02-29 20:09:43 +00:00
|
|
|
hash = "sha256-k3YQuXwymh7JJoVT+3gAN7z/8Nz/6XJevE/ZwaqQdds=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2024-01-13 08:15:51 +00:00
|
|
|
nativeBuildInputs = [ autoreconfHook ];
|
|
|
|
|
2021-12-26 17:43:05 +00:00
|
|
|
separateDebugInfo = true;
|
|
|
|
|
2021-09-26 12:46:18 +00:00
|
|
|
preConfigure = lib.optionalString stdenv.isCygwin ''
|
2020-04-24 23:36:52 +00:00
|
|
|
sed -i gnu/fpending.h -e 's,include <stdio_ext.h>,,'
|
2021-09-26 12:46:18 +00:00
|
|
|
'';
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
enableParallelBuilding = true;
|
|
|
|
|
2023-07-15 17:15:38 +00:00
|
|
|
passthru.tests = {
|
|
|
|
inherit libguestfs rpm;
|
|
|
|
git = git.tests.withInstallCheck;
|
|
|
|
initrd = nixosTests.systemd-initrd-simple;
|
|
|
|
};
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
homepage = "https://www.gnu.org/software/cpio/";
|
2024-06-20 14:57:18 +00:00
|
|
|
description = "Program to create or extract from cpio archives";
|
2020-04-24 23:36:52 +00:00
|
|
|
license = licenses.gpl3;
|
|
|
|
platforms = platforms.all;
|
|
|
|
priority = 6; # resolves collision with gnutar's "libexec/rmt"
|
2024-01-02 11:29:13 +00:00
|
|
|
mainProgram = "cpio";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|