`sourceByRegex src regexes` should include a source file if one of the
regular expressions `regexes` matches the path of that file relative
to `src`.
However to compute this relative path `sourceByRegex` uses:
```
relPath = lib.removePrefix (toString src + "/") (toString path);
```
Note that `toString path` evaluates to an absolute file somewhere
under `src` and not under `/nix/store`.
The problem is that this doesn't work if `src` is a `cleanSourceWith`
invocation as well because `toString src` will then evaluate to
`src.outPath` which will evaluate to `builtins.filterSource ...` which
evaluates to a path in `/nix/store` which is not a prefix of `path`.
The solution is to replace `src` with `origSrc` where
```
origSrc = if isFiltered then src.origSrc else src;
isFiltered = src ? _isLibCleanSourceWith;
```
Test this by executing the following from the nixpkgs repo:
```
(cat << 'EOI'
let
pkgs = import ./. {};
in pkgs.runCommand "test-sourceByRegex" {
test_sourceByRegex =
let
src1 = pkgs.lib.sourceByRegex ./. [ "^test-sourceByRegex.nix$" ];
src2 = pkgs.lib.sourceByRegex src1 [ "^test-sourceByRegex.nix$" ];
in src2 + "/test-sourceByRegex.nix";
} ''
cp $test_sourceByRegex $out
''
EOI
) > test-sourceByRegex.nix
nix-build test-sourceByRegex.nix
```
That way we can use a ccacheStdenv with e.g. a different CC:
stdenv = overrideCC gcc8Stdenv (ccacheWrapper.override { unwrappedCC
= gcc8Stdenv.cc.cc; });
The initial stable standalone release.
The integer numbered tags are the standalone releases, while the
PQ3B.190705.003.2019.07.01.21 style tags are part of GrapheneOS releases.
For us it probably makes the most sense to track the standalone releases.
Fixes#64465.
Resolves conflicts with earlier merged PR,
notable differences in the result
(by our powers combined!):
* provide both ttf and otf versions
* quote URL, since folks seem to like those
* don't put fonts in ${pname} subdirs
fontconfig's hashing/cache is mostly geared
for the many-fonts-in-one-place situation,
although this may be fixed in more recent versions.
Anyway minor change and mostly went with not modifying
what I had ;) so happy to adjust back if that
better matches your senses/style/use.
* Drop leading 'A' from description,
I think this is per policy written.. somewhere O:).
* alpha-sort the meta attributes, which is easy to rem
and generally matches what most expressions do anyway :)
Reviewer feedback:
* use subdirs with fontname, seems preferred
* fix indent, whoops
Fish 3.0 has an updated an more robust handling of unicode glyphs. Per
the original author of the INTERNAL_WCWIDTH flag, it was something of
misfeature, and they regret that NixOS came to rely on it.
Removes the flag from the Nix expression.
Flag was added originally to Nixpkgs in 68076b7d49
It is being removed entirely from upstream fish:
https://github.com/fish-shell/fish-shell/pull/5777.