From fbb2cfd0bb72cd18d523b2b99807c76a3f7d57c4 Mon Sep 17 00:00:00 2001 From: figsoda Date: Sat, 9 Oct 2021 19:54:08 -0400 Subject: [PATCH] crabz: init at 0.7.2 --- pkgs/tools/compression/crabz/default.nix | 39 ++++++++++++++++++++++++ pkgs/top-level/all-packages.nix | 4 +++ 2 files changed, 43 insertions(+) create mode 100644 pkgs/tools/compression/crabz/default.nix 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 18c5484a9b18..e1df7dc4d711 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; };