diff --git a/flake.lock b/flake.lock new file mode 100644 index 0000000..ef63ca4 --- /dev/null +++ b/flake.lock @@ -0,0 +1,42 @@ +{ + "nodes": { + "flake-utils": { + "locked": { + "lastModified": 1610051610, + "narHash": "sha256-U9rPz/usA1/Aohhk7Cmc2gBrEEKRzcW4nwPWMPwja4Y=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "3982c9903e93927c2164caa727cd3f6a0e6d14cc", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } + }, + "nixpkgs": { + "locked": { + "lastModified": 1610729867, + "narHash": "sha256-bk/SBaBLqZX/PEqal27DMQwAHHl0dcZMp8NNksQr80s=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "04af07c659c6723a2259bb6bc00a47ec53330f20", + "type": "github" + }, + "original": { + "owner": "NixOS", + "repo": "nixpkgs", + "type": "github" + } + }, + "root": { + "inputs": { + "flake-utils": "flake-utils", + "nixpkgs": "nixpkgs" + } + } + }, + "root": "root", + "version": 7 +} diff --git a/flake.nix b/flake.nix index 28f86b8..669def1 100644 --- a/flake.nix +++ b/flake.nix @@ -1,8 +1,32 @@ { description = "Poetry2nix flake"; - outputs = { self }: + inputs.flake-utils.url = "github:numtide/flake-utils"; + inputs.nixpkgs.url = "github:NixOS/nixpkgs"; + + outputs = { self, nixpkgs, flake-utils }: { overlay = import ./overlay.nix; - }; + } // (flake-utils.lib.eachDefaultSystem (system: + let + pkgs = import nixpkgs { + inherit system; + overlays = [ self.overlay ]; + }; + in + rec { + packages = { + inherit (pkgs) poetry; + poetry2nix = pkgs.poetry2nix.cli; + }; + + defaultPackage = packages.poetry2nix; + + apps = { + poetry = flake-utils.lib.mkApp { drv = packages.poetry; }; + poetry2nix = flake-utils.lib.mkApp { drv = packages.poetry2nix; }; + }; + + defaultApp = apps.poetry2nix; + })); }