Compare commits
2 commits
f663253642
...
083f985888
Author | SHA1 | Date | |
---|---|---|---|
Bruno BELANYI | 083f985888 | ||
Bruno BELANYI | ea663ea04a |
7
.envrc
Normal file
7
.envrc
Normal file
|
@ -0,0 +1,7 @@
|
|||
use_flake() {
|
||||
watch_file flake.nix
|
||||
watch_file flake.lock
|
||||
eval "$(nix print-dev-env)"
|
||||
}
|
||||
|
||||
use flake
|
42
flake.lock
Normal file
42
flake.lock
Normal file
|
@ -0,0 +1,42 @@
|
|||
{
|
||||
"nodes": {
|
||||
"futils": {
|
||||
"locked": {
|
||||
"lastModified": 1610051610,
|
||||
"narHash": "sha256-U9rPz/usA1/Aohhk7Cmc2gBrEEKRzcW4nwPWMPwja4Y=",
|
||||
"owner": "numtide",
|
||||
"repo": "flake-utils",
|
||||
"rev": "3982c9903e93927c2164caa727cd3f6a0e6d14cc",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "numtide",
|
||||
"repo": "flake-utils",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1614256104,
|
||||
"narHash": "sha256-V92DxPnYqlAr5+eYYhkfdwy6aDVxU8ipVrd1ykWdrE0=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "772406c2a4e22a85620854056a4cd02856fa10f0",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"type": "github"
|
||||
}
|
||||
},
|
||||
"root": {
|
||||
"inputs": {
|
||||
"futils": "futils",
|
||||
"nixpkgs": "nixpkgs"
|
||||
}
|
||||
}
|
||||
},
|
||||
"root": "root",
|
||||
"version": 7
|
||||
}
|
55
flake.nix
Normal file
55
flake.nix
Normal file
|
@ -0,0 +1,55 @@
|
|||
{
|
||||
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
|
||||
(texlive.combine {
|
||||
inherit (texlive)
|
||||
scheme-small
|
||||
# Build script
|
||||
latexmk
|
||||
# Extra packages needed
|
||||
clearsans
|
||||
fontaxes
|
||||
textpos
|
||||
ifmtarg
|
||||
marvosym
|
||||
;
|
||||
})
|
||||
];
|
||||
in
|
||||
{
|
||||
devShell = pkgs.mkShell {
|
||||
name = "cv";
|
||||
inherit buildInputs;
|
||||
};
|
||||
|
||||
defaultPackage = pkgs.stdenvNoCC.mkDerivation {
|
||||
pname = "cv";
|
||||
version = self.rev or "dirty";
|
||||
src = ./.;
|
||||
|
||||
inherit buildInputs;
|
||||
|
||||
buildPhase = ''
|
||||
make
|
||||
'';
|
||||
|
||||
installPhase = ''
|
||||
install -Dm644 en.pdf $out/share/en.pdf
|
||||
install -Dm644 fr.pdf $out/share/fr.pdf
|
||||
'';
|
||||
};
|
||||
}
|
||||
);
|
||||
}
|
Loading…
Reference in a new issue