From 6f4f0af8b0ea5a6d7b0d6c21c1e9526db8558584 Mon Sep 17 00:00:00 2001 From: Qubasa Date: Wed, 11 Feb 2026 14:17:07 +0100 Subject: [PATCH] make this nix buildable --- flake.nix | 36 ++++++++++++++++++++++++++++++------ 1 file changed, 30 insertions(+), 6 deletions(-) diff --git a/flake.nix b/flake.nix index 4eeb13f..5865db2 100644 --- a/flake.nix +++ b/flake.nix @@ -1,13 +1,11 @@ { - description = "Your jupyenv project"; + description = "Master thesis - Decrypting the Overlay"; inputs = { - #treefmt-nix.url = "github:Qubasa/treefmt-nix"; 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 = @@ -23,11 +21,37 @@ 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 = with pkgs; [ - python3 + buildInputs = [ + texlive + pkgs.inkscape + pkgs.python3 ]; }; };