Skip to content

Commit

Permalink
Cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
WeetHet committed Dec 20, 2024
1 parent 8d39b21 commit 832b8b2
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 16 deletions.
1 change: 1 addition & 0 deletions .envrc
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
watch_file nix/*.nix
use flake
19 changes: 9 additions & 10 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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 = {
Expand All @@ -44,23 +45,21 @@
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 = [
"dev"
"guide"
];
}
);
in
pkgs.mkShell {
packages = [
pythonEnv
];
};
))
];
};

formatter = pkgs.nixfmt-rfc-style;
};
Expand Down
9 changes: 4 additions & 5 deletions nix/mkPackageOverrides.nix
Original file line number Diff line number Diff line change
Expand Up @@ -2,24 +2,23 @@
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 {
inherit src;
hash = "sha256-AqSVFOB9Lfvk9h3GtoYlEOXBEt7YZYLhCDNKM9upQ2U=";
};
});
python-semantic-release = pkgs.callPackage ./python-semantic-release.nix { };
}
4 changes: 3 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down Expand Up @@ -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"

0 comments on commit 832b8b2

Please sign in to comment.