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

Optimize nix build #88

Closed
sayanarijit opened this issue Feb 28, 2020 · 4 comments · Fixed by #104
Closed

Optimize nix build #88

sayanarijit opened this issue Feb 28, 2020 · 4 comments · Fixed by #104

Comments

@sayanarijit
Copy link

Due to a known issue nix garbage collector is collecting more packages than it should. The suggested solution is running ln -sfv /root/.cache/nix/tarballs/* /nix/var/nix/gcroots/auto before collecting garbage. However, that doesn't seem to fix the issue.

@hazelweakly
Copy link

Does this solution work for you? I've seen a variant of it used elsewhere (eg in iohk's codebase) as ifdPins

  mkPins = inputs:
    pkgs.runCommand "ifd-pins" { } ''
      mkdir $out
      cd $out
      ${lib.concatMapStringsSep "\n" (i: "ln -sv ${i.value} ${i.key}")
      (lib.attrValues
        (lib.mapAttrs (key: value: { inherit key value; }) inputs))}
    '';

sayanarijit added a commit that referenced this issue Mar 27, 2020
- Separate develop from test dependencies
- Use entrypoints to run CI/CD tests
- Fix #88
sayanarijit added a commit that referenced this issue Mar 27, 2020
- Separate develop from test dependencies
- Use entrypoints to run CI/CD tests
- Fix #88
@sayanarijit
Copy link
Author

Trying a fix in #104

sayanarijit added a commit that referenced this issue Mar 27, 2020
- Separate develop from test dependencies
- Use entrypoints to run CI/CD tests
- Fix #88
@sayanarijit
Copy link
Author

i.e. using NIX_BUILD_SHELL=/nix/var/nix/profiles/default/bin/bash

sayanarijit added a commit that referenced this issue Mar 27, 2020
- Separate develop from test dependencies
- Use entrypoints to run CI/CD tests
- Fix #88
@sayanarijit
Copy link
Author

Seems to be working.

sayanarijit added a commit that referenced this issue Mar 27, 2020
- Separate develop from test dependencies
- Use entrypoints to run CI/CD tests
- Fix #88
- Optimize CI/CD pipeline by restoring cache in build deps
sayanarijit added a commit that referenced this issue Mar 27, 2020
- Separate develop from test dependencies
- Use entrypoints to run CI/CD tests
- Fix #88
- Optimize CI/CD pipeline by restoring cache in build deps
sayanarijit added a commit that referenced this issue Mar 27, 2020
- Separate develop from test dependencies
- Use entrypoints to run CI/CD tests
- Fix #88
- Optimize CI/CD pipeline by restoring cache in build deps
sayanarijit added a commit that referenced this issue Mar 28, 2020
- Separate develop from test dependencies
- Use entrypoints to run CI/CD tests
- Fix #88
- Optimize CI/CD pipeline by restoring cache in build deps
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

Successfully merging a pull request may close this issue.

2 participants