about summary refs log tree commit diff
path: root/pkgs/applications/window-managers
diff options
context:
space:
mode:
authorDominik Schrempf <dominik.schrempf@gmail.com>2021-08-30 15:47:23 +0200
committerDominik Schrempf <dominik.schrempf@gmail.com>2021-08-31 07:47:39 +0200
commitc2f8476de0d966b081739f56f3fdf4a7893079c4 (patch)
tree4d719496fb6b1baa522b160288b3a2d6a08a410f /pkgs/applications/window-managers
parent3e25f7feaaf09c15167d0410999fc38da3872e6c (diff)
stalonetray: 0.8.3 -> 0.8.4
This update is quite involved for a minor version update.

1. I had to change the source from Sourceforge to Github.

2. I manually specify the autoconf pre-configuration steps. This seems to be
necessary, but is there a better, more canonical way?

3. I had to add the docbook dependency and tinker around with substitutions,
because the original files would pull sources from an online repository. Please
have a look!

Thanks for your comments.

Cheers.
Diffstat (limited to 'pkgs/applications/window-managers')
-rw-r--r--pkgs/applications/window-managers/stalonetray/default.nix50
1 files changed, 36 insertions, 14 deletions
diff --git a/pkgs/applications/window-managers/stalonetray/default.nix b/pkgs/applications/window-managers/stalonetray/default.nix
index 47903bb2276e6..218b2a4fefd25 100644
--- a/pkgs/applications/window-managers/stalonetray/default.nix
+++ b/pkgs/applications/window-managers/stalonetray/default.nix
@@ -1,29 +1,51 @@
-{ lib, stdenv, fetchurl, libX11, xorgproto }:
+{ autoreconfHook
+, docbook_xml_dtd_44
+, docbook-xsl-ns
+, fetchFromGitHub
+, lib
+, libX11
+, libXpm
+, libxslt
+, stdenv
+}:
 
 stdenv.mkDerivation rec {
   pname = "stalonetray";
-  version = "0.8.3";
+  version = "0.8.4";
 
-  src = fetchurl {
-    url = "mirror://sourceforge/stalonetray/${pname}-${version}.tar.bz2";
-    sha256 = "0k7xnpdb6dvx25d67v0crlr32cdnzykdsi9j889njiididc8lm1n";
+  src = fetchFromGitHub {
+    owner = "kolbusa";
+    repo = pname;
+    rev = "v${version}";
+    sha256 = "sha256-grxPqSYPLUstLIOKqzMActaSQ2ftYrjbalfR4HcPDRY=";
   };
 
-  buildInputs = [ libX11 xorgproto ];
+  preConfigure =
+    let
+      db_root = "${docbook-xsl-ns}/share/xml/docbook-xsl-ns";
+      ac_str = "AC_SUBST(DOCBOOK_ROOT)";
+      ac_str_sub = "DOCBOOK_ROOT=${db_root}; ${ac_str}";
+    in
+      ''
+        substituteInPlace configure.ac --replace '${ac_str}' '${ac_str_sub}'
+      '';
+
+  nativeBuildInputs = [
+    autoreconfHook
+    docbook-xsl-ns
+    docbook_xml_dtd_44
+    libX11
+    libXpm
+    libxslt
+  ];
 
   hardeningDisable = [ "format" ];
 
   meta = with lib; {
     description = "Stand alone tray";
-    homepage = "http://stalonetray.sourceforge.net";
-    license = licenses.gpl2;
+    homepage = "https://github.com/kolbusa/stalonetray";
+    license = licenses.gpl2Only;
     platforms = platforms.linux;
     maintainers = with maintainers; [ raskin ];
   };
-
-  passthru = {
-    updateInfo = {
-      downloadPage = "https://sourceforge.net/projects/stalonetray/files/";
-    };
-  };
 }