nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
at python-updates 61 lines 1.4 kB view raw
1{ 2 lib, 3 stdenv, 4 fetchFromGitHub, 5 fetchpatch, 6 python3, 7}: 8 9stdenv.mkDerivation { 10 pname = "monoid"; 11 version = "2020-10-26"; 12 13 src = fetchFromGitHub { 14 owner = "larsenwork"; 15 repo = "monoid"; 16 rev = "0673c8d6728df093faee9f183b6dfa62939df8c0"; 17 sha256 = "sha256-u2jwVOC9QM2JHsdAVBuEpqqdiBAVs+IWnpp48A5Xk28="; 18 }; 19 20 nativeBuildInputs = [ 21 (python3.withPackages ( 22 pp: with pp; [ 23 fontforge 24 ] 25 )) 26 ]; 27 28 patches = [ 29 # port to python 3 30 (fetchpatch { 31 url = "https://salsa.debian.org/fonts-team/fonts-monoid/-/raw/master/debian/patches/0002-fontbuilder.py-Fix-FTBFS-with-non-int-bearing-value.patch"; 32 hash = "sha256-IG3KXvOFZfi8dhVuKDYo0onl6ruEe24aFHBgSoMKf9c="; 33 }) 34 ]; 35 36 buildPhase = '' 37 local _d="" 38 local _l="" 39 for _d in {Monoisome,Source}/*.sfdir; do 40 _l="''${_d##*/}.log" 41 echo "Building $_d (log at $_l)" 42 python Scripts/build.py 1 0 $_d > $_l 43 done 44 ''; 45 46 installPhase = '' 47 install -m444 -Dt $out/share/fonts/truetype _release/* 48 install -m444 -Dt $out/share/doc Readme.md 49 ''; 50 51 meta = { 52 homepage = "http://larsenwork.com/monoid"; 53 description = "Customisable coding font with alternates, ligatures and contextual positioning"; 54 license = [ 55 lib.licenses.ofl 56 lib.licenses.mit 57 ]; 58 platforms = lib.platforms.all; 59 maintainers = [ lib.maintainers.romildo ]; 60 }; 61}