diff --git a/pkgs/tools/compression/crabz/default.nix b/pkgs/tools/compression/crabz/default.nix new file mode 100644 index 000000000000..ab5cc94b43a1 --- /dev/null +++ b/pkgs/tools/compression/crabz/default.nix @@ -0,0 +1,39 @@ +{ lib +, rustPlatform +, fetchFromGitHub +, cmake +, stdenv +, libiconv +, CoreFoundation +, Security +}: + +rustPlatform.buildRustPackage rec { + pname = "crabz"; + version = "0.7.2"; + + src = fetchFromGitHub { + owner = "sstadick"; + repo = pname; + rev = "v${version}"; + sha256 = "0ch9cqarsakihg9ymbdm0ka6wz77z84n4g6cdlcskczc5g3b9gp9"; + }; + + cargoSha256 = "sha256-nrCYlhq/f8gk3NmltAg+xppRJ533ooEpetWvaF2vmP0="; + + nativeBuildInputs = [ cmake ]; + + buildInputs = lib.optionals stdenv.isDarwin [ + libiconv + CoreFoundation + Security + ]; + + meta = with lib; { + description = "A cross platform, fast, compression and decompression tool"; + homepage = "https://github.com/sstadick/crabz"; + changelog = "https://github.com/sstadick/crabz/blob/v${version}/CHANGELOG.md"; + license = with licenses; [ unlicense /* or */ mit ]; + maintainers = with maintainers; [ figsoda ]; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index d9901bd4a35c..1aa076c0bb2b 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -3912,6 +3912,10 @@ with pkgs; cpuminer-multi = callPackage ../tools/misc/cpuminer-multi { }; + crabz = callPackage ../tools/compression/crabz { + inherit (darwin.apple_sdk.frameworks) CoreFoundation Security; + }; + cryptpad = callPackage ../servers/web-apps/cryptpad { nodejs = nodejs-12_x; };