Create flake.nix

This commit is contained in:
Gregory Bednov 2025-01-06 16:11:08 +03:00 committed by GitHub
commit e0c88c2e07
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

47
flake.nix Normal file
View file

@ -0,0 +1,47 @@
{
description = "GOST Type fonts flake";
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-24.11";
};
outputs = { self, nixpkgs, ... }:
let
pkgs = import nixpkgs { system = "x86_64-linux"; };
gostfont = pkgs.stdenvNoCC.mkDerivation rec {
pname = "gosttypefont";
version = "1.0.0";
src = fetchzip {
url = "http://kafpi.local/GOST Type.zip";
sha256 = "";
stripRoot = false;
};
dontPatch = true;
dontConfigure = true;
dontBuild = true;
doCheck = false;
dontFixup = true;
installPhase = ''
runHook preInstall
install -Dm644 -t $out/share/fonts/truetype/ *.ttf
install -Dm644 -t $out/share/fonts/truetype/ *.ttf
runHook postInstall
'';
meta = with lib; {
description = "Typeface made for engineers";
homepage = "https://ascon.ru/";
license = licenses.unfree;
maintainers = with maintainers; [ gregorybednov ];
platforms = platforms.all;
};
};
in {
packages.x86_64-linux.gostfont = gostfont;
defaultPackage.x86_64-linux = gostfont;
};
}