-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #17 from phip1611/nix-modernize
nix: modernize + shell.nix + documentation improvements
- Loading branch information
Showing
9 changed files
with
159 additions
and
123 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,7 +9,9 @@ jobs: | |
steps: | ||
- uses: actions/[email protected] | ||
- uses: cachix/install-nix-action@v17 | ||
- run: nix-build ./nix/release.nix -A latex-template | ||
- run: nix-build | ||
# -s: test if this is a file and if it has a size. | ||
- run: test -s result/diplom.pdf | ||
|
||
# uses latexmk | ||
regular_build: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
(import ./nix/release.nix {}).pdf |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,39 +1,24 @@ | ||
{ stdenvNoCC, gitignoreSource, texlive }: | ||
{ stdenvNoCC, gitignoreSource, tex, gnumake }: | ||
|
||
let | ||
tex = texlive.combine { | ||
inherit (texlive) scheme-small | ||
biber | ||
biblatex | ||
csquotes | ||
hyphenat | ||
lastpage | ||
latexmk | ||
siunitx | ||
todonotes | ||
xpatch; | ||
}; | ||
in stdenvNoCC.mkDerivation { | ||
stdenvNoCC.mkDerivation { | ||
pname = "latex-template"; | ||
version = "1.0.0"; | ||
|
||
src = gitignoreSource ../.; | ||
|
||
nativeBuildInputs = [ | ||
gnumake | ||
tex | ||
]; | ||
|
||
doConfigure = false; | ||
|
||
# Avoid luatex failing due to non-writable cache. | ||
TEXMFVAR = "/tmp/texlive/"; | ||
|
||
buildPhase = '' | ||
make | ||
''; | ||
TEXTMFHOME = "/tmp/texlive/"; | ||
|
||
installPhase = '' | ||
mkdir -p $out/share/latex-template | ||
install -m 0644 diplom.pdf $out/share/latex-template/ | ||
mkdir -p $out | ||
install -m 0644 diplom.pdf $out/ | ||
''; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,13 @@ | ||
{ sources ? import ./sources.nix | ||
, pkgs ? import sources.nixpkgs { } | ||
}: | ||
let | ||
sources = import ./sources.nix; | ||
pkgs = import sources.nixpkgs {}; | ||
|
||
tex = import ./tex-toolchain.nix { inherit pkgs; }; | ||
inherit (import sources."gitignore.nix" { inherit (pkgs) lib; }) gitignoreSource; | ||
in | ||
{ | ||
latex-template = pkgs.callPackage ./build.nix { | ||
pdf = pkgs.callPackage ./build.nix { | ||
inherit gitignoreSource; | ||
inherit tex; | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.