summary refs log tree commit diff
path: root/pkgs/applications
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/applications')
-rw-r--r--pkgs/applications/audio/helvum/default.nix12
-rw-r--r--pkgs/applications/networking/p2p/retroshare/default.nix53
-rw-r--r--pkgs/applications/networking/p2p/retroshare/no-submodules.patch62
-rw-r--r--pkgs/applications/science/electronics/dsview/default.nix11
4 files changed, 137 insertions, 1 deletions
diff --git a/pkgs/applications/audio/helvum/default.nix b/pkgs/applications/audio/helvum/default.nix
index 1c2acb36f00..1ecf9c56e86 100644
--- a/pkgs/applications/audio/helvum/default.nix
+++ b/pkgs/applications/audio/helvum/default.nix
@@ -1,5 +1,7 @@
 { lib
 , fetchFromGitLab
+, makeDesktopItem
+, copyDesktopItems
 , rustPlatform
 , pkg-config
 , clang
@@ -23,11 +25,19 @@ rustPlatform.buildRustPackage rec {
 
   cargoSha256 = "sha256-uNTSU06Fz/ud04K40e98rb7o/uAht0DsiJOXeHX72vw=";
 
-  nativeBuildInputs = [ clang pkg-config ];
+  nativeBuildInputs = [ clang copyDesktopItems pkg-config ];
   buildInputs = [ glib gtk4 pipewire ];
 
   LIBCLANG_PATH = "${libclang.lib}/lib";
 
+  desktopItems = makeDesktopItem {
+    name = "Helvum";
+    exec = pname;
+    desktopName = "Helvum";
+    genericName = "Helvum";
+    categories = "AudioVideo;";
+  };
+
   meta = with lib; {
     description = "A GTK patchbay for pipewire";
     homepage = "https://gitlab.freedesktop.org/ryuukyu/helvum";
diff --git a/pkgs/applications/networking/p2p/retroshare/default.nix b/pkgs/applications/networking/p2p/retroshare/default.nix
new file mode 100644
index 00000000000..e69155d4c2f
--- /dev/null
+++ b/pkgs/applications/networking/p2p/retroshare/default.nix
@@ -0,0 +1,53 @@
+{ lib, mkDerivation, fetchFromGitHub, qmake, cmake, pkg-config, miniupnpc, bzip2
+, speex, libmicrohttpd, libxml2, libxslt, sqlcipher, rapidjson, libXScrnSaver
+, qtbase, qtx11extras, qtmultimedia, libgnome-keyring3
+}:
+
+mkDerivation rec {
+  pname = "retroshare";
+  version = "0.6.6";
+
+  src = fetchFromGitHub {
+    owner = "RetroShare";
+    repo = "RetroShare";
+    rev = "v${version}";
+    sha256 = "1hsymbhsfgycj39mdkrdp2hgq8irmvxa4a6jx2gg339m1fgf2xmh";
+    fetchSubmodules = true;
+  };
+
+  patches = [
+    # The build normally tries to get git sub-modules during build
+    # but we already have them checked out
+    ./no-submodules.patch
+  ];
+
+  nativeBuildInputs = [ pkg-config qmake cmake ];
+  buildInputs = [
+    speex miniupnpc qtmultimedia qtx11extras qtbase libgnome-keyring3
+    bzip2 libXScrnSaver libxml2 libxslt sqlcipher libmicrohttpd rapidjson
+  ];
+
+  qmakeFlags = [
+    # Upnp library autodetection doesn't work
+    "RS_UPNP_LIB=miniupnpc"
+
+    # These values are normally found from the .git folder
+    "RS_MAJOR_VERSION=${lib.versions.major version}"
+    "RS_MINOR_VERSION=${lib.versions.minor version}"
+    "RS_MINI_VERSION=${lib.versions.patch version}"
+    "RS_EXTRA_VERSION="
+  ];
+
+  postInstall = ''
+    # BT DHT bootstrap
+    cp libbitdht/src/bitdht/bdboot.txt $out/share/retroshare
+  '';
+
+  meta = with lib; {
+    description = "Decentralized peer to peer chat application.";
+    homepage = "http://retroshare.sourceforge.net/";
+    license = licenses.gpl2Plus;
+    platforms = platforms.linux;
+    maintainers = with maintainers; [ StijnDW ];
+  };
+}
diff --git a/pkgs/applications/networking/p2p/retroshare/no-submodules.patch b/pkgs/applications/networking/p2p/retroshare/no-submodules.patch
new file mode 100644
index 00000000000..d4726800309
--- /dev/null
+++ b/pkgs/applications/networking/p2p/retroshare/no-submodules.patch
@@ -0,0 +1,62 @@
+diff --git a/libretroshare/src/libretroshare.pro b/libretroshare/src/libretroshare.pro
+index 84d18944e..71aeb67d2 100644
+--- a/libretroshare/src/libretroshare.pro
++++ b/libretroshare/src/libretroshare.pro
+@@ -870,20 +870,14 @@ rs_jsonapi {
+         genrestbedlib.variable_out = PRE_TARGETDEPS
+         win32-g++:isEmpty(QMAKE_SH) {
+             genrestbedlib.commands = \
+-                cd /D $$shell_path($${RS_SRC_PATH}) && git submodule update --init supportlibs/restbed || cd . $$escape_expand(\\n\\t) \
+-                cd /D $$shell_path($${RESTBED_SRC_PATH}) && git submodule update --init dependency/asio || cd . $$escape_expand(\\n\\t) \
+-                cd /D $$shell_path($${RESTBED_SRC_PATH}) && git submodule update --init dependency/catch || cd . $$escape_expand(\\n\\t )\
+-                cd /D $$shell_path($${RESTBED_SRC_PATH}) && git submodule update --init dependency/kashmir || cd . $$escape_expand(\\n\\t) \
++                cd /D $$shell_path($${RS_SRC_PATH}) && cd . $$escape_expand(\\n\\t) \
++                cd /D $$shell_path($${RESTBED_SRC_PATH}) && cd . $$escape_expand(\\n\\t) \
++                cd /D $$shell_path($${RESTBED_SRC_PATH}) && cd . $$escape_expand(\\n\\t )\
++                cd /D $$shell_path($${RESTBED_SRC_PATH}) && cd . $$escape_expand(\\n\\t) \
+                 $(CHK_DIR_EXISTS) $$shell_path($$UDP_DISCOVERY_BUILD_PATH) $(MKDIR) $$shell_path($${UDP_DISCOVERY_BUILD_PATH}) $$escape_expand(\\n\\t)
+         } else {
+             genrestbedlib.commands = \
+-                cd $${RS_SRC_PATH} && ( \
+-                git submodule update --init supportlibs/restbed ; \
+-                cd $${RESTBED_SRC_PATH} ; \
+-                git submodule update --init dependency/asio ; \
+-                git submodule update --init dependency/catch ; \
+-                git submodule update --init dependency/kashmir ; \
+-                true ) && \
++                cd $${RS_SRC_PATH} && \
+                 mkdir -p $${RESTBED_BUILD_PATH} &&
+         }
+         genrestbedlib.commands += \
+@@ -991,14 +985,9 @@ rs_broadcast_discovery {
+         udpdiscoverycpplib.variable_out = PRE_TARGETDEPS
+         win32-g++:isEmpty(QMAKE_SH) {
+             udpdiscoverycpplib.commands = \
+-                cd /D $$shell_path($${RS_SRC_PATH}) && git submodule update --init supportlibs/udp-discovery-cpp || cd . $$escape_expand(\\n\\t) \
+                 $(CHK_DIR_EXISTS) $$shell_path($$UDP_DISCOVERY_BUILD_PATH) $(MKDIR) $$shell_path($${UDP_DISCOVERY_BUILD_PATH}) $$escape_expand(\\n\\t)
+         } else {
+-            udpdiscoverycpplib.commands = \
+-                cd $${RS_SRC_PATH} && ( \
+-                git submodule update --init supportlibs/udp-discovery-cpp || \
+-                true ) && \
+-                mkdir -p $${UDP_DISCOVERY_BUILD_PATH} &&
++            udpdiscoverycpplib.commands = mkdir -p $${UDP_DISCOVERY_BUILD_PATH} &&
+         }
+         udpdiscoverycpplib.commands += \
+             cd $$shell_path($${UDP_DISCOVERY_BUILD_PATH}) && \
+diff --git a/retroshare-gui/src/retroshare-gui.pro b/retroshare-gui/src/retroshare-gui.pro
+index 654efd170..06cba9ba3 100644
+--- a/retroshare-gui/src/retroshare-gui.pro
++++ b/retroshare-gui/src/retroshare-gui.pro
+@@ -66,10 +66,7 @@ rs_gui_cmark {
+ 		gencmarklib.CONFIG += target_predeps combine
+ 		gencmarklib.variable_out = PRE_TARGETDEPS
+ 		gencmarklib.commands = \
+-		    cd $${RS_SRC_PATH} && ( \
+-		    git submodule update --init supportlibs/cmark ; \
+-		    cd $${CMARK_SRC_PATH} ; \
+-		    true ) && \
++		    cd $${RS_SRC_PATH} && \
+ 		    mkdir -p $${CMARK_BUILD_PATH} && cd $${CMARK_BUILD_PATH} && \
+ 		    cmake \
+ 		        -DCMAKE_CXX_COMPILER=$$QMAKE_CXX \
diff --git a/pkgs/applications/science/electronics/dsview/default.nix b/pkgs/applications/science/electronics/dsview/default.nix
index ab16866fe01..eb8246a584d 100644
--- a/pkgs/applications/science/electronics/dsview/default.nix
+++ b/pkgs/applications/science/electronics/dsview/default.nix
@@ -25,6 +25,17 @@ mkDerivation rec {
     # Using local file instead of content of commit #33e3d896a47 because
     # sourceRoot make it unappliable
     ./qt515.patch
+
+    # Change from upstream master that removes extern-C scopes which
+    # cause failures with modern glib. This can likely be removed if
+    # there is an upstream release >1.12
+    (fetchpatch {
+      name = "fix-extern-c.patch";
+      url = "https://github.com/DreamSourceLab/DSView/commit/33cc733abe19872bf5ed08540a94b798d0d4ecf4.patch";
+      sha256 = "sha256-TLfLQa3sdyNHTpMMvId/V6uUuOFihOZMFJOj9frnDoY=";
+      stripLen = 2;
+      extraPrefix = "";
+    })
   ];
 
   nativeBuildInputs = [ cmake pkg-config ];