chore: migrate to flake
This commit is contained in:
parent
8194610c03
commit
d4df74d662
5 changed files with 84 additions and 165 deletions
57
flake.nix
Normal file
57
flake.nix
Normal file
|
@ -0,0 +1,57 @@
|
|||
{
|
||||
|
||||
inputs = {
|
||||
nixpkgs.url = "github:NixOS/nixpkgs";
|
||||
};
|
||||
|
||||
outputs =
|
||||
{ nixpkgs, ... }:
|
||||
let
|
||||
pkgs = import nixpkgs { system = "x86_64-linux"; };
|
||||
in
|
||||
rec {
|
||||
devShells.default = pkgs.mkShell {
|
||||
nativeBuildInputs = [ pkgs.bashInteractive ];
|
||||
buildInputs = with pkgs; [
|
||||
quarto
|
||||
texliveFull
|
||||
];
|
||||
};
|
||||
|
||||
packages.x86_64-linux = {
|
||||
default = pkgs.callPackage (
|
||||
{
|
||||
stdenv,
|
||||
quarto,
|
||||
which,
|
||||
...
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation {
|
||||
name = "coap-february-2025";
|
||||
src = ./.;
|
||||
|
||||
buildInputs = [
|
||||
quarto
|
||||
which
|
||||
];
|
||||
|
||||
buildPhase = ''
|
||||
mkdir _slides
|
||||
HOME=. quarto render index.qmd --output-dir _slides
|
||||
'';
|
||||
|
||||
installPhase = ''
|
||||
cp -r _slides $out
|
||||
rm $out/index.qmd
|
||||
rm $out/*.nix
|
||||
'';
|
||||
}
|
||||
) { };
|
||||
};
|
||||
|
||||
checks.default = {
|
||||
inherit packages;
|
||||
};
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue