Created
May 17, 2023 00:37
-
-
Save steshaw/259c79d2a1574b6b99f0e24387ea0126 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
description = "Application packaged using poetry2nix"; | |
inputs.flake-utils.url = "github:numtide/flake-utils"; | |
inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable"; | |
inputs.poetry2nix = { | |
url = "github:nix-community/poetry2nix"; | |
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. | |
inherit (poetry2nix.legacyPackages.${system}) mkPoetryApplication; | |
pkgs = nixpkgs.legacyPackages.${system}; | |
in | |
{ | |
packages = { | |
myapp = mkPoetryApplication { projectDir = self; }; | |
default = self.packages.${system}.myapp; | |
}; | |
devShells.default = pkgs.mkShell { | |
packages = [ poetry2nix.packages.${system}.poetry ]; | |
}; | |
}); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment