mirror of
https://codeberg.org/leana8959/.files.git
synced 2025-12-06 14:49:14 +00:00
ref(nix): formatted with nixfmt-rfc-style
This commit is contained in:
parent
36a2265325
commit
23404db605
40 changed files with 574 additions and 474 deletions
|
|
@ -2,35 +2,46 @@
|
|||
nerd-font-patcher,
|
||||
parallel,
|
||||
stdenvNoCC,
|
||||
}: {
|
||||
}:
|
||||
{
|
||||
font,
|
||||
extraArgs ? [],
|
||||
extraArgs ? [ ],
|
||||
useDefaultsArgs ? true,
|
||||
}:
|
||||
stdenvNoCC.mkDerivation {
|
||||
/*
|
||||
Credits:
|
||||
https://github.com/NixOS/nixpkgs/issues/44329#issuecomment-1231189572
|
||||
https://github.com/NixOS/nixpkgs/issues/44329#issuecomment-1544597422
|
||||
/* Credits:
|
||||
https://github.com/NixOS/nixpkgs/issues/44329#issuecomment-1231189572
|
||||
https://github.com/NixOS/nixpkgs/issues/44329#issuecomment-1544597422
|
||||
|
||||
long font names is not problematic:
|
||||
https://github.com/ryanoasis/nerd-fonts/issues/1018#issuecomment-1953555781
|
||||
long font names is not problematic:
|
||||
https://github.com/ryanoasis/nerd-fonts/issues/1018#issuecomment-1953555781
|
||||
*/
|
||||
name = "${font.name}-NerdFont";
|
||||
src = font;
|
||||
nativeBuildInputs = [nerd-font-patcher parallel];
|
||||
nativeBuildInputs = [
|
||||
nerd-font-patcher
|
||||
parallel
|
||||
];
|
||||
|
||||
buildPhase = let
|
||||
args = builtins.concatStringsSep " " extraArgs;
|
||||
defArgs =
|
||||
if useDefaultsArgs
|
||||
then builtins.concatStringsSep " " ["--careful" "--complete" "--quiet" "--no-progressbars"]
|
||||
else "";
|
||||
in ''
|
||||
mkdir -p nerd-font
|
||||
find \( -name \*.ttf -o -name \*.otf \) | parallel nerd-font-patcher {} \
|
||||
--outputdir nerd-font ${defArgs} ${args}
|
||||
'';
|
||||
buildPhase =
|
||||
let
|
||||
args = builtins.concatStringsSep " " extraArgs;
|
||||
defArgs =
|
||||
if useDefaultsArgs then
|
||||
builtins.concatStringsSep " " [
|
||||
"--careful"
|
||||
"--complete"
|
||||
"--quiet"
|
||||
"--no-progressbars"
|
||||
]
|
||||
else
|
||||
"";
|
||||
in
|
||||
''
|
||||
mkdir -p nerd-font
|
||||
find \( -name \*.ttf -o -name \*.otf \) | parallel nerd-font-patcher {} \
|
||||
--outputdir nerd-font ${defArgs} ${args}
|
||||
'';
|
||||
|
||||
installPhase = ''
|
||||
exists() { [ -e "$1" ]; }
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue