initial commit
All checks were successful
Deploy docs / build-and-deploy (push) Successful in 3s

This commit is contained in:
sid 2026-02-23 20:34:35 +01:00
commit 95a533c876
451 changed files with 18255 additions and 0 deletions

View file

@ -0,0 +1,66 @@
{
lib,
python3,
fetchPypi,
}:
python3.pkgs.buildPythonApplication rec {
pname = "arxiv-mcp-server";
version = "0.3.1";
pyproject = true;
src = fetchPypi {
pname = "arxiv_mcp_server";
inherit version;
hash = "sha256-yGNetU7el6ZXsavD8uvO17OZtaPuYgzkxiVEk402GUs=";
};
build-system = [
python3.pkgs.hatchling
];
dependencies = with python3.pkgs; [
aiofiles
aiohttp
anyio
arxiv
httpx
mcp
pydantic
pydantic-settings
pymupdf4llm
python-dateutil
python-dotenv
sse-starlette
uvicorn
];
optional-dependencies = with python3.pkgs; {
test = [
aioresponses
pytest
pytest-asyncio
pytest-cov
pytest-mock
];
};
pythonRemoveDeps = [
"black"
];
pythonImportsCheck = [
"arxiv_mcp_server"
];
meta = {
description = "A flexible arXiv search and analysis service with MCP protocol support";
homepage = "https://pypi.org/project/arxiv-mcp-server";
license = with lib.licenses; [
asl20
mit
];
maintainers = with lib.maintainers; [ ];
mainProgram = "arxiv-mcp-server";
};
}

46
pkgs/baibot/default.nix Normal file
View file

@ -0,0 +1,46 @@
{
lib,
rustPlatform,
fetchFromGitHub,
pkg-config,
openssl,
sqlite,
stdenv,
darwin,
}:
rustPlatform.buildRustPackage rec {
pname = "baibot";
version = "1.10.0";
src = fetchFromGitHub {
owner = "etkecc";
repo = "baibot";
rev = "v${version}";
hash = "sha256-8QKYDk7Q4oiqyf3vwziu1+A5T2soKuKC5MxPlsOWTM4=";
};
useFetchCargoVendor = true;
cargoHash = "sha256-jLZcjvkNj9FzSCQbQ9aqiV42a6OXyqm/FfbTIJX03x4=";
nativeBuildInputs = [
pkg-config
];
buildInputs = [
openssl
sqlite
]
++ lib.optionals stdenv.isDarwin [
darwin.apple_sdk.frameworks.Security
darwin.apple_sdk.frameworks.SystemConfiguration
];
meta = {
description = "A Matrix bot for using diffent capabilities (text-generation, text-to-speech, speech-to-text, image-generation, etc.) of AI / Large Language Models (OpenAI, Anthropic, etc";
homepage = "https://github.com/etkecc/baibot";
changelog = "https://github.com/etkecc/baibot/blob/${src.rev}/CHANGELOG.md";
license = lib.licenses.agpl3Only;
mainProgram = "baibot";
};
}

View file

@ -0,0 +1,40 @@
{
lib,
python3,
fetchPypi,
}:
python3.pkgs.buildPythonApplication rec {
pname = "blender-mcp";
version = "1.4.0";
pyproject = true;
src = fetchPypi {
pname = "blender_mcp";
inherit version;
hash = "sha256-0+bWXhw8/DXC6aFQJiSwU7BqsfhoY+pUdIfOEVMStqQ=";
};
build-system = [
python3.pkgs.setuptools
python3.pkgs.wheel
];
dependencies = with python3.pkgs; [
mcp
supabase
tomli
];
pythonImportsCheck = [
"blender_mcp"
];
meta = {
description = "Blender integration through the Model Context Protocol";
homepage = "https://pypi.org/project/blender-mcp";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ ];
mainProgram = "blender-mcp";
};
}

View file

@ -0,0 +1,137 @@
#!/bin/bash
# Function to display usage
usage() {
echo "Usage: bulk-rename [directory]"
echo " bulk-rename [file1 file2 ...]"
echo ""
echo "If files are provided as arguments, they will be renamed."
echo "If a directory is provided, all files in that directory will be renamed."
echo "If no arguments are provided, files in current directory will be renamed."
}
# Function to cleanup temporary files
cleanup() {
[ -n "$index" ] && [ -f "$index" ] && rm -f "$index"
[ -n "$index_edit" ] && [ -f "$index_edit" ] && rm -f "$index_edit"
}
# Set trap to ensure cleanup on exit
trap cleanup EXIT
# Check for help flag
if [[ "$1" == "-h" || "$1" == "--help" ]]; then
usage
exit 0
fi
# Create temporary files
index=$(mktemp /tmp/bulk-rename-index.XXXXXXXXXX) || exit 1
index_edit=$(mktemp /tmp/bulk-rename.XXXXXXXXXX) || exit 1
# Determine target directory and what files to rename
target_dir="."
if [ $# -eq 0 ]; then
# No arguments - use current directory
shopt -s nullglob dotglob
files=(*)
if [ ${#files[@]} -gt 0 ]; then
printf '%s\n' "${files[@]}" > "$index"
fi
elif [ -d "$1" ] && [ $# -eq 1 ]; then
# Single directory argument
target_dir="$1"
if [ "$target_dir" = "." ]; then
target_dir="$(pwd)"
fi
shopt -s nullglob dotglob
files=("$target_dir"/*)
# Extract just the filenames
for file in "${files[@]}"; do
[ -e "$file" ] && basename "$file"
done | sort > "$index"
else
# File arguments - assume current directory for now
# TODO: Handle files from different directories properly
for file in "$@"; do
if [ -e "$file" ]; then
basename "$file"
else
echo "Warning: $file does not exist" >&2
fi
done > "$index"
fi
# Check if we have any files to rename
if [ ! -s "$index" ]; then
echo "No files to rename"
exit 0
fi
# Copy index to edit file
cat "$index" > "$index_edit"
# Get editor (same priority as lf)
EDITOR="${EDITOR:-${VISUAL:-vi}}"
# Open editor
"$EDITOR" "$index_edit"
# Check if line counts match
original_lines=$(wc -l < "$index")
edited_lines=$(wc -l < "$index_edit")
if [ "$original_lines" -ne "$edited_lines" ]; then
echo "Error: Number of lines must stay the same ($original_lines -> $edited_lines)" >&2
exit 1
fi
# Process the renames
echo "Processing renames in $target_dir..."
success_count=0
error_count=0
max=$((original_lines + 1))
counter=1
while [ $counter -le $max ]; do
a=$(sed "${counter}q;d" "$index")
b=$(sed "${counter}q;d" "$index_edit")
counter=$((counter + 1))
# Skip if names are the same
[ "$a" = "$b" ] && continue
# Full paths for source and destination
source_path="$target_dir/$a"
dest_path="$target_dir/$b"
# Check if destination already exists
if [ -e "$dest_path" ]; then
echo "Error: File exists: $b" >&2
error_count=$((error_count + 1))
continue
fi
# Check if source exists
if [ ! -e "$source_path" ]; then
echo "Error: Source file does not exist: $a" >&2
error_count=$((error_count + 1))
continue
fi
# Perform rename
if mv "$source_path" "$dest_path"; then
echo "Renamed: $a -> $b"
success_count=$((success_count + 1))
else
echo "Error: Failed to rename $a -> $b" >&2
error_count=$((error_count + 1))
fi
done
echo "Summary: $success_count successful, $error_count errors"
# Exit with error code if there were errors
[ $error_count -gt 0 ] && exit 1 || exit 0

View file

@ -0,0 +1,16 @@
{
writeShellApplication,
...
}:
let
name = "bulk-rename";
text = builtins.readFile ./${name}.sh;
in
writeShellApplication {
inherit name text;
meta.mainProgram = name;
runtimeInputs = [
];
}

55
pkgs/cppman/default.nix Normal file
View file

@ -0,0 +1,55 @@
{
lib,
python3,
fetchPypi,
groff,
}:
python3.pkgs.buildPythonApplication rec {
pname = "cppman";
version = "0.5.9";
pyproject = true;
src = fetchPypi {
inherit pname version;
hash = "sha256-FaTkCrAltNzsWnOlDfJrfdrvfBSPyxl5QP/ySE+emQM=";
};
build-system = [
python3.pkgs.setuptools
python3.pkgs.wheel
];
dependencies = with python3.pkgs; [
beautifulsoup4
distutils
html5lib
lxml
six
soupsieve
typing-extensions
webencodings
];
postInstall = ''
wrapProgram $out/bin/cppman --prefix PATH : "${groff}/bin"
'';
pythonRelaxDeps = true;
pythonRemoveDeps = true; # for bs4
pythonImportsCheck = [
"cppman"
];
meta = {
description = "C++ 98/11/14/17/20 manual pages for Linux/MacOS";
homepage = "https://pypi.org/project/cppman";
license = with lib.licenses; [
gpl3Only
gpl2Only
];
maintainers = with lib.maintainers; [ ];
mainProgram = "cppman";
};
}

24
pkgs/default.nix Normal file
View file

@ -0,0 +1,24 @@
{
pkgs ? import <nixpkgs>,
...
}:
{
arxiv-mcp-server = pkgs.callPackage ./arxiv-mcp-server { };
baibot = pkgs.callPackage ./baibot { };
blender-mcp = pkgs.callPackage ./blender-mcp { };
bulk-rename = pkgs.callPackage ./bulk-rename { };
cppman = pkgs.callPackage ./cppman { };
fetcher-mcp = pkgs.callPackage ./fetcher-mcp { };
freecad-mcp = pkgs.callPackage ./freecad-mcp { };
kicad-mcp = pkgs.callPackage ./kicad-mcp { };
mcpo = pkgs.callPackage ./mcpo { };
pass2bw = pkgs.callPackage ./pass2bw { };
pyman = pkgs.callPackage ./pyman { };
quicknote = pkgs.callPackage ./quicknote { };
synapse_change_display_name = pkgs.callPackage ./synapse_change_display_name { };
synix-docs = pkgs.callPackage ./synix-docs { };
trelis-gitingest-mcp = pkgs.callPackage ./trelis-gitingest-mcp { };
# marker-pdf = pkgs.callPackage ./marker-pdf { }; # FIXME
}

View file

@ -0,0 +1,69 @@
{
lib,
buildNpmPackage,
fetchFromGitHub,
makeWrapper,
playwright-driver,
linkFarm,
jq,
...
}:
let
revision = "1161";
chromium-headless-shell =
playwright-driver.passthru.components."chromium-headless-shell".overrideAttrs
(old: {
inherit revision;
});
browsers-headless-only = linkFarm "playwright-browsers-headless-only" [
{
name = "chromium-${revision}";
path = chromium-headless-shell;
}
];
in
buildNpmPackage rec {
pname = "fetcher-mcp";
version = "0.3.6";
src = fetchFromGitHub {
owner = "jae-jae";
repo = "fetcher-mcp";
rev = "4f4ad0f723367a7b0d3215c01d04282d573e6980";
hash = "sha256-4Hh2H2ANBHOYYl3I1BqrkdCPNF/1hgv649CqAy7aiYw=";
};
env.PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD = "1";
nativeBuildInputs = [
makeWrapper
jq
];
npmDepsHash = "sha256-a56gDzZCo95vQUO57uFwMc9g/7jweYdCKqx64W8D1T8=";
postPatch = ''
${jq}/bin/jq 'del(.scripts.postinstall) | del(.scripts."install-browser")' package.json > package.json.tmp && mv package.json.tmp package.json
'';
makeWrapperArgs = [
"--set"
"PLAYWRIGHT_BROWSERS_PATH"
"${browsers-headless-only}"
# "--set"
# "PLAYWRIGHT_SKIP_VALIDATE_HOST_REQUIREMENTS"
# "true"
];
meta = {
description = "MCP server for fetch web page content using Playwright headless browser";
homepage = "https://github.com/jae-jae/fetcher-mcp";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ ];
mainProgram = "fetcher-mcp";
platforms = lib.platforms.all;
};
}

View file

@ -0,0 +1,36 @@
{
lib,
python3,
fetchPypi,
}:
python3.pkgs.buildPythonApplication rec {
pname = "freecad-mcp";
version = "0.1.13";
pyproject = true;
src = fetchPypi {
pname = "freecad_mcp";
inherit version;
hash = "sha256-/CCMTyaDt6XsG+mok12pIM0TwG86Vs4pxq/Zd5Ol6wg=";
};
build-system = [
python3.pkgs.hatchling
];
dependencies = with python3.pkgs; [
mcp
];
pythonImportsCheck = [
"freecad_mcp"
];
meta = {
description = "Add your description here";
homepage = "https://pypi.org/project/freecad-mcp/";
license = lib.licenses.mit;
mainProgram = "freecad-mcp";
};
}

View file

@ -0,0 +1,69 @@
{
lib,
buildNpmPackage,
fetchFromGitHub,
python3,
fetchPypi,
makeWrapper,
nodejs,
kicad,
...
}:
let
kicad-skip = import ./kicad-skip.nix { inherit lib python3 fetchPypi; };
pythonEnv = python3.withPackages (
ps:
[
kicad-skip
]
++ (with ps; [
cairosvg
colorlog
pillow
pydantic
python-dotenv
requests
])
);
in
buildNpmPackage rec {
pname = "kicad-mcp";
version = "2.1.0-alpha";
src = fetchFromGitHub {
owner = "mixelpixx";
repo = "KiCAD-MCP-Server";
rev = "d2723bc29207c942bc93083131e2ac2a8d1a82d5";
hash = "sha256-WvEd+tSjAdc+qjFh4kUaWGnd9pEiJb6Og7i1viUqh94=";
};
npmDepsHash = "sha256-nz73qj8CK2LyFixoF14ET2wq407YyuJUw/4VTDc80cQ=";
buildScript = "build";
nativeBuildInputs = [ makeWrapper ];
buildInputs = [
pythonEnv
];
postInstall = ''
mkdir -p $out/bin
makeWrapper ${nodejs}/bin/node $out/bin/${pname} \
--add-flags "$out/lib/node_modules/${pname}/dist/index.js" \
--prefix PATH : ${
lib.makeBinPath [
pythonEnv
]
} \
--prefix PYTHONPATH : "${kicad}/lib/python3/dist-packages"
'';
meta = {
description = "Model Context Protocol server for KiCAD";
homepage = "https://github.com/mixelpixx/KiCAD-MCP-Server";
};
}

View file

@ -0,0 +1,35 @@
{
lib,
python3,
fetchPypi,
}:
python3.pkgs.buildPythonApplication rec {
pname = "kicad-skip";
version = "0.2.5";
pyproject = true;
src = fetchPypi {
inherit pname version;
hash = "sha256-3GtHIV2h6C8syFZ/Dx6OWsgpf14ZQdlnGS4EM4DgjIM=";
};
build-system = [
python3.pkgs.setuptools
];
dependencies = with python3.pkgs; [
sexpdata
];
pythonImportsCheck = [
"kicad_skip"
];
meta = {
description = "A friendly way to skip the drudgery and manipulate kicad 7+ s-expression schematic, netlist and PCB files";
homepage = "https://pypi.org/project/kicad-skip/";
license = lib.licenses.lgpl21Only;
mainProgram = "kicad-skip";
};
}

106
pkgs/marker-pdf/default.nix Normal file
View file

@ -0,0 +1,106 @@
{
lib,
python3,
fetchPypi,
fetchurl,
}:
let
fontFileName = "GoNotoCurrent-Regular.ttf";
fetchFont = fetchurl {
url = "https://models.datalab.to/artifacts/${fontFileName}";
hash = "sha256-iCr7q5ZWCMLSvGJ/2AFrliqlpr4tNY+d4kp7WWfFYy4=";
};
python = python3;
pdftext = import ./pdftext.nix { inherit lib python fetchPypi; };
surya-ocr = import ./surya-ocr.nix { inherit lib python fetchPypi; };
in
python.pkgs.buildPythonApplication rec {
pname = "marker-pdf";
version = "1.8.2";
pyproject = true;
src = fetchPypi {
pname = "marker_pdf";
inherit version;
hash = "sha256-k2mxOpBBtXdCzxP4hqfXnCEqUF69hQZWr/d9V/tITZ4=";
};
patches = [
./skip-font-download.patch
./fix-output-dir.patch
];
pythonRelaxDeps = [
"click"
"anthropic"
"markdownify"
"pillow"
];
pythonRemoveDeps = [
"pre-commit"
];
postInstall = ''
FONT_DEST_DIR="$out/lib/${python.libPrefix}/site-packages/static/fonts"
mkdir -p $FONT_DEST_DIR
cp ${fetchFont} "$FONT_DEST_DIR/${fontFileName}"
echo "Installed font to $FONT_DEST_DIR/${fontFileName}"
'';
build-system = [
python.pkgs.poetry-core
];
dependencies = [
pdftext
surya-ocr
]
++ (with python.pkgs; [
anthropic
click
filetype
ftfy
google-genai
markdown2
markdownify
openai
pillow
pydantic
pydantic-settings
python-dotenv
rapidfuzz
regex
scikit-learn
torch
tqdm
transformers
]);
optional-dependencies = with python.pkgs; {
full = [
ebooklib
mammoth
openpyxl
python-pptx
weasyprint
];
};
pythonImportsCheck = [
"marker"
];
meta = {
description = "Convert documents to markdown with high speed and accuracy";
homepage = "https://pypi.org/project/marker-pdf/";
license = lib.licenses.gpl3Only;
maintainers = with lib.maintainers; [ ];
};
}

View file

@ -0,0 +1,11 @@
--- a/marker/settings.py
+++ b/marker/settings.py
@@ -6,7 +6,7 @@
class Settings(BaseSettings):
# Paths
BASE_DIR: str = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))
- OUTPUT_DIR: str = os.path.join(BASE_DIR, "conversion_results")
+ OUTPUT_DIR: str = "/tmp/marker_conversion_results"
FONT_DIR: str = os.path.join(BASE_DIR, "static", "fonts")
DEBUG_DATA_FOLDER: str = os.path.join(BASE_DIR, "debug_data")
ARTIFACT_URL: str = "https://models.datalab.to/artifacts"

View file

@ -0,0 +1,43 @@
{
lib,
python,
fetchPypi,
}:
python.pkgs.buildPythonApplication rec {
pname = "pdftext";
version = "0.6.3";
pyproject = true;
src = fetchPypi {
inherit pname version;
hash = "sha256-q1xd/g8ft43h24N8ytrB6kGwfOGJD+rZc8moTNr1Tew=";
};
pythonRelaxDeps = [
"pypdfium2"
];
build-system = [
python.pkgs.poetry-core
];
dependencies = with python.pkgs; [
click
numpy
pydantic
pydantic-settings
pypdfium2
];
pythonImportsCheck = [
"pdftext"
];
meta = {
description = "Extract structured text from pdfs quickly";
homepage = "https://pypi.org/project/pdftext/";
license = lib.licenses.asl20;
maintainers = with lib.maintainers; [ ];
};
}

View file

@ -0,0 +1,24 @@
--- a/marker/util.py
+++ b/marker/util.py
@@ -151,13 +151,7 @@
return sorted_lines
def download_font():
- if not os.path.exists(settings.FONT_PATH):
- os.makedirs(os.path.dirname(settings.FONT_PATH), exist_ok=True)
- font_dl_path = f"{settings.ARTIFACT_URL}/{settings.FONT_NAME}"
- with requests.get(font_dl_path, stream=True) as r, open(settings.FONT_PATH, 'wb') as f:
- r.raise_for_status()
- for chunk in r.iter_content(chunk_size=8192):
- f.write(chunk)
+ pass
def get_opening_tag_type(tag):
"""
@@ -195,4 +189,4 @@
if tag_type in TAG_MAPPING:
return True, TAG_MAPPING[tag_type]
- return False, None
\ No newline at end of file
+ return False, None

View file

@ -0,0 +1,58 @@
{
lib,
python,
fetchPypi,
}:
python.pkgs.buildPythonApplication rec {
pname = "surya-ocr";
version = "0.14.6";
pyproject = true;
src = fetchPypi {
pname = "surya_ocr";
inherit version;
hash = "sha256-yFoL2d0AyGq0TtJlwO0VYBEG268tDQoGf6e7UzE31fA=";
};
pythonRelaxDeps = [
"opencv-python-headless"
"pillow"
"pypdfium2"
"einops"
];
pythonRemoveDeps = [
"pre-commit"
];
build-system = [
python.pkgs.poetry-core
];
dependencies = with python.pkgs; [
click
einops
filetype
opencv-python-headless
pillow
platformdirs
pydantic
pydantic-settings
pypdfium2
python-dotenv
torch
transformers
];
pythonImportsCheck = [
"surya"
];
meta = {
description = "OCR, layout, reading order, and table recognition in 90+ languages";
homepage = "https://pypi.org/project/surya-ocr/";
license = lib.licenses.gpl3Only;
maintainers = with lib.maintainers; [ ];
};
}

53
pkgs/mcpo/default.nix Normal file
View file

@ -0,0 +1,53 @@
# See https://github.com/NixOS/nixpkgs/pull/410836
{
lib,
python3,
fetchFromGitHub,
}:
python3.pkgs.buildPythonApplication rec {
pname = "mcpo";
version = "0.0.19";
pyproject = true;
src = fetchFromGitHub {
owner = "open-webui";
repo = "mcpo";
rev = "v${version}";
hash = "sha256-ZfTVMrXXEsEKHmeG4850Hq3MEpQA/3WMpAVZS0zvp1I=";
};
build-system = [
python3.pkgs.hatchling
];
dependencies = with python3.pkgs; [
click
fastapi
mcp
passlib
pydantic
pyjwt
python-dotenv
typer
uvicorn
watchdog
];
pythonRelaxDeps = [
"mcp"
];
pythonImportsCheck = [
"mcpo"
];
meta = {
description = "A simple, secure MCP-to-OpenAPI proxy server";
homepage = "https://github.com/open-webui/mcpo";
changelog = "https://github.com/open-webui/mcpo/blob/${src.rev}/CHANGELOG.md";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ ];
mainProgram = "mcpo";
};
}

View file

@ -0,0 +1,77 @@
import csv
import re
import sys
def process_csv(input_file, output_file):
column_mapping = {
'Group(/)': 'folder',
'Title': 'name',
'Password': 'login_password',
'Notes': 'notes'
}
default_values = {
'favorite': '',
'type': 'login',
'fields': '',
'reprompt': '0',
'login_uri': '',
'login_username': '',
'login_totp': ''
}
target_columns = [
'folder', 'favorite', 'type', 'name', 'notes', 'fields',
'reprompt', 'login_uri', 'login_username', 'login_password', 'login_totp'
]
with open(input_file, 'r', newline='', encoding='utf-8') as infile, \
open(output_file, 'w', newline='', encoding='utf-8') as outfile:
reader = csv.DictReader(infile)
writer = csv.DictWriter(outfile, fieldnames=target_columns)
writer.writeheader()
for row in reader:
new_row = {}
for old_col, new_col in column_mapping.items():
new_row[new_col] = row.get(old_col, '')
for col, default_val in default_values.items():
if col not in new_row:
new_row[col] = default_val
if new_row['notes']:
new_row['notes'] = new_row['notes'].replace('\n', ' ').replace('\r', ' ')
new_row['notes'] = re.sub(r'\s+', ' ', new_row['notes']).strip()
notes = new_row['notes']
if notes:
# Look for pattern: "login: USERNAME"
match = re.search(r'login:\s*(\S+)', notes, re.IGNORECASE)
if match:
username = match.group(1)
new_row['login_username'] = username
new_row['notes'] = re.sub(r'login:\s*\S+', '', notes, flags=re.IGNORECASE).strip()
new_row['notes'] = re.sub(r'\s+', ' ', new_row['notes']).strip()
new_row['notes'] = new_row['notes'].strip(': ').strip()
for key in new_row:
if new_row[key]:
new_row[key] = str(new_row[key]).replace('\n', ' ').replace('\r', ' ')
new_row[key] = re.sub(r'\s+', ' ', new_row[key]).strip()
writer.writerow(new_row)
if __name__ == "__main__":
if len(sys.argv) != 3:
print("Usage: python script.py <input_file.csv> <output_file.csv>")
sys.exit(1)
input_file = sys.argv[1]
output_file = sys.argv[2]
process_csv(input_file, output_file)
print(f"Processing complete. Output saved to {output_file}")

32
pkgs/pass2bw/default.nix Normal file
View file

@ -0,0 +1,32 @@
{
stdenv,
lib,
makeWrapper,
python3,
...
}:
stdenv.mkDerivation rec {
pname = "pass2bw";
version = "0.1";
src = ./.;
dontBuild = true;
doCheck = false;
nativeBuildInputs = [ makeWrapper ];
installPhase = ''
mkdir -p $out/bin
sed -e "s|python ./convert_csvs.py|python $out/bin/convert_csvs.py|" \
${src}/${pname}.sh > $out/bin/${pname}
chmod +x $out/bin/${pname}
cp ${src}/convert_csvs.py $out/bin/
wrapProgram $out/bin/${pname} \
--prefix PATH : ${lib.makeBinPath [ python3 ]}
'';
}

8
pkgs/pass2bw/pass2bw.sh Normal file
View file

@ -0,0 +1,8 @@
if [ "$#" -ne 2 ]; then
echo "Usage: $0 <pass_storepath> <output_csv>"
exit 1
fi
pass2csv "$1" /tmp/pass.csv
python ./convert_csvs.py /tmp/pass.csv "$2"
rm /tmp/pass.csv

22
pkgs/pyman/default.nix Normal file
View file

@ -0,0 +1,22 @@
{
python3Packages,
...
}:
python3Packages.buildPythonApplication {
pname = "pyman";
version = "1.0.0";
src = ./.;
pyproject = true;
build-system = [ python3Packages.setuptools ];
propagatedBuildInputs = [ python3Packages.pyyaml ];
doCheck = false;
meta = {
description = "Display colors from a YAML color palette file in the terminal.";
};
}

26
pkgs/pyman/pyman Normal file
View file

@ -0,0 +1,26 @@
#!/usr/bin/env python3
import sys
import io
def main():
if len(sys.argv) != 2:
print(f"Usage: {sys.argv[0]} <topic>")
sys.exit(1)
topic = sys.argv[1]
# Capture the output of the help function
captured_output = io.StringIO()
sys.stdout = captured_output
try:
help(topic)
except Exception as e:
print(f"Error: {e}")
finally:
sys.stdout = sys.__stdout__
# Print the captured output
print(captured_output.getvalue())
if __name__ == "__main__":
main()

7
pkgs/pyman/setup.py Normal file
View file

@ -0,0 +1,7 @@
from setuptools import setup
setup(
name='pyman',
version='1.0.0',
scripts=['pyman'],
)

View file

@ -0,0 +1,16 @@
{
writeShellApplication,
...
}:
let
name = "quicknote";
text = builtins.readFile ./${name}.sh;
in
writeShellApplication {
inherit name text;
meta.mainProgram = name;
runtimeInputs = [
];
}

View file

@ -0,0 +1,30 @@
#!/bin/bash
if [ -n "$XDG_DOCUMENTS_DIR" ]; then
NOTES_DIR="$XDG_DOCUMENTS_DIR/notes"
else
NOTES_DIR="/tmp/notes"
fi
mkdir -p "$NOTES_DIR"
TIMESTAMP=$(date +"%Y-%m-%d_%H-%M-%S")
NOTE_FILE="$NOTES_DIR/note_$TIMESTAMP.md"
touch "$NOTE_FILE"
if [ -z "$EDITOR" ]; then
# Try common editors
for editor in vim vi nano; do
if command -v "$editor" &> /dev/null; then
EDITOR="$editor"
break
fi
done
if [ -z "$EDITOR" ]; then
echo "Error: No editor found. Please set the EDITOR environment variable."
exit 1
fi
fi
"$EDITOR" "$NOTE_FILE"

View file

@ -0,0 +1,26 @@
{ stdenv, gcc, ... }:
let
pname = "synapse_change_display_name";
version = "1.0.0";
in
stdenv.mkDerivation {
inherit pname version;
src = ./.;
buildInputs = [ gcc ];
buildPhase = ''
gcc -o ${pname} ${pname}.c
'';
installPhase = ''
mkdir -p $out/bin
cp ${pname} $out/bin/
'';
meta = {
description = "A program for updating MatrixS-Synapse display names";
};
}

View file

@ -0,0 +1,105 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
// Function to print the help page
void print_help() {
printf("Usage:\n");
printf(" update_display_name [-t ACCESS_TOKEN] [-r REMOTE] [-u USER] [-d "
"DISPLAY_NAME] [-h]\n\n");
printf("Options:\n");
printf(" -h Show this help message and exit.\n");
printf(" -t ACCESS_TOKEN Your access token for authentication.\n");
printf(" -r REMOTE The remote server address.\n");
printf(" -u USER The user identifier to update.\n");
printf(" -d DISPLAY_NAME The new display name to set.\n\n");
printf("Example:\n");
printf(" update_display_name -t my_access_token -r my_remote_server -u "
"user123 -d \"My New Display Name\"\n");
}
int main(int argc, char *argv[]) {
char *access_token = NULL;
char *remote = NULL;
char *user = NULL;
char *display_name = NULL;
for (int i = 1; i < argc; i++) {
if (argv[i][0] == '-' &&
strlen(argv[i]) == 2) { // Ensure it is a single-character flag
switch (argv[i][1]) {
case 'h':
print_help();
return 0;
case 't':
if (i + 1 < argc) {
access_token = argv[++i];
} else {
printf("Error: Missing value for -t (ACCESS_TOKEN).\n\n");
print_help();
return 1;
}
break;
case 'r':
if (i + 1 < argc) {
remote = argv[++i];
} else {
printf("Error: Missing value for -r (REMOTE).\n\n");
print_help();
return 1;
}
break;
case 'u':
if (i + 1 < argc) {
user = argv[++i];
} else {
printf("Error: Missing value for -u (USER).\n\n");
print_help();
return 1;
}
break;
case 'd':
if (i + 1 < argc) {
display_name = argv[++i];
} else {
printf("Error: Missing value for -d (DISPLAY_NAME).\n\n");
print_help();
return 1;
}
break;
default:
printf("Error: Unknown option -%c.\n\n", argv[i][1]);
print_help();
return 1;
}
} else {
printf("Error: Invalid argument format: %s\n\n", argv[i]);
print_help();
return 1;
}
}
if (!access_token || !remote || !user || !display_name) {
printf("Error: Missing required arguments.\n\n");
print_help();
return 1;
}
char command[1024];
snprintf(command, sizeof(command),
"curl --header \"Authorization: Bearer %s\" "
"--location --request PUT "
"'https://%s/_matrix/client/v3/profile/%s/displayname' "
"--data '{ \"displayname\": \"%s\" }'",
access_token, remote, user, display_name);
int result = system(command);
if (result != 0) {
printf("\nError: Failed to execute the curl command.\n");
return 1;
}
printf("\nDisplay name updated successfully.\n");
return 0;
}

View file

@ -0,0 +1,25 @@
{
stdenv,
python313,
...
}:
let
python = python313.withPackages (
p: with p; [
mkdocs
mkdocs-material
mkdocs-material-extensions
pygments
]
);
in
stdenv.mkDerivation {
name = "synix-docs";
src = ./../../.;
nativeBuildInputs = [
python
];
buildPhase = "mkdocs build --strict --verbose";
installPhase = "cp -r site $out";
}

View file

@ -0,0 +1,48 @@
# See https://github.com/coderamp-labs/gitingest/issues/245
{
lib,
python3,
fetchPypi,
curl,
git,
}:
python3.pkgs.buildPythonApplication rec {
pname = "trelis-gitingest-mcp";
version = "1.1.2";
pyproject = true;
src = fetchPypi {
pname = "trelis_gitingest_mcp";
inherit version;
hash = "sha256-ZOoG0nL0+XnyOUPo4qsGTYizAPzSECUr9eSHEp4Hmzc=";
};
build-system = [
python3.pkgs.hatchling
];
dependencies =
with python3.pkgs;
[
gitingest
mcp
pathspec
]
++ [
curl
git
];
pythonImportsCheck = [
"gitingest_mcp"
];
meta = {
description = "An MCP server for gitingest";
homepage = "https://pypi.org/project/trelis-gitingest-mcp/";
license = lib.licenses.asl20;
maintainers = with lib.maintainers; [ ];
mainProgram = "trelis-gitingest-mcp";
};
}