Skip to content

Commit

Permalink
nix: Switch doc builds to setuptools
Browse files Browse the repository at this point in the history
  • Loading branch information
lucc committed Jul 31, 2024
1 parent 5bea39a commit 68b6413
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 21 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,8 @@ jobs:
matrix:
derivation:
- default
- docs
- alot.doc
- alot.man

steps:
- name: Install Nix
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,4 @@ docs/source/configuration/*table.rst
tags
.eggs
__pycache__
result*/
31 changes: 11 additions & 20 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -32,11 +32,16 @@
in
{
packages = {
alot-setuptools = pkgs.python3Packages.buildPythonApplication {
alot = pkgs.python3Packages.buildPythonApplication {
name = "alot";
version = "dev";
src = self;
pyproject = true;
outputs = [
"out"
"doc"
"man"
];
build-system = with pkgs.python3Packages; [
setuptools
setuptools-scm
Expand All @@ -51,26 +56,12 @@
urwidtrees
];
inherit checkPhase nativeCheckInputs;
nativeBuildInputs = with pkgs.python3Packages; [ sphinxHook ];
sphinxBuilders = [ "html" "man" ];
};
alot-poetry = mkPoetryApplication (defaultArgs // {
nativeBuildInputs = [
pkgs.python3.pkgs.cffi
];
propagatedBuildInputs = with pkgs; [
gpgme
pkgs.gpgme.dev
pkgs.python3.pkgs.cffi
];
inherit checkPhase nativeCheckInputs;
});
docs = pkgs.runCommand "alot-docs" {
src = self;
nativeBuildInputs = [
(mkPoetryEnv (defaultArgs // { groups = ["doc"]; }))
pkgs.gnumake
];
} ''make -C $src/docs html man BUILDDIR=$out'';
default = self.packages.${system}.alot-poetry;
docs = pkgs.lib.trivial.warn "The docs attribute moved to alot.doc"
self.packages.${system}.alot.doc;
default = self.packages.${system}.alot;
};
});
}
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -48,3 +48,4 @@ Documentation = "https://alot.readthedocs.io/en/latest/"
Issues = "https://github.com/pazz/alot/issues"

[tool.setuptools.packages.find]
include = ["alot*"]

0 comments on commit 68b6413

Please sign in to comment.