Skip to content

Instantly share code, notes, and snippets.

@bencoman
Created November 2, 2017 00:30
Show Gist options
  • Save bencoman/1860ba81320d7eb74aaf43593bc083fe to your computer and use it in GitHub Desktop.
Save bencoman/1860ba81320d7eb74aaf43593bc083fe to your computer and use it in GitHub Desktop.
$ git clone https://github.com/nixos/nixpkgs
$ export NIXPKGS=`pwd`/nixpkgs
$ ls $NIXPKGS
The build phases listed https://nixos.wiki/wiki/Create_and_debug_nix_packages#Using_nix-shell_for_package_development
unpackPhase
patchPhase
configurePhase
buildPhase
checkPhase
installPhase
fixupPhase
installCheckPhase
distPhase
Choose a simple package like "banner"
$ mkdir practiceBuild && cd practiceBuild
$ nix-shell $NIXPKGS -A banner
[nix-shell]$ unpackPhase
[nix-shell]$ cd banner*
[nix-shell]$ configurePhase
[nix-shell]
@bencoman
Copy link
Author

bencoman commented Nov 2, 2017

First manual build of an existing package in NixOS. Practice for developing own package.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment