Updating and developing NixOS packages
Useful links:
First of all create your environment
$ git clone xxx
$ cd nixpkgs
$ git checkout update-package
$ export NIXPKGS=$(pwd)
Build a packages
$ nix-build $NIXPKGS -k -A xfsprogs
Run shell with your new updated packages and play around with it to make sure it works:
$ nix-shell -I nixpkgs=$NIXPKGS -p xfsprogs
...
$ mkfs.xfs -V
mkfs.xfs version 6.12.0