summary refs log tree commit diff
path: root/pkgs/applications/misc/khal/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/applications/misc/khal/default.nix')
-rw-r--r--pkgs/applications/misc/khal/default.nix20
1 files changed, 18 insertions, 2 deletions
diff --git a/pkgs/applications/misc/khal/default.nix b/pkgs/applications/misc/khal/default.nix
index 2e32bbd611a..6aa94b2fecb 100644
--- a/pkgs/applications/misc/khal/default.nix
+++ b/pkgs/applications/misc/khal/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, pkgs, python3 }:
+{ stdenv, pkgs, python3, fetchpatch }:
 
 with python3.pkgs; buildPythonApplication rec {
   pname = "khal";
@@ -9,6 +9,14 @@ with python3.pkgs; buildPythonApplication rec {
     sha256 = "1r8bkgjwkh7i8ygvsv51h1cnax50sb183vafg66x5snxf3dgjl6l";
   };
 
+  # 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";
+  }) ];
+
   propagatedBuildInputs = [
     atomicwrites
     click
@@ -26,11 +34,19 @@ with python3.pkgs; buildPythonApplication rec {
     pkginfo
     freezegun
   ];
-  nativeBuildInputs = [ setuptools_scm ];
+  nativeBuildInputs = [ setuptools_scm sphinx sphinxcontrib_newsfeed ];
   checkInputs = [ pytest ];
 
   postInstall = ''
+    # zsh completion
     install -D misc/__khal $out/share/zsh/site-functions/__khal
+
+    # man page
+    make -C doc man
+    install -Dm755 doc/build/man/khal.1 -t $out/share/man/man1
+
+    # desktop
+    install -Dm755 misc/khal.desktop -t $out/share/applications
   '';
 
   doCheck = !stdenv.isAarch64;