nixpkgs/pkgs/by-name/vc/vcs/fonts.patch
aleksana 571c71e6f7 treewide: migrate packages to pkgs/by-name, take 1
We are migrating packages that meet below requirements:

1. using `callPackage`
2. called path is a directory
3. overriding set is empty (`{ }`)
4. not containing path expressions other than relative path (to
makenixpkgs-vet happy)
5. not referenced by nix files outside of the directory, other
than`pkgs/top-level/all-packages.nix`
6. not referencing nix files outside of the directory
7. not referencing `default.nix` (since it's changed to `package.nix`)
8. `outPath` doesn't change after migration

The tool is here: https://github.com/Aleksanaa/by-name-migrate.
2024-11-09 20:04:51 +08:00

24 lines
1021 B
Diff

--- a/vcs 2020-04-04 14:37:53.531095977 -0700
+++ b/vcs 2020-04-04 14:40:46.459407878 -0700
@@ -3669,18 +3669,8 @@
[[ ( -z $USR_FONT_TITLE ) && ( $FONT_TITLE != 'DejaVu-Sans-Book' ) ]] && return
[[ ( -z $USR_FONT_TSTAMPS ) && ( $FONT_TSTAMPS != 'DejaVu-Sans-Book' ) ]] && return
[[ ( -z $USR_FONT_SIGN ) && ( $FONT_SIGN != 'DejaVu-Sans-Book' ) ]] && return
- # Try to locate DejaVu Sans
- local dvs=''
- if [[ -d /usr/local/share/fonts ]]; then
- dvs=$(find /usr/local/share/fonts/ -type f -iname 'dejavusans.ttf')
- fi
- if [[ ( -z $dvs ) && ( -d /usr/share/fonts ) ]]; then
- dvs=$(find /usr/share/fonts/ -type f -iname 'dejavusans.ttf')
- fi
- if [[ -z $dvs ]]; then
- warn "Unable to locate DejaVu Sans font. Falling back to helvetica."
- dvs=helvetica
- fi
+ # Use DejaVu Sans, by default
+ local dvs='@dejavu_fonts@/share/fonts/truetype/DejaVuSans.ttf'
[[ -z $USR_FONT_HEADING ]] && FONT_HEADING="$dvs"
[[ -z $USR_FONT_TITLE ]] && FONT_TITLE="$dvs"
[[ -z $USR_FONT_TSTAMPS ]] && FONT_TSTAMPS="$dvs"