1 { lib, python3, fetchFromGitHub, withServer ? false }:
4 serverRequire = with python3.pkgs; [
19 with python3.pkgs; buildPythonApplication rec {
24 src = fetchFromGitHub {
28 sha256 = "sha256-kPVlfTYUusf5CZnKB53WZcCHo3MEnA2bLUHTRPGPn+8=";
48 propagatedBuildInputs = [
54 ] ++ lib.optionals withServer serverRequire;
57 # Disables a test which requires internet
58 substituteInPlace tests/test_bukuDb.py \
59 --replace "@pytest.mark.slowtest" "@unittest.skip('skipping')" \
60 --replace "self.assertEqual(shorturl, \"http://tny.im/yt\")" "" \
61 --replace "self.assertEqual(url, \"https://www.google.com\")" ""
62 substituteInPlace setup.py \
63 --replace mypy-extensions==0.4.1 mypy-extensions>=0.4.1
64 '' + lib.optionalString (!withServer) ''
65 rm tests/test_{server,views}.py
69 make install PREFIX=$out
71 mkdir -p $out/share/zsh/site-functions $out/share/bash-completion/completions $out/share/fish/vendor_completions.d
72 cp auto-completion/zsh/* $out/share/zsh/site-functions
73 cp auto-completion/bash/* $out/share/bash-completion/completions
74 cp auto-completion/fish/* $out/share/fish/vendor_completions.d
75 '' + lib.optionalString (!withServer) ''
76 rm $out/bin/bukuserver
80 description = "Private cmdline bookmark manager";
82 homepage = "https://github.com/jarun/Buku";
83 license = licenses.gpl3;
84 platforms = platforms.unix;
85 maintainers = with maintainers; [ matthiasbeyer ];