62 lines
1.6 KiB
Nix
62 lines
1.6 KiB
Nix
{
|
|
description = "A very basic flake";
|
|
|
|
inputs = {
|
|
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
|
|
flake-utils.url = "github:numtide/flake-utils";
|
|
};
|
|
|
|
outputs = { self, flake-utils, nixpkgs }: flake-utils.lib.eachDefaultSystem (system:
|
|
let
|
|
pkgs = nixpkgs.legacyPackages.${system};
|
|
in
|
|
rec {
|
|
packages.seminararbeit =
|
|
let
|
|
texlive = pkgs.texlive.combine {
|
|
inherit (pkgs.texlive) scheme-small
|
|
biber
|
|
biblatex
|
|
csquotes
|
|
datetime2
|
|
datetime2-german
|
|
geschichtsfrkl
|
|
latexmk
|
|
lipsum
|
|
setspace
|
|
todonotes
|
|
tracklang;
|
|
};
|
|
in
|
|
pkgs.stdenv.mkDerivation {
|
|
name = "seminararbeit.pdf";
|
|
|
|
nativeBuildInputs = [
|
|
texlive
|
|
];
|
|
|
|
src = self;
|
|
|
|
# We only build a PDF
|
|
dontFixup = true;
|
|
|
|
installPhase = "cp $name $out";
|
|
};
|
|
|
|
defaultPackage = packages.seminararbeit;
|
|
|
|
# My hydra only has x86_64-linux builders
|
|
hydraJobs =
|
|
if pkgs.lib.elem system [ "x86_64-linux" ]
|
|
then {
|
|
build = packages.seminararbeit;
|
|
hydra-product = pkgs.runCommandNoCC "seminararbeit-hydra" { } ''
|
|
install -D ${packages.seminararbeit} $out/seminararbeit.pdf
|
|
mkdir -p $out/nix-support
|
|
echo "doc-pdf seminararbeit $out/seminararbeit.pdf" >> $out/nix-support/hydra-build-products
|
|
'';
|
|
}
|
|
else { };
|
|
});
|
|
}
|