nixcon-2024-presentation-pu.../flake.nix

37 lines
1,005 B
Nix
Raw Normal View History

2024-11-02 15:30:24 +00:00
{
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 = ''
2024-11-02 15:34:49 +00:00
marp $src/presentation.md --output $out/presentation.html --html
2024-11-02 15:30:24 +00:00
cp -r $src/assets $out/assets
'';
};
});
devShells = forEachSupportedSystem ({ pkgs }: {
default = pkgs.mkShell {
packages = with pkgs; [ marp-cli ];
};
});
};
}