2021-07-24 22:21:24 +00:00
|
|
|
{ lib, stdenv, fetchurl, fetchpatch, librsync }:
|
2011-12-09 21:15:41 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2021-07-24 22:22:42 +00:00
|
|
|
pname = "btar";
|
|
|
|
version = "1.1.1";
|
|
|
|
|
2011-12-09 21:15:41 +00:00
|
|
|
src = fetchurl {
|
2021-07-24 22:22:42 +00:00
|
|
|
url = "https://vicerveza.homeunix.net/~viric/soft/btar/btar-${version}.tar.gz";
|
2012-07-30 17:25:08 +00:00
|
|
|
sha256 = "0miklk4bqblpyzh1bni4x6lqn88fa8fjn15x1k1n8bxkx60nlymd";
|
2011-12-09 21:15:41 +00:00
|
|
|
};
|
|
|
|
|
2021-07-24 22:21:24 +00:00
|
|
|
patches = [
|
|
|
|
(fetchpatch {
|
|
|
|
url = "https://build.opensuse.org/public/source/openSUSE:Factory/btar/btar-librsync.patch?rev=2";
|
|
|
|
sha256 = "1awqny9489vsfffav19s73xxg26m7zrhvsgf1wxb8c2izazwr785";
|
|
|
|
})
|
|
|
|
];
|
|
|
|
|
2022-05-19 14:39:32 +00:00
|
|
|
# Workaround build failure on -fno-common toolchains like upstream
|
|
|
|
# gcc-10. Otherwise build fails as:
|
|
|
|
# ld: listindex.o:/build/btar-1.1.1/loadindex.h:12: multiple definition of
|
|
|
|
# `ptr'; main.o:/build/btar-1.1.1/loadindex.h:12: first defined here
|
2023-02-19 19:23:32 +00:00
|
|
|
env.NIX_CFLAGS_COMPILE = "-fcommon";
|
2022-05-19 14:39:32 +00:00
|
|
|
|
2011-12-09 21:15:41 +00:00
|
|
|
buildInputs = [ librsync ];
|
|
|
|
|
2021-07-24 22:22:42 +00:00
|
|
|
makeFlags = [ "PREFIX=$(out)" ];
|
2011-12-09 21:15:41 +00:00
|
|
|
|
2021-07-24 22:22:42 +00:00
|
|
|
meta = with lib; {
|
2011-12-09 21:15:41 +00:00
|
|
|
description = "Tar-compatible block-based archiver";
|
2024-03-19 02:14:51 +00:00
|
|
|
mainProgram = "btar";
|
2021-01-15 09:19:50 +00:00
|
|
|
license = lib.licenses.gpl3Plus;
|
2021-07-24 22:22:42 +00:00
|
|
|
homepage = "https://viric.name/cgi-bin/btar";
|
|
|
|
platforms = platforms.all;
|
|
|
|
maintainers = with maintainers; [ viric ];
|
2011-12-09 21:15:41 +00:00
|
|
|
};
|
|
|
|
}
|