Convert Figma logo to code with AI

NixOS logonixpkgs

Nix Packages collection & NixOS

17,805
13,910
17,805
15,648

Top Related Projects

The Void source packages collection

2,057

[MIRROR] Official Gentoo ebuild repository

🍻 Default formulae for the missing package manager for macOS (or Linux)

The Microsoft community Windows Package Manager manifest repository

Quick Overview

NixOS/nixpkgs is the core package collection for the Nix package manager and NixOS operating system. It contains a vast collection of software packages, build instructions, and configurations, enabling reproducible and declarative system management. Nixpkgs serves as the foundation for NixOS and can be used on other Linux distributions and macOS.

Pros

  • Reproducible builds and configurations across different machines
  • Declarative system management, allowing easy rollbacks and atomic updates
  • Large and actively maintained package collection
  • Support for multiple versions of packages coexisting on the same system

Cons

  • Steep learning curve for newcomers to the Nix ecosystem
  • Can be resource-intensive, especially for large builds
  • Some packages may lag behind the latest upstream versions
  • Limited support for proprietary software and certain hardware drivers

Getting Started

To get started with Nixpkgs, follow these steps:

  1. Install Nix package manager:
sh <(curl -L https://nixos.org/nix/install) --daemon
  1. Enable Nix Flakes (optional, but recommended for modern Nix usage):
mkdir -p ~/.config/nix
echo "experimental-features = nix-command flakes" >> ~/.config/nix/nix.conf
  1. Create a basic flake.nix file for your project:
{
  description = "My project";

  inputs = {
    nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
  };

  outputs = { self, nixpkgs }: {
    # Define your outputs here
  };
}
  1. Use Nix commands to build or develop your project:
nix develop  # Enter a development environment
nix build    # Build your project
nix run      # Run your project

For more detailed information and advanced usage, refer to the Nixpkgs manual and the NixOS website.

Competitor Comparisons

The Void source packages collection

Pros of void-packages

  • Simpler package build system, easier for newcomers to contribute
  • Faster package building process due to less complexity
  • More flexible package customization options

Cons of void-packages

  • Smaller package repository compared to nixpkgs
  • Less advanced dependency management and reproducibility features
  • Limited cross-compilation support

Code Comparison

void-packages:

do_install() {
    vbin ${wrksrc}/example
    vdoc README.md
}

nixpkgs:

installPhase = ''
  mkdir -p $out/bin
  cp ${wrksrc}/example $out/bin
  mkdir -p $out/share/doc/${pname}
  cp README.md $out/share/doc/${pname}
'';

The void-packages example uses helper functions like vbin and vdoc for installation, while nixpkgs relies on more explicit shell commands within a Nix string. This showcases the simplicity of void-packages' approach compared to the more flexible but potentially complex nixpkgs system.

Both repositories serve as package management systems for their respective Linux distributions, with nixpkgs offering a more comprehensive and sophisticated approach, while void-packages focuses on simplicity and ease of use.

2,057

[MIRROR] Official Gentoo ebuild repository

Pros of gentoo

  • Offers more granular control over package compilation and optimization
  • Provides a larger selection of package versions and USE flags
  • Allows for a highly customized system tailored to specific hardware

Cons of gentoo

  • Longer compilation times for packages, especially on less powerful hardware
  • Steeper learning curve and more complex configuration process
  • Requires more manual intervention and maintenance

Code comparison

gentoo (package.use):

app-editors/vim X python lua
dev-lang/python sqlite

nixpkgs (configuration.nix):

environment.systemPackages = with pkgs; [
  (vim_configurable.override { python = true; })
  (python3.withPackages (ps: with ps; [ pysqlite ]))
];

Both repositories serve as package management systems for their respective distributions. Gentoo focuses on source-based packages with high customizability, while nixpkgs emphasizes reproducibility and declarative configuration. Gentoo's approach allows for fine-tuned optimizations but requires more time and expertise. Nixpkgs offers a more streamlined experience with its functional package management, but may sacrifice some flexibility in the process.

🍻 Default formulae for the missing package manager for macOS (or Linux)

Pros of homebrew-core

  • Simpler and more user-friendly for macOS users
  • Faster installation and update processes
  • Wider adoption and community support for macOS

Cons of homebrew-core

  • Less flexible and customizable than nixpkgs
  • Limited to macOS and Linux, while nixpkgs supports multiple platforms
  • Lacks the reproducibility and declarative system configuration of Nix

Code Comparison

homebrew-core (Ruby):

class Wget < Formula
  homepage "https://www.gnu.org/software/wget/"
  url "https://ftp.gnu.org/gnu/wget/wget-1.21.3.tar.gz"
  sha256 "5726bb8bc5ca0f6dc7110f6416e4bb7019e2d2ff5bf93d1ca2ffcc6656f220e5"
  license "GPL-3.0-or-later"

nixpkgs (Nix):

{ lib, stdenv, fetchurl, perl, libidn2, zlib, pcre2, gpgme, libpsl, libunistring }:

stdenv.mkDerivation rec {
  pname = "wget";
  version = "1.21.3";

  src = fetchurl {
    url = "mirror://gnu/wget/wget-${version}.tar.gz";
    sha256 = "5726bb8bc5ca0f6dc7110f6416e4bb7019e2d2ff5bf93d1ca2ffcc6656f220e5";
  };

Both repositories serve as package managers, but nixpkgs offers a more comprehensive and flexible approach to system configuration and package management across multiple platforms. homebrew-core, while more limited in scope, provides a simpler and more accessible solution for macOS users.

The Microsoft community Windows Package Manager manifest repository

Pros of winget-pkgs

  • Simpler package management system, easier for beginners to understand and use
  • Native integration with Windows, providing a seamless experience for Windows users
  • Faster package installation and updates due to its lightweight nature

Cons of winget-pkgs

  • Limited cross-platform support, primarily focused on Windows
  • Less comprehensive package ecosystem compared to nixpkgs
  • Fewer advanced features and customization options for power users

Code Comparison

winget-pkgs:

PackageIdentifier: Microsoft.VisualStudioCode
PackageVersion: 1.60.0
Installers:
  - Architecture: x64
    InstallerUrl: https://az764295.vo.msecnd.net/stable/e7d7e9a9348e6a8cc8c03f877d39cb72e5dfb1ff/VSCodeUserSetup-x64-1.60.0.exe
    InstallerSha256: 3E9D70C6A6E9C4C76A8B5A6F9E5CCBC7D8C4D1F5F5A8B5A5F5A8B5A5F5A8B5A5

nixpkgs:

{ lib, stdenv, fetchurl, ... }:

stdenv.mkDerivation rec {
  pname = "vscode";
  version = "1.60.0";
  src = fetchurl {
    url = "https://update.code.visualstudio.com/${version}/linux-x64/stable";
    sha256 = "0000000000000000000000000000000000000000000000000000";
  };
}

The code examples show the different approaches to package management. winget-pkgs uses a YAML format for package definitions, while nixpkgs uses Nix language for more complex and flexible package descriptions.

Convert Figma logo designs to code with AI

Visual Copilot

Introducing Visual Copilot: A new AI model to turn Figma designs to high quality code using your components.

Try Visual Copilot

README

NixOS logo

Contributors badge Open Collective supporters

Nixpkgs is a collection of over 100,000 software packages that can be installed with the Nix package manager. It also implements NixOS, a purely-functional Linux distribution.

Manuals

  • NixOS Manual - how to install, configure, and maintain a purely-functional Linux distribution
  • Nixpkgs Manual - contributing to Nixpkgs and using programming-language-specific Nix expressions
  • Nix Package Manager Manual - how to write Nix expressions (programs), and how to use Nix command line tools

Community

Other Project Repositories

The sources of all official Nix-related projects are in the NixOS organization on GitHub. Here are some of the main ones:

  • Nix - the purely functional package manager
  • NixOps - the tool to remotely deploy NixOS machines
  • nixos-hardware - NixOS profiles to optimize settings for different hardware
  • Nix RFCs - the formal process for making substantial changes to the community
  • NixOS homepage - the NixOS.org website
  • hydra - our continuous integration system
  • NixOS Artwork - NixOS artwork

Continuous Integration and Distribution

Nixpkgs and NixOS are built and tested by our continuous integration system, Hydra.

Artifacts successfully built with Hydra are published to cache at https://cache.nixos.org/. When successful build and test criteria are met, the Nixpkgs expressions are distributed via Nix channels.

Contributing

Nixpkgs is among the most active projects on GitHub. While thousands of open issues and pull requests might seem a lot at first, it helps consider it in the context of the scope of the project. Nixpkgs describes how to build tens of thousands of pieces of software and implements a Linux distribution. The GitHub Insights page gives a sense of the project activity.

Community contributions are always welcome through GitHub Issues and Pull Requests.

For more information about contributing to the project, please visit the contributing page.

Donations

The infrastructure for NixOS and related projects is maintained by a nonprofit organization, the NixOS Foundation. To ensure the continuity and expansion of the NixOS infrastructure, we are looking for donations to our organization.

You can donate to the NixOS foundation through SEPA bank transfers or by using Open Collective:

License

Nixpkgs is licensed under the MIT License.

Note: MIT license does not apply to the packages built by Nixpkgs, merely to the files in this repository (the Nix expressions, build scripts, NixOS modules, etc.). It also might not apply to patches included in Nixpkgs, which may be derivative works of the packages to which they apply. The aforementioned artifacts are all covered by the licenses of the respective packages.