diff --git a/flake.nix b/flake.nix new file mode 100644 index 0000000..c871540 --- /dev/null +++ b/flake.nix @@ -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; + }; +}