diff options
Diffstat (limited to 'flake.nix')
| -rw-r--r-- | flake.nix | 32 |
1 files changed, 31 insertions, 1 deletions
@@ -1,5 +1,35 @@ { description = "a tool for generating packages from packwiz modpacks"; - outputs = _: {lib = import ./lib;}; + inputs.nixpkgs.url = "nixpkgs/nixos-unstable"; + + outputs = { + nixpkgs, + self, + ... + }: let + inherit (nixpkgs) lib; + + systems = [ + "x86_64-linux" + "aarch64-linux" + "x86_64-darwin" + "aarch64-darwin" + ]; + + forAllSystems = fn: lib.genAttrs systems (s: fn nixpkgs.legacyPackages.${s}); + in { + formatter = forAllSystems (pkgs: pkgs.alejandra); + + lib = forAllSystems (pkgs: let + lib' = lib.makeScope pkgs.newScope (final: self.overlays.default final pkgs); + in { + inherit + (lib') + fetchPackwizModpack + ; + }); + + overlays.default = final: prev: (import ./lib final prev); + }; } |
