2023-01-07 23:52:04 +01:00
|
|
|
{ lib, stdenv, fetchurl, utmp, musl-fts }:
|
2020-12-03 16:59:06 +01:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "pax";
|
|
|
|
version = "20201030";
|
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
url = "http://www.mirbsd.org/MirOS/dist/mir/cpio/paxmirabilis-${version}.tgz";
|
|
|
|
sha256 = "1p18nxijh323f4i1s2pg7pcr0557xljl5avv8ll5s9nfr34r5j0w";
|
|
|
|
};
|
|
|
|
|
2023-01-07 23:52:04 +01:00
|
|
|
buildInputs = lib.optional stdenv.isDarwin utmp
|
|
|
|
++ lib.optional stdenv.hostPlatform.isMusl musl-fts;
|
|
|
|
|
|
|
|
NIX_LDFLAGS = lib.optionalString stdenv.hostPlatform.isMusl "-lfts";
|
2021-11-18 17:17:59 +01:00
|
|
|
|
2020-12-03 16:59:06 +01:00
|
|
|
buildPhase = ''
|
|
|
|
sh Build.sh -r -tpax
|
|
|
|
'';
|
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
install -Dm555 pax $out/bin/pax
|
|
|
|
ln -s $out/bin/pax $out/bin/paxcpio
|
|
|
|
ln -s $out/bin/pax $out/bin/paxtar
|
|
|
|
install -Dm444 mans/pax{,cpio,tar}.1 -t $out/share/man/man1/
|
|
|
|
'';
|
|
|
|
|
2021-01-11 08:54:33 +01:00
|
|
|
meta = with lib; {
|
2020-12-03 16:59:06 +01:00
|
|
|
description = "POSIX standard archive tool from MirBSD";
|
|
|
|
homepage = "https://www.mirbsd.org/pax.htm";
|
|
|
|
license = licenses.bsd3;
|
|
|
|
maintainers = with maintainers; [ gebner ];
|
|
|
|
platforms = platforms.unix;
|
|
|
|
};
|
|
|
|
}
|