Remove use of builderDefsPackage in font packages.
With this change they now use `stdenv.mkDerivation` instead. Also some minor cleanups such as URL fixes, adding version numbers, adding descriptions, etc.
This commit is contained in:
@@ -1,51 +1,26 @@
|
||||
x@{builderDefsPackage
|
||||
, fontforge
|
||||
, ...}:
|
||||
builderDefsPackage
|
||||
(a :
|
||||
let
|
||||
helperArgNames = ["stdenv" "fetchurl" "builderDefsPackage"] ++
|
||||
[];
|
||||
{ stdenv, fetchurl }:
|
||||
|
||||
buildInputs = map (n: builtins.getAttr n x)
|
||||
(builtins.attrNames (builtins.removeAttrs x helperArgNames));
|
||||
sourceInfo = rec {
|
||||
name="inconsolata";
|
||||
url="http://www.levien.com/type/myfonts/Inconsolata.sfd";
|
||||
hash="1cd29c8396adb18bfeddb1abf5bdb98b677649bb9b09f126d1335b123a4cfddb";
|
||||
};
|
||||
in
|
||||
rec {
|
||||
src = a.fetchurl {
|
||||
url = sourceInfo.url;
|
||||
sha256 = sourceInfo.hash;
|
||||
stdenv.mkDerivation rec {
|
||||
name = "inconsolata-${version}";
|
||||
version = "1.010";
|
||||
|
||||
src = fetchurl {
|
||||
url = "http://www.levien.com/type/myfonts/Inconsolata.otf";
|
||||
sha256 = "06js6znbcf7swn8y3b8ki416bz96ay7d3yvddqnvi88lqhbfcq8m";
|
||||
};
|
||||
|
||||
inherit (sourceInfo) name;
|
||||
inherit buildInputs;
|
||||
phases = [ "installPhase" ];
|
||||
|
||||
/* doConfigure should be removed if not needed */
|
||||
phaseNames = ["copySrc" "generateFontsFromSFD" "installFonts"];
|
||||
|
||||
copySrc = a.fullDepEntry (''
|
||||
cp ${src} inconsolata.sfd
|
||||
'') ["minInit"];
|
||||
installPhase = ''
|
||||
mkdir -p $out/share/fonts/opentype
|
||||
cp -v $src $out/share/fonts/opentype/inconsolata.otf
|
||||
'';
|
||||
|
||||
generateFontsFromSFD = a.generateFontsFromSFD // {deps=["addInputs"];};
|
||||
|
||||
meta = {
|
||||
meta = with stdenv.lib; {
|
||||
homepage = http://www.levien.com/type/myfonts/inconsolata.html;
|
||||
description = "A monospace font for both screen and print";
|
||||
maintainers = with a.lib.maintainers;
|
||||
[
|
||||
raskin
|
||||
];
|
||||
platforms = with a.lib.platforms;
|
||||
all;
|
||||
maintainers = with maintainers; [ raskin rycee ];
|
||||
license = licenses.ofl;
|
||||
platforms = platforms.all;
|
||||
};
|
||||
passthru = {
|
||||
updateInfo = {
|
||||
downloadPage = "http://www.levien.com/type/myfonts/inconsolata.html";
|
||||
};
|
||||
};
|
||||
}) x
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user