Replies: 1 comment 1 reply
-
|
When I add `makeWrapper` to my list of packages, the startup script isn't able to find the `makeWrapper` bash function.
```nix
devshells.default = {
packagesFrom = [ config.packages.default ];
packages = with pkgs; [
gdb
libsForQt5.wrapQtAppsHook
makeWrapper
bashInteractive
];
devshell.startup.wrapQt.text = # bash
''
# Set the environment variables that unpatched Qt apps expect
bashdir=$(mktemp -d)
makeWrapper "$(type -p bash)" "$bashdir/bash" "''${qtWrapperArgs[@]}"
exec "$bashdir/bash"
'';
};
```
The `pkgs.makeWrapper` derivation does not provide a `makeWrapper` file
under `$out/bin`, since it provides only a setup-hook, thus, there's no
makeWrapper to be used on the startup script.
To make it available to your startup script, you'd have to source it
like so:
```bash
source "${pkgs.makeWrapper}/nix-support/setup-hook"
```
But do beware of sourcing setup-hooks: They're made to work only
under the nixpkgs build environment, having no guarantees that they work
outside of it.
|
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
When I add
makeWrapperto my list of packages, the startup script isn't able to find themakeWrapperbash function.Beta Was this translation helpful? Give feedback.
All reactions