nixpkgs-suyu/pkgs/tools/backup/rdedup/default.nix
Benjamin Hipple 1285836756 rdedup: fix broken build
In the Rust platform builder, the attribute `cargoPatches` must be used if we
want to consistently apply a patch to the `Cargo.lock` in the vendored
`cargoDeps` and to the `Cargo.lock` in the `src` attribute.

This fixes the build by applying that patch consistently, so the coherency
checker in the newer Rust cargo builder passes.
2020-03-14 17:34:18 -07:00

38 lines
1 KiB
Nix

{ stdenv, fetchFromGitHub, rustPlatform, pkgconfig, openssl, libsodium
, llvmPackages, clang, lzma
, Security }:
rustPlatform.buildRustPackage rec {
pname = "rdedup";
version = "3.1.1";
src = fetchFromGitHub {
owner = "dpc";
repo = "rdedup";
rev = "rdedup-v${version}";
sha256 = "0y34a3mpghdmcb2rx4z62q0s351bfmy1287d75mm07ryfgglgsd7";
};
cargoSha256 = "0akwb7ak4h1i1zk4wcn27zyqjz6mrchs47014xbzw22rj8h8dx92";
cargoPatches = [
./v3.1.1-fix-Cargo.lock.patch
];
nativeBuildInputs = [ pkgconfig llvmPackages.libclang clang ];
buildInputs = [ openssl libsodium lzma ]
++ (stdenv.lib.optional stdenv.isDarwin Security);
configurePhase = ''
export LIBCLANG_PATH="${llvmPackages.libclang}/lib"
'';
meta = with stdenv.lib; {
description = "Data deduplication with compression and public key encryption";
homepage = https://github.com/dpc/rdedup;
license = licenses.mpl20;
maintainers = with maintainers; [ dywedir ];
platforms = platforms.all;
broken = stdenv.isDarwin;
};
}