nixpkgs/pkgs/applications/networking/instant-messengers/tangram/default.nix

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

91 lines
1.8 KiB
Nix
Raw Normal View History

2023-01-19 07:03:34 +00:00
{ stdenv
, lib
, fetchFromGitHub
, appstream-glib
, desktop-file-utils
, gdk-pixbuf
, gettext
, gjs
, glib
, glib-networking
, gobject-introspection
, gsettings-desktop-schemas
, gtk4
, libadwaita
, gst_all_1
, hicolor-icon-theme
, meson
, ninja
, pkg-config
, python3
, webkitgtk_5_0
, blueprint-compiler
, wrapGAppsHook
2021-01-18 21:40:10 +00:00
}:
stdenv.mkDerivation rec {
pname = "tangram";
2023-01-19 07:03:34 +00:00
version = "2.0";
2021-01-18 21:40:10 +00:00
src = fetchFromGitHub {
owner = "sonnyp";
repo = "Tangram";
rev = "v${version}";
2023-01-19 07:03:34 +00:00
hash = "sha256-ocHE8IztiNm9A1hbzzHXstWpPaOau/IrQ44ccxbsGb0=";
2021-01-18 21:40:10 +00:00
fetchSubmodules = true;
};
nativeBuildInputs = [
appstream-glib
desktop-file-utils
gettext
gobject-introspection
hicolor-icon-theme
meson
ninja
pkg-config
2021-01-18 21:40:10 +00:00
python3
2023-01-19 07:03:34 +00:00
blueprint-compiler
2021-01-18 21:40:10 +00:00
wrapGAppsHook
];
2023-01-19 07:03:34 +00:00
buildInputs = [
gdk-pixbuf
gjs
glib
glib-networking
gsettings-desktop-schemas
gtk4
libadwaita
webkitgtk_5_0
] ++ (with gst_all_1; [
gstreamer
gst-libav
gst-plugins-base
(gst-plugins-good.override { gtkSupport = true; })
gst-plugins-bad
]);
dontPatchShebangs = true;
2021-01-18 21:40:10 +00:00
postPatch = ''
2023-01-19 07:03:34 +00:00
substituteInPlace src/meson.build --replace "/app/bin/blueprint-compiler" "blueprint-compiler"
substituteInPlace {src/,}re.sonny.Tangram troll/gjspack/bin/gjspack \
--replace "#!/usr/bin/env -S gjs -m" "#!${gjs}/bin/gjs -m"
2021-01-18 21:40:10 +00:00
'';
2023-01-19 07:03:34 +00:00
# https://github.com/NixOS/nixpkgs/issues/31168#issuecomment-341793501
preFixup = ''
sed -e '2iimports.package._findEffectiveEntryPointName = () => "re.sonny.Tangram"' \
-i $out/bin/re.sonny.Tangram
2021-01-18 21:40:10 +00:00
'';
meta = with lib; {
description = "Run web apps on your desktop";
homepage = "https://github.com/sonnyp/Tangram";
license = licenses.gpl3Only;
platforms = platforms.linux;
2023-01-19 07:03:34 +00:00
maintainers = with maintainers; [ austinbutler chuangzhu ];
2021-01-18 21:40:10 +00:00
};
}