1{
2 stdenv,
3 lib,
4 rustPlatform,
5 pkg-config,
6 nix-update-script,
7 fetchFromGitHub,
8}:
9
10rustPlatform.buildRustPackage (finalAttrs: {
11 pname = "nu_plugin_units";
12 version = "0.1.7";
13
14 src = fetchFromGitHub {
15 owner = "JosephTLyons";
16 repo = "nu_plugin_units";
17 tag = "v${finalAttrs.version}";
18 hash = "sha256-4donh0UlBbaEwgDxUECKTPWGLuAc9KUmrRty2Ob7ZMA=";
19 };
20
21 cargoHash = "sha256-MjalDrjJTAHay9zcPhA8br2tOkkIzE4etL+yF5MKetY=";
22
23 nativeBuildInputs = [ pkg-config ] ++ lib.optionals stdenv.cc.isClang [ rustPlatform.bindgenHook ];
24
25 passthru.updateScript = nix-update-script { };
26
27 meta = {
28 description = "Nushell plugin for easily converting between common units";
29 mainProgram = "nu_plugin_units";
30 homepage = "https://github.com/JosephTLyons/nu_plugin_units";
31 license = lib.licenses.mit;
32 maintainers = with lib.maintainers; [ mgttlinger ];
33 };
34})