2019-07-19 14:54:18 +08:00
|
|
|
let
|
|
|
|
pkgs = import <nixpkgs> {};
|
2022-09-27 10:45:41 +08:00
|
|
|
web-src = <webSrc>;
|
|
|
|
nmigen-src = <nmigenSrc>;
|
2019-07-19 14:54:18 +08:00
|
|
|
in
|
2022-09-27 10:45:41 +08:00
|
|
|
rec {
|
|
|
|
web = pkgs.runCommand "web" {} "cd ${web-src}; ${pkgs.zola}/bin/zola build -o $out";
|
2024-06-17 17:13:44 +08:00
|
|
|
web-intl = pkgs.runCommand "web-intl" {}
|
|
|
|
''
|
|
|
|
cd ${web-src}
|
2024-11-16 10:37:59 +08:00
|
|
|
export DOMAINNAME=m-labs-intl.com
|
|
|
|
${pkgs.zola}/bin/zola build -o $out -u https://$DOMAINNAME
|
2024-06-17 17:13:44 +08:00
|
|
|
'';
|
2022-09-27 10:45:41 +08:00
|
|
|
sphinxcontrib-platformpicker = pkgs.python3Packages.buildPythonPackage rec {
|
|
|
|
pname = "sphinxcontrib-platformpicker";
|
|
|
|
version = "1.3";
|
|
|
|
src = pkgs.fetchFromGitHub {
|
|
|
|
owner = "whitequark";
|
|
|
|
repo = "sphinxcontrib-platformpicker";
|
|
|
|
rev = "v${version}";
|
|
|
|
sha256 = "sha256-qKhi4QqYhU7CbNSpziFacXc/sWWPSuM3Nc/oWPmBivM=";
|
|
|
|
};
|
|
|
|
propagatedBuildInputs = [ pkgs.python3Packages.sphinx ];
|
|
|
|
};
|
|
|
|
nmigen-docs = pkgs.stdenvNoCC.mkDerivation {
|
|
|
|
name = "nmigen-docs";
|
|
|
|
src = nmigen-src;
|
|
|
|
buildInputs = [ (pkgs.python3.withPackages(ps: [ ps.sphinx ps.sphinx_rtd_theme sphinxcontrib-platformpicker ])) ];
|
|
|
|
phases = [ "buildPhase" ];
|
|
|
|
buildPhase =
|
|
|
|
''
|
|
|
|
export PYTHONPATH=$src
|
|
|
|
sphinx-build -b html $src/docs $out
|
|
|
|
'';
|
|
|
|
};
|
2019-07-19 14:54:18 +08:00
|
|
|
}
|