vendor ibm-plex
i don't like how we're doing this lol. setting the IBM_PLEX_WEB env var feels wrong.
This commit is contained in:
8
vendor/default.nix
vendored
Normal file
8
vendor/default.nix
vendored
Normal file
@@ -0,0 +1,8 @@
|
||||
{ fetchzip
|
||||
, fetchurl
|
||||
, callPackage
|
||||
}:
|
||||
|
||||
{
|
||||
ibm-plex-web = callPackage ./ibm-plex-web.nix {};
|
||||
}
|
||||
21
vendor/ibm-plex-web.nix
vendored
Normal file
21
vendor/ibm-plex-web.nix
vendored
Normal file
@@ -0,0 +1,21 @@
|
||||
# Differs from the Nixpkgs distribution in that we distribute WOFFs
|
||||
# and CSS rather than just OTF.
|
||||
{ ibm-plex
|
||||
, families ? []
|
||||
}@args:
|
||||
|
||||
(ibm-plex.overrideAttrs (_prev: {
|
||||
installPhase = ''
|
||||
runHook preInstall
|
||||
for i in $srcs; do
|
||||
# cp $i/css/*.css $out/css
|
||||
for j in css fonts/{complete,split}/{woff,woff2}; do
|
||||
if [ -d $i/$j ]; then
|
||||
find $i/$j -type f -regex '.*\.\(woff2?\|css\)' \
|
||||
-exec install -Dm644 -t $out/share/ibm-plex-web/$j {} \;
|
||||
fi
|
||||
done
|
||||
done
|
||||
runHook postInstall
|
||||
'';
|
||||
})).override { inherit families; }
|
||||
Reference in New Issue
Block a user