From 6402231607610a1f80b6aaaf4c6d5c89c3db0bf2 Mon Sep 17 00:00:00 2001 From: Ryan Horiguchi Date: Tue, 8 Feb 2022 21:08:15 +0100 Subject: fragments: 1.5 -> 2.0.2 --- .../networking/p2p/fragments/default.nix | 95 ++++++++++++---------- 1 file changed, 54 insertions(+), 41 deletions(-) (limited to 'pkgs/applications/networking/p2p/fragments/default.nix') 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; -- cgit 1.4.1