initial commit

This commit is contained in:
Tim Schubert 2022-11-01 13:50:29 +01:00
commit f1b9082f4e
Signed by: dadada
GPG key ID: EEB8D1CE62C4DFEA
15 changed files with 498 additions and 0 deletions

53
flake.nix Normal file
View file

@ -0,0 +1,53 @@
{
description = "tubslatex";
inputs.flake-utils.url = "github:numtide/flake-utils";
outputs = { self, flake-utils, nixpkgs }@inputs:
flake-utils.lib.eachDefaultSystem
(system:
let
pkgs = import nixpkgs {
inherit system;
overlays = [ self.overlays.default ];
};
in
{
packages = rec {
default = tubslatex;
tubslatex = pkgs.tubslatex;
};
checks = {
format = pkgs.runCommand "format" { buildInputs = [ pkgs.nixpkgs-fmt ]; } "nixpkgs-fmt --check ${./.} && touch $out";
testOverlay = pkgs.mkShell {
buildInputs = [ pkgs.texliveWithTubslatex ];
shellHook = ''Shell created'';
};
};
formatter = pkgs.nixpkgs-fmt;
}) // {
overlays.default = final: prev: {
tubslatex = prev.callPackage ./tubslatex.nix { };
texliveWithTubslatex =
let
postCombineOverride = oldAttrs: {
postBuild = oldAttrs.postBuild + ''
updmap --sys --enable Map=NexusProSerif.map --enable Map=NexusProSans.map
updmap --sys
'';
};
tubslatexAttrs = { pkgs = [ final.tubslatex ]; };
combined = prev.texlive.combine {
inherit (prev.texlive) scheme-full;
inherit tubslatexAttrs;
};
in
combined.overrideAttrs postCombineOverride;
};
};
}