nix-development-configs/pythonflake-python2nix/flake.nix
2022-03-18 11:18:21 +09:00

40 lines
1 KiB
Nix

# SPDX-FileCopyrightText: 2021 Serokell <https://serokell.io/>
#
# SPDX-License-Identifier: CC0-1.0
{
description = "My Python application";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs";
flake-utils.url = "github:numtide/flake-utils";
};
outputs = { self, nixpkgs, flake-utils }:
flake-utils.lib.eachDefaultSystem (system:
let
pkgs = nixpkgs.legacyPackages.${system};
customOverrides = self: super: {
# Overrides go here
};
app = pkgs.poetry2nix.mkPoetryApplication {
projectDir = ./.;
overrides =
[ pkgs.poetry2nix.defaultPoetryOverrides customOverrides ];
};
packageName = "pythonflake";
in {
packages.${packageName} = app;
defaultPackage = self.packages.${system}.${packageName};
apps.${system}.default = app;
devShell = pkgs.mkShell {
buildInputs = with pkgs; [ poetry ];
inputsFrom = builtins.attrValues self.packages.${system};
};
});
}