poetry2nix/templates/app/flake.nix
Jairo Llopis a71ffbe7c5
Remove rec from template
It seems this is an anti-pattern, according to https://nix.dev/anti-patterns/language#rec-expression.

So, I suggest to remove it from there. Better not ship anti-patterns on templates, isn't it?
2022-01-12 08:42:40 +01:00

34 lines
881 B
Nix

{
description = "Application packaged using poetry2nix";
inputs.flake-utils.url = "github:numtide/flake-utils";
inputs.nixpkgs.url = "github:NixOS/nixpkgs";
inputs.poetry2nix.url = "github:nix-community/poetry2nix";
outputs = { self, nixpkgs, flake-utils, poetry2nix }:
{
# Nixpkgs overlay providing the application
overlay = nixpkgs.lib.composeManyExtensions [
poetry2nix.overlay
(final: prev: {
# The application
myapp = prev.poetry2nix.mkPoetryApplication {
projectDir = ./.;
};
})
];
} // (flake-utils.lib.eachDefaultSystem (system:
let
pkgs = import nixpkgs {
inherit system;
overlays = [ self.overlay ];
};
in
{
apps = {
myapp = pkgs.myapp;
};
defaultApp = pkgs.myapp;
}));
}