Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

nushellPlugins.hcl: init at 0.100.0 #358184

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions maintainers/maintainer-list.nix
Original file line number Diff line number Diff line change
Expand Up @@ -24268,6 +24268,11 @@
githubId = 4113027;
name = "Jesper Geertsen Jonsson";
};
yethal = {
github = "yethal";
githubId = 26117918;
name = "Yethal";
};
yinfeng = {
email = "[email protected]";
github = "linyinfeng";
Expand Down
2 changes: 2 additions & 0 deletions pkgs/shells/nushell/plugins/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@ lib.makeScope newScope (self: with self; {
highlight = callPackage ./highlight.nix { inherit IOKit Foundation; };
dbus = callPackage ./dbus.nix { inherit dbus; nushell_plugin_dbus = self.dbus; };
skim = callPackage ./skim.nix { inherit IOKit CoreFoundation; };
hcl = callPackage ./hcl.nix { inherit IOKit CoreFoundation; };

} // lib.optionalAttrs config.allowAliases {
regex = throw "`nu_plugin_regex` is no longer compatible with the current Nushell release.";
})
42 changes: 42 additions & 0 deletions pkgs/shells/nushell/plugins/hcl.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
{
lib,
rustPlatform,
fetchFromGitHub,
stdenv,
IOKit,
CoreFoundation,
nix-update-script,
}:

rustPlatform.buildRustPackage rec {
pname = "nu_plugin_hcl";
version = "0.100.0";
Yethal marked this conversation as resolved.
Show resolved Hide resolved

src = fetchFromGitHub {
owner = "yethal";
repo = pname;
rev = "2be6d719a0721981ad4a87931547324271fce5b5";
hash = "sha256-Uj4zzRJ1MtUZBCGc1/wCdh7ZOqLHPQhpdVJBseQR1uE=";
};

cargoHash = "sha256-J4i4lDoXcwU5ecyXiHh/4wwQGqp+dkQkwFHsCr2oNFw=";

nativeBuildInputs = lib.optionals stdenv.hostPlatform.isDarwin [ rustPlatform.bindgenHook ];
buildInputs = lib.optionals stdenv.hostPlatform.isDarwin [
IOKit
CoreFoundation
];

passthru = {
updateScript = nix-update-script { };
};

meta = with lib; {
description = "Nushell plugin for parsing Hashicorp Configuration Language files";
mainProgram = "nu_plugin_hcl";
homepage = "https://github.com/yethal/nu_plugin_hcl";
license = licenses.mit;
maintainers = with maintainers; [ yethal ];
platforms = platforms.all;
};
}