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

buildDotnetModule: add passthru.fetch-deps #150587

Merged
merged 1 commit into from
Dec 18, 2021

Conversation

IvarWithoutBones
Copy link
Member

Motivation for this change

This adds a script which fetches nuget dependencies for all projects using buildDotnetModule, as this was something that you had to do manually before. It should make packaging dotnet applications a lot more user friendly.

For example:

~/nix/nixpkgs > nix-build -A python-language-server.passthru.fetch-deps
/nix/store/p5yfgpgi2rr63gva01l94f2vxm8lwj2k-fetch-python-language-server-deps
~/nix/nixpkgs > /nix/store/p5yfgpgi2rr63gva01l94f2vxm8lwj2k-fetch-python-language-server-deps
/tmp/python-language-server.KuJ /nix/store
  Determining projects to restore...
  Restored /tmp/python-language-server.KuJ/src/Analysis/Core/Impl/Microsoft.Python.Analysis.Core.csproj (in 1.38 sec).
  Restored /tmp/python-language-server.KuJ/src/Parsing/Impl/Microsoft.Python.Parsing.csproj (in 1.38 sec).
  Restored /tmp/python-language-server.KuJ/src/Analysis/Ast/Impl/Microsoft.Python.Analysis.csproj (in 19 ms).
  Restored /tmp/python-language-server.KuJ/src/Core/Impl/Microsoft.Python.Core.csproj (in 17 ms).
  Restored /tmp/python-language-server.KuJ/src/LanguageServer/Impl/Microsoft.Python.LanguageServer.csproj (in 16.54 sec).
Writing lockfile...
Succesfully wrote lockfile to: /tmp/python-language-server-deps.nix

The location the file get's written to is kind of arbitrary, if anyone has a better suggestion please share!

This could potentially be used for auto-updating as well, though I'm not very familair with how that works. I'll have to look into it.

Things done
  • Built on platform(s)
    • x86_64-linux
    • aarch64-linux
    • x86_64-darwin
    • aarch64-darwin
  • For non-Linux: Is sandbox = true set in nix.conf? (See Nix manual)
  • Tested, as applicable:
  • Tested compilation of all packages that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review rev HEAD". Note: all changes have to be committed, also see nixpkgs-review usage
  • Tested basic functionality of all binary files (usually in ./result/bin/)
  • 22.05 Release Notes (or backporting 21.11 Release notes)
    • (Package updates) Added a release notes entry if the change is major or breaking
    • (Module updates) Added a release notes entry if the change is significant
    • (Module addition) Added a release notes entry if adding a new NixOS module
    • (Release notes changes) Ran nixos/doc/manual/md-to-db.sh to update generated release notes
  • Fits CONTRIBUTING.md.

@github-actions github-actions bot added the 8.has: documentation This PR adds or changes documentation label Dec 13, 2021
@IvarWithoutBones
Copy link
Member Author

cc @prusnak

@ofborg ofborg bot added 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin 10.rebuild-linux: 0 This PR does not cause any packages to rebuild on Linux labels Dec 13, 2021
@IvarWithoutBones
Copy link
Member Author

/marvin opt-in
/status needs_reviewer

@marvin-mk2 marvin-mk2 bot added the marvin This PR was reviewed by Marvin, a discontinued bot: https://github.com/timokau/marvin-mk2 label Dec 15, 2021
@marvin-mk2
Copy link

marvin-mk2 bot commented Dec 15, 2021

Hi! I'm an experimental bot. My goal is to guide this PR through its stages, hopefully ending with a merge. You can read up on the usage here.

@marvin-mk2 marvin-mk2 bot added the needs_reviewer (old Marvin label, do not use) label Dec 15, 2021
@marvin-mk2 marvin-mk2 bot requested a review from bennyandresen December 15, 2021 11:54
@marvin-mk2 marvin-mk2 bot added awaiting_reviewer (old Marvin label, do not use) and removed needs_reviewer (old Marvin label, do not use) labels Dec 15, 2021
@marvin-mk2
Copy link

marvin-mk2 bot commented Dec 18, 2021

Reminder: Please review!

This Pull Request is awaiting review. If you are the assigned reviewer, please have a look. Try to find another reviewer if necessary. If you can't, please say so. If the status is not accurate, please change it. If nothing happens, this PR will be should be put back in the needs_reviewer queue in one day.


Note: This feature is currently broken. The bot will not actually change the status. If you see this message multiple times, please request a status change manually.

@prusnak prusnak merged commit fc1c566 into NixOS:master Dec 18, 2021
@prusnak
Copy link
Member

prusnak commented Dec 18, 2021

There are 0 rebuilds anyway, so let's merge this in.

@IvarWithoutBones IvarWithoutBones deleted the dotnetModule-fetchdep branch December 18, 2021 15:05
@legendofmiracles
Copy link
Contributor

This seems to break custom passthru's of derivations. See the failing tests on this PR.
https://github.com/NixOS/nixpkgs/runs/4647348126?check_suite_focus=true

@prusnak
Copy link
Member

prusnak commented Dec 28, 2021

This seems to break custom passthru's of derivations.

@IvarWithoutBones Can you please have a look?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
8.has: documentation This PR adds or changes documentation 10.rebuild-darwin: 0 This PR does not cause any packages to rebuild on Darwin 10.rebuild-linux: 0 This PR does not cause any packages to rebuild on Linux awaiting_reviewer (old Marvin label, do not use) marvin This PR was reviewed by Marvin, a discontinued bot: https://github.com/timokau/marvin-mk2
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants