nix: add flake
This commit is contained in:
parent
4dc58ae8ed
commit
e2bfc2c247
2 changed files with 94 additions and 0 deletions
52
flake.nix
Normal file
52
flake.nix
Normal file
|
|
@ -0,0 +1,52 @@
|
|||
{
|
||||
description = "Ambroisie's CV";
|
||||
|
||||
inputs = {
|
||||
nixpkgs.url = "github:NixOS/nixpkgs";
|
||||
futils.url = "github:numtide/flake-utils";
|
||||
};
|
||||
|
||||
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)
|
||||
scheme-small
|
||||
# Extra packages needed
|
||||
changepage
|
||||
enumitem
|
||||
placeins
|
||||
;
|
||||
})
|
||||
];
|
||||
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/
|
||||
'';
|
||||
};
|
||||
}
|
||||
);
|
||||
}
|
||||
Reference in a new issue