From 797970c69d2ad1383ec7d412d047c95961ff1b05 Mon Sep 17 00:00:00 2001 From: Matthieu Coudron Date: Tue, 1 Dec 2020 12:44:48 +0100 Subject: [PATCH] feat: can now call 'nix run' on it For instance nix run poetry#. -- lock -v or something similar. you can override the nixpkgs input if you dont want to redownload it, or just lock everything. --- flake.nix | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/flake.nix b/flake.nix index 9b5db1d..2006a2d 100644 --- a/flake.nix +++ b/flake.nix @@ -16,15 +16,22 @@ ); in { - overlay = import ./overlay.nix; - # TODO: I feel like `packages` is the wrong place for the poetry2nix attr - packages = forAllSystems ( - system: { - inherit (nixpkgsFor.${system}) poetry poetry2nix; - } + packages = forAllSystems (system: { + inherit (nixpkgsFor.${system}) poetry; + } ); + apps = forAllSystems (system: { + poetry = { + type = "app"; + program = self.packages."${system}".poetry + "/bin/poetry"; + }; + }); + + defaultApp = forAllSystems (system: + self.apps."${system}".poetry + ); }; }