Merge pull request #317269 from JoaquinTrinanes/nu_plugin_polars

nu_plugin_polars: init at 0.94.1
This commit is contained in:
Yt 2024-06-07 00:51:11 +00:00 committed by GitHub
commit 9c2adf0c9a
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 56 additions and 11 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

@ -1,10 +1,11 @@
{ lib
, rustPlatform
, fetchFromGitHub
, stdenv
, IOKit
, CoreFoundation
, unstableGitUpdater
{
lib,
rustPlatform,
fetchFromGitHub,
stdenv,
IOKit,
CoreFoundation,
unstableGitUpdater,
}:
rustPlatform.buildRustPackage {
@ -20,9 +21,7 @@ rustPlatform.buildRustPackage {
cargoHash = "sha256-nBxcxADyvPgGrfkW8eBq/wmB2Slq+YGJV2IlxuuCgCg=";
nativeBuildInputs = [
rustPlatform.bindgenHook
];
nativeBuildInputs = [ rustPlatform.bindgenHook ];
buildInputs = lib.optionals stdenv.isDarwin [
CoreFoundation
@ -36,6 +35,6 @@ rustPlatform.buildRustPackage {
homepage = "https://github.com/fennewald/nu_plugin_net";
license = licenses.mit;
maintainers = with maintainers; [ happysalada ];
mainProgram = "nu-plugin-net";
mainProgram = "nu_plugin_net";
};
}

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;
};
}