mirror of
https://github.com/wimpysworld/stream-sprout
synced 2026-03-14 14:45:50 +01:00
feat: add nix flake
This commit is contained in:
parent
2244197989
commit
53575da58e
6 changed files with 142 additions and 0 deletions
42
flake.nix
Normal file
42
flake.nix
Normal file
|
|
@ -0,0 +1,42 @@
|
|||
{
|
||||
description = "Stream Sprout flake";
|
||||
inputs = {
|
||||
flake-schemas.url = "https://flakehub.com/f/DeterminateSystems/flake-schemas/*.tar.gz";
|
||||
nixpkgs.url = "https://flakehub.com/f/NixOS/nixpkgs/*.tar.gz";
|
||||
};
|
||||
|
||||
outputs = {
|
||||
self,
|
||||
flake-schemas,
|
||||
nixpkgs,
|
||||
}: let
|
||||
# Define supported systems and a helper function for generating system-specific outputs
|
||||
supportedSystems = [ "x86_64-linux" "x86_64-darwin" "aarch64-darwin" "aarch64-linux" ];
|
||||
|
||||
forEachSupportedSystem = f: nixpkgs.lib.genAttrs supportedSystems (system: f {
|
||||
system = system;
|
||||
pkgs = import nixpkgs { inherit system; };
|
||||
});
|
||||
in {
|
||||
# Define schemas for the flake's outputs
|
||||
schemas = flake-schemas.schemas;
|
||||
|
||||
# Define overlays for each supported system
|
||||
overlays = forEachSupportedSystem ({pkgs, system, ...}: {
|
||||
default = final: prev: {
|
||||
stream-sprout = final.callPackage ./package.nix { };
|
||||
};
|
||||
});
|
||||
|
||||
# Define packages for each supported system
|
||||
packages = forEachSupportedSystem ({pkgs, system, ...}: rec {
|
||||
stream-sprout = pkgs.callPackage ./package.nix { };
|
||||
default = stream-sprout;
|
||||
});
|
||||
|
||||
# Define devShells for each supported system
|
||||
devShells = forEachSupportedSystem ({pkgs, system, ...}: {
|
||||
default = pkgs.callPackage ./devshell.nix { };
|
||||
});
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue