summary refs log tree commit diff
path: root/pkgs/applications/misc/khal
diff options
context:
space:
mode:
authorMaximilian Bosch <maximilian@mbosch.me>2020-01-06 17:28:46 +0100
committerMaximilian Bosch <maximilian@mbosch.me>2020-01-06 17:41:44 +0100
commita6d0b81d28dcbd08d32f178d91fa8cdb97f5fa3f (patch)
treebd66f9d7090a592dd0357ba61be6172ea8277d91 /pkgs/applications/misc/khal
parentb806f95ce6f38c1e4a49e08379975324db183b4a (diff)
downloadnixpkgs-a6d0b81d28dcbd08d32f178d91fa8cdb97f5fa3f.tar
nixpkgs-a6d0b81d28dcbd08d32f178d91fa8cdb97f5fa3f.tar.gz
nixpkgs-a6d0b81d28dcbd08d32f178d91fa8cdb97f5fa3f.tar.bz2
nixpkgs-a6d0b81d28dcbd08d32f178d91fa8cdb97f5fa3f.tar.lz
nixpkgs-a6d0b81d28dcbd08d32f178d91fa8cdb97f5fa3f.tar.xz
nixpkgs-a6d0b81d28dcbd08d32f178d91fa8cdb97f5fa3f.tar.zst
nixpkgs-a6d0b81d28dcbd08d32f178d91fa8cdb97f5fa3f.zip
khal: fix build
* `glibcLocales` (+appropriate locale settings) are needed to fix
  locale/language-related errors in the `checkPhase`.
* The `test_editor.test_popup`-testcase appears to break in
  their testsuite. I confirmed manually that the functionality works, the
  error looks more like a problem related to the mocking-api. Thus I
  disabled the test for now.

https://hydra.nixos.org/build/109705657

Closes #76989
Diffstat (limited to 'pkgs/applications/misc/khal')
-rw-r--r--pkgs/applications/misc/khal/default.nix18
-rw-r--r--pkgs/applications/misc/khal/skip-broken-test.patch21
2 files changed, 32 insertions, 7 deletions
diff --git a/pkgs/applications/misc/khal/default.nix b/pkgs/applications/misc/khal/default.nix
index 756c8e25971..c435eaefed5 100644
--- a/pkgs/applications/misc/khal/default.nix
+++ b/pkgs/applications/misc/khal/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, pkgs, python3, fetchpatch }:
+{ stdenv, pkgs, python3, fetchpatch, glibcLocales }:
 
 with python3.pkgs; buildPythonApplication rec {
   pname = "khal";
@@ -11,11 +11,14 @@ with python3.pkgs; buildPythonApplication rec {
 
   # Include a khal.desktop file via upstream commit.
   # This patch should be removed when updating to the next version, probably.
-  patches = [ (fetchpatch {
-    name = "add-khal-dot-desktop.patch";
-    url = "https://github.com/pimutils/khal/commit/1f93d238fec7c934dd2f8e48f54925d22130e3aa.patch";
-    sha256 = "06skn3van7zd93348fc6axllx71ckkc7h2zljqlvwa339vca608c";
-  }) ];
+  patches = [
+    (fetchpatch {
+      name = "add-khal-dot-desktop.patch";
+      url = "https://github.com/pimutils/khal/commit/1f93d238fec7c934dd2f8e48f54925d22130e3aa.patch";
+      sha256 = "06skn3van7zd93348fc6axllx71ckkc7h2zljqlvwa339vca608c";
+    })
+    ./skip-broken-test.patch
+  ];
 
   propagatedBuildInputs = [
     atomicwrites
@@ -35,7 +38,8 @@ with python3.pkgs; buildPythonApplication rec {
     freezegun
   ];
   nativeBuildInputs = [ setuptools_scm sphinx sphinxcontrib_newsfeed ];
-  checkInputs = [ pytest ];
+  checkInputs = [ pytest glibcLocales ];
+  LC_ALL = "en_US.UTF-8";
 
   postInstall = ''
     # zsh completion
diff --git a/pkgs/applications/misc/khal/skip-broken-test.patch b/pkgs/applications/misc/khal/skip-broken-test.patch
new file mode 100644
index 00000000000..c3c982547ae
--- /dev/null
+++ b/pkgs/applications/misc/khal/skip-broken-test.patch
@@ -0,0 +1,21 @@
+diff --git a/tests/ui/test_editor.py b/tests/ui/test_editor.py
+index 27b7fa5..5978d72 100644
+--- a/tests/ui/test_editor.py
++++ b/tests/ui/test_editor.py
+@@ -1,5 +1,7 @@
+ import datetime as dt
+ 
++import pytest
++
+ import icalendar
+ from khal.ui.editor import RecurrenceEditor, StartEndEditor
+ 
+@@ -19,7 +21,7 @@ palette = {
+     'edit': 'blue',
+ }
+ 
+-
++@pytest.mark.skip(reason="Mocking breaks in this testcase")
+ def test_popup(monkeypatch):
+     """making sure the popup calendar gets callend with the right inital value
+