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

_multioutPropagateDev(): can't set propagatedBuildOutputs with __structuredAttrs #323126

Open
SomeoneSerge opened this issue Jun 28, 2024 · 0 comments
Labels
0.kind: bug Something is broken

Comments

@SomeoneSerge
Copy link
Contributor

Describe the bug

Steps To Reproduce

nix-build << \EOF

test-structured-multiple-outputs.nix
with import <nixpkgs> { };

stdenv.mkDerivation {
  pname = "structured-multiple-outputs";
  version = "0.0.1";
  __structuredAttrs = true;
  outputs = [
    "out"
    "a"
    "b"
    "c"
  ];
  dontUnpack = true;
  postInstall = ''
    for output in $(getAllOutputNames) ; do
      mkdir "''${!output}"
    done
  '';
  propagatedBuildOutputs = [
    "a"
    "b"
    "c"
  ];
}
EOFcat result/nix-support/propagated-build-inputs 
 /nix/store/c39a0kg4fazhc80zfrh8zq7ryc8hc577-structured-multiple-outputs-0.0.1-a

Expected behavior

cat result/nix-support/propagated-build-inputs 
 /nix/store/vj1xb9gm2miy36mkzhg5man4b0qfq48r-structured-multiple-outputs-0.0.1-a /nix/store/72h5ba19ln4awnsyjd2m0srhny4aqfcs-structured-multiple-outputs-0.0.1-b /nix/store/aifzdh9si8qr59rwx1g89z6z6yz5pvgq-structured-multiple-outputs-0.0.1-c

The above was obtained with:

  # _multioutPropagateDev() currently expects a space-separated string rather than an array
  preFixup = ''
    export propagatedBuildOutputs="''${propagatedBuildOutputs[@]}"
  '';

Notify maintainers

CC maybe @vcunat @Artturin ?

Metadata

Please run nix-shell -p nix-info --run "nix-info -m" and paste the result.

nix flake metadata nixpkgs
Resolved URL:  path:/nix/store/dydg48djlykksz8cxq0xjplyxpa9pvf4-source?lastModified=1718160348&narHash=sha256-9YrUjdztqi4Gz8n3mBuqvCkMo4ojrA6nASwyIKWMpus%3D&rev=57d6973abba7ea108bac64ae7629e7431e0199b6
Locked URL:    path:/nix/store/dydg48djlykksz8cxq0xjplyxpa9pvf4-source?lastModified=1718160348&narHash=sha256-9YrUjdztqi4Gz8n3mBuqvCkMo4ojrA6nASwyIKWMpus%3D&rev=57d6973abba7ea108bac64ae7629e7431e0199b6
Description:   A collection of packages for the Nix package manager
Path:          /nix/store/dydg48djlykksz8cxq0xjplyxpa9pvf4-source
Revision:      57d6973abba7ea108bac64ae7629e7431e0199b6
Last modified: 2024-06-12 02:45:48

Add a 👍 reaction to issues you find important.

@SomeoneSerge SomeoneSerge added the 0.kind: bug Something is broken label Jun 28, 2024
@SomeoneSerge SomeoneSerge changed the title _multioutPropagateDev() doesn't work with __structuredAttrs _multioutPropagateDev(): can't set propagatedBuildOutputs with __structuredAttrs Jun 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
0.kind: bug Something is broken
Projects
None yet
Development

No branches or pull requests

1 participant