mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-22 05:31:22 +00:00
4a7f99d55d
Part of: https://github.com/NixOS/nixpkgs/issues/108938 meta = with stdenv.lib; is a widely used pattern. We want to slowly remove the `stdenv.lib` indirection and encourage people to use `lib` directly. Thus let’s start with the meta field. This used a rewriting script to mostly automatically replace all occurances of this pattern, and add the `lib` argument to the package header if it doesn’t exist yet. The script in its current form is available at https://cs.tvl.fyi/depot@2f807d7f141068d2d60676a89213eaa5353ca6e0/-/blob/users/Profpatsch/nixpkgs-rewriter/default.nix
45 lines
1.1 KiB
Nix
45 lines
1.1 KiB
Nix
{ lib, stdenv
|
|
, rustPlatform
|
|
, fetchFromGitHub
|
|
, pkg-config
|
|
, installShellFiles
|
|
, openssl
|
|
, Security
|
|
}:
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
pname = "tealdeer";
|
|
version = "1.4.1";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "dbrgn";
|
|
repo = "tealdeer";
|
|
rev = "v${version}";
|
|
sha256 = "1f37qlw4nxdhlqlqzzb4j11gsv26abk2nk2qhbzj77kp4v2b125x";
|
|
};
|
|
|
|
cargoSha256 = "0g5fjj677qzhw3nw7f3n5gghsj2y811bdclxpy8aq2n58gbwvhvc";
|
|
|
|
buildInputs = if stdenv.isDarwin then [ Security ] else [ openssl ];
|
|
|
|
nativeBuildInputs = [ installShellFiles pkg-config ];
|
|
|
|
postInstall = ''
|
|
installShellCompletion --bash --name tealdeer.bash bash_tealdeer
|
|
installShellCompletion --fish --name tealdeer.fish fish_tealdeer
|
|
installShellCompletion --zsh --name _tealdeer zsh_tealdeer
|
|
'';
|
|
|
|
# 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";
|
|
homepage = "https://github.com/dbrgn/tealdeer";
|
|
maintainers = with maintainers; [ davidak ];
|
|
license = with licenses; [ asl20 mit ];
|
|
};
|
|
}
|