alqages/flake.nix

54 lines
1.3 KiB
Nix
Raw Permalink Normal View History

2025-02-10 20:28:46 +00:00
{
description = "Alqages, packages from alqueva to here.";
2025-04-02 21:06:44 +01:00
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
};
2025-02-10 20:28:46 +00:00
2025-04-02 21:06:44 +01:00
outputs =
inputs@{ self, nixpkgs }:
2025-04-02 20:37:22 +01:00
let
inherit (nixpkgs) lib;
2025-04-02 21:06:44 +01:00
eachSystem =
f:
nixpkgs.lib.genAttrs [ "x86_64-linux" "aarch64-linux" ] (
system:
2025-04-02 20:37:22 +01:00
f {
inherit system;
pkgs = nixpkgs.legacyPackages.${system};
2025-04-02 21:06:44 +01:00
}
);
in
{
overlays.default =
_: prev:
2025-04-02 20:37:22 +01:00
lib.pipe (builtins.readDir ./packages) [
(lib.filterAttrs (_: v: v == "directory"))
2025-04-02 21:06:44 +01:00
(lib.concatMapAttrs (
name: _: {
${name} = prev.callPackage ./packages/${name} { inherit inputs; };
}
))
2025-04-02 20:37:22 +01:00
];
2025-02-10 20:28:46 +00:00
2025-04-02 20:37:22 +01:00
packages = eachSystem ({ pkgs, ... }: self.overlays.default pkgs pkgs);
2025-04-02 21:06:44 +01:00
devShells = eachSystem (
{ pkgs, ... }:
{
default = pkgs.mkShell {
name = "alqages-dev";
packages = builtins.attrValues {
inherit (pkgs)
nil
nixfmt
deadnix
statix
;
};
};
}
);
formatter = eachSystem ({ pkgs, ... }: pkgs.nixfmt-rfc-style);
2025-04-02 20:37:22 +01:00
};
2025-02-10 20:28:46 +00:00
}