nix-package-creator

Automate creation of Nix package derivations for AppImages, .deb files, and source code.

Updated Feb 21, 2024
One-click install
npx skills add https://github.com/zhongjis/nix-config --skill nix-package-creator
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: nix-package-creator
Source: https://github.com/zhongjis/nix-config/tree/main/.agents/skills/nix-package-creator
Command: npx skills add https://github.com/zhongjis/nix-config --skill nix-package-creator

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

This Skill streamlines the process of creating Nix package derivations, making it easier to package new software, wrap binaries, and build language-specific projects within a Nix environment.

Core Features & Use Cases

  • Package Creation: Supports packaging AppImages, .deb files, pre-built binaries, and source code.
  • Language Support: Includes templates for Node.js (npm, pnpm, yarn), Python, Go, and Rust projects.
  • Use Case: You've downloaded an AppImage and want to integrate it seamlessly into your NixOS system. This Skill can help you create a Nix derivation for it.

Quick Start

Use the nix-package-creator skill to create a Nix package for the 'my-app' project.

Frequently Asked Questions about nix-package-creator

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I create a Nix derivation for an AppImage?

You can package AppImages into Nix derivations by using the appimageTools primitive from Nixpkgs, which wraps pre-built binaries for seamless integration into NixOS environments.

Can I build Rust and Node.js projects in Nix without manual configuration?

Yes, building Rust and Node.js projects in Nix is automated without manual configuration by leveraging standard Nixpkgs primitives like buildRustPackage and buildNpmPackage to generate derivations.

What is the best way to package a pre-built binary or .deb file for NixOS?

Packaging pre-built binaries or .deb files for NixOS uses stdenv.mkDerivation to extract and wrap existing software artifacts into functional Nix packages.

Does this packaging approach support Python and Go source code builds?

Yes, this packaging approach supports Python and Go source code builds by utilizing specific Nixpkgs build helpers like buildGoModule to compile and integrate language-specific projects.

When should I use mkDerivation instead of language-specific builders in Nix?

Use stdenv.mkDerivation instead of language-specific builders when packaging generic source code, .deb files, or pre-built binaries that lack dedicated helpers like buildNpmPackage.