Merge pull request #158706 from rhoriguchi/fragments

fragments: 1.5 -> 2.0.2
This commit is contained in:
Jan Tojnar 2022-03-21 14:49:47 +01:00 committed by GitHub
commit 84569e8d3c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 55 additions and 67 deletions

View file

@ -1,76 +1,89 @@
{ lib
, stdenv
, fetchFromGitLab
, meson
, vala
, ninja
, pkg-config
, wrapGAppsHook
, desktop-file-utils
, fetchpatch
, appstream-glib
, python3
, dbus
, desktop-file-utils
, git
, glib
, gtk3
, libhandy
, libtransmission
, libb64
, libutp
, miniupnpc
, dht
, libnatpmp
, libevent
, curl
, gtk4
, libadwaita
, meson
, ninja
, openssl
, zlib
, pkg-config
, python3
, 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;

View file

@ -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')