nixpkgs/pkgs/applications/networking/p2p/fragments/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

92 lines
1.8 KiB
Nix
Raw Normal View History

2021-08-14 13:36:03 +01:00
{ lib
, stdenv
, fetchFromGitLab
2022-02-08 20:08:15 +00:00
, fetchpatch
, appstream-glib
, dbus
, desktop-file-utils
, git
, glib
, gtk4
, libadwaita
2021-08-14 13:36:03 +01:00
, meson
, ninja
2022-02-08 20:08:15 +00:00
, openssl
2021-08-14 13:36:03 +01:00
, pkg-config
, python3
2022-02-08 20:08:15 +00:00
, rustPlatform
, sqlite
, transmission
, wrapGAppsHook4
2021-08-14 13:36:03 +01:00
}:
2022-02-08 20:08:15 +00:00
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 {
2021-08-14 13:36:03 +01:00
pname = "fragments";
2022-02-08 20:08:15 +00:00
version = "2.0.2";
2021-08-14 13:36:03 +01:00
src = fetchFromGitLab {
domain = "gitlab.gnome.org";
owner = "World";
repo = "Fragments";
rev = version;
2022-02-08 20:08:15 +00:00
sha256 = "sha256-CMa1yka0kOxMhxSuazlJxTk4fzxuuwKYLBpEMwHbBUE=";
2021-08-14 13:36:03 +01:00
};
2022-02-08 20:08:15 +00:00
postPatch = ''
patchShebangs build-aux/meson/postinstall.py
'';
cargoDeps = rustPlatform.fetchCargoTarball {
inherit src;
name = "${pname}-${version}";
hash = "sha256-/rFZcbpITYkpSCEZp9XH253u90RGmuVLEBGIRNBgI/o=";
};
2021-08-14 13:36:03 +01:00
nativeBuildInputs = [
2022-02-08 20:08:15 +00:00
appstream-glib
desktop-file-utils
git
2021-08-14 13:36:03 +01:00
meson
ninja
pkg-config
python3
2022-02-08 20:08:15 +00:00
wrapGAppsHook4
] ++ (with rustPlatform; [
cargoSetupHook
rust.cargo
rust.rustc
]);
2021-08-14 13:36:03 +01:00
buildInputs = [
2022-02-08 20:08:15 +00:00
dbus
2021-08-14 13:36:03 +01:00
glib
2022-02-08 20:08:15 +00:00
gtk4
libadwaita
2021-08-14 13:36:03 +01:00
openssl
2022-02-08 20:08:15 +00:00
sqlite
2021-08-14 13:36:03 +01:00
];
2022-02-08 20:08:15 +00:00
preFixup = ''
gappsWrapperArgs+=(
--prefix PATH : "${lib.makeBinPath [ patchedTransmission ]}"
)
'';
2021-08-14 13:36:03 +01:00
meta = with lib; {
homepage = "https://gitlab.gnome.org/World/Fragments";
2022-02-08 20:08:15 +00:00
description = "Easy to use BitTorrent client for the GNOME desktop environment";
2022-02-11 04:45:03 +00:00
maintainers = with maintainers; [ emilytrau ];
2021-08-14 13:36:03 +01:00
license = licenses.gpl3Plus;
platforms = platforms.linux;
};
}