about summary refs log tree commit diff
path: root/nixpkgs/pkgs/tools/misc/rust-motd/default.nix
blob: bfd4db8ff882975722579d12beed433ab8077615 (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
{ lib
, rustPlatform
, fetchFromGitHub
, pkg-config
, openssl
, stdenv
, Security
}:

rustPlatform.buildRustPackage rec {
  pname = "rust-motd";
  version = "0.2.1";

  src = fetchFromGitHub {
    owner = "rust-motd";
    repo = pname;
    rev = "v${version}";
    sha256 = "sha256-iuADR7m+wdmsQ897o4CQHqDv9PmYu/vJgO5C6Dluao4=";
  };

  cargoSha256 = "sha256-kdSMcADoTpMU4w2XSv0pPQZC155rrQACQ4XTVyj7eeA=";

  nativeBuildInputs = [ pkg-config ];

  buildInputs = [ openssl ] ++ lib.optional stdenv.isDarwin Security;

  OPENSSL_NO_VENDOR = 1;

  meta = with lib; {
    description = "Beautiful, useful MOTD generation with zero runtime dependencies";
    homepage = "https://github.com/rust-motd/rust-motd";
    license = licenses.mit;
    maintainers = with maintainers; [ figsoda ];
  };
}