Journal 2022-09-11

Nix stdenv.mkDerivation

The function requires a name and source and will return a derivation.

stdenv.mkDerivation {
    name = "example";
    src = ./src;

    # buildInputs = [];
    # nativeBuildInputs = [];
    # installPhase = ...;
    # etc ...
};

The source code for the function can be found here:

Some useful configuration variables:

You should use the post<hook-name> (postInstall, postPatch) to run code since it will not override te existing hook step like decompression,

<!-- Morning --> <!-- What do I want to do today? --> <!-- Evening --> <!-- What did I learn today? --> <!-- Things I learned --> <!-- Useful tools and libraries -->