Merge pull request #317269 from JoaquinTrinanes/nu_plugin_polars
nu_plugin_polars: init at 0.94.1
This commit is contained in:
commit
9c2adf0c9a
@ -3,6 +3,7 @@
|
|||||||
lib.makeScope newScope (self: with self; {
|
lib.makeScope newScope (self: with self; {
|
||||||
gstat = callPackage ./gstat.nix { inherit Security; };
|
gstat = callPackage ./gstat.nix { inherit Security; };
|
||||||
formats = callPackage ./formats.nix { inherit IOKit Foundation; };
|
formats = callPackage ./formats.nix { inherit IOKit Foundation; };
|
||||||
|
polars = callPackage ./polars.nix { inherit IOKit Foundation; };
|
||||||
query = callPackage ./query.nix { inherit IOKit CoreFoundation; };
|
query = callPackage ./query.nix { inherit IOKit CoreFoundation; };
|
||||||
regex = throw "`nu_plugin_regex` is no longer compatible with the current Nushell release.";
|
regex = throw "`nu_plugin_regex` is no longer compatible with the current Nushell release.";
|
||||||
net = callPackage ./net.nix { inherit IOKit CoreFoundation; };
|
net = callPackage ./net.nix { inherit IOKit CoreFoundation; };
|
||||||
|
@ -1,10 +1,11 @@
|
|||||||
{ lib
|
{
|
||||||
, rustPlatform
|
lib,
|
||||||
, fetchFromGitHub
|
rustPlatform,
|
||||||
, stdenv
|
fetchFromGitHub,
|
||||||
, IOKit
|
stdenv,
|
||||||
, CoreFoundation
|
IOKit,
|
||||||
, unstableGitUpdater
|
CoreFoundation,
|
||||||
|
unstableGitUpdater,
|
||||||
}:
|
}:
|
||||||
|
|
||||||
rustPlatform.buildRustPackage {
|
rustPlatform.buildRustPackage {
|
||||||
@ -20,9 +21,7 @@ rustPlatform.buildRustPackage {
|
|||||||
|
|
||||||
cargoHash = "sha256-nBxcxADyvPgGrfkW8eBq/wmB2Slq+YGJV2IlxuuCgCg=";
|
cargoHash = "sha256-nBxcxADyvPgGrfkW8eBq/wmB2Slq+YGJV2IlxuuCgCg=";
|
||||||
|
|
||||||
nativeBuildInputs = [
|
nativeBuildInputs = [ rustPlatform.bindgenHook ];
|
||||||
rustPlatform.bindgenHook
|
|
||||||
];
|
|
||||||
|
|
||||||
buildInputs = lib.optionals stdenv.isDarwin [
|
buildInputs = lib.optionals stdenv.isDarwin [
|
||||||
CoreFoundation
|
CoreFoundation
|
||||||
@ -36,6 +35,6 @@ rustPlatform.buildRustPackage {
|
|||||||
homepage = "https://github.com/fennewald/nu_plugin_net";
|
homepage = "https://github.com/fennewald/nu_plugin_net";
|
||||||
license = licenses.mit;
|
license = licenses.mit;
|
||||||
maintainers = with maintainers; [ happysalada ];
|
maintainers = with maintainers; [ happysalada ];
|
||||||
mainProgram = "nu-plugin-net";
|
mainProgram = "nu_plugin_net";
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
45
pkgs/shells/nushell/plugins/polars.nix
Normal file
45
pkgs/shells/nushell/plugins/polars.nix
Normal 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;
|
||||||
|
};
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user