Change how overlay is used and remove devshell from template
This commit is contained in:
parent
095a81b8c1
commit
62e5b34e5d
6 changed files with 92 additions and 133 deletions
29
flake.nix
29
flake.nix
|
@ -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";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue