nix flake add systems input

This commit is contained in:
Laureηt 2024-01-01 13:28:18 +01:00
parent 22b727dbfc
commit 5803ada3b4
Signed by: Laurent
SSH key fingerprint: SHA256:kZEpW8cMJ54PDeCvOhzreNr4FSh6R13CMGH/POoO8DI

View file

@ -1,22 +1,38 @@
{ {
inputs = { inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; nixpkgs = {
flake-parts.url = "github:hercules-ci/flake-parts"; url = "github:NixOS/nixpkgs/nixos-unstable";
};
flake-parts = {
url = "github:hercules-ci/flake-parts";
inputs.nixpkgs-lib.follows = "nixpkgs";
};
systems = {
url = "github:nix-systems/default";
};
}; };
outputs = inputs@{ nixpkgs, flake-parts, ... }: outputs = inputs @ {
flake-parts.lib.mkFlake { inherit inputs; } { nixpkgs,
systems = [ "x86_64-linux" "aarch64-linux" ]; flake-parts,
...
}:
flake-parts.lib.mkFlake {inherit inputs;} {
systems = import inputs.systems;
perSystem = { pkgs, system, ... }: { perSystem = {
devShells.default = pkgs.mkShell { packages = with pkgs; [ marp-cli ]; }; pkgs,
system,
...
}: {
devShells.default = pkgs.mkShell {packages = with pkgs; [marp-cli];};
packages.slides = pkgs.stdenvNoCC.mkDerivation { packages.slides = pkgs.stdenvNoCC.mkDerivation {
name = "slides"; name = "slides";
src = ./.; src = ./.;
dontUnpack = true; dontUnpack = true;
buildInputs = with pkgs; [ marp-cli ]; buildInputs = with pkgs; [marp-cli];
buildPhase = '' buildPhase = ''
marp --html $src/slides.md --allow-local-files -o slides.html marp --html $src/slides.md --allow-local-files -o slides.html
@ -31,4 +47,3 @@
}; };
}; };
} }