summary refs log tree commit diff stats
path: root/nix/.config/nixpkgs/zr.nix
blob: 1ef3e328b28ef28d26c6ebd93ea3f485ac7d53e0 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
{
  fetchFromGitHub,
  darwin,
  stdenv,
  rustPlatform,
  cmake,
  curl,
  libiconv,
  openssl,
  zlib
}:
with rustPlatform;

buildRustPackage rec {
  name = "zr-${version}";
  version = "0.4.8";

  src = fetchFromGitHub {
    owner = "jedahan";
    repo = "zr";
    rev = "${version}";
    sha256 = "07kb8bk2zri1087dp3pk2zpqjy8rd40nw931z6nnm230ygq481zm";
  };

  buildInputs = [ cmake curl openssl zlib libiconv ] ++ stdenv.lib.optionals stdenv.isDarwin
      (with darwin.apple_sdk.frameworks; [ Security ]);

  cargoDepsHook = stdenv.lib.optionals stdenv.isDarwin ''
    export OPENSSL_DIR=${openssl}
    export OPENSSL_LIB_DIR=${openssl.out}/lib
    export OPENSSL_INCLUDE_DIR=${openssl.dev}/include
  '';

  depsSha256 = "0cjnqilsb9la28b65j1w1n8gdr49b1d9m3z7wsl4q2w3qc42ad52";

  meta = with stdenv.lib; {
    description = "zsh plugin manager written in rust";
    homepage = https://github.com/jedahan/zr;
    license = with licenses; [ unfree ];
    platforms = platforms.all;
  };
}