Age | Commit message (Collapse) | Author | Files | Lines |
|
makeWrapper,makeBinaryWrapper: implement `--append-flags`
|
|
Fixes https://github.com/NixOS/nixpkgs/issues/175045
|
|
|
|
Reverts 8b79ef2c on aarch64-darwin, no-op on other platforms.
|
|
|
|
A small shell script that can be used to extract a binary wrapper's
makeCWrapper call from its embedded docstring, without depending on
makeBinaryWrapper.
|
|
For symmetry/interoperability with makeBinaryWrapper. Implemented as
--argv0 '$0'
|
|
Fixes https://github.com/NixOS/nixpkgs/issues/172249
|
|
...and pass it makeBinaryWrapper in all-packages.nix
|
|
Because both versions might end up in a derivation's build inputs, it
might be useful to be able to explicitly select which function to use.
|
|
The derivation is complex enough to warrant moving out of
all-packages.nix
|
|
https://github.com/NixOS/nixpkgs/commit/f8cc8ff5755528d9a73671481ba3d6fb00f4e8d5
fails to unset the variables in the environment due to a Bash quirk,
so set them to the empty string instead.
|
|
The generated C code contains large string literals that are longer than
the maximum length specified by the standard.
However, GCC has no trouble dealing with those strings, so we can just
add -Wno-overlength-strings.
https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html#index-Woverlength-strings
|
|
Prevent the wrapper from being affected by the derivation's CFLAGS,
which may not even apply to GCC.
|
|
Reduces the likelihood of having apps wrapped twice by a shell script,
which causes problems with argv0.
|
|
make-darwin-bundle: Use output bin
|
|
desktopToDarwinBundle: Patch Exec field codes
|
|
`postgresqlTestHook`: init
|
|
|
|
|
|
This commit fixes precise dependency ignorance by converting the
environment variable `autoPatchelfIgnoreMissingDeps` into a bash array
`ignoreMissingDepsArray`, passing `"${ignoreMissingDepsArray[@]}"`
instead of `"${autoPatchelfIgnoreMissingDeps[@]}"` to the python
script.
The original implementation does not work when
`autoPatchelfIgnoreMissingDeps` contains multiple dependency names.
Because it mistakenly passes `"${autoPatchelfIgnoreMissingDeps[@]}"`
to the python script. According to the Nix manual
(https://nixos.org/manual/nix/stable/expressions/derivations.html),
lists of strings are concatenated into whitespace-separated strings,
then passed to the builder as environment variables. So, if
`autoPatchelfIgnoreMissingDeps = [ "dep1" "dep2" "dep3" ]`,
`"${autoPatchelfIgnoreMissingDeps[@]}"` will be expanded to a single
argument `"dep1 dep2 dep3"`, which is not the intended behavior,
because the python script takes the long argument as a dependency
name.
With this commit, `"${ignoreMissingDepsArray[@]}"` will be expanded to
three arguments `"dep1" "dep2" "dep3"` arguments as expected, fixing
the issue.
|
|
Minor conflicts; I hope I didn't mess up:
pkgs/development/tools/misc/binutils/default.nix
pkgs/games/openjk/default.nix
|
|
autoPatchelfHook: more precise dependency ignorance
|
|
|
|
Conflicts:
pkgs/development/compilers/go/2-dev.nix
|
|
Co-authored-by: K900 <me@0upti.me>
|
|
Desktop files are only useful when accompanied by the binaries they
specify. So it makes more sense to put them next to the binaries rather
than `$out` which only usually contains the binaries.
|
|
Similar to the implementation of the `%f` and `%u` field codes. In this
case the amount of arguments passed poses no problem but the position
could, at least in theory.
This finishes the implementation of all the non-deprecated field codes.
As a part of that, repetitions of field codes are left alone. Originally
all field codes were removed. Now we replace only the first occurence.
This is correct for at least `%f`, `%u`, `%F` and `%U` because at most
one of them is permitted.
Shortcomings:
1. We replace `%[cfFikuU]` patterns one at a time. This means if the
right field code appears as part of the rest of the `Exec` field or
in a field code that was substituted earlier.
2. If any field code is repeated, only the first occurence is
substituted.
|
|
`%f` and `%u` are used to signal the program only accepts a single file
or URI argument. I do not believe there's a way to signal this
information to macOS but it is possible the program really won't work if
multiple files are passed and it's possible the relative position of
`%i`, `%c` or `%k` matters. So we replace `%f` or `%u` with `$1`. That
way we only pass one file in the (possibly significant) position of the
field code.
|
|
|
|
|
|
|
|
`ls -1 "$iconsdir/"*` listed the source directory for me when the glob
had no matches. Switching to `-A` circumvents this problem and has the
added advantage that it cannot run into argument list length limits.
|
|
Co-authored-by: milahu <milahu@gmail.com>
|
|
Checked the desktop entry spec, there's other field codes than `%[fFuU]`
and those can in fact occur more than once, hence dropping '$' and
adding `/g`.
|
|
The "Exec" key in desktop items sometimes has one of the `%f`, `%F`,
`%u` and `%U` suffixes, which specify whether the command takes a file,
multiple files or a generalized URL or URLs. Darwin application bundles
do no understand this syntax so we do the next best thing, which is
simply dropping it.
|
|
|
|
nixos/wrap-gapps-hook: don't add data directories of icon dependencies into XDG_DATA_DIRS
|
|
Sometimes scalable icons or icons within the thresholds from the desired
resolutions aren't available. In this case it's still nicer to end up
with a blocky scaled icon rather than the generic default.
|
|
In order to compose a `.icns` file containing multiple icon sizes I had
to pass `--toc` to `icnsutil`. This did not seem to have a negative
effect on `.icns` containing only a single icon size.
|
|
|
|
On macOS 10.13 the 48x48 icon size is not supported. It results in a
corrupted image being displayed. I suspect the image data is being
truncated to what it expects for 32x32 or maybe data is read for
128x128, which would be a buffer overflow.
|
|
The script and the hook assume `/bin` is in `$out` but that's not always
true for a multi-output derivation.
|
|
For symmetry with `makeBinaryWrapper`.
|
|
XDG_DATA_DIRS
As discussed in https://github.com/NixOS/nixpkgs/issues/163590, it's not really required and has a side effect of adding refeferences to packages from nativeBuildInputs that aren't really required
|
|
|
|
Co-authored-by: Uri Baghin <uri@canva.com>
|
|
|
|
- Convert icons to a single .icns file; and
- Provide an opt-out via X-macOS-Squircle in the desktop item to
override the squircle behavior when the source icons look bad when
converted automatically.
|
|
Disable file globbing in --prefix/--suffix, since bash will otherwise
try to find filenames matching the the value to be prefixed/suffixed
if it contains characters considered wildcards, such as `?` and
`*`. We want the value as is, except we also want to split it on on
the separator; hence we can't quote it.
|