diff --git a/pkgs/applications/networking/p2p/fragments/default.nix b/pkgs/applications/networking/p2p/fragments/default.nix new file mode 100644 index 000000000000..721f0ca259f0 --- /dev/null +++ b/pkgs/applications/networking/p2p/fragments/default.nix @@ -0,0 +1,78 @@ +{ lib +, stdenv +, fetchFromGitLab +, meson +, vala +, ninja +, pkg-config +, wrapGAppsHook +, desktop-file-utils +, appstream-glib +, python3 +, glib +, gtk3 +, libhandy +, libtransmission +, libb64 +, libutp +, miniupnpc +, dht +, libnatpmp +, libevent +, curl +, openssl +, zlib +}: + +stdenv.mkDerivation rec { + pname = "fragments"; + version = "1.5"; + + src = fetchFromGitLab { + domain = "gitlab.gnome.org"; + owner = "World"; + repo = "Fragments"; + rev = version; + sha256 = "0x1kafhlgyi65l4w67c24r8mpvasg3q3c4wlgnjc9sxvp6ki7xbn"; + }; + + patches = [ + # Fix dependency resolution + ./dependency-resolution.patch + ]; + + nativeBuildInputs = [ + meson + vala + ninja + pkg-config + wrapGAppsHook + desktop-file-utils + appstream-glib + python3 + ]; + + buildInputs = [ + glib + gtk3 + libhandy + libtransmission + libb64 + libutp + miniupnpc + dht + libnatpmp + libevent + curl + openssl + zlib + ]; + + meta = with lib; { + homepage = "https://gitlab.gnome.org/World/Fragments"; + description = "A GTK3 BitTorrent Client"; + maintainers = with maintainers; [ angustrau ]; + 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 new file mode 100644 index 000000000000..0446bc1390c7 --- /dev/null +++ b/pkgs/applications/networking/p2p/fragments/dependency-resolution.patch @@ -0,0 +1,25 @@ +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') diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 77931a010802..a5f710024cf6 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -24577,6 +24577,8 @@ with pkgs; fractal = callPackage ../applications/networking/instant-messengers/fractal { }; + fragments = callPackage ../applications/networking/p2p/fragments { }; + freecad = libsForQt5.callPackage ../applications/graphics/freecad { inherit (python3Packages) GitPython