NixOS can create development environments using the default.nix file on a folder when nix-shell is executed which bundles the declared packages and requirements for the environment making it repeatable in other systems.

I was developing a gtk finger client for which I created a simple environment with default.nix file inside the gtk-finger directory.

with import <nixpkgs> {};
stdenv.mkDerivation {
  name = "finger-gtk-env";
  buildInputs = [

then I ran nix-shell command which took me to the development environment which had the required packages for me to develop my gtk finger client.

then i wrote the source code for the gtk finger client and compiled with the following string:

g++ -o finger-gtk gtk-finger.cpp `pkg-config --cflags --libs gtk+-3.0`