add flake.nix for reproducible builds and NixOS#2444
add flake.nix for reproducible builds and NixOS#2444randomizedcoder wants to merge 2 commits intoperformancecopilot:mainfrom
Conversation
kmcdonell
left a comment
There was a problem hiding this comment.
@randomizedcoder Could I suggest you separate the 2 portability patches as a separate PR? I'm happy for those to proceed immediately.
Then you're left with just the one nix-specific patch and the associated nix life-support changes.
For the latter, my only (nit) issue is adding result* to the top-level .gitignore ... can that be more targeted, or does the nix build leave result* files all over the place?
|
G'day Ken, Thanks for the feedback. I'm actually from Melbourne also! Is this what you meant? #2445 Thanks, |
|
@randomizedcoder I'm assuming we need to drive #2445 to completion, and then circle back with a rebased set of changes here? |
- $tmp in our scripts are for transient files, they never need to
survive a reboot, so /tmp is a better match than /var/tmp
- /tmp is often a tmpfs these days which provides a potential
reduction in disk i/o
- $TMPDIR provides a standard way of locating *all* these temporary
files someplace else, e.g. for a container or sandbox environment
- consistently uses tmp=${TMPDIR:-/tmp}/<script>-$$ for a script
named <script> to avoid concurrent execution clashes and to help
identify corpses in /tmp
This pre-empts point 2. in PR performancecopilot#2445 and the similar changes in
PR performancecopilot#2444.
|
Continuing to work on getting flake.nix working well. Just added pull request for "ar" Will assess this pull request, if/when 2479 is merged |
|
I've also updated this flake.nix branch now that TMPDIR has been improved, and I'm assuming the AR pull request 2479 gets merged. nix does build correctly Thanks, |
Add comprehensive Nix packaging support for PCP 7.0.5, enabling reproducible
builds via Nix flakes and preparing for inclusion in nixpkgs.
New files:
tmpfiles path, exclude qa from build
hardcoded /var/tmp for sandbox compatibility
applied, available for upstream)
packaging, technical details, and future improvements
Features enabled by default (Linux):
The flake provides:
Technical fixes for Nix sandbox:
Documentation ./docs/HowTos/nix/index.rst includes explanations of why Nix
packaging can be challenging (non-FHS paths, sandboxed builds, pure
environment) and how these constraints help expose portability issues in
build systems.