+kestracli
This commit is contained in:
@@ -42,6 +42,7 @@ nix run git+https://code.m3ta.dev/m3tam3re/nixpkgs#zellij-ps
|
|||||||
| ------------------ | ------------------------------------- |
|
| ------------------ | ------------------------------------- |
|
||||||
| `code2prompt` | Convert code to prompts |
|
| `code2prompt` | Convert code to prompts |
|
||||||
| `hyprpaper-random` | Random wallpaper setter for Hyprpaper |
|
| `hyprpaper-random` | Random wallpaper setter for Hyprpaper |
|
||||||
|
| `kestractl` | CLI for the Kestra workflow orchestration platform |
|
||||||
| `launch-webapp` | Launch web applications |
|
| `launch-webapp` | Launch web applications |
|
||||||
| `mem0` | AI memory assistant with vector storage |
|
| `mem0` | AI memory assistant with vector storage |
|
||||||
| `msty-studio` | Msty Studio application |
|
| `msty-studio` | Msty Studio application |
|
||||||
|
|||||||
@@ -30,6 +30,7 @@ Documentation for all custom packages:
|
|||||||
|
|
||||||
- [code2prompt](./packages/code2prompt.md) - Convert code to prompts
|
- [code2prompt](./packages/code2prompt.md) - Convert code to prompts
|
||||||
- [hyprpaper-random](./packages/hyprpaper-random.md) - Random wallpaper setter for Hyprpaper
|
- [hyprpaper-random](./packages/hyprpaper-random.md) - Random wallpaper setter for Hyprpaper
|
||||||
|
- [kestractl](./packages/kestractl.md) - CLI for the Kestra workflow orchestration platform
|
||||||
- [launch-webapp](./packages/launch-webapp.md) - Launch web applications
|
- [launch-webapp](./packages/launch-webapp.md) - Launch web applications
|
||||||
- [mem0](./packages/mem0.md) - AI memory assistant with vector storage
|
- [mem0](./packages/mem0.md) - AI memory assistant with vector storage
|
||||||
- [msty-studio](./packages/msty-studio.md) - Msty Studio application
|
- [msty-studio](./packages/msty-studio.md) - Msty Studio application
|
||||||
|
|||||||
8
flake.lock
generated
8
flake.lock
generated
@@ -39,16 +39,16 @@
|
|||||||
]
|
]
|
||||||
},
|
},
|
||||||
"locked": {
|
"locked": {
|
||||||
"lastModified": 1773072574,
|
"lastModified": 1773628428,
|
||||||
"narHash": "sha256-smGIc6lYWSjfmGAikoYpP7GbB6mWacrPWrRtp/+HJ3E=",
|
"narHash": "sha256-JUlFfILzcUCME3mOxdxDbcCXphNVEfVGIKhwAwtJPl8=",
|
||||||
"owner": "anomalyco",
|
"owner": "anomalyco",
|
||||||
"repo": "opencode",
|
"repo": "opencode",
|
||||||
"rev": "c6262f9d4002d86a1f1795c306aa329d45361d12",
|
"rev": "4ee426ba549131c4903a71dfb6259200467aca81",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
},
|
},
|
||||||
"original": {
|
"original": {
|
||||||
"owner": "anomalyco",
|
"owner": "anomalyco",
|
||||||
"ref": "v1.2.24",
|
"ref": "v1.2.27",
|
||||||
"repo": "opencode",
|
"repo": "opencode",
|
||||||
"type": "github"
|
"type": "github"
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -7,7 +7,7 @@
|
|||||||
|
|
||||||
# opencode needs newer bun from master
|
# opencode needs newer bun from master
|
||||||
opencode = {
|
opencode = {
|
||||||
url = "github:anomalyco/opencode/v1.2.24";
|
url = "github:anomalyco/opencode/v1.2.27";
|
||||||
inputs.nixpkgs.follows = "nixpkgs-master";
|
inputs.nixpkgs.follows = "nixpkgs-master";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
@@ -12,12 +12,12 @@
|
|||||||
launch-webapp = pkgs.callPackage ./launch-webapp {};
|
launch-webapp = pkgs.callPackage ./launch-webapp {};
|
||||||
mem0 = pkgs.callPackage ./mem0 {};
|
mem0 = pkgs.callPackage ./mem0 {};
|
||||||
msty-studio = pkgs.callPackage ./msty-studio {};
|
msty-studio = pkgs.callPackage ./msty-studio {};
|
||||||
notesmd-cli = pkgs.callPackage ./notesmd-cli {};
|
|
||||||
n8n = pkgs.callPackage ./n8n {};
|
n8n = pkgs.callPackage ./n8n {};
|
||||||
pomodoro-timer = pkgs.callPackage ./pomodoro-timer {};
|
pomodoro-timer = pkgs.callPackage ./pomodoro-timer {};
|
||||||
rofi-project-opener = pkgs.callPackage ./rofi-project-opener {};
|
rofi-project-opener = pkgs.callPackage ./rofi-project-opener {};
|
||||||
stt-ptt = pkgs.callPackage ./stt-ptt {};
|
stt-ptt = pkgs.callPackage ./stt-ptt {};
|
||||||
tuxedo-backlight = pkgs.callPackage ./tuxedo-backlight {};
|
tuxedo-backlight = pkgs.callPackage ./tuxedo-backlight {};
|
||||||
|
kestractl = pkgs.callPackage ./kestractl {};
|
||||||
zellij-ps = pkgs.callPackage ./zellij-ps {};
|
zellij-ps = pkgs.callPackage ./zellij-ps {};
|
||||||
|
|
||||||
# Imported from flake inputs
|
# Imported from flake inputs
|
||||||
|
|||||||
37
pkgs/kestractl/default.nix
Normal file
37
pkgs/kestractl/default.nix
Normal file
@@ -0,0 +1,37 @@
|
|||||||
|
{
|
||||||
|
lib,
|
||||||
|
stdenv,
|
||||||
|
fetchurl,
|
||||||
|
autoPatchelfHook,
|
||||||
|
}: let
|
||||||
|
sources = lib.importJSON ./sources.json;
|
||||||
|
source = sources.sources.${stdenv.hostPlatform.system};
|
||||||
|
in
|
||||||
|
stdenv.mkDerivation {
|
||||||
|
pname = "kestractl";
|
||||||
|
version = sources.version;
|
||||||
|
|
||||||
|
src = fetchurl {
|
||||||
|
inherit (source) url hash;
|
||||||
|
};
|
||||||
|
|
||||||
|
nativeBuildInputs = [autoPatchelfHook];
|
||||||
|
|
||||||
|
unpackPhase = ''
|
||||||
|
tar -xzf $src
|
||||||
|
'';
|
||||||
|
|
||||||
|
installPhase = ''
|
||||||
|
install -Dm755 kestractl $out/bin/kestractl
|
||||||
|
'';
|
||||||
|
|
||||||
|
passthru.updateScript = ./update.sh;
|
||||||
|
|
||||||
|
meta = with lib; {
|
||||||
|
description = "CLI for the Kestra workflow orchestration platform";
|
||||||
|
homepage = "https://github.com/kestra-io/kestractl";
|
||||||
|
license = licenses.asl20;
|
||||||
|
platforms = attrNames sources.sources;
|
||||||
|
mainProgram = "kestractl";
|
||||||
|
};
|
||||||
|
}
|
||||||
13
pkgs/kestractl/sources.json
Normal file
13
pkgs/kestractl/sources.json
Normal file
@@ -0,0 +1,13 @@
|
|||||||
|
{
|
||||||
|
"version": "1.0.0",
|
||||||
|
"sources": {
|
||||||
|
"x86_64-linux": {
|
||||||
|
"url": "https://github.com/kestra-io/kestractl/releases/download/1.0.0/kestractl_1.0.0_linux_amd64.tar.gz",
|
||||||
|
"hash": "sha256-lX6A+2DJdA5otXZLbBGZSUQUdh7CoHmLoy6GJ/AvUJE="
|
||||||
|
},
|
||||||
|
"aarch64-linux": {
|
||||||
|
"url": "https://github.com/kestra-io/kestractl/releases/download/1.0.0/kestractl_1.0.0_linux_arm64.tar.gz",
|
||||||
|
"hash": "sha256-6ashiuDQ6fv5nkFGM7giSUCmHR44QRlDCSD9rPzq1Ac="
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
51
pkgs/kestractl/update.sh
Executable file
51
pkgs/kestractl/update.sh
Executable file
@@ -0,0 +1,51 @@
|
|||||||
|
#!/usr/bin/env bash
|
||||||
|
set -euo pipefail
|
||||||
|
|
||||||
|
# Update kestractl sources.json with the latest release from GitHub.
|
||||||
|
# Usage: ./update.sh
|
||||||
|
# Called automatically by: nix-update --update-script kestractl
|
||||||
|
|
||||||
|
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
||||||
|
SOURCES_FILE="$SCRIPT_DIR/sources.json"
|
||||||
|
|
||||||
|
# Map Nix system -> GitHub release asset name fragment
|
||||||
|
declare -A SYSTEMS=(
|
||||||
|
["x86_64-linux"]="linux_amd64"
|
||||||
|
["aarch64-linux"]="linux_arm64"
|
||||||
|
)
|
||||||
|
|
||||||
|
echo "Fetching latest kestractl release..."
|
||||||
|
LATEST=$(curl -fsSL "https://api.github.com/repos/kestra-io/kestractl/releases/latest")
|
||||||
|
VERSION=$(echo "$LATEST" | jq -r '.tag_name')
|
||||||
|
echo "Latest version: $VERSION"
|
||||||
|
|
||||||
|
CURRENT_VERSION=$(jq -r '.version' "$SOURCES_FILE")
|
||||||
|
if [[ "$VERSION" == "$CURRENT_VERSION" ]]; then
|
||||||
|
echo "Already at latest version $VERSION, nothing to do."
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
|
NEW_SOURCES="{}"
|
||||||
|
|
||||||
|
for NIX_SYSTEM in "${!SYSTEMS[@]}"; do
|
||||||
|
ASSET_FRAG="${SYSTEMS[$NIX_SYSTEM]}"
|
||||||
|
URL="https://github.com/kestra-io/kestractl/releases/download/${VERSION}/kestractl_${VERSION}_${ASSET_FRAG}.tar.gz"
|
||||||
|
|
||||||
|
echo "Fetching hash for $NIX_SYSTEM ($URL)..."
|
||||||
|
HASH=$(nix-prefetch-url --type sha256 "$URL" 2>/dev/null)
|
||||||
|
SRI=$(nix hash to-sri --type sha256 "$HASH")
|
||||||
|
|
||||||
|
NEW_SOURCES=$(echo "$NEW_SOURCES" | jq \
|
||||||
|
--arg sys "$NIX_SYSTEM" \
|
||||||
|
--arg url "$URL" \
|
||||||
|
--arg hash "$SRI" \
|
||||||
|
'. + {($sys): {url: $url, hash: $hash}}')
|
||||||
|
done
|
||||||
|
|
||||||
|
jq -n \
|
||||||
|
--arg version "$VERSION" \
|
||||||
|
--argjson sources "$NEW_SOURCES" \
|
||||||
|
'{"version": $version, "sources": $sources}' \
|
||||||
|
> "$SOURCES_FILE"
|
||||||
|
|
||||||
|
echo "Updated $SOURCES_FILE to $VERSION"
|
||||||
@@ -16,24 +16,29 @@
|
|||||||
libpq,
|
libpq,
|
||||||
makeWrapper,
|
makeWrapper,
|
||||||
}: let
|
}: let
|
||||||
python = python3.withPackages (ps: with ps; [websockets]);
|
python = python3.withPackages (
|
||||||
|
ps:
|
||||||
|
with ps; [
|
||||||
|
websockets
|
||||||
|
]
|
||||||
|
);
|
||||||
in
|
in
|
||||||
stdenv.mkDerivation (finalAttrs: {
|
stdenv.mkDerivation (finalAttrs: {
|
||||||
pname = "n8n";
|
pname = "n8n";
|
||||||
version = "2.9.4";
|
version = "2.11.4";
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "n8n-io";
|
owner = "n8n-io";
|
||||||
repo = "n8n";
|
repo = "n8n";
|
||||||
tag = "n8n@${finalAttrs.version}";
|
tag = "n8n@${finalAttrs.version}";
|
||||||
hash = "sha256-XXQPZHtY66gOQ+nYH+Q1IjbR+SRZ9g06sgBy2x8gGh4=";
|
hash = "sha256-mhfVipTAoHCY1BPSV5Ge1iQpa/LaUCw2aiI3KFkW0CI=";
|
||||||
};
|
};
|
||||||
|
|
||||||
pnpmDeps = fetchPnpmDeps {
|
pnpmDeps = fetchPnpmDeps {
|
||||||
inherit (finalAttrs) pname version src;
|
inherit (finalAttrs) pname version src;
|
||||||
pnpm = pnpm_10;
|
pnpm = pnpm_10;
|
||||||
fetcherVersion = 3;
|
fetcherVersion = 3;
|
||||||
hash = "sha256-TU7HIShYj20QtdcthP0nQdubYl0bdy+XM3CoX5Rvhzk=";
|
hash = "sha256-fWE/uJTs7lawbVu7iDSrpufqFaOkzFc5jjTD8u3Drok=";
|
||||||
};
|
};
|
||||||
|
|
||||||
nativeBuildInputs =
|
nativeBuildInputs =
|
||||||
@@ -44,9 +49,17 @@ in
|
|||||||
node-gyp # required to build sqlite3 bindings
|
node-gyp # required to build sqlite3 bindings
|
||||||
makeWrapper
|
makeWrapper
|
||||||
]
|
]
|
||||||
++ lib.optional stdenv.hostPlatform.isDarwin [cctools xcbuild];
|
++ lib.optional stdenv.hostPlatform.isDarwin [
|
||||||
|
cctools
|
||||||
|
xcbuild
|
||||||
|
];
|
||||||
|
|
||||||
buildInputs = [nodejs libkrb5 libmongocrypt libpq];
|
buildInputs = [
|
||||||
|
nodejs
|
||||||
|
libkrb5
|
||||||
|
libmongocrypt
|
||||||
|
libpq
|
||||||
|
];
|
||||||
|
|
||||||
buildPhase = ''
|
buildPhase = ''
|
||||||
runHook preBuild
|
runHook preBuild
|
||||||
@@ -55,6 +68,12 @@ in
|
|||||||
node-gyp rebuild
|
node-gyp rebuild
|
||||||
popd
|
popd
|
||||||
|
|
||||||
|
# isolated-vm is a native addon required by n8n-nodes-base (Merge node SQL sandbox)
|
||||||
|
# since n8n 2.11.x; must be compiled before pnpm build runs generate-metadata
|
||||||
|
pushd node_modules/isolated-vm
|
||||||
|
node-gyp rebuild
|
||||||
|
popd
|
||||||
|
|
||||||
# TODO: use deploy after resolved https://github.com/pnpm/pnpm/issues/5315
|
# TODO: use deploy after resolved https://github.com/pnpm/pnpm/issues/5315
|
||||||
pnpm build --filter=n8n
|
pnpm build --filter=n8n
|
||||||
|
|
||||||
@@ -119,7 +138,12 @@ in
|
|||||||
'';
|
'';
|
||||||
homepage = "https://n8n.io";
|
homepage = "https://n8n.io";
|
||||||
changelog = "https://github.com/n8n-io/n8n/releases/tag/n8n@${finalAttrs.version}";
|
changelog = "https://github.com/n8n-io/n8n/releases/tag/n8n@${finalAttrs.version}";
|
||||||
maintainers = with lib.maintainers; [gepbird AdrienLemaire sweenu];
|
maintainers = with lib.maintainers; [
|
||||||
|
gepbird
|
||||||
|
AdrienLemaire
|
||||||
|
sweenu
|
||||||
|
wrbbz
|
||||||
|
];
|
||||||
license = lib.licenses.sustainableUse;
|
license = lib.licenses.sustainableUse;
|
||||||
mainProgram = "n8n";
|
mainProgram = "n8n";
|
||||||
platforms = lib.platforms.unix;
|
platforms = lib.platforms.unix;
|
||||||
|
|||||||
@@ -1,31 +0,0 @@
|
|||||||
{
|
|
||||||
lib,
|
|
||||||
buildGoModule,
|
|
||||||
fetchFromGitHub,
|
|
||||||
nix-update-script,
|
|
||||||
}:
|
|
||||||
buildGoModule (finalAttrs: {
|
|
||||||
pname = "notesmd-cli";
|
|
||||||
version = "0.3.2";
|
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
|
||||||
owner = "Yakitrak";
|
|
||||||
repo = "notesmd-cli";
|
|
||||||
tag = "v${finalAttrs.version}";
|
|
||||||
hash = "sha256-/yewtA5eJ4hxwZ4bBx8Pef+/TSY6Hfv15AAB9lxsW+4=";
|
|
||||||
};
|
|
||||||
|
|
||||||
vendorHash = null;
|
|
||||||
|
|
||||||
ldflags = ["-s" "-w"];
|
|
||||||
|
|
||||||
passthru.updateScript = nix-update-script {};
|
|
||||||
|
|
||||||
meta = {
|
|
||||||
description = "Obsidian CLI (Community) - Interact with Obsidian in the terminal";
|
|
||||||
homepage = "https://github.com/Yakitrak/notesmd-cli";
|
|
||||||
license = lib.licenses.mit;
|
|
||||||
platforms = lib.platforms.unix;
|
|
||||||
mainProgram = "notesmd-cli";
|
|
||||||
};
|
|
||||||
})
|
|
||||||
Reference in New Issue
Block a user