Skip to content

Build failure: tests.makeBinaryWrapper #505339

Closed

Description

@me-and

Nixpkgs version

  • Unstable (26.05)

Steps to reproduce

nix-build -A tests.wrapBinaryPackage.combination at an appropriate commit.

Can Hydra reproduce this build failure?

Yes, Hydra can reproduce this build failure.

Link to Hydra build job

https://hydra.nixos.org/build/318197796

Relevant log output

6d5
< #include <string.h>
10,31d8
< int is_surrounded_by_sep(char *env, char *ptr, unsigned long len, char *sep) {
<   unsigned long sep_len = strlen(sep);
< 
<   // Check left side (if not at start)
<   if (env != ptr) {
<     if (ptr - env < sep_len)
<       return 0;
<     if (strncmp(sep, ptr - sep_len, sep_len) != 0) {
<       return 0;
<     }
<   }
<   // Check right side (if not at end)
<   char *end_ptr = ptr + len;
<   if (*end_ptr != '\0') {
<     if (strncmp(sep, ptr + len, sep_len) != 0) {
<       return 0;
<     }
<   }
< 
<   return 1;
< }
< 
33,50c10,15
<   char *existing_env = getenv(env);
<   if (existing_env) {
<     char *val;
< 
<     char *existing_suffix = strstr(existing_env, suffix);
<     unsigned long suffix_len = strlen(suffix);
<     // If the suffix already exists, remove the original
<     if (existing_suffix && is_surrounded_by_sep(existing_env, existing_suffix, suffix_len, sep)) {
<       char *end_ptr = existing_suffix + suffix_len;
<       if (*end_ptr == '\0') {
<         return;
<       }
<       unsigned long sep_len = strlen(sep);
<       int n_before = existing_suffix - existing_env;
<       assert_success(asprintf(&val, "%.*s%s%s%s",
<                               n_before, existing_env,
<                               existing_suffix + suffix_len + sep_len,
<                               sep, suffix));
---
>     char *existing = getenv(env);
>     if (existing) {
>         char *val;
>         assert_success(asprintf(&val, "%s%s%s", existing, sep, suffix));
>         assert_success(setenv(env, val, 1));
>         free(val);
52c17
<       assert_success(asprintf(&val, "%s%s%s", existing_env, sep, suffix));
---
>         assert_success(setenv(env, suffix, 1));
54,58d18
<     assert_success(setenv(env, val, 1));
<     free(val);
<   } else {
<     assert_success(setenv(env, suffix, 1));
<   }

Additional context

git bisect plus some manual digging indicates the failures are introduced by #451031.

System metadata

  • system: "aarch64-linux"
  • host os: Linux 6.18.16, NixOS, 26.05 (Yarara), 26.05.20260328.8110df5
  • multi-user?: yes
  • sandbox: relaxed
  • version: nix-env (Nix) 2.31.3
  • nixpkgs: /nix/store/dj9rm8vy5k06wsy0793xa5q9whlf1rv5-source

Notify maintainers

Doesn't look like there are any maintainers :(


Note for maintainers: Please tag this issue in your pull request description. (i.e. Resolves #ISSUE.)

I assert that this issue is relevant for Nixpkgs

Is this issue important to you?

Add a 👍 reaction to issues you find important.

Activity

  1. added
    0.kind: bug
    0.kind: regression
    0.kind: build failure
    on Mar 31, 2026
  2. me-and commented on Mar 31, 2026

    @me-and
    MemberAuthor

    Got it: failure was introduced in #451031. Tagging the folk involved in that commit: @SuperSamus @K900

  3. added a commit that references this issue on Jul 31, 2026
    7c07457
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    0.kind: bug0.kind: build failure0.kind: regression

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions