Files
clan-master-thesis/flake.nix
2026-02-11 14:17:07 +01:00

60 lines
1.3 KiB
Nix

{
description = "Master thesis - Decrypting the Overlay";
inputs = {
treefmt-nix.url = "github:qubasa/treefmt-nix";
flake-parts.url = "github:hercules-ci/flake-parts";
flake-parts.inputs.nixpkgs-lib.follows = "nixpkgs";
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
};
outputs =
inputs@{ flake-parts, ... }:
flake-parts.lib.mkFlake { inherit inputs; } {
imports = [ ./treefmt.nix ];
systems = [
"x86_64-linux"
"aarch64-linux"
];
perSystem =
{
pkgs,
...
}:
let
texlive = pkgs.texliveFull;
in
{
packages.default = pkgs.stdenvNoCC.mkDerivation {
pname = "master-thesis";
version = "0.1.0";
src = ./.;
nativeBuildInputs = [
texlive
pkgs.inkscape
];
buildPhase = ''
export HOME=$(mktemp -d)
latexmk -pdf -shell-escape -interaction=nonstopmode main.tex
'';
installPhase = ''
mkdir -p $out
cp main.pdf $out/
'';
};
devShells.default = pkgs.mkShell {
buildInputs = [
texlive
pkgs.inkscape
pkgs.python3
];
};
};
};
}