58 lines
1.6 KiB
Nix
58 lines
1.6 KiB
Nix
{
|
|
inputs = {
|
|
flake-parts.url = "github:hercules-ci/flake-parts";
|
|
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
|
|
};
|
|
|
|
outputs = {
|
|
self,
|
|
flake-parts,
|
|
...
|
|
} @ inputs:
|
|
flake-parts.lib.mkFlake {inherit inputs;} {
|
|
systems = ["x86_64-linux"];
|
|
perSystem = {
|
|
self',
|
|
inputs',
|
|
system,
|
|
config,
|
|
pkgs,
|
|
lib,
|
|
...
|
|
}: let
|
|
inherit (pkgs) callPackage;
|
|
in {
|
|
# Customize the pkgs instance with our desired features
|
|
# and overlays.
|
|
legacyPackages = import inputs.nixpkgs {
|
|
inherit system;
|
|
config = {
|
|
overlays = [self.overlays.default]; # consume local overlay
|
|
};
|
|
};
|
|
|
|
# Set pkgs to the updated value, which is also exposed
|
|
# as legacyPackages in the flake schema.
|
|
_module.args.pkgs = config.legacyPackages;
|
|
|
|
# Generate packages automagically from ./nix/packages
|
|
# for each package that contains a package.nix - this
|
|
# is a flake-parts feature that makes our life easier.
|
|
packages = {
|
|
sdl3-custom = callPackage ./nix/packages/SDL3 {};
|
|
# cursed-libcxx-stdenv = callPackage ./nix/packages/cursed-libcxx-stdenv {};
|
|
gooey = callPackage ./nix/packages/gooey {
|
|
inherit self;
|
|
sdl3 = self'.packages.sdl3-custom;
|
|
};
|
|
};
|
|
|
|
# Generate an overlay containing each one of our packages that are collected
|
|
# from ./nix/packages.
|
|
# overlayAttrs = self.packages;
|
|
|
|
devShells.default = callPackage ./shells/default.nix {inherit (self'.packages) gooey;};
|
|
};
|
|
};
|
|
}
|