Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
39 changes: 23 additions & 16 deletions pkgs/applications/misc/buku/default.nix
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{ lib, python3, fetchFromGitHub }:
{ lib, python3, fetchFromGitHub, withServer ? false }:

let
python3' = python3.override {
Expand All @@ -19,6 +19,21 @@ let
});
};
};
serverRequire = with python3'.pkgs; [
requests
flask
flask-admin
flask-api
flask-bootstrap
flask-paginate
flask-reverse-proxy-fix
flask_wtf
arrow
werkzeug
click
vcrpy
toml
];
in
with python3'.pkgs; buildPythonApplication rec {
version = "4.6";
Expand All @@ -40,27 +55,16 @@ with python3'.pkgs; buildPythonApplication rec {
flake8
pyyaml
mypy-extensions
click
Comment on lines 40 to +55

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

pytest-cov, pylint and flake8 should be removed. They only check cosmetic stuff and often break for no good reason.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

];

propagatedBuildInputs = [
cryptography
beautifulsoup4
requests
certifi
urllib3
flask
flask-admin
flask-api
flask-bootstrap
flask-paginate
flask-reverse-proxy-fix
flask_wtf
arrow
werkzeug
click
html5lib
vcrpy
toml
];
] ++ lib.optionals withServer serverRequire;

postPatch = ''
# Jailbreak problematic dependencies
Expand All @@ -80,6 +84,8 @@ with python3'.pkgs; buildPythonApplication rec {
--replace "self.assertEqual(url, \"https://www.google.com\")" ""
substituteInPlace setup.py \
--replace mypy-extensions==0.4.1 mypy-extensions>=0.4.1
'' + lib.optionalString (!withServer) ''
rm tests/test_{server,views}.py
'';

postInstall = ''
Expand All @@ -89,6 +95,8 @@ with python3'.pkgs; buildPythonApplication rec {
cp auto-completion/zsh/* $out/share/zsh/site-functions
cp auto-completion/bash/* $out/share/bash-completion/completions
cp auto-completion/fish/* $out/share/fish/vendor_completions.d
'' + lib.optionalString (!withServer) ''
rm $out/bin/bukuserver
'';

meta = with lib; {
Expand All @@ -99,4 +107,3 @@ with python3'.pkgs; buildPythonApplication rec {
maintainers = with maintainers; [ matthiasbeyer infinisil ma27 ];
};
}