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

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

56 lines
1.2 KiB
Nix
Raw Normal View History

2022-04-18 01:30:05 +00:00
{ lib
, stdenv
, rustPlatform
, fetchFromGitHub
2022-08-14 02:33:37 +00:00
, installShellFiles
, pkg-config
2022-04-18 01:30:05 +00:00
, libxcb
2022-08-14 02:33:37 +00:00
, openssl
# Darwin dependencies
2022-04-18 01:30:05 +00:00
, AppKit
}:
rustPlatform.buildRustPackage rec {
pname = "didyoumean";
2022-08-14 02:33:37 +00:00
version = "1.1.3";
2022-04-18 01:30:05 +00:00
src = fetchFromGitHub {
owner = "hisbaan";
repo = "didyoumean";
rev = "v${version}";
2022-08-14 02:33:37 +00:00
sha256 = "sha256-hHl9PGNDFN7Dad2JOlAy99dz0pC9OmphwYMJHBBwx7Y=";
2022-04-18 01:30:05 +00:00
};
2022-08-14 02:33:37 +00:00
cargoSha256 = "sha256-rjkj9MO6fXVOk3fA87olGt/iIaJ8Zv/cy/Cqy/pg6yI=";
2022-04-18 01:30:05 +00:00
2022-08-14 02:33:37 +00:00
nativeBuildInputs = [
installShellFiles
] ++ lib.optionals stdenv.isLinux [
pkg-config
];
buildInputs = lib.optionals stdenv.isLinux [
libxcb
openssl
] ++ lib.optionals stdenv.isDarwin [
AppKit
];
postInstall = ''
installManPage man/dym.1
installShellCompletion completions/dym.{bash,fish}
installShellCompletion --zsh completions/_dym
'';
# Clipboard doesn't exist in test environment
doCheck = false;
2022-04-18 01:30:05 +00:00
meta = with lib; {
description = "A CLI spelling corrector for when you're unsure";
homepage = "https://github.com/hisbaan/didyoumean";
license = licenses.gpl3Plus;
2022-08-14 02:33:37 +00:00
maintainers = with maintainers; [ evanjs wegank ];
mainProgram = "dym";
2022-04-18 01:30:05 +00:00
};
}