4a7f99d55d
Part of: https://github.com/NixOS/nixpkgs/issues/108938 meta = with stdenv.lib; is a widely used pattern. We want to slowly remove the `stdenv.lib` indirection and encourage people to use `lib` directly. Thus let’s start with the meta field. This used a rewriting script to mostly automatically replace all occurances of this pattern, and add the `lib` argument to the package header if it doesn’t exist yet. The script in its current form is available at https://cs.tvl.fyi/depot@2f807d7f141068d2d60676a89213eaa5353ca6e0/-/blob/users/Profpatsch/nixpkgs-rewriter/default.nix
41 lines
967 B
Nix
41 lines
967 B
Nix
{ lib, stdenv, fetchurl, libfaketime
|
|
, fonttosfnt, mkfontscale
|
|
}:
|
|
|
|
stdenv.mkDerivation {
|
|
name = "envypn-font-1.7.1";
|
|
|
|
src = fetchurl {
|
|
url = "https://ywstd.fr/files/p/envypn-font/envypn-font-1.7.1.tar.gz";
|
|
sha256 = "bda67b6bc6d5d871a4d46565d4126729dfb8a0de9611dae6c68132a7b7db1270";
|
|
};
|
|
|
|
nativeBuildInputs = [ libfaketime fonttosfnt mkfontscale ];
|
|
|
|
unpackPhase = ''
|
|
tar -xzf $src --strip-components=1
|
|
'';
|
|
|
|
buildPhase = ''
|
|
# convert pcf fonts to otb
|
|
for i in *e.pcf.gz; do
|
|
faketime -f "1970-01-01 00:00:01" \
|
|
fonttosfnt -v -o "$(basename "$i" .pcf.gz)".otb "$i"
|
|
done
|
|
'';
|
|
|
|
installPhase = ''
|
|
install -D -m 644 -t "$out/share/fonts/misc" *.otb *.pcf.gz
|
|
mkfontdir "$out/share/fonts/misc"
|
|
'';
|
|
|
|
meta = with lib; {
|
|
description = ''
|
|
Readable bitmap font inspired by Envy Code R
|
|
'';
|
|
homepage = "http://ywstd.fr/p/pj/#envypn";
|
|
license = licenses.miros;
|
|
platforms = platforms.all;
|
|
};
|
|
}
|