report/flake.nix

64 lines
1.3 KiB
Nix
Raw Normal View History

2021-04-23 14:47:26 +02:00
{
description = "Ambroisie's CV";
inputs = {
2021-07-20 20:23:54 +02:00
futils = {
type = "github";
owner = "numtide";
repo = "flake-utils";
ref = "master";
};
nixpkgs = {
type = "github";
owner = "NixOS";
repo = "nixpkgs";
ref = "nixpkgs-unstable";
};
2021-04-23 14:47:26 +02:00
};
outputs = { self, nixpkgs, futils } @ inputs:
futils.lib.eachSystem futils.lib.allSystems (system:
let
inherit (nixpkgs) lib;
pkgs = nixpkgs.legacyPackages.${system};
buildInputs = with pkgs; [
gnumake
pandoc
(texlive.combine {
inherit (texlive)
2021-07-20 20:28:35 +02:00
scheme-small
# Extra packages needed
changepage
enumitem
placeins
;
2021-04-23 14:47:26 +02:00
})
];
in
{
devShell = pkgs.mkShell {
name = "report";
inherit buildInputs;
};
defaultPackage = pkgs.stdenvNoCC.mkDerivation {
pname = "report";
version = self.rev or "dirty";
src = ./.;
inherit buildInputs;
buildPhase = ''
make
'';
installPhase = ''
mkdir -p $out
cp report.pdf $out/
'';
};
}
);
}