make this nix buildable
This commit is contained in:
36
flake.nix
36
flake.nix
@@ -1,13 +1,11 @@
|
|||||||
{
|
{
|
||||||
description = "Your jupyenv project";
|
description = "Master thesis - Decrypting the Overlay";
|
||||||
|
|
||||||
inputs = {
|
inputs = {
|
||||||
#treefmt-nix.url = "github:Qubasa/treefmt-nix";
|
|
||||||
treefmt-nix.url = "github:qubasa/treefmt-nix";
|
treefmt-nix.url = "github:qubasa/treefmt-nix";
|
||||||
flake-parts.url = "github:hercules-ci/flake-parts";
|
flake-parts.url = "github:hercules-ci/flake-parts";
|
||||||
flake-parts.inputs.nixpkgs-lib.follows = "nixpkgs";
|
flake-parts.inputs.nixpkgs-lib.follows = "nixpkgs";
|
||||||
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
|
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
outputs =
|
outputs =
|
||||||
@@ -23,11 +21,37 @@
|
|||||||
pkgs,
|
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 {
|
devShells.default = pkgs.mkShell {
|
||||||
buildInputs = with pkgs; [
|
buildInputs = [
|
||||||
python3
|
texlive
|
||||||
|
pkgs.inkscape
|
||||||
|
pkgs.python3
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user