diff --git a/flake.nix b/flake.nix index 566cc40..d72b097 100644 --- a/flake.nix +++ b/flake.nix @@ -7,20 +7,30 @@ inputs.nixpkgs.follows = "nixpkgs"; }; }; - - outputs = { self, nixpkgs, flake-utils, poetry2nix }: - flake-utils.lib.eachDefaultSystem (system: - let - # see https://github.com/nix-community/poetry2nix/tree/master#api for more functions and examples. - pkgs = nixpkgs.legacyPackages.${system}; - inherit (poetry2nix.lib.mkPoetry2Nix { inherit pkgs; }) mkPoetryApplication; - in - { - packages.default = mkPoetryApplication { projectDir = self; }; - - devShells.default = pkgs.mkShell { - inputsFrom = [ self.packages.${system}.default ]; - packages = with pkgs; [poetry python39 cargo]; - }; + outputs = { + self, + nixpkgs, + flake-utils, + poetry2nix, + }: + flake-utils.lib.eachDefaultSystem (system: let + # see https://github.com/nix-community/poetry2nix/tree/master#api for more functions and examples. + pkgs = nixpkgs.legacyPackages.${system}; + inherit (poetry2nix.lib.mkPoetry2Nix {inherit pkgs;}) mkPoetryApplication; + hyperer = mkPoetryApplication {projectDir = self;}; + in { + packages = { + inherit hyperer; + default = self.packages.${system}.hyperer; + }; + apps = pkgs.lib.genAttrs ["hyperer-cargo" "hyperer-rg" "hyperer-ruff"] (name: { + type = "app"; + program = "${hyperer}/bin/${name}"; }); + + devShells.default = pkgs.mkShell { + inputsFrom = [self.packages.${system}.hyperer]; + packages = with pkgs; [poetry python39 cargo]; + }; + }); }