about summary refs log tree commit diff
path: root/pkgs/tools/misc/iay/default.nix
blob: 9c8b0a47ab8679f3b5fef9df2ae84c594948caa5 (plain) (blame)
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
43
44
45
46
47
{ lib
, stdenv
, fetchFromGitHub
, rustPlatform
, openssl
, pkg-config
, AppKit
, Cocoa
, Foundation
, Security
}:

rustPlatform.buildRustPackage rec {
  pname = "iay";
  version = "0.4.0";

  src = fetchFromGitHub {
    owner = "aaqaishtyaq";
    repo = pname;
    rev = "v${version}";
    sha256 = "0r2yp34gxkh32amrysfj1jg543dh0kyqxzcx0zyi6a8y9232d8ky";
  };

  cargoHash = "sha256-SMqiwM6LrXXjV4Mb2BY9WbeKKPkxiYxPyZ4aepVIAqU=";

  nativeBuildInputs = [ pkg-config ];

  buildInputs = [
    openssl
  ]
  ++ lib.optionals stdenv.isDarwin [
    AppKit
    Cocoa
    Foundation
    Security
  ];

  NIX_LDFLAGS = lib.optionals stdenv.isDarwin [ "-framework" "AppKit" ];

  meta = with lib; {
    description =
      "Minimalistic, blazing-fast, and extendable prompt for bash and zsh";
    homepage = "https://github.com/aaqaishtyaq/iay";
    license = licenses.mit;
    maintainers = with maintainers; [ aaqaishtyaq ];
  };
}