43 lines
1.0 KiB
Nix
43 lines
1.0 KiB
Nix
{
|
|
inputs = {
|
|
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
|
|
utils.url = "github:numtide/flake-utils";
|
|
poetry2nix = {
|
|
url = "github:nix-community/poetry2nix";
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
};
|
|
};
|
|
|
|
outputs = {
|
|
self,
|
|
poetry2nix,
|
|
nixpkgs,
|
|
utils,
|
|
}: let
|
|
out = system: let
|
|
pkgs = nixpkgs.legacyPackages."${system}";
|
|
inherit (poetry2nix.lib.mkPoetry2Nix {inherit pkgs;}) mkPoetryApplication;
|
|
python = pkgs.python39;
|
|
in {
|
|
devShell = pkgs.mkShell {
|
|
buildInputs = with pkgs; [
|
|
(python39Packages.poetry.withPlugins (p: [p.poetry-plugin-up]))
|
|
libnotify
|
|
];
|
|
};
|
|
|
|
defaultPackage = mkPoetryApplication {
|
|
inherit python;
|
|
projectDir = ./.;
|
|
# There is no unit tests. Avoid building mypy
|
|
checkGroups = [];
|
|
};
|
|
|
|
defaultApp = utils.lib.mkApp {
|
|
drv = self.defaultPackage."${system}";
|
|
};
|
|
};
|
|
in
|
|
with utils.lib; eachSystem defaultSystems out;
|
|
}
|