Change how overlay is used and remove devshell from template

This commit is contained in:
Tim Schubert 2023-12-03 10:28:34 +01:00
parent 095a81b8c1
commit 62e5b34e5d
Signed by: dadada
SSH key fingerprint: SHA256:bFAjFH3hR8zRBaJjzQDjc3o4jqoq5EZ87l+KXEjxIz0
6 changed files with 92 additions and 133 deletions

View file

@ -1,5 +1,5 @@
{
description = "tubslatex";
description = "tubslatex-nix";
inputs.flake-utils.url = "github:numtide/flake-utils";
@ -7,23 +7,30 @@
flake-utils.lib.eachDefaultSystem
(system:
let
pkgs = import nixpkgs {
inherit system;
overlays = [ self.overlays.default ];
};
pkgs = import nixpkgs { inherit system; };
in
{
packages = rec {
default = tubslatex;
tubslatex = pkgs.tubslatex;
tubslatex = pkgs.callPackage ./tubslatex.nix { };
};
checks = {
format = pkgs.runCommand "format" { buildInputs = [ pkgs.nixpkgs-fmt ]; } "nixpkgs-fmt --check ${./.} && touch $out";
testOverlay = pkgs.mkShell {
buildInputs = [ pkgs.texliveWithTubslatex ];
shellHook = ''Shell created'';
};
testOverlay =
let
pkgs = import nixpkgs {
inherit system;
config.allowUnfreePredicate = pkg: builtins.elem (pkgs.lib.getName pkg) [
"tubslatex"
];
overlays = [ self.overlays.default ];
};
in
pkgs.mkShell {
buildInputs = [ pkgs.texliveWithTubslatex ];
shellHook = ''Shell created'';
};
};
formatter = pkgs.nixpkgs-fmt;
@ -54,7 +61,7 @@
default = thesis;
thesis = {
path = ./template;
description = "Thesis template";
description = "tubslatex-nix thesis template";
};
};
};