From 22c6199166e343d950e37029041cf7d251b903c1 Mon Sep 17 00:00:00 2001 From: seth Date: Mon, 1 May 2023 21:01:55 -0400 Subject: feat: add nix flake --- flake.nix | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 flake.nix (limited to 'flake.nix') diff --git a/flake.nix b/flake.nix new file mode 100644 index 0000000..74ffdfb --- /dev/null +++ b/flake.nix @@ -0,0 +1,39 @@ +{ + description = "getchoo's modpack"; + + inputs.nixpkgs.url = "nixpkgs/nixos-unstable"; + + outputs = { + self, + nixpkgs, + }: let + version = self.lastModifiedDate; + systems = [ + "x86_64-linux" + "aarch64-linux" + "x86_64-darwin" + "aarch64-darwin" + ]; + + forAllSystems = nixpkgs.lib.genAttrs systems; + nixpkgsFor = forAllSystems (system: import nixpkgs {inherit system;}); + in { + packages = forAllSystems (s: let + pkgs = nixpkgsFor.${s}; + in { + getchoo-modpack = pkgs.callPackage ./nix {inherit version;}; + }); + + devShells = forAllSystems (s: let + pkgs = nixpkgsFor.${s}; + inherit (pkgs) mkShell; + in { + default = mkShell { + packages = with pkgs; [ + packwiz + p7zip + ]; + }; + }); + }; +} -- cgit v1.2.3