2021-01-11 10:54:33 +03:00
|
|
|
{ lib, stdenv, fetchurl, libfaketime
|
2022-10-14 01:16:16 +03:00
|
|
|
, xorg
|
2020-02-10 02:57:53 +03:00
|
|
|
}:
|
2017-04-13 00:13:12 +03:00
|
|
|
|
2022-09-24 10:41:02 +03:00
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "envypn-font";
|
|
|
|
version = "1.7.1";
|
2017-04-13 00:13:12 +03:00
|
|
|
|
|
|
|
src = fetchurl {
|
2022-09-24 10:41:02 +03:00
|
|
|
url = "https://ywstd.fr/files/p/envypn-font/envypn-font-${version}.tar.gz";
|
2017-04-13 00:13:12 +03:00
|
|
|
sha256 = "bda67b6bc6d5d871a4d46565d4126729dfb8a0de9611dae6c68132a7b7db1270";
|
|
|
|
};
|
|
|
|
|
2022-10-14 01:16:16 +03:00
|
|
|
nativeBuildInputs = [ libfaketime xorg.fonttosfnt xorg.mkfontscale ];
|
2017-04-13 00:13:12 +03:00
|
|
|
|
|
|
|
unpackPhase = ''
|
|
|
|
tar -xzf $src --strip-components=1
|
|
|
|
'';
|
|
|
|
|
2020-02-10 02:57:53 +03:00
|
|
|
buildPhase = ''
|
2022-10-04 14:57:25 +03:00
|
|
|
runHook preBuild
|
|
|
|
|
2020-02-10 02:57:53 +03:00
|
|
|
# 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
|
2022-10-04 14:57:25 +03:00
|
|
|
|
|
|
|
runHook postBuild
|
2020-02-10 02:57:53 +03:00
|
|
|
'';
|
|
|
|
|
2017-04-13 00:13:12 +03:00
|
|
|
installPhase = ''
|
2022-10-04 14:57:25 +03:00
|
|
|
runHook preInstall
|
|
|
|
|
2020-08-21 15:18:18 +03:00
|
|
|
install -D -m 644 -t "$out/share/fonts/misc" *.otb *.pcf.gz
|
2020-02-10 02:57:53 +03:00
|
|
|
mkfontdir "$out/share/fonts/misc"
|
2022-10-04 14:57:25 +03:00
|
|
|
|
|
|
|
runHook postInstall
|
2017-04-13 00:13:12 +03:00
|
|
|
'';
|
|
|
|
|
2021-01-11 10:54:33 +03:00
|
|
|
meta = with lib; {
|
2017-04-13 00:13:12 +03:00
|
|
|
description = ''
|
|
|
|
Readable bitmap font inspired by Envy Code R
|
|
|
|
'';
|
|
|
|
homepage = "http://ywstd.fr/p/pj/#envypn";
|
|
|
|
license = licenses.miros;
|
2020-02-15 03:32:36 +03:00
|
|
|
platforms = platforms.all;
|
2022-10-04 14:57:40 +03:00
|
|
|
maintainers = with maintainers; [ erdnaxe ];
|
2017-04-13 00:13:12 +03:00
|
|
|
};
|
|
|
|
}
|