Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at devShellTools-shell 43 lines 1.2 kB view raw
1{ 2 lib, 3 stdenv, 4 fetchurl, 5 fetchpatch, 6 librsync, 7}: 8 9stdenv.mkDerivation rec { 10 pname = "btar"; 11 version = "1.1.1"; 12 13 src = fetchurl { 14 url = "https://vicerveza.homeunix.net/~viric/soft/btar/btar-${version}.tar.gz"; 15 sha256 = "0miklk4bqblpyzh1bni4x6lqn88fa8fjn15x1k1n8bxkx60nlymd"; 16 }; 17 18 patches = [ 19 (fetchpatch { 20 url = "https://build.opensuse.org/public/source/openSUSE:Factory/btar/btar-librsync.patch?rev=2"; 21 sha256 = "1awqny9489vsfffav19s73xxg26m7zrhvsgf1wxb8c2izazwr785"; 22 }) 23 ]; 24 25 # Workaround build failure on -fno-common toolchains like upstream 26 # gcc-10. Otherwise build fails as: 27 # ld: listindex.o:/build/btar-1.1.1/loadindex.h:12: multiple definition of 28 # `ptr'; main.o:/build/btar-1.1.1/loadindex.h:12: first defined here 29 env.NIX_CFLAGS_COMPILE = "-fcommon"; 30 31 buildInputs = [ librsync ]; 32 33 makeFlags = [ "PREFIX=$(out)" ]; 34 35 meta = with lib; { 36 description = "Tar-compatible block-based archiver"; 37 mainProgram = "btar"; 38 license = lib.licenses.gpl3Plus; 39 homepage = "https://briantracy.xyz/writing/btar.html"; 40 platforms = platforms.all; 41 maintainers = [ ]; 42 }; 43}