nixcon-2024-presentation-pu.../flake.nix
2024-11-02 16:30:24 +01:00

36 lines
989 B
Nix

{
description = "Presentation for NixCon 2024";
inputs = {
nixpkgs.url = "github:nixos/nixpkgs?ref=nixos-unstable";
};
outputs = { self, nixpkgs }:
let
supportedSystems = [ "x86_64-linux" "aarch64-linux" "x86_64-darwin" "aarch64-darwin" ];
forEachSupportedSystem = f: nixpkgs.lib.genAttrs supportedSystems (system: f {
pkgs = import nixpkgs { inherit system; };
});
in
{
packages = forEachSupportedSystem ({ pkgs }: {
default = pkgs.stdenv.mkDerivation {
name = "nixcon-2024-slides";
buildInputs = with pkgs; [ marp-cli ];
src = self;
dontUnpack = true;
buildPhase = ''
marp $src --output $out/presentation.html --html
cp -r $src/assets $out/assets
'';
};
});
devShells = forEachSupportedSystem ({ pkgs }: {
default = pkgs.mkShell {
packages = with pkgs; [ marp-cli ];
};
});
};
}