2021-01-11 08:54:33 +01:00
|
|
|
{ lib, stdenv, fetchFromGitHub, fetchpatch, python3 }:
|
2017-06-28 13:42:37 +02:00
|
|
|
|
2019-08-13 23:52:01 +02:00
|
|
|
stdenv.mkDerivation {
|
2019-08-15 14:41:18 +02:00
|
|
|
pname = "monoid";
|
2020-10-04 15:45:52 +02:00
|
|
|
version = "2018-06-03";
|
2017-06-28 13:42:37 +02:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "larsenwork";
|
|
|
|
repo = "monoid";
|
2020-10-04 15:45:52 +02:00
|
|
|
rev = "a331c7c5f402c449f623e0d0895bd2fd8dc30ccf";
|
|
|
|
sha256 = "sha256-RV6lxv5CjywTMcuPMj6rdjLKrap7zLJ7niaNeF//U1Y=";
|
2017-06-28 13:42:37 +02:00
|
|
|
};
|
|
|
|
|
2020-10-04 15:45:52 +02:00
|
|
|
patches = [
|
|
|
|
(fetchpatch {
|
|
|
|
url = "https://github.com/larsenwork/monoid/pull/233/commits/f84f2ed61301ee84dadd16351314394f22ebed2f.patch";
|
|
|
|
sha256 = "sha256-CxfFHlR7TB64pvrfzVfUDkPwuRO2UdGOhXwW98c+oQU=";
|
|
|
|
})
|
|
|
|
];
|
|
|
|
|
2019-12-25 20:32:05 +01:00
|
|
|
nativeBuildInputs = [
|
2020-10-04 15:45:52 +02:00
|
|
|
(python3.withPackages (pp: with pp; [
|
2019-12-25 20:32:05 +01:00
|
|
|
fontforge
|
|
|
|
]))
|
|
|
|
];
|
2017-06-28 13:42:37 +02:00
|
|
|
|
|
|
|
buildPhase = ''
|
|
|
|
local _d=""
|
|
|
|
local _l=""
|
|
|
|
for _d in {Monoisome,Source}/*.sfdir; do
|
|
|
|
_l="''${_d##*/}.log"
|
|
|
|
echo "Building $_d (log at $_l)"
|
2017-09-24 00:04:52 +02:00
|
|
|
python Scripts/build.py 1 0 $_d > $_l
|
2017-06-28 13:42:37 +02:00
|
|
|
done
|
|
|
|
'';
|
|
|
|
|
|
|
|
installPhase = ''
|
2019-05-13 05:54:44 +02:00
|
|
|
install -m444 -Dt $out/share/fonts/truetype _release/*
|
|
|
|
install -m444 -Dt $out/share/doc Readme.md
|
2017-06-28 13:42:37 +02:00
|
|
|
'';
|
|
|
|
|
2021-01-11 08:54:33 +01:00
|
|
|
meta = with lib; {
|
2020-04-01 03:11:51 +02:00
|
|
|
homepage = "http://larsenwork.com/monoid";
|
2017-06-28 13:42:37 +02:00
|
|
|
description = "Customisable coding font with alternates, ligatures and contextual positioning";
|
|
|
|
license = [ licenses.ofl licenses.mit ];
|
|
|
|
platforms = platforms.all;
|
|
|
|
maintainers = [ maintainers.romildo ];
|
|
|
|
};
|
|
|
|
}
|