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

terraform-providers: introduce mkTerraformProvider #57026

Closed
wants to merge 1 commit into from

Conversation

zimbatm
Copy link
Member

@zimbatm zimbatm commented Mar 7, 2019

Motivation for this change

keep the code DRY, use the same defaults when building providers outside
of the nixpkgs tree.

/cc @stephengroat

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nox --run "nox-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Assured whether relevant documentation is up to date
  • Fits CONTRIBUTING.md.

keep the code DRY, use the same defaults when building providers outside
of the nixpkgs tree
@andir
Copy link
Member

andir commented Mar 7, 2019

Interesting that ofBorg reports an issue. I just built all the plugins on this PR without an issue..

@GrahamcOfBorg eval

@andir
Copy link
Member

andir commented Mar 7, 2019

Running ./maintainers/scripts/eval-release.sh locally leads to the same error :/

Marking the new function to not be recursed into should probably fix this.

For future reference the error:

./maintainers/scripts/eval-release.sh
You may set VERBOSE=1 to see debug output or to any other non-empty string to make this script completely silent
trace: `mkStrict' is obsolete; use `mkOverride 0' instead.
trace: `lib.nixpkgsVersion` is deprecated, use `lib.version` instead!
trace: Warning: `showVal` is deprecated and will be removed in the next release, please use `traceSeqN`
trace: lib.zip is deprecated, use lib.zipAttrsWith instead
error: while evaluating anonymous function at /home/andi/dev/nixos/nixpkgs-57026/maintainers/scripts/eval-release.nix:21:25, called from undefined position:
while evaluating anonymous function at /home/andi/dev/nixos/nixpkgs-57026/maintainers/scripts/eval-release.nix:7:76, called from /home/andi/dev/nixos/nixpkgs-57026/maintainers/scripts/eval-release.nix:21:56:
while evaluating 'recurse' at /home/andi/dev/nixos/nixpkgs-57026/maintainers/scripts/eval-release.nix:13:19, called
from /home/andi/dev/nixos/nixpkgs-57026/maintainers/scripts/eval-release.nix:21:69:
while evaluating anonymous function at /home/andi/dev/nixos/nixpkgs-57026/pkgs/top-level/release-lib.nix:121:6, called from /home/andi/dev/nixos/nixpkgs-57026/lib/attrsets.nix:292:43:
while evaluating 'hydraJob' at /home/andi/dev/nixos/nixpkgs-57026/lib/customisation.nix:157:14, called from /home/andi/dev/nixos/nixpkgs-57026/pkgs/top-level/release-lib.nix:121:14:
while evaluating the attribute 'drvPath' at /home/andi/dev/nixos/nixpkgs-57026/lib/customisation.nix:174:13:
while evaluating the attribute 'drvPath' at /home/andi/dev/nixos/nixpkgs-57026/lib/customisation.nix:141:13:
while evaluating the attribute 'buildCommand' of the derivation 'terraform-0.11.11' at /home/andi/dev/nixos/nixpkgs-57026/pkgs/applications/networking/cluster/terraform/default.nix:74:34:
while evaluating the attribute 'passAsFile' of the derivation 'tf-plugin-env' at /home/andi/dev/nixos/nixpkgs-57026/pkgs/build-support/trivial-builders.nix:7:14:
cannot convert a function to JSON

# A specialized buildGoPackage for the terraform provider plugins
{ pname, version, ... }@attrs:
buildGoPackage ({
name = "${pname}-${version}";
Copy link
Member

@kalbasit kalbasit Mar 7, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what if you pass in name instead of pname and then access the inner name via attrs.name? You'll have to remove the name from attrs before you merge them back into this set.

{ name, version, ... }@attrs:
buildGoPackage ({
  name = "${attrs.name}-${version}"

@flokli
Copy link
Contributor

flokli commented Jun 19, 2019

What's the status of this?

@zimbatm
Copy link
Member Author

zimbatm commented Jun 19, 2019

This PR is stale right now. It would be nice to have but not big enough for me to spend more time on it at the moment.

@stale
Copy link

stale bot commented Jun 2, 2020

Thank you for your contributions.
This has been automatically marked as stale because it has had no activity for 180 days.
If this is still important to you, we ask that you leave a comment below. Your comment can be as simple as "still important to me". This lets people see that at least one person still cares about this. Someone will have to do this at most twice a year if there is no other activity.
Here are suggestions that might help resolve this more quickly:

  1. Search for maintainers and people that previously touched the
    related code and @ mention them in a comment.
  2. Ask on the NixOS Discourse. 3. Ask on the #nixos channel on
    irc.freenode.net.

@stale stale bot added the 2.status: stale https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md label Jun 2, 2020
@zimbatm zimbatm closed this Jun 2, 2020
@zimbatm zimbatm deleted the mkTerraformProvider branch June 2, 2020 14:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
2.status: stale https://github.com/NixOS/nixpkgs/blob/master/.github/STALE-BOT.md
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants