1
0
Fork 0
mirror of https://github.com/NixOS/nixpkgs synced 2024-10-19 03:47:13 -04:00
nixpkgs/pkgs/shells/nushell/plugins/formats.nix

42 lines
1.1 KiB
Nix
Raw Normal View History

{ stdenv
, lib
, rustPlatform
, nushell
, pkg-config
, IOKit
, Foundation
2023-12-15 15:56:01 -05:00
, libclang
, nix-update-script
}:
rustPlatform.buildRustPackage rec {
pname = "nushell_plugin_formats";
inherit (nushell) version src;
2024-04-05 08:47:06 -04:00
cargoHash = "sha256-mInMs0kAJn3/fgRAG0E8hgvaly2G68kT5O+D83pLq78=";
env = lib.optionalAttrs stdenv.cc.isClang {
2023-12-15 15:56:01 -05:00
LIBCLANG_PATH = "${libclang.lib}/lib";
};
nativeBuildInputs = [ pkg-config ];
2023-09-25 16:58:52 -04:00
buildInputs = lib.optionals stdenv.isDarwin [ IOKit Foundation ];
cargoBuildFlags = [ "--package nu_plugin_formats" ];
2023-09-11 16:48:00 -04:00
checkPhase = ''
cargo test --manifest-path crates/nu_plugin_formats/Cargo.toml
'';
passthru.updateScript = nix-update-script {
# Skip the version check and only check the hash because we inherit version from nushell.
extraArgs = [ "--version=skip" ];
};
meta = with lib; {
description = "A formats plugin for Nushell";
mainProgram = "nu_plugin_formats";
homepage = "https://github.com/nushell/nushell/tree/${version}/crates/nu_plugin_formats";
license = licenses.mpl20;
maintainers = with maintainers; [ viraptor aidalgol ];
platforms = with platforms; all;
};
}