What about reading the nixpkgs (the sections describing what a derivation is) manual and or having a look at the nixpkgs repository which should contain more than enough examples ? Marc Weber