Add recipemd

This commit is contained in:
Tim Schubert 2021-03-14 21:37:51 +01:00
parent 8d3acd5270
commit 950b23bc40
Signed by: dadada
GPG key ID: EEB8D1CE62C4DFEA
7 changed files with 92 additions and 0 deletions

View file

@ -16,5 +16,6 @@ rec {
keys = callPackage ./pkgs/keys { };
homePage = callPackage ./pkgs/homePage { };
deploy = callPackage ./pkgs/deploy.nix { };
recipemd = python3.pkgs.toPythonApplication (python3Packages.callPackage ./pkgs/recipemd { });
scripts = callPackage ./pkgs/scripts.nix { };
}

View file

@ -20,6 +20,8 @@ in
{
nixpkgs.overlays = [
this.overlays.dadadaScripts
this.overlays.python3Packages
this.overlays.recipemd
];
imports = lib.attrValues this.hmModules;

View file

@ -69,6 +69,7 @@ with pkgs; [
python38Packages.dateutil
python38Packages.managesieve
python38Packages.solo-python
recipemd
signal-desktop
slurp
sqlite

View file

@ -10,4 +10,8 @@
dadadaScripts = super.callPackage ../pkgs/scripts.nix { };
};
sudo = import ./sudo.nix;
python3Packages = import ./python3-packages.nix;
recipemd = self: super: {
recipemd = super.python3Packages.toPythonApplication super.python3Packages.recipemd;
};
}

View file

@ -0,0 +1,6 @@
self: super:
{
python3Packages = super.python3Packages // super.recurseIntoAttrs (
super.python3Packages.callPackage ../pkgs/python-pkgs { }
);
}

View file

@ -0,0 +1,4 @@
{ callPackage }:
{
recipemd = callPackage ./recipemd { };
}

View file

@ -0,0 +1,74 @@
{ lib
, buildPythonPackage
, fetchFromGitHub
, pytestCheckHook
, python3Packages
}:
buildPythonPackage rec {
pname = "recipemd";
version = "4.0.5";
disabled = false; # requires python version >=3.7,<4
src = fetchFromGitHub {
owner = "tstehr";
repo = "RecipeMD";
rev = "v${version}";
sha256 = "17ph5gnbrx6159cryjlpkkp15gvazvxgm6ixcmrbdmsg6rgyqcpn";
};
# # Package conditions to handle
# # might have to sed setup.py and egg.info in patchPhase
# # sed -i "s/<package>.../<package>/"
# # Extra packages (may not be necessary)
# pytest-cov==2.8.1 # tests
# tox==3.20.1 # tests
# Sphinx==2.2.2 # docs
# m2r==0.2.1 # docs
# sphinxcontrib.fulltoc==1.2.0 # docs
# sphinxcontrib.autoprogram==0.1.5 # docs
# sphinx_autodoc_typehints==1.10.3 # docs
# sphinxcontrib.apidoc==0.3.0 # docs
# sphinx-autobuild==0.7.1 # docs
# twine==3.1.1 # release
# pytest==5.3.1 # dev
# pytest-cov==2.8.1 # dev
# tox==3.20.1 # dev
# Sphinx==2.2.2 # dev
# m2r==0.2.1 # dev
# sphinxcontrib.fulltoc==1.2.0 # dev
# sphinxcontrib.autoprogram==0.1.5 # dev
# sphinx_autodoc_typehints==1.10.3 # dev
# sphinxcontrib.apidoc==0.3.0 # dev
# sphinx-autobuild==0.7.1 # dev
# twine==3.1.1 # dev
patchPhase = ''
# Override yarl version
sed -i 's/argcomplete~=1.10.0/yarl~=1.0/' setup.py
sed -i 's/yarl~=1.3.0/yarl~=1.0/' setup.py
'';
propagatedBuildInputs = with python3Packages; [
dataclasses-json
yarl
CommonMark
argcomplete
pyparsing
];
checkInputs = [
pytestCheckHook
python3Packages.pytestcov
];
doCheck = true;
meta = with lib; {
description = "Markdown recipe manager, reference implementation of RecipeMD";
homepage = https://recipemd.org;
license = [ licenses.lgpl3Only ];
maintainers = [ maintainers.dadada ];
};
}