From 7a0003aff5262172700c5a10c53d91fa4421eec4 Mon Sep 17 00:00:00 2001 From: Benedikt Peetz Date: Mon, 30 Sep 2024 19:32:31 +0200 Subject: fix(templates/latex/{academia,letter}): Share files and update to lpm v2.0 --- templates/latex/academia/flake.nix | 127 +------------------------------------ 1 file changed, 1 insertion(+), 126 deletions(-) mode change 100644 => 120000 templates/latex/academia/flake.nix (limited to 'templates/latex/academia/flake.nix') diff --git a/templates/latex/academia/flake.nix b/templates/latex/academia/flake.nix deleted file mode 100644 index 9a85d5d..0000000 --- a/templates/latex/academia/flake.nix +++ /dev/null @@ -1,126 +0,0 @@ -{ - description = "%INIT_DESCRIPTION"; - - inputs = { - nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable"; - - treefmt-nix = { - url = "github:numtide/treefmt-nix"; - inputs = { - nixpkgs.follows = "nixpkgs"; - }; - }; - flake_version_update = { - url = "git+https://codeberg.org/soispha/flake_version_update.git"; - inputs = { - systems.follows = "systems"; - nixpkgs.follows = "nixpkgs"; - flake-utils.follows = "flake-utils"; - }; - }; - lpm = { - url = "git+https://codeberg.org/bpeetz/lpm.git"; - inputs = { - nixpkgs.follows = "nixpkgs"; - flake-compat.follows = "flake-compat"; - flake-utils.follows = "flake-utils"; - rust-overlay.follows = "rust-overlay"; - crane.follows = "crane"; - systems.follows = "systems"; - }; - }; - - # inputs for following - systems = { - url = "github:nix-systems/x86_64-linux"; # only evaluate for this system - }; - flake-compat = { - url = "github:edolstra/flake-compat"; - flake = false; - }; - flake-utils = { - url = "github:numtide/flake-utils"; - inputs = { - systems.follows = "systems"; - }; - }; - crane = { - url = "github:ipetkov/crane"; - inputs = { - nixpkgs.follows = "nixpkgs"; - }; - }; - rust-overlay = { - url = "github:oxalica/rust-overlay"; - inputs = { - nixpkgs.follows = "nixpkgs"; - flake-utils.follows = "flake-utils"; - }; - }; - }; - - outputs = { - self, - nixpkgs, - flake-utils, - treefmt-nix, - lpm, - flake_version_update, - ... - }: - flake-utils.lib.eachDefaultSystem (system: let - pkgs = nixpkgs.legacyPackages.${system}; - - # This version is set automatically on `cog bump --auto`; - version = "v%INIT_APPLICATION_VERSION"; # GUIDING VERSION STRING - - # TODO reduce to the needed ones - texlive = pkgs.texlive.combined.scheme-full; - - treefmtEval = import ./treefmt.nix {inherit treefmt-nix pkgs;}; - - build = pkgs.stdenv.mkDerivation { - pname = "%INIT_APPLICATION_NAME"; - inherit version; - src = ./.; - - buildInputs = [ - texlive - ]; - - # Run local - preferLocalBuild = true; - allowSubstitutes = false; - - buildPhase = '' - # TODO: I have no idea, why calling it with `./build.sh` does not work <2024-03-20> - bash ./build.sh - ''; - - installPhase = '' - install -D ./build/main.pdf "$out/%INIT_APPLICATION_NAME.pdf"; - ''; - }; - in { - packages.default = build; - - checks = { - inherit build; - formatting = treefmtEval.config.build.check self; - }; - - formatter = treefmtEval.config.build.wrapper; - - devShells.default = pkgs.mkShell { - packages = with pkgs; [ - cocogitto - reuse - flake_version_update.packages."${system}".default - lpm.packages."${system}".default - texlive - - zathura - ]; - }; - }); -} diff --git a/templates/latex/academia/flake.nix b/templates/latex/academia/flake.nix new file mode 120000 index 0000000..3c2e48b --- /dev/null +++ b/templates/latex/academia/flake.nix @@ -0,0 +1 @@ +../../../common/flakes/latex/flake.nix \ No newline at end of file -- cgit 1.4.1