nerd-font-patcher: update patches for 3.4.0 (#410263)

authored by Christian Kögler and committed by GitHub cfc7fc55 92970f6d

+25 -7
+3 -7
pkgs/by-name/ne/nerd-font-patcher/package.nix
··· 18 19 format = "other"; 20 21 - postPatch = '' 22 - sed -i font-patcher \ 23 - -e 's,__dir__ + "/src,"'$out'/share/,' 24 - sed -i font-patcher \ 25 - -e 's,/bin/scripts/name_parser,/../lib/name_parser,' 26 - ''; 27 - # Note: we cannot use $out for second substitution 28 29 dontBuild = true; 30
··· 18 19 format = "other"; 20 21 + patches = [ 22 + ./use-nix-paths.patch 23 + ]; 24 25 dontBuild = true; 26
+22
pkgs/by-name/ne/nerd-font-patcher/use-nix-paths.patch
···
··· 1 + diff --git a/font-patcher b/font-patcher 2 + index c48039f2c..e776adfbc 100755 3 + --- a/font-patcher 4 + +++ b/font-patcher 5 + @@ -38,7 +38,7 @@ except ImportError: 6 + ) 7 + ) 8 + 9 + -sys.path.insert(0, os.path.join(os.path.abspath(os.path.dirname(sys.argv[0])), 'bin', 'scripts', 'name_parser')) 10 + +sys.path.insert(0, os.path.join(os.path.abspath(os.path.dirname(sys.argv[0])), '..', 'lib', 'name_parser')) 11 + try: 12 + from FontnameParser import FontnameParser 13 + from FontnameTools import FontnameTools 14 + @@ -2075,7 +2075,7 @@ def setup_arguments(): 15 + expert_group.add_argument('--configfile', dest='configfile', default=False, type=str, help='Specify a file path for configuration file (see sample: src/config.sample.cfg)') 16 + expert_group.add_argument('--custom', dest='custom', default=False, type=str, help='Specify a custom symbol font, all glyphs will be copied; absolute path suggested') 17 + expert_group.add_argument('--dry', dest='dry_run', default=False, action='store_true', help='Do neither patch nor store the font, to check naming') 18 + - expert_group.add_argument('--glyphdir', dest='glyphdir', default=__dir__ + "/src/glyphs/", type=str, help='Path to glyphs to be used for patching') 19 + + expert_group.add_argument('--glyphdir', dest='glyphdir', default=__dir__ + "/../share/glyphs/", type=str, help='Path to glyphs to be used for patching') 20 + expert_group.add_argument('--has-no-italic', dest='noitalic', default=False, action='store_true', help='Font family does not have Italic (but Oblique), to help create correct RIBBI set') 21 + expert_group.add_argument('--metrics', dest='metrics', default=None, choices=get_metrics_names(), help='Select vertical metrics source (for problematic cases)') 22 + expert_group.add_argument('--name', dest='force_name', default=None, type=str, help='Specify naming source (\'full\', \'postscript\', \'filename\', or concrete free name-string)')