diff --git a/.envrc b/.envrc index 3550a30..74e0968 100644 --- a/.envrc +++ b/.envrc @@ -1 +1,2 @@ +watch_file nix/*.nix use flake diff --git a/flake.nix b/flake.nix index c23e113..79a1bdf 100644 --- a/flake.nix +++ b/flake.nix @@ -30,6 +30,7 @@ packageOverrides = import ./nix/mkPackageOverrides.nix { inherit pkgs; }; }; packageAttrs = project.renderers.buildPythonPackage { inherit python; }; + python-semantic-release = pkgs.callPackage ./nix/python-semantic-release.nix { }; in { packages = { @@ -44,9 +45,11 @@ default = config.packages.tgpy; }; - devShells.default = - let - pythonEnv = python.withPackages ( + devShells.default = pkgs.mkShell { + packages = [ + pkgs.poetry + python-semantic-release + (python.withPackages ( project.renderers.withPackages { inherit python; groups = [ @@ -54,13 +57,9 @@ "guide" ]; } - ); - in - pkgs.mkShell { - packages = [ - pythonEnv - ]; - }; + )) + ]; + }; formatter = pkgs.nixfmt-rfc-style; }; diff --git a/nix/mkPackageOverrides.nix b/nix/mkPackageOverrides.nix index 8190e59..ed301f7 100644 --- a/nix/mkPackageOverrides.nix +++ b/nix/mkPackageOverrides.nix @@ -2,18 +2,18 @@ self: super: { telethon-v1-24 = super.telethon.overridePythonAttrs (old: rec { version = "1.24.18"; + pname = "Telethon-v1.24"; src = pkgs.fetchPypi { - pname = "Telethon-v1.24"; - inherit version; + inherit version pname; hash = "sha256-rVgunqMHpOLjRhIZ7RfugTrrv136YtTlqa9CvWOyElY="; }; doCheck = false; }); cryptg-anyos = super.cryptg.overridePythonAttrs (old: rec { version = "0.4.1"; + pname = "cryptg-anyos"; src = super.fetchPypi { - pname = "cryptg-anyos"; - inherit version; + inherit version pname; hash = "sha256-pXY0CfdZRDjgID78STTDrvm1wUj4z1AooUBtrSG09Qo="; }; cargoDeps = pkgs.rustPlatform.fetchCargoTarball { @@ -21,5 +21,4 @@ self: super: { hash = "sha256-AqSVFOB9Lfvk9h3GtoYlEOXBEt7YZYLhCDNKM9upQ2U="; }; }); - python-semantic-release = pkgs.callPackage ./python-semantic-release.nix { }; } diff --git a/pyproject.toml b/pyproject.toml index 40dd977..7f43fef 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -26,7 +26,8 @@ dependencies = [ ] [dependency-groups] -dev = ["python-semantic-release~=7.31.2", "black~=22.6.0", "isort~=5.10.1"] +release = ["python-semantic-release~=7.31.2"] +dev = ["black~=22.6.0", "isort~=5.10.1"] guide = [ "mkdocs-material~=9.5.18", "mkdocs-git-revision-date-localized-plugin~=1.2.4", @@ -59,6 +60,7 @@ include = '/tgpy/.*\.pyi?$' profile = "black" src_paths = ["tgpy"] + [build-system] requires = ["flit-core>=3.4,<4"] build-backend = "flit_core.buildapi"