From 4f78c88e819e5e6566096d8e3350a9d27b0e8562 Mon Sep 17 00:00:00 2001 From: Emery Hemingway Date: Mon, 17 May 2021 13:47:15 +0200 Subject: uhub: 0.5.0 -> unstable-2019-12-13 --- pkgs/servers/uhub/default.nix | 43 ++++++++++---------------------------- pkgs/servers/uhub/plugin-dir.patch | 19 ----------------- 2 files changed, 11 insertions(+), 51 deletions(-) delete mode 100644 pkgs/servers/uhub/plugin-dir.patch 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; { diff --git a/pkgs/servers/uhub/plugin-dir.patch b/pkgs/servers/uhub/plugin-dir.patch deleted file mode 100644 index d29d600425f..00000000000 --- a/pkgs/servers/uhub/plugin-dir.patch +++ /dev/null @@ -1,19 +0,0 @@ ---- a/CMakeLists.txt -+++ b/CMakeLists.txt -@@ -241,8 +241,14 @@ - - if (UNIX) - install( TARGETS uhub uhub-passwd RUNTIME DESTINATION bin ) -- install( TARGETS mod_example mod_welcome mod_logging mod_auth_simple mod_auth_sqlite mod_chat_history mod_chat_history_sqlite mod_chat_only mod_topic mod_no_guest_downloads DESTINATION /usr/lib/uhub/ OPTIONAL ) -- install( FILES ${CMAKE_SOURCE_DIR}/doc/uhub.conf ${CMAKE_SOURCE_DIR}/doc/plugins.conf ${CMAKE_SOURCE_DIR}/doc/rules.txt ${CMAKE_SOURCE_DIR}/doc/motd.txt DESTINATION /etc/uhub OPTIONAL ) -+ -+ set( PLUGINS mod_example mod_welcome mod_logging mod_auth_simple mod_auth_sqlite mod_chat_history mod_chat_only mod_topic mod_no_guest_downloads ) -+ -+ foreach( PLUGIN ${PLUGINS} ) -+ install( TARGETS ${PLUGIN} DESTINATION $ENV{${PLUGIN}} OPTIONAL ) -+ endforeach( PLUGIN ) -+ -+ install( FILES ${CMAKE_SOURCE_DIR}/doc/uhub.conf ${CMAKE_SOURCE_DIR}/doc/plugins.conf ${CMAKE_SOURCE_DIR}/doc/rules.txt ${CMAKE_SOURCE_DIR}/doc/motd.txt DESTINATION doc/ OPTIONAL ) - endif() - - -- cgit 1.4.1