My notes My blog

How to build a package in a local clone of nixpkgs

For example, if you need to update hashes manually, or test package in the shell

First, clone nixpkgs:

git clone https://github.com/NixOS/nixpkgs
git clone https://github.com/NixOS/nixpkgs

Then, run from nixpkgs folder:

nix repl
# or, if some env variables is needed (e.g. NIXPKGS_ALLOW_INSECURE):
nix repl --impure
nix repl
# or, if some env variables is needed (e.g. NIXPKGS_ALLOW_INSECURE):
nix repl --impure

And then in the repl: