mirror of
https://github.com/NixOS/nix.dev.git
synced 2024-10-18 00:06:26 -04:00
add python dependency sphinx-sitemap
This commit is contained in:
parent
5ede808e39
commit
c2adc4efe4
|
@ -9,12 +9,17 @@
|
|||
let
|
||||
pkgs = import nixpkgs {
|
||||
inherit system;
|
||||
overlays = [
|
||||
# Add sphinx-sitemap from an overlay until
|
||||
# it becomes available from nixpkgs-unstable
|
||||
(import ./overlay.nix)
|
||||
];
|
||||
};
|
||||
in {
|
||||
packages.default = pkgs.stdenv.mkDerivation {
|
||||
name = "nix-dev";
|
||||
src = self;
|
||||
buildInputs = with pkgs.python310Packages; [
|
||||
buildInputs = with pkgs.python310.pkgs; [
|
||||
livereload
|
||||
linkify-it-py
|
||||
myst-parser
|
||||
|
@ -23,6 +28,7 @@
|
|||
sphinx-copybutton
|
||||
sphinx-design
|
||||
sphinx-notfound-page
|
||||
sphinx-sitemap
|
||||
black
|
||||
];
|
||||
buildPhase = ''
|
||||
|
|
50
overlay.nix
Normal file
50
overlay.nix
Normal file
|
@ -0,0 +1,50 @@
|
|||
final: prev: let
|
||||
python-module-sphinx-sitemap = {
|
||||
lib,
|
||||
buildPythonPackage,
|
||||
fetchPypi,
|
||||
sphinx,
|
||||
pytest,
|
||||
}: let
|
||||
pname = "sphinx-sitemap";
|
||||
version = "2.5.1";
|
||||
in
|
||||
buildPythonPackage {
|
||||
inherit pname version;
|
||||
|
||||
src = fetchPypi {
|
||||
inherit pname version;
|
||||
sha256 = "sha256-mEvvBou9vCbPriCai2E5LpaBq8kZG0d80w2kBuOmDuU=";
|
||||
};
|
||||
|
||||
propagatedBuildInputs = [
|
||||
sphinx
|
||||
];
|
||||
|
||||
nativeCheckInputs = [
|
||||
pytest
|
||||
];
|
||||
|
||||
doCheck = true;
|
||||
checkPhase = ''
|
||||
pytest --fixtures tests
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "Sitemap generator for Sphinx";
|
||||
homepage = "https://github.com/jdillard/sphinx-sitemap";
|
||||
maintainers = with maintainers; [ ];
|
||||
license = licenses.mit;
|
||||
};
|
||||
};
|
||||
in {
|
||||
python310 = prev.python310.override {
|
||||
packageOverrides = python-final: python-prev: {
|
||||
sphinx-sitemap = python-module-sphinx-sitemap {
|
||||
inherit (prev) lib;
|
||||
inherit (python-prev) buildPythonPackage fetchPypi pytest;
|
||||
inherit (python-prev.pkgs) sphinx;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
Loading…
Reference in a new issue