forked from mirrors/nixpkgs
ankisyncd: use bundled anki version
Updating anki in the next commit will break it otherwise.
This commit is contained in:
parent
10978e9c8d
commit
5451b89b28
|
@ -1,7 +1,6 @@
|
||||||
{ lib
|
{ lib
|
||||||
, fetchFromGitHub
|
, fetchFromGitHub
|
||||||
, python3
|
, python3
|
||||||
, anki
|
|
||||||
}:
|
}:
|
||||||
|
|
||||||
python3.pkgs.buildPythonApplication rec {
|
python3.pkgs.buildPythonApplication rec {
|
||||||
|
@ -11,7 +10,8 @@ python3.pkgs.buildPythonApplication rec {
|
||||||
owner = "ankicommunity";
|
owner = "ankicommunity";
|
||||||
repo = "anki-sync-server";
|
repo = "anki-sync-server";
|
||||||
rev = version;
|
rev = version;
|
||||||
sha256 = "196xhd6vzp1ncr3ahz0bv0gp1ap2s37j8v48dwmvaywzayakqdab";
|
hash = "sha256-RXrdJGJ+HMSpDGQBuVPPqsh3+uwAgE6f7ZJ0yFRMI8I=";
|
||||||
|
fetchSubmodules = true;
|
||||||
};
|
};
|
||||||
format = "other";
|
format = "other";
|
||||||
|
|
||||||
|
@ -21,6 +21,7 @@ python3.pkgs.buildPythonApplication rec {
|
||||||
mkdir -p $out/${python3.sitePackages}
|
mkdir -p $out/${python3.sitePackages}
|
||||||
|
|
||||||
cp -r ankisyncd utils ankisyncd.conf $out/${python3.sitePackages}
|
cp -r ankisyncd utils ankisyncd.conf $out/${python3.sitePackages}
|
||||||
|
cp -r anki-bundled/anki $out/${python3.sitePackages}
|
||||||
mkdir $out/share
|
mkdir $out/share
|
||||||
cp ankisyncctl.py $out/share/
|
cp ankisyncctl.py $out/share/
|
||||||
|
|
||||||
|
@ -28,7 +29,7 @@ python3.pkgs.buildPythonApplication rec {
|
||||||
'';
|
'';
|
||||||
|
|
||||||
fixupPhase = ''
|
fixupPhase = ''
|
||||||
PYTHONPATH="$PYTHONPATH:$out/${python3.sitePackages}:${anki}"
|
PYTHONPATH="$PYTHONPATH:$out/${python3.sitePackages}"
|
||||||
|
|
||||||
makeWrapper "${python3.interpreter}" "$out/bin/ankisyncd" \
|
makeWrapper "${python3.interpreter}" "$out/bin/ankisyncd" \
|
||||||
--set PYTHONPATH $PYTHONPATH \
|
--set PYTHONPATH $PYTHONPATH \
|
||||||
|
@ -46,14 +47,14 @@ python3.pkgs.buildPythonApplication rec {
|
||||||
|
|
||||||
buildInputs = [ ];
|
buildInputs = [ ];
|
||||||
|
|
||||||
propagatedBuildInputs = [ anki ];
|
propagatedBuildInputs = with python3.pkgs; [
|
||||||
|
decorator
|
||||||
|
requests
|
||||||
|
];
|
||||||
|
|
||||||
checkPhase = ''
|
checkPhase = ''
|
||||||
# Exclude tests that require sqlite's sqldiff command, since
|
# skip these tests, our files are too young:
|
||||||
# it isn't yet packaged for NixOS, although 2 PRs exist:
|
# tests/test_web_media.py::SyncAppFunctionalMediaTest::test_sync_mediaChanges ValueError: ZIP does not support timestamps before 1980
|
||||||
# - https://github.com/NixOS/nixpkgs/pull/69112
|
|
||||||
# - https://github.com/NixOS/nixpkgs/pull/75784
|
|
||||||
# Once this is merged, these tests can be run as well.
|
|
||||||
pytest --ignore tests/test_web_media.py tests/
|
pytest --ignore tests/test_web_media.py tests/
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue