flake.nix: init

This commit is contained in:
2025-06-07 14:34:35 +02:00
parent 2ecd95f9b0
commit 1c7c75173d
6 changed files with 144 additions and 2 deletions

41
flake.nix Normal file
View File

@@ -0,0 +1,41 @@
{
description = "Dibbler and Worblehat shadow voodoo magic";
inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
outputs = { self, nixpkgs, flake-utils }: let
inherit (nixpkgs) lib;
systems = [
"x86_64-linux"
"aarch64-linux"
"x86_64-darwin"
"aarch64-darwin"
];
forAllSystems = f: lib.genAttrs systems (system: let
pkgs = nixpkgs.legacyPackages.${system};
in f system pkgs);
in {
packages = forAllSystems (system: pkgs: {
default = self.packages.${system}.libdib;
libdib = pkgs.callPackage ./default.nix {
python3Packages = pkgs.python313Packages;
};
});
overlays = {
default = self.overlays.libdib;
libdib = final: prev: {
inherit (self.packages.${prev.system}) libdib;
};
};
devShells = forAllSystems (system: pkgs: {
default = self.devShells.${system}.libdib;
libdib = pkgs.callPackage ./shell.nix {
python = pkgs.python313;
};
});
};
}