feat(flake): add hetch to packages output

This commit is contained in:
Artur Manuel 2025-01-16 00:45:14 +00:00
commit e37ca2d480

View file

@ -4,13 +4,14 @@
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
treefmt.url = "github:numtide/treefmt-nix"; treefmt.url = "github:numtide/treefmt-nix";
}; };
outputs = outputs = inputs @ {
inputs@{ nixpkgs, ... }: self,
let nixpkgs,
...
}: let
inherit (nixpkgs) lib; inherit (nixpkgs) lib;
systems = ["x86_64-linux"]; systems = ["x86_64-linux"];
forAllSystems = forAllSystems = f:
f:
lib.genAttrs systems ( lib.genAttrs systems (
system: system:
f { f {
@ -20,18 +21,16 @@
} }
); );
treefmtEval = forAllSystems ({pkgs}: inputs.treefmt.lib.evalModule pkgs ./flake/treefmt.nix); treefmtEval = forAllSystems ({pkgs}: inputs.treefmt.lib.evalModule pkgs ./flake/treefmt.nix);
in in {
{
packages = forAllSystems ( packages = forAllSystems (
{ pkgs }: {pkgs}: {
{
default = pkgs.callPackage ./flake/package.nix {}; default = pkgs.callPackage ./flake/package.nix {};
} }
); );
devShells = forAllSystems ( devShells = forAllSystems (
{ pkgs }: {pkgs}: {
{
default = pkgs.callPackage ./flake/shell.nix {}; default = pkgs.callPackage ./flake/shell.nix {};
hetch = self.packages.${pkgs.system}.default;
} }
); );
formatter = forAllSystems ({pkgs}: treefmtEval.${pkgs.system}.config.build.wrapper); formatter = forAllSystems ({pkgs}: treefmtEval.${pkgs.system}.config.build.wrapper);