chore: migrate to flake

This commit is contained in:
Luj 2025-06-05 19:52:17 +02:00
parent 8194610c03
commit d4df74d662
Signed by: luj
GPG key ID: 6FC74C847011FD83
5 changed files with 84 additions and 165 deletions

57
flake.nix Normal file
View 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;
};
};
}