2021-01-17 09:17:16 +00:00
|
|
|
{ lib, stdenv, fetchFromGitHub, rustPlatform, pkg-config, openssl, libsodium
|
2020-01-18 18:55:51 +00:00
|
|
|
, llvmPackages, clang, lzma
|
2019-02-13 10:06:20 +00:00
|
|
|
, Security }:
|
2017-11-20 09:24:43 +00:00
|
|
|
|
|
|
|
rustPlatform.buildRustPackage rec {
|
2019-08-31 12:41:23 +01:00
|
|
|
pname = "rdedup";
|
2019-02-13 10:06:20 +00:00
|
|
|
version = "3.1.1";
|
2017-11-20 09:24:43 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "dpc";
|
|
|
|
repo = "rdedup";
|
2019-02-13 10:06:20 +00:00
|
|
|
rev = "rdedup-v${version}";
|
|
|
|
sha256 = "0y34a3mpghdmcb2rx4z62q0s351bfmy1287d75mm07ryfgglgsd7";
|
2017-11-20 09:24:43 +00:00
|
|
|
};
|
|
|
|
|
2020-03-14 21:48:04 +00:00
|
|
|
cargoSha256 = "0akwb7ak4h1i1zk4wcn27zyqjz6mrchs47014xbzw22rj8h8dx92";
|
2019-02-13 10:06:20 +00:00
|
|
|
|
2020-03-14 21:48:04 +00:00
|
|
|
cargoPatches = [
|
2019-02-13 10:06:20 +00:00
|
|
|
./v3.1.1-fix-Cargo.lock.patch
|
|
|
|
];
|
2017-11-20 09:24:43 +00:00
|
|
|
|
2021-01-17 09:17:16 +00:00
|
|
|
nativeBuildInputs = [ pkg-config llvmPackages.libclang clang ];
|
2019-02-13 10:06:20 +00:00
|
|
|
buildInputs = [ openssl libsodium lzma ]
|
2021-01-15 09:19:50 +00:00
|
|
|
++ (lib.optional stdenv.isDarwin Security);
|
2019-02-13 10:06:20 +00:00
|
|
|
|
2018-07-30 11:50:51 +01:00
|
|
|
configurePhase = ''
|
|
|
|
export LIBCLANG_PATH="${llvmPackages.libclang}/lib"
|
|
|
|
'';
|
2017-11-20 09:24:43 +00:00
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2017-11-20 09:24:43 +00:00
|
|
|
description = "Data deduplication with compression and public key encryption";
|
2020-04-01 02:11:51 +01:00
|
|
|
homepage = "https://github.com/dpc/rdedup";
|
2017-11-20 09:24:43 +00:00
|
|
|
license = licenses.mpl20;
|
|
|
|
maintainers = with maintainers; [ dywedir ];
|
2019-02-13 10:12:01 +00:00
|
|
|
broken = stdenv.isDarwin;
|
2017-11-20 09:24:43 +00:00
|
|
|
};
|
|
|
|
}
|