nixpkgs/pkgs/tools/misc/tealdeer/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

48 lines
1.1 KiB
Nix
Raw Normal View History

2022-05-19 04:20:00 +00:00
{ lib
, stdenv
, rustPlatform
, fetchFromGitHub
, pkg-config
, installShellFiles
, openssl
2019-11-01 02:04:12 +00:00
, Security
}:
2018-04-11 12:12:47 +00:00
rustPlatform.buildRustPackage rec {
2019-08-31 11:41:23 +00:00
pname = "tealdeer";
2022-01-01 00:56:48 +00:00
version = "1.5.0";
2018-04-11 12:12:47 +00:00
src = fetchFromGitHub {
owner = "dbrgn";
repo = "tealdeer";
rev = "v${version}";
2022-01-01 00:56:48 +00:00
sha256 = "sha256-yF46jCdC4UDswKa/83ZrM9VkZXQqzua2/S7y2bqYa+c=";
2018-04-11 12:12:47 +00:00
};
2022-01-01 00:56:48 +00:00
cargoSha256 = "sha256-BIMaVeNSdKl2A9613S+wgmb6YmiF5YJU8pTMVQfjDwI=";
2018-04-11 12:12:47 +00:00
2020-07-24 00:26:31 +00:00
buildInputs = if stdenv.isDarwin then [ Security ] else [ openssl ];
2018-04-11 12:12:47 +00:00
nativeBuildInputs = [ installShellFiles pkg-config ];
postInstall = ''
2022-05-19 04:20:00 +00:00
installShellCompletion --cmd tldr \
--bash bash_tealdeer \
--fish fish_tealdeer \
--zsh zsh_tealdeer
'';
2018-04-11 12:12:47 +00:00
# disable tests for now since one needs network
# what is unavailable in sandbox build
# and i can't disable just this one
doCheck = false;
meta = with lib; {
description = "A very fast implementation of tldr in Rust";
2018-04-11 12:12:47 +00:00
homepage = "https://github.com/dbrgn/tealdeer";
maintainers = with maintainers; [ davidak ];
license = with licenses; [ asl20 mit ];
2021-09-02 19:42:33 +00:00
mainProgram = "tldr";
2018-04-11 12:12:47 +00:00
};
}