mirror of
https://github.com/CHN-beta/nixpkgs.git
synced 2026-01-12 02:40:31 +08:00
Because otherwise:
- The names are inconsistent with the other nushell plugins
- `versionCheckHook` cannot find the binaries without setting a special
variable
(cherry picked from commit bd065b6888)
35 lines
893 B
Nix
35 lines
893 B
Nix
{
|
|
stdenv,
|
|
lib,
|
|
rustPlatform,
|
|
pkg-config,
|
|
nix-update-script,
|
|
fetchFromGitHub,
|
|
}:
|
|
|
|
rustPlatform.buildRustPackage (finalAttrs: {
|
|
pname = "nu_plugin_units";
|
|
version = "0.1.6";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "JosephTLyons";
|
|
repo = "nu_plugin_units";
|
|
tag = "v${finalAttrs.version}";
|
|
hash = "sha256-1KyuUaWN+OiGpo8Ohc/8B+nisdb8uT+T3qBu+JbaVYo=";
|
|
};
|
|
|
|
cargoHash = "sha256-LYVwFM8znN96LwOwRnauehrucSqHnKNPoMzl2HRczww=";
|
|
|
|
nativeBuildInputs = [ pkg-config ] ++ lib.optionals stdenv.cc.isClang [ rustPlatform.bindgenHook ];
|
|
|
|
passthru.updateScript = nix-update-script { };
|
|
|
|
meta = {
|
|
description = "Nushell plugin for easily converting between common units";
|
|
mainProgram = "nu_plugin_units";
|
|
homepage = "https://github.com/JosephTLyons/nu_plugin_units";
|
|
license = lib.licenses.mit;
|
|
maintainers = with lib.maintainers; [ mgttlinger ];
|
|
};
|
|
})
|