Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

document post-build-hook usage #2

Open
domenkozar opened this issue Oct 29, 2019 · 2 comments
Open

document post-build-hook usage #2

domenkozar opened this issue Oct 29, 2019 · 2 comments

Comments

@domenkozar
Copy link
Member

       post-build-hook
           Optional. The path to a program to execute after each build.

           This option is only settable in the global nix.conf, or on the command line by trusted users.

           When using the nix-daemon, the daemon executes the hook as root. If the nix-daemon is not involved, the hook runs as the user executing the nix-build.

           ·   The hook executes after an evaluation-time build.

           ·   The hook does not execute on substituted paths.

           ·   The hook's output always goes to the user's terminal.

           ·   If the hook fails, the build succeeds but no further builds execute.

           ·   The hook executes synchronously, and blocks other builds from progressing while it runs.

           The program executes with no arguments. The program's environment contains the following environment variables:

           DRV_PATH
               The derivation for the built paths.

               Example: /nix/store/5nihn1a7pa8b25l9zafqaqibznlvvp3f-bash-4.4-p23.drv

           OUT_PATHS
               Output paths of the built derivation, separated by a space character.

               Example: /nix/store/zf5lbh336mnzf1nlswdn11g4n2m8zh3g-bash-4.4-p23-dev /nix/store/rjxwxwv1fpn9wa2x5ssk5phzwlcv4mna-bash-4.4-p23-doc
               /nix/store/6bqvbzjkcp9695dq0dpl5y43nvy37pq1-bash-4.4-p23-info /nix/store/r7fng3kk3vlpdlh2idnrbn37vh4imlj2-bash-4.4-p23-man
               /nix/store/xfghy8ixrhz3kyy6p724iv3cxji088dx-bash-4.4-p23.


Seems like cachix push mycache $OUT_PATHS should do.

@domenkozar
Copy link
Member Author

See cachix/cachix-action#19 for example usage

@domenkozar domenkozar transferred this issue from cachix/cachix Jul 20, 2020
@domenkozar
Copy link
Member Author

It is documented at https://docs.cachix.org/continuous-integration-setup/hydra.html, although it deserves it's own section.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant