Skip to content

Commit

Permalink
Merge pull request #206786 from Borlaag/add-extism-cli
Browse files Browse the repository at this point in the history
  • Loading branch information
SuperSandro2000 authored Dec 31, 2022
2 parents 407160f + f240364 commit 8ba56d7
Show file tree
Hide file tree
Showing 3 changed files with 45 additions and 0 deletions.
6 changes: 6 additions & 0 deletions maintainers/maintainer-list.nix
Original file line number Diff line number Diff line change
Expand Up @@ -1975,6 +1975,12 @@
githubId = 1743184;
name = "Boris Babić";
};
borlaag = {
email = "borlaag@proton.me";
github = "Borlaag";
githubId = 114830266;
name = "Børlaag";
};
bosu = {
email = "boriss@gmail.com";
github = "bosu";
Expand Down
37 changes: 37 additions & 0 deletions pkgs/development/tools/extism-cli/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
{ lib, stdenvNoCC, fetchFromGitHub, python3, makeBinaryWrapper }:

stdenvNoCC.mkDerivation rec {
pname = "extism-cli";
version = "0.1.0";

src = fetchFromGitHub {
owner = "extism";
repo = "cli";
rev = "97935786166e82154266b82410028482800e6061";
sha256 = "sha256-LRzXuZQt5h3exw43UXUwLVIhveYVFw/SQ2YtHI9ZnWc=";
};

buildInputs = [ python3 ];
nativeBuildInputs = [ makeBinaryWrapper ];

installPhase = ''
runHook preInstall
install -D -m 755 ./extism_cli/__init__.py "$out/bin/extism"
# The extism cli tries by default to install a library and header into /usr/local which does not work on NixOS.
# Pass a reasonable writable directory which can still be overwritten with another --prefix argument.
wrapProgram "$out/bin/extism" \
--add-flags '--prefix $HOME/.local'
runHook postInstall
'';

meta = with lib; {
description = "The extism CLI is used to manage Extism installations";
homepage = "https://github.com/extism/cli";
license = licenses.bsd3;
maintainers = with maintainers; [ borlaag ];
platforms = platforms.all;
};
}
2 changes: 2 additions & 0 deletions pkgs/top-level/all-packages.nix
Original file line number Diff line number Diff line change
Expand Up @@ -4422,6 +4422,8 @@ with pkgs;

eternal-terminal = callPackage ../tools/networking/eternal-terminal {};

extism-cli = callPackage ../development/tools/extism-cli {};

extrude = callPackage ../tools/security/extrude { };

fastly = callPackage ../misc/fastly {
Expand Down

0 comments on commit 8ba56d7

Please sign in to comment.