nu_plugin_polars: init at 0.94.1

This commit is contained in:
Joaquín Triñanes 2024-06-04 19:05:42 +02:00
parent 1523ad99b8
commit 923ad862cd
No known key found for this signature in database
GPG Key ID: 6E1446DD451C6BAF
2 changed files with 46 additions and 0 deletions

View File

@ -3,6 +3,7 @@
lib.makeScope newScope (self: with self; {
gstat = callPackage ./gstat.nix { inherit Security; };
formats = callPackage ./formats.nix { inherit IOKit Foundation; };
polars = callPackage ./polars.nix { inherit IOKit Foundation; };
query = callPackage ./query.nix { inherit IOKit CoreFoundation; };
regex = throw "`nu_plugin_regex` is no longer compatible with the current Nushell release.";
net = callPackage ./net.nix { inherit IOKit CoreFoundation; };

View File

@ -0,0 +1,45 @@
{
stdenv,
lib,
rustPlatform,
openssl,
nushell,
pkg-config,
IOKit,
Foundation,
nix-update-script,
}:
rustPlatform.buildRustPackage rec {
pname = "nushell_plugin_polars";
inherit (nushell) version src;
cargoHash = "sha256-GkVX12MEHFP4g183zUzOUn4MNeTEBEpB+D5s0OXa4nc=";
nativeBuildInputs = [ pkg-config ] ++ lib.optionals stdenv.cc.isClang [ rustPlatform.bindgenHook ];
buildInputs =
[ openssl ]
++ lib.optionals stdenv.isDarwin [
IOKit
Foundation
];
cargoBuildFlags = [ "--package nu_plugin_polars" ];
checkPhase = ''
cargo test --manifest-path crates/nu_plugin_polars/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 = "Nushell dataframe plugin commands based on polars.";
mainProgram = "nu_plugin_polars";
homepage = "https://github.com/nushell/nushell/tree/${version}/crates/nu_plugin_polars";
license = licenses.mit;
maintainers = with maintainers; [ joaquintrinanes ];
platforms = with platforms; all;
};
}