Files
sorry/flake.nix
2022-02-11 01:43:51 +05:30

41 lines
1.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 ];
};
# DON'T FORGET TO PUT YOUR PACKAGE NAME HERE, REMOVING `throw`
packageName = throw "put your package name here";
in {
packages.${packageName} = app;
defaultPackage = self.packages.${system}.${packageName};
devShell = pkgs.mkShell {
buildInputs = with pkgs; [ poetry ];
inputsFrom = builtins.attrValues self.packages.${system};
};
});
}