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

Build failure: pkgs.pulumi #351955

Closed
SchahinRohani opened this issue Oct 28, 2024 · 8 comments
Closed

Build failure: pkgs.pulumi #351955

SchahinRohani opened this issue Oct 28, 2024 · 8 comments
Labels
0.kind: build failure A package fails to build

Comments

@SchahinRohani
Copy link

SchahinRohani commented Oct 28, 2024

Steps To Reproduce

Steps to reproduce the behavior:

  1. build pkgs.pulumi with a flake.nix for a devshell

Build log

error: builder for '/nix/store/fq64fs96qq7lscd3p5sdxpf00gh76zdn-pulumi-3.122.0.drv' failed with exit code 1;
       last 20 log lines:
       > Running phase: unpackPhase
       > unpacking source archive /nix/store/8ivlsqblr4r2z3317r7lscxvbp9hbmmv-pulumi
       > source root is pulumi/pkg
       > Running phase: patchPhase
       > applying patch /nix/store/928ny7w2l22jva8i0wpfjpckjijzx5dm-6dba7192d134d3b6f7e26dee9205711ccc736fa7.patch
       > patching file cmd/pulumi/new_ai_test.go
       > Running phase: updateAutotoolsGnuConfigScriptsPhase
       > Running phase: configurePhase
       > Running phase: buildPhase
       > Building subPackage ./authhelpers
       > Building subPackage ./backend
       > Building subPackage ./backend/display
       > Building subPackage ./backend/display/internal/terminal
       > Building subPackage ./backend/filestate
       > Building subPackage ./backend/httpstate
       > Building subPackage ./backend/httpstate/client
       > Building subPackage ./backend/state
       > Building subPackage ./cmd/pulumi
       > # github.com/pulumi/pulumi/pkg/v3/cmd/pulumi
       > link: github.com/pgavlin/text/internal/bytealg: invalid reference to internal/bytealg.MaxLen
       For full logs, run 'nix log /nix/store/fq64fs96qq7lscd3p5sdxpf00gh76zdn-pulumi-3.122.0.drv'.
error: 1 dependencies of derivation '/nix/store/qyrld8i53bh7biqcnb91jzrwd70c5djm-nix-shell-env.drv' failed to build

Notify maintainers

@Trundle @veehaitch

Metadata

Might be related to this: pulumi/pulumi#17003


Add a 👍 reaction to issues you find important.

@SchahinRohani SchahinRohani added the 0.kind: build failure A package fails to build label Oct 28, 2024
@tonybutt
Copy link

pulumi/pulumi#17003

@jq-bb
Copy link

jq-bb commented Nov 21, 2024

error: builder for '/nix/store/nq8n90pl17dacp10k6ahi42igi26z5l8-pulumi-3.122.0.drv' failed with exit code 1;
       last 10 log lines:
       > Building subPackage ./backend
       > Building subPackage ./backend/display
       > Building subPackage ./backend/display/internal/terminal
       > Building subPackage ./backend/filestate
       > Building subPackage ./backend/httpstate
       > Building subPackage ./backend/httpstate/client
       > Building subPackage ./backend/state
       > Building subPackage ./cmd/pulumi
       > # github.com/pulumi/pulumi/pkg/v3/cmd/pulumi
       > link: github.com/pgavlin/text/internal/bytealg: invalid reference to internal/bytealg.MaxLen
       For full logs, run 'nix log /nix/store/nq8n90pl17dacp10k6ahi42igi26z5l8-pulumi-3.122.0.drv'.

nix-info -m               
 - system: `"x86_64-linux"`
 - host os: `Linux 6.6.58, NixOS, 24.11 (Vicuna), 24.11.20241025.18536bf`
 - multi-user?: `yes`
 - sandbox: `yes`
 - version: `nix-env (Nix) 2.19.6`
 - nixpkgs: `/nix/store/wb6agba4kfsxpbnb5hzlq58vkjzvbsk6-source`

same issue on 24.11 branch

@bmillwood
Copy link
Contributor

bmillwood commented Dec 27, 2024

I know how to make pkgs.pulumi build again (see comments in #363539) but to be honest I'm too confused about how pulumi is meant to be used in NixOS to submit a PR. There's pulumi.withPackages, there's pulumi-bin, and there's pulumi-related packages in the Python package set (and possibly other languages, I only use Python). When I get pulumi working locally, it's usually with a venv and feels like a hack. What's the "intended" usage of all this stuff?

@jq-bb
Copy link

jq-bb commented Dec 30, 2024

This sounds like maybe we need a NixOS wiki entry that shows different possible recipes for using Pulumi + Nix?
Or maybe someone who has a working configuration to kindly share their code?

I don't see there being a single correct way to use this stuff due to the wide programming language support of Pulumi.

I agree that currently though, its super hard to figure out how to get a working Pulumi + Nix configuration.

@teto
Copy link
Member

teto commented Dec 30, 2024

better would be a nixpkgs manual entry.

pulumi-bin usually takes the upstream binaries and patch them, as opposed to building from source (pulumi).
Then you need the host provider (node), and pulumi usually tries to install plugins by itself (and collects the versions from the pulumi state). Even though I would like to see a fully reproducible pulumi nix stuff, it would need someone really motivated to work around the oddities of pulumi (especially as it is regularly updated).

bmillwood added a commit to bmillwood/nixpkgs that referenced this issue Jan 2, 2025
@bmillwood
Copy link
Contributor

pulumi-bin usually takes the upstream binaries and patch them, as opposed to building from source (pulumi)

This may not really be the place for this discussion, but I'm curious what difference this makes for the end-user? Why would I choose to install pulumi-bin over pulumi, especially considering that usually I'm not building it myself anyway but getting it from the hydra cache?

@teto teto closed this as completed in 6dd85fe Jan 6, 2025
@MarkusKramer
Copy link

I can confirm this fix solved this bug for me (using "pulumi" package from master). Thanks 👍

@teto
Copy link
Member

teto commented Jan 23, 2025

This sounds like maybe we need a NixOS wiki entry that shows different possible recipes for using Pulumi + Nix? Or maybe someone who has a working configuration to kindly share their code?

@jq-bb I've created this issue following your feedback (I feel the same) #376137 . If anyone is interested to contribute, I might not have the cycles to work on things, but I can help PRs get merged so feel free to tag me.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
0.kind: build failure A package fails to build
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants