mastodon: 4.3.1 -> 4.3.2 (#361487)
[NixPkgs.git] / pkgs / by-name / ri / ripunzip / package.nix
blobd60bedc482cdd736da04bd57e1fe29a049b3d880
1 { lib
2 , stdenv
3 , fetchFromGitHub
4 , rustPlatform
5 , openssl
6 , darwin
7 , pkg-config
8 , testers
9 , fetchzip
10 , ripunzip
13 rustPlatform.buildRustPackage rec {
14   pname = "ripunzip";
15   version = "2.0.0";
17   src = fetchFromGitHub {
18     owner = "google";
19     repo = "ripunzip";
20     rev = "v${version}";
21     hash = "sha256-O9R7SmhKQ6VB9TWbLsQmK/0tDWhJ1QWIPwW7VtibqAk=";
22   };
24   cargoHash = "sha256-1ZHAbJIWRQh876rshMYeuCz7UMlwdqrScO0eIkGjZao=";
26   buildInputs = [ openssl ]
27     ++ lib.optionals stdenv.hostPlatform.isDarwin (with darwin.apple_sdk.frameworks; [ Security SystemConfiguration ]);
28   nativeBuildInputs = [ pkg-config ];
30   setupHook = ./setup-hook.sh;
32   passthru.tests = {
33     fetchzipWithRipunzip = testers.invalidateFetcherByDrvHash (fetchzip.override { unzip = ripunzip; }) {
34       url = "https://github.com/google/ripunzip/archive/cb9caa3ba4b0e27a85e165be64c40f1f6dfcc085.zip";
35       hash = "sha256-BoErC5VL3Vpvkx6xJq6J+eUJrBnjVEdTuSo7zh98Jy4=";
36     };
37     version = testers.testVersion {
38       package = ripunzip;
39     };
40   };
42   meta = with lib; {
43     description = "Tool to unzip files in parallel";
44     mainProgram = "ripunzip";
45     homepage = "https://github.com/google/ripunzip";
46     license = with lib.licenses; [ mit asl20 ];
47     maintainers = [ maintainers.lesuisse ];
48   };