introduce a name variable
This commit is contained in:
parent
6a98c96f7a
commit
8626e1e2f1
@ -25,10 +25,12 @@ let
|
||||
# Function to generate a list of srcs that look like
|
||||
# [
|
||||
# (fetchurl {
|
||||
# name = "namezzxs"
|
||||
# url = "";
|
||||
# sha256 = "sha256-abc123...";
|
||||
# })
|
||||
# (fetchurl {
|
||||
# name = "namezzxy"
|
||||
# url = "";
|
||||
# sha256 = "sha256-def456...";
|
||||
# })
|
||||
@ -37,6 +39,7 @@ let
|
||||
builtins.map (variant:
|
||||
let sha = fontAttrs.${variant};
|
||||
in fetchzip {
|
||||
name = "${fontName}-${variant}";
|
||||
url = "https://smc.org.in/downloads/fonts/${fontName}/${variant}.zip";
|
||||
sha256 = sha;
|
||||
stripRoot = false;
|
||||
@ -51,14 +54,14 @@ in stdenv.mkDerivation (finalAttrs: {
|
||||
inherit version;
|
||||
inherit srcs;
|
||||
pname = "smc-fonts";
|
||||
# sourceRoot = ".";
|
||||
sourceRoot = ".";
|
||||
buildPhase = ''
|
||||
echo "selected fonts are ${toString selectedFonts}"
|
||||
ls *.otf *.ttf
|
||||
'';
|
||||
installPhase = ''
|
||||
find -name \*.otf -exec mkdir -p $out/share/fonts/opentype/ \; -exec mv {} $out/share/fonts/opentype/ \;
|
||||
find -name \*.ttf -exec mkdir -p $out/share/fonts/truetype/ \; -exec mv {} $out/share/fonts/truetype/ \;
|
||||
find -name \*.otf -exec mkdir -p $out/share/fonts/opentype/SMCFonts \; -exec mv {} $out/share/fonts/opentype/SMCFonts \;
|
||||
find -name \*.ttf -exec mkdir -p $out/share/fonts/truetype/SMCFonts \; -exec mv {} $out/share/fonts/truetype/SMCFonts \;
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
|
Loading…
Reference in New Issue
Block a user