monocraft: 1.4 -> 2.4

This commit is contained in:
InternetUnexplorer 2023-03-03 16:18:20 -08:00
parent ac1f5b72a9
commit fa8ecdced8

View File

@ -1,15 +1,25 @@
{ stdenv, lib, fetchFromGitHub }:
{ stdenv, lib, fetchurl }:
stdenv.mkDerivation rec {
pname = "monocraft";
version = "1.4";
src = fetchFromGitHub {
owner = "IdreesInc";
repo = "Monocraft";
rev = "v${version}";
sha256 = "sha256-YF0uPCc+dajJtG6mh/JpoSr6GirAhif5L5sp6hFmKLE=";
let
version = "2.4";
relArtifact = name: hash: fetchurl {
inherit name hash;
url = "https://github.com/IdreesInc/Monocraft/releases/download/v${version}/${name}";
};
in
stdenv.mkDerivation {
pname = "monocraft";
inherit version;
srcs = [
(relArtifact "Monocraft.otf" "sha256-PA1W+gOUStGw7cDmtEbG+B6M+sAYr8cft+Ckxj5LciU=")
(relArtifact "Monocraft.ttf" "sha256-S4j5v2bTJbhujT3Bt8daNN1YGYYP8zVPf9XXjuR64+o=")
(relArtifact "Monocraft-no-ligatures.ttf" "sha256-MuHfoP+dsXe+ODN4vWFIj50jwOxYyIiS0dd1tzVxHts=")
(relArtifact "Monocraft-nerd-fonts-patched.ttf" "sha256-QxMp8UwcRjWySNHWoNeX2sX9teZ4+tCFj+DG41azsXw=")
];
sourceRoot = ".";
unpackCmd = ''cp "$curSrc" $(basename $curSrc)'';
dontConfigure = true;
dontBuild = true;
@ -17,6 +27,7 @@ stdenv.mkDerivation rec {
installPhase = ''
runHook preInstall
install -Dm644 -t $out/share/fonts/opentype *.otf
install -Dm644 -t $out/share/fonts/truetype *.ttf
runHook postInstall
'';