Skip to content

Commit c5bb4fa

Browse files
committed
split out nix/python-docs.nix
1 parent 0e7b940 commit c5bb4fa

2 files changed

Lines changed: 19 additions & 15 deletions

File tree

flake.nix

Lines changed: 4 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -351,21 +351,10 @@
351351
pkgs.python3Packages.requests
352352
];
353353
};
354-
python-docs =
355-
pkgs.stdenv.mkDerivation {
356-
pname = "docs";
357-
version = manifest.version;
358-
src = pkgs.lib.cleanSource ./.;
359-
buildInputs = [
360-
deltachat-python
361-
deltachat-rpc-client
362-
pkgs.python3Packages.breathe
363-
pkgs.python3Packages.sphinx-rtd-theme
364-
];
365-
nativeBuildInputs = [ pkgs.sphinx ];
366-
buildPhase = ''sphinx-build -b html -a python/doc/ dist/html'';
367-
installPhase = ''mkdir -p $out; cp -av dist/html $out'';
368-
};
354+
python-docs = pkgs.callPackage ./nix/python-docs.nix {
355+
inherit deltachat-python deltachat-rpc-client;
356+
version = manifest.version;
357+
};
369358
};
370359

371360
devShells.default = import ./nix/devshell.nix { inherit nixpkgs fenix system; };

nix/python-docs.nix

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
{ pkgs, version, deltachat-python, deltachat-rpc-client }:
2+
pkgs.stdenv.mkDerivation {
3+
pname = "docs";
4+
inherit version;
5+
src = pkgs.lib.cleanSource ../.;
6+
buildInputs = [
7+
deltachat-python
8+
deltachat-rpc-client
9+
pkgs.python3Packages.breathe
10+
pkgs.python3Packages.sphinx-rtd-theme
11+
];
12+
nativeBuildInputs = [ pkgs.sphinx ];
13+
buildPhase = ''sphinx-build -b html -a python/doc/ dist/html'';
14+
installPhase = ''mkdir -p $out; cp -av dist/html $out'';
15+
}

0 commit comments

Comments
 (0)