summary refs log tree commit diff
path: root/pkgs/applications/networking/p2p
diff options
context:
space:
mode:
authorgithub-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>2022-03-21 18:07:51 +0000
committerGitHub <noreply@github.com>2022-03-21 18:07:51 +0000
commit6ae26bb3c8f192281581014f76c3115bf60d7d84 (patch)
tree9b404988a07154dce33cd9654a7f53ad7885be40 /pkgs/applications/networking/p2p
parentde642acb2e49a9499d4a0d71164007391326eb4d (diff)
parent685d333b88e93b7de5eb23096f9d232a0bb97a61 (diff)
downloadnixpkgs-6ae26bb3c8f192281581014f76c3115bf60d7d84.tar
nixpkgs-6ae26bb3c8f192281581014f76c3115bf60d7d84.tar.gz
nixpkgs-6ae26bb3c8f192281581014f76c3115bf60d7d84.tar.bz2
nixpkgs-6ae26bb3c8f192281581014f76c3115bf60d7d84.tar.lz
nixpkgs-6ae26bb3c8f192281581014f76c3115bf60d7d84.tar.xz
nixpkgs-6ae26bb3c8f192281581014f76c3115bf60d7d84.tar.zst
nixpkgs-6ae26bb3c8f192281581014f76c3115bf60d7d84.zip
Merge staging-next into staging
Diffstat (limited to 'pkgs/applications/networking/p2p')
-rw-r--r--pkgs/applications/networking/p2p/fragments/default.nix95
-rw-r--r--pkgs/applications/networking/p2p/fragments/dependency-resolution.patch25
2 files changed, 54 insertions, 66 deletions
diff --git a/pkgs/applications/networking/p2p/fragments/default.nix b/pkgs/applications/networking/p2p/fragments/default.nix
index a07869209c7..ebeba4c010e 100644
--- a/pkgs/applications/networking/p2p/fragments/default.nix
+++ b/pkgs/applications/networking/p2p/fragments/default.nix
@@ -1,76 +1,89 @@
 { lib
 , stdenv
 , fetchFromGitLab
+, fetchpatch
+, appstream-glib
+, dbus
+, desktop-file-utils
+, git
+, glib
+, gtk4
+, libadwaita
 , meson
-, vala
 , ninja
+, openssl
 , pkg-config
-, wrapGAppsHook
-, desktop-file-utils
-, appstream-glib
 , python3
-, glib
-, gtk3
-, libhandy
-, libtransmission
-, libb64
-, libutp
-, miniupnpc
-, dht
-, libnatpmp
-, libevent
-, curl
-, openssl
-, zlib
+, rustPlatform
+, sqlite
+, transmission
+, wrapGAppsHook4
 }:
 
-stdenv.mkDerivation rec {
+let
+  patchedTransmission = transmission.overrideAttrs (oldAttrs: {
+    patches = (oldAttrs.patches or []) ++ [
+      (fetchpatch {
+        url = "https://raw.githubusercontent.com/flathub/de.haeckerfelix.Fragments/2aee477c8e26a24570f8dbbdbd1c49e017ae32eb/transmission_pdeathsig.patch";
+        sha256 = "sha256-/rCoA566tMmzqcIfffC082Y56TwEyyQJ0knxymtscbA=";
+      })
+    ];
+  });
+in stdenv.mkDerivation rec {
   pname = "fragments";
-  version = "1.5";
+  version = "2.0.2";
 
   src = fetchFromGitLab {
     domain = "gitlab.gnome.org";
     owner = "World";
     repo = "Fragments";
     rev = version;
-    sha256 = "0x1kafhlgyi65l4w67c24r8mpvasg3q3c4wlgnjc9sxvp6ki7xbn";
+    sha256 = "sha256-CMa1yka0kOxMhxSuazlJxTk4fzxuuwKYLBpEMwHbBUE=";
   };
 
-  patches = [
-    # Fix dependency resolution
-    ./dependency-resolution.patch
-  ];
+  postPatch = ''
+    patchShebangs build-aux/meson/postinstall.py
+  '';
+
+  cargoDeps = rustPlatform.fetchCargoTarball {
+    inherit src;
+    name = "${pname}-${version}";
+    hash = "sha256-/rFZcbpITYkpSCEZp9XH253u90RGmuVLEBGIRNBgI/o=";
+  };
 
   nativeBuildInputs = [
+    appstream-glib
+    desktop-file-utils
+    git
     meson
-    vala
     ninja
     pkg-config
-    wrapGAppsHook
-    desktop-file-utils
-    appstream-glib
     python3
-  ];
+    wrapGAppsHook4
+  ] ++ (with rustPlatform; [
+    cargoSetupHook
+    rust.cargo
+    rust.rustc
+  ]);
 
   buildInputs = [
+    dbus
     glib
-    gtk3
-    libhandy
-    libtransmission
-    libb64
-    libutp
-    miniupnpc
-    dht
-    libnatpmp
-    libevent
-    curl
+    gtk4
+    libadwaita
     openssl
-    zlib
+    sqlite
   ];
 
+  preFixup =  ''
+    gappsWrapperArgs+=(
+      --prefix PATH : "${lib.makeBinPath [ patchedTransmission ]}"
+    )
+  '';
+
   meta = with lib; {
     homepage = "https://gitlab.gnome.org/World/Fragments";
-    description = "A GTK3 BitTorrent Client";
+    description = "Easy to use BitTorrent client for the GNOME desktop environment";
     maintainers = with maintainers; [ emilytrau ];
     license = licenses.gpl3Plus;
     platforms = platforms.linux;
diff --git a/pkgs/applications/networking/p2p/fragments/dependency-resolution.patch b/pkgs/applications/networking/p2p/fragments/dependency-resolution.patch
deleted file mode 100644
index 0446bc1390c..00000000000
--- a/pkgs/applications/networking/p2p/fragments/dependency-resolution.patch
+++ /dev/null
@@ -1,25 +0,0 @@
-diff --git a/meson.build b/meson.build
-index 5030d0c..6de7a20 100644
---- a/meson.build
-+++ b/meson.build
-@@ -32,10 +32,11 @@ transmission_dep = declare_dependency(
- 				meson.get_compiler('c').find_library('dht'),
- 				meson.get_compiler('c').find_library('natpmp'),
- 				meson.get_compiler('c').find_library('event'),
--				meson.get_compiler('c').find_library('libcurl'),
--				meson.get_compiler('c').find_library('libcrypto'),
-+				meson.get_compiler('c').find_library('curl'),
-+				meson.get_compiler('c').find_library('crypto'),
-+				meson.get_compiler('c').find_library('ssl'),
- 				meson.get_compiler('c').find_library('libpthread'),
--				meson.get_compiler('c').find_library('libz'),
-+				meson.get_compiler('c').find_library('z'),
- 				transmission_vapi,
- 				transmission_lib
- 			])
-@@ -45,4 +46,4 @@ subdir('data')
- subdir('po')
- subdir('src')
- 
--meson.add_install_script('build-aux/postinstall.py')
-+meson.add_install_script('python3', '../build-aux/postinstall.py')