mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-01-06 21:13:40 +00:00
571c71e6f7
We are migrating packages that meet below requirements: 1. using `callPackage` 2. called path is a directory 3. overriding set is empty (`{ }`) 4. not containing path expressions other than relative path (to makenixpkgs-vet happy) 5. not referenced by nix files outside of the directory, other than`pkgs/top-level/all-packages.nix` 6. not referencing nix files outside of the directory 7. not referencing `default.nix` (since it's changed to `package.nix`) 8. `outPath` doesn't change after migration The tool is here: https://github.com/Aleksanaa/by-name-migrate.
38 lines
1.1 KiB
Nix
38 lines
1.1 KiB
Nix
{ lib, stdenv, fetchurl, fetchpatch, librsync }:
|
|
|
|
stdenv.mkDerivation rec {
|
|
pname = "btar";
|
|
version = "1.1.1";
|
|
|
|
src = fetchurl {
|
|
url = "https://vicerveza.homeunix.net/~viric/soft/btar/btar-${version}.tar.gz";
|
|
sha256 = "0miklk4bqblpyzh1bni4x6lqn88fa8fjn15x1k1n8bxkx60nlymd";
|
|
};
|
|
|
|
patches = [
|
|
(fetchpatch {
|
|
url = "https://build.opensuse.org/public/source/openSUSE:Factory/btar/btar-librsync.patch?rev=2";
|
|
sha256 = "1awqny9489vsfffav19s73xxg26m7zrhvsgf1wxb8c2izazwr785";
|
|
})
|
|
];
|
|
|
|
# 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
|
|
env.NIX_CFLAGS_COMPILE = "-fcommon";
|
|
|
|
buildInputs = [ librsync ];
|
|
|
|
makeFlags = [ "PREFIX=$(out)" ];
|
|
|
|
meta = with lib; {
|
|
description = "Tar-compatible block-based archiver";
|
|
mainProgram = "btar";
|
|
license = lib.licenses.gpl3Plus;
|
|
homepage = "https://viric.name/cgi-bin/btar";
|
|
platforms = platforms.all;
|
|
maintainers = [ ];
|
|
};
|
|
}
|