summary refs log tree commit diff
path: root/pkgs/servers/uhub/default.nix
diff options
context:
space:
mode:
authorEmery Hemingway <ehmry@posteo.net>2021-05-17 13:47:15 +0200
committerJ. Emery Hemingway <ehmry@posteo.net>2021-08-11 09:51:23 +0200
commit4f78c88e819e5e6566096d8e3350a9d27b0e8562 (patch)
treeb4e5444b4677d0c23c15adda490ac0e69deeef2b /pkgs/servers/uhub/default.nix
parent297a0094a6ffba23c8d7e2bcb992d401ab61b7a6 (diff)
downloadnixpkgs-4f78c88e819e5e6566096d8e3350a9d27b0e8562.tar
nixpkgs-4f78c88e819e5e6566096d8e3350a9d27b0e8562.tar.gz
nixpkgs-4f78c88e819e5e6566096d8e3350a9d27b0e8562.tar.bz2
nixpkgs-4f78c88e819e5e6566096d8e3350a9d27b0e8562.tar.lz
nixpkgs-4f78c88e819e5e6566096d8e3350a9d27b0e8562.tar.xz
nixpkgs-4f78c88e819e5e6566096d8e3350a9d27b0e8562.tar.zst
nixpkgs-4f78c88e819e5e6566096d8e3350a9d27b0e8562.zip
uhub: 0.5.0 -> unstable-2019-12-13
Diffstat (limited to 'pkgs/servers/uhub/default.nix')
-rw-r--r--pkgs/servers/uhub/default.nix43
1 files changed, 11 insertions, 32 deletions
diff --git a/pkgs/servers/uhub/default.nix b/pkgs/servers/uhub/default.nix
index 4569ee675d9..df76789f908 100644
--- a/pkgs/servers/uhub/default.nix
+++ b/pkgs/servers/uhub/default.nix
@@ -1,52 +1,31 @@
-{ lib, stdenv, fetchpatch, fetchFromGitHub, cmake, openssl, sqlite, pkg-config, systemd
-, tlsSupport ? false }:
+{ lib, stdenv, fetchpatch, fetchFromGitHub, cmake, openssl, sqlite, pkg-config
+, systemd, tlsSupport ? false }:
 
 assert tlsSupport -> openssl != null;
 
 stdenv.mkDerivation rec {
   pname = "uhub";
-  version = "0.5.0";
+  version = "unstable-2019-12-13";
 
   src = fetchFromGitHub {
     owner = "janvidar";
     repo = "uhub";
-    rev = version;
-    sha256 = "0zdbxfvw7apmfhqgsfkfp4pn9iflzwdn0zwvzymm5inswfc00pxg";
+    rev = "35d8088b447527f56609b85b444bd0b10cd67b5c";
+    hash = "sha256-CdTTf82opnpjd7I9TTY+JDEZSfdGFPE0bq/xsafwm/w=";
   };
 
   nativeBuildInputs = [ cmake pkg-config ];
   buildInputs = [ sqlite systemd ] ++ lib.optional tlsSupport openssl;
 
-  outputs = [ "out"
-    "mod_example"
-    "mod_welcome"
-    "mod_logging"
-    "mod_auth_simple"
-    "mod_auth_sqlite"
-    "mod_chat_history"
-    "mod_chat_only"
-    "mod_topic"
-    "mod_no_guest_downloads"
-  ];
-
-  patches = [
-    ./plugin-dir.patch
-    # fix aarch64 build: https://github.com/janvidar/uhub/issues/46
-    (fetchpatch {
-      url = "https://github.com/janvidar/uhub/pull/47.patch";
-      sha256 = "07yik6za89ar5bxm7m2183i7f6hfbawbxvd4vs02n1zr2fgfxmiq";
-    })
-
-    # Fixed compilation on systemd > 210
-    (fetchpatch {
-      url = "https://github.com/janvidar/uhub/commit/70f2a43f676cdda5961950a8d9a21e12d34993f8.diff";
-      sha256 = "1jp8fvw6f9jh0sdjml9mahkk6p6b96p6rzg2y601mnnbcdj8y8xp";
-    })
-  ];
+  postPatch = ''
+    substituteInPlace CMakeLists.txt \
+      --replace "/usr/lib/uhub/" "$out/plugins" \
+      --replace "/etc/uhub" "$TMPDIR"
+  '';
 
   cmakeFlags = [
     "-DSYSTEMD_SUPPORT=ON"
-    (if tlsSupport then "-DSSL_SUPPORT=ON" else "-DSSL_SUPPORT=OFF")
+    "-DSSL_SUPPORT=${if tlsSupport then "ON" else "OFF"}"
   ];
 
   meta = with lib; {