nixpkgs/pkgs/shells/nushell/plugins/units.nix

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

42 lines
1.1 KiB
Nix
Raw Normal View History

2024-10-09 09:56:41 +00:00
{
stdenv,
lib,
rustPlatform,
pkg-config,
nix-update-script,
fetchFromGitHub,
2024-10-21 07:58:23 +00:00
IOKit,
Foundation,
2024-10-09 09:56:41 +00:00
}:
rustPlatform.buildRustPackage rec {
pname = "nushell_plugin_units";
2024-11-13 11:38:43 +00:00
version = "0.1.3";
2024-10-09 09:56:41 +00:00
src = fetchFromGitHub {
repo = "nu_plugin_units";
owner = "JosephTLyons";
rev = "v${version}";
2024-11-13 11:38:43 +00:00
hash = "sha256-zPN18ECzh2/l0kxp+Vyp3d9kCq3at/7SqMYbV3WDV3I=";
2024-10-09 09:56:41 +00:00
};
2024-11-13 11:38:43 +00:00
cargoHash = "sha256-6NWyuErdxj7//wW4L7ijW4RiWqdwbeTrelIjpisAGkg=";
2024-10-09 09:56:41 +00:00
nativeBuildInputs = [ pkg-config ] ++ lib.optionals stdenv.cc.isClang [ rustPlatform.bindgenHook ];
2024-10-21 07:58:23 +00:00
buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [
IOKit
Foundation
];
2024-10-09 09:56:41 +00:00
cargoBuildFlags = [ "--package nu_plugin_units" ];
passthru.updateScript = nix-update-script { };
meta = with lib; {
description = "A nushell plugin for easily converting between common units.";
mainProgram = "nu_plugin_units";
homepage = "https://github.com/JosephTLyons/nu_plugin_units";
license = licenses.mit;
maintainers = with maintainers; [ mgttlinger ];
platforms = with platforms; all;
};
}