com um clique
create-nix-package
Create a new Nix package from source code or binary
Instalar com Codex ou Claude Copie este prompt, cole no Codex, Claude ou outro assistente e deixe que ele revise a página da skill e instale para você.
Menu
Create a new Nix package from source code or binary
Instalar com Codex ou Claude Copie este prompt, cole no Codex, Claude ou outro assistente e deixe que ele revise a página da skill e instale para você.
Baseado na classificação ocupacional SOC
Add an AeroSpace window rule to assign an app/window to a workspace (macOS only)
Create or update secrets using Infisical (preferred) or legacy agenix files
Re-encrypt all secrets after modifying .age files or changing host keys
Decrypt and view the contents of an .age secret file
Deploy NixOS/Darwin configuration to local or remote host using justfile commands
Analyze project from URL/path and auto-detect build system to create Nix package
| name | create-nix-package |
| description | Create a new Nix package from source code or binary |
| compatibility | Requires nix |
| metadata | {"author":"ruinous.ai","version":"1.1","domain":"packaging"} |
| parameters | {"package_name":{"type":"string","description":"Name for the package (lowercase, hyphens allowed)","required":true,"placeholder":"myapp"},"source_type":{"type":"select","description":"Where the source code comes from","required":true,"options":[{"label":"GitHub (Recommended)","description":"fetchFromGitHub - public GitHub repository"},{"label":"Git repository","description":"fetchgit - any git repo (including private)"},{"label":"URL/archive","description":"fetchurl - direct download URL"},{"label":"Local","description":"src = ./. - files in package directory"}]},"build_system":{"type":"select","description":"Language/build system for the package","required":true,"options":[{"label":"Go module","description":"buildGoModule - Go with go.mod"},{"label":"Rust/Cargo","description":"buildRustPackage - Rust with Cargo.toml"},{"label":"Python","description":"buildPythonPackage - Python package"},{"label":"Shell script","description":"stdenv.mkDerivation - wrap shell script"},{"label":"Binary","description":"stdenv.mkDerivation - prebuilt binary"}]}} |
Create a new Nix package from source code, a binary, or a script.
If parameters are missing from $ARGUMENTS, use mcp_question to gather them:
mcp_question({
questions: [
{
question: "What should the package be named?",
header: "Name",
options: [
{ label: "Enter name...", description: "e.g., myapp (lowercase, hyphens OK)" }
]
},
{
question: "Where does the source code come from?",
header: "Source",
options: [
{ label: "GitHub (Recommended)", description: "Public GitHub repository" },
{ label: "Git repository", description: "Any git repo (including private)" },
{ label: "URL/archive", description: "Direct download URL" },
{ label: "Local", description: "Files in package directory" }
]
},
{
question: "What language/build system does it use?",
header: "Build",
options: [
{ label: "Go module", description: "Go with go.mod" },
{ label: "Rust/Cargo", description: "Rust with Cargo.toml" },
{ label: "Python", description: "Python package" },
{ label: "Shell script", description: "Wrap shell script" },
{ label: "Binary", description: "Prebuilt binary" }
]
}
]
})
Expected $ARGUMENTS format: <package_name> <source_type> <build_system>
myapp github gomytool local shellpackages/<package-name>/
├── default.nix # Package definition
└── README.md # Documentation (optional but recommended)
mkdir -p packages/<package-name>
Choose the appropriate template based on source type.
nix build .#<package-name>
./result/bin/<program> --version
{ lib, stdenv, makeWrapper, bash, coreutils }:
stdenv.mkDerivation rec {
pname = "script-name";
version = "1.0.0";
src = ./.;
nativeBuildInputs = [ makeWrapper ];
buildInputs = [ bash ];
dontBuild = true;
installPhase = ''
runHook preInstall
mkdir -p $out/bin
cp script.sh $out/bin/${pname}
chmod +x $out/bin/${pname}
wrapProgram $out/bin/${pname} \
--prefix PATH : ${lib.makeBinPath [ coreutils ]}
runHook postInstall
'';
meta = with lib; {
description = "Description";
homepage = "https://github.com/user/repo";
license = licenses.mit;
platforms = platforms.unix;
};
}
{ lib, rustPlatform, fetchFromGitHub, pkg-config, openssl }:
rustPlatform.buildRustPackage rec {
pname = "package-name";
version = "1.0.0";
src = fetchFromGitHub {
owner = "user";
repo = "repo";
rev = "v${version}";
hash = "sha256-AAAA...";
};
cargoHash = "sha256-BBBB...";
nativeBuildInputs = [ pkg-config ];
buildInputs = [ openssl ];
meta = with lib; {
description = "Description";
homepage = "https://github.com/user/repo";
license = licenses.mit;
mainProgram = "package-name";
};
}
{ lib, python3Packages, fetchFromGitHub }:
python3Packages.buildPythonPackage rec {
pname = "package-name";
version = "1.0.0";
format = "pyproject";
src = fetchFromGitHub {
owner = "user";
repo = "repo";
rev = "v${version}";
hash = "sha256-AAAA...";
};
nativeBuildInputs = with python3Packages; [ setuptools wheel ];
propagatedBuildInputs = with python3Packages; [ requests click ];
pythonImportsCheck = [ "package_name" ];
meta = with lib; {
description = "Description";
homepage = "https://github.com/user/repo";
license = licenses.mit;
};
}
{ lib, buildGoModule, fetchFromGitHub }:
buildGoModule rec {
pname = "package-name";
version = "1.0.0";
src = fetchFromGitHub {
owner = "user";
repo = "repo";
rev = "v${version}";
hash = "sha256-AAAA...";
};
vendorHash = "sha256-BBBB...";
meta = with lib; {
description = "Description";
homepage = "https://github.com/user/repo";
license = licenses.mit;
mainProgram = "package-name";
};
}
# Get hash from build error (use lib.fakeHash first)
nix build .#package-name 2>&1 | grep "got:" | awk '{print $2}'
# Or use nix-prefetch
nix-prefetch-github user repo --rev v1.0.0
dontBuild = true for scriptsmainProgram for primary executable/create-nix-package myapp git rust