nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
at netboot-syslinux-multiplatform 41 lines 1.3 kB view raw
1{ stdenv, lib, fetchurl }: 2 3let 4 version = "2.4"; 5 relArtifact = name: hash: fetchurl { 6 inherit name hash; 7 url = "https://github.com/IdreesInc/Monocraft/releases/download/v${version}/${name}"; 8 }; 9in 10stdenv.mkDerivation { 11 pname = "monocraft"; 12 inherit version; 13 14 srcs = [ 15 (relArtifact "Monocraft.otf" "sha256-PA1W+gOUStGw7cDmtEbG+B6M+sAYr8cft+Ckxj5LciU=") 16 (relArtifact "Monocraft.ttf" "sha256-S4j5v2bTJbhujT3Bt8daNN1YGYYP8zVPf9XXjuR64+o=") 17 (relArtifact "Monocraft-no-ligatures.ttf" "sha256-MuHfoP+dsXe+ODN4vWFIj50jwOxYyIiS0dd1tzVxHts=") 18 (relArtifact "Monocraft-nerd-fonts-patched.ttf" "sha256-QxMp8UwcRjWySNHWoNeX2sX9teZ4+tCFj+DG41azsXw=") 19 ]; 20 21 sourceRoot = "."; 22 unpackCmd = ''cp "$curSrc" $(basename $curSrc)''; 23 24 dontConfigure = true; 25 dontBuild = true; 26 27 installPhase = '' 28 runHook preInstall 29 install -Dm644 -t $out/share/fonts/opentype *.otf 30 install -Dm644 -t $out/share/fonts/truetype *.ttf 31 runHook postInstall 32 ''; 33 34 meta = with lib; { 35 description = "A programming font based on the typeface used in Minecraft"; 36 homepage = "https://github.com/IdreesInc/Monocraft"; 37 license = licenses.ofl; 38 platforms = platforms.all; 39 maintainers = with maintainers; [ zhaofengli ]; 40 }; 41}