xin/pkgs/promnesia.nix

92 lines
1.8 KiB
Nix
Raw Permalink Normal View History

2023-09-12 08:44:05 -06:00
{ lib
, buildPythonPackage
, fetchFromGitHub
, beautifulsoup4
, fastapi
, httptools
, logzero
, lxml
, mistletoe
, more-itertools
, mypy
, pytz
, setuptools
, tzlocal
, urlextract
, uvicorn
, uvloop
, watchfiles
, websockets
, setuptools-scm
2023-10-23 08:23:05 -06:00
, starlette
2023-09-12 08:44:05 -06:00
, pkgs
, ...
2023-03-22 10:35:46 -06:00
}:
2023-07-11 09:12:50 -06:00
with pkgs; let
2023-09-12 08:44:05 -06:00
hpi = pkgs.python3Packages.callPackage ./hpi.nix { inherit pkgs; };
sqlcipher3 =
2023-09-12 08:44:05 -06:00
pkgs.python3Packages.callPackage ./sqlcipher3.nix { inherit pkgs; };
cachew = pkgs.python3Packages.callPackage ./cachew.nix { inherit pkgs; };
python-dotenv = pkgs.python3Packages.callPackage ./python-dotenv.nix { };
2023-07-11 09:12:50 -06:00
in
2023-09-12 08:44:05 -06:00
buildPythonPackage rec {
pname = "promnesia";
2023-10-23 08:23:05 -06:00
version = "1.1.20231016";
pyproject = true;
2023-02-06 09:46:46 -07:00
2023-09-12 08:44:05 -06:00
src = fetchFromGitHub {
owner = "karlicoss";
repo = pname;
2023-10-23 08:23:05 -06:00
rev = "9ff734e6fde9ee42f9e8f895d1de54ee02e95d78";
hash = "sha256-TmLyHqa25I6NoTPsmd1AesYdxc8hmGPHdiMuFfw78uQ=";
2023-09-12 08:44:05 -06:00
};
2023-02-06 09:46:46 -07:00
2023-09-12 08:44:05 -06:00
SETUPTOOLS_SCM_PRETEND_VERSION = version;
2023-09-12 08:44:05 -06:00
doCheck = true;
2023-02-07 09:07:55 -07:00
2023-10-23 08:23:05 -06:00
nativeBuildInputs = [
setuptools-scm
];
2023-02-06 09:46:46 -07:00
2023-09-12 08:44:05 -06:00
# Optional
# bs4 lxml mistletoe logzero
propagatedBuildInputs = [
beautifulsoup4
cachew
fastapi
hpi
httptools
2023-10-23 08:23:05 -06:00
starlette
2023-09-12 08:44:05 -06:00
logzero
lxml
mistletoe
more-itertools
mypy
python-dotenv
pytz
setuptools
sqlcipher3
tzlocal
urlextract
uvicorn
uvloop
watchfiles
websockets
];
2023-02-06 09:46:46 -07:00
2023-09-12 08:44:05 -06:00
makeWrapperArgs = [
# Add the installed directories to the python path so the daemon can find them
"--prefix PYTHONPATH : ${python3.pkgs.makePythonPath propagatedBuildInputs}"
"--prefix PYTHONPATH : $out/lib/${python3.libPrefix}/site-packages"
];
2023-09-12 08:44:05 -06:00
meta = with lib; {
homepage = "https://github.com/karlicoss/promnesia";
description = "Another piece of your extended mind";
license = licenses.mit;
maintainers = with maintainers; [ qbit ];
};
}