build with nix
Signed-off-by: Christine Dodrill <me@christine.website>
This commit is contained in:
parent
f3a7a87064
commit
77aecbed96
35
default.nix
Normal file
35
default.nix
Normal file
@ -0,0 +1,35 @@
|
||||
{ pkgs ? import <nixpkgs> { } }:
|
||||
|
||||
let
|
||||
nur = import (builtins.fetchTarball
|
||||
"https://github.com/nix-community/NUR/archive/master.tar.gz") {
|
||||
inherit pkgs;
|
||||
};
|
||||
tex = pkgs.callPackage ./nix/texlive.nix { };
|
||||
version = "devel";
|
||||
in pkgs.stdenv.mkDerivation {
|
||||
pname = "tulpanomicon";
|
||||
inherit version;
|
||||
src = ./.;
|
||||
phases = "buildPhase installPhase";
|
||||
buildInputs = with pkgs; [
|
||||
calibre
|
||||
mdbook
|
||||
nur.repos.mic92.pandoc-bin
|
||||
tex
|
||||
];
|
||||
|
||||
buildPhase = ''
|
||||
cp -rf $src/src .
|
||||
chmod a+w ./src
|
||||
cp -rf $src/book.toml .
|
||||
mkdir book
|
||||
mdbook build
|
||||
cd ./src && ./build.sh && cd ..
|
||||
'';
|
||||
|
||||
installPhase = ''
|
||||
mkdir -p $out
|
||||
cp -vrf book/* $out
|
||||
'';
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user