NixOS / nixpkgs

Nix Packages collection & NixOS
MIT License
18.39k stars 14.34k forks source link

postman: `failed to execvp` multiple standard binaries (`cat`, `xdg-settings`, `xdg-open`) #325307

Open Tchekda opened 4 months ago

Tchekda commented 4 months ago

Describe the bug

A clear and concise description of what the bug is. Using the latest version (b88607fa3d5e17739aa01c8c0449ad3b8dee7ab4) of the derivation, I am getting an error when starting Postman and when trying to open the browser from Postman (for login). Here are the errors:

LaunchProcess: failed to execvp:
xdg-settings
LaunchProcess: failed to execvp:
xdg-open

Steps To Reproduce

Steps to reproduce the behavior:

  1. Install the package
  2. Launch the app
  3. Try to login
  4. No browser is opened and the error is printed in the system journal

Expected behavior

Postman should have access to the xdg environment to allow integrations with browser and other apps

Additional context

This error wasn't happening in the nixos-23.05 version of the package.

If I change the last line of postFixup https://github.com/NixOS/nixpkgs/blob/ab82a9612aa45284d4adf69ee81871a389669a9e/pkgs/development/web/postman/linux.nix#L159 It seems to be working again, meaning the fact that PATH is overriden has an impact

wrapProgram $out/bin/postman --prefix PATH : ${lib.makeBinPath [ openssl ]}

Notify maintainers

@johnrichardrinehart @evanjs @tricktron @Crafter

Metadata

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

[user@system:~]$ nix-shell -p nix-info --run "nix-info -m"
- system: `"x86_64-linux"`
 - host os: `Linux 6.1.73, NixOS, 23.11 (Tapir), 23.11.3019.8bf65f17d807`
 - multi-user?: `yes`
 - sandbox: `yes`
 - version: `nix-env (Nix) 2.18.1`
 - channels(tchekda): `"android-nixpkgs, home-manager-23.11.tar.gz, home-manager-master, nixos-23.11, nixos-21.11-21.11, nixos-unstable, unstable"`
 - channels(root): `"home-manager-23.11.tar.gz, home-manager-master, nixos-23.11, nixos-21.11-21.11, nixos-hardware, nixos-unstable"`
 - nixpkgs: `/nix/var/nix/profiles/per-user/root/channels/nixos`

Add a :+1: reaction to issues you find important.

amirsalarsafaei commented 1 month ago

I don't think this is a good fix up,.I think xdg-utils should be in the Deps that was my fixup if everyone agrees I can draft a pull request

Tchekda commented 1 month ago

I don't think this is a good fix up,.I think xdg-utils should be in the Deps that was my fixup if everyone agrees I can draft a pull request

Feel free to draft a PR and I will test it out. My solution wasn't perfect but it worked and made logical sense when I looked into the issue.