nixpkgs/pkgs/by-name/ta/tangram/package.nix

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

92 lines
1.9 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_6_0
2023-01-19 07:03:34 +00:00
, blueprint-compiler
, wrapGAppsHook4
2021-01-18 21:40:10 +00:00
}:
stdenv.mkDerivation rec {
pname = "tangram";
2024-05-30 02:34:55 +00:00
version = "3.1";
2021-01-18 21:40:10 +00:00
src = fetchFromGitHub {
owner = "sonnyp";
repo = "Tangram";
rev = "v${version}";
2024-05-30 02:34:55 +00:00
hash = "sha256-vN9zRc8Ac9SI0lIcuf01A2WLqLGtV3DUiNzCSmc2ri4=";
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
wrapGAppsHook4
2021-01-18 21:40:10 +00:00
];
2023-01-19 07:03:34 +00:00
buildInputs = [
gdk-pixbuf
gjs
glib
glib-networking
gsettings-desktop-schemas
gtk4
libadwaita
webkitgtk_6_0
2023-01-19 07:03:34 +00:00
] ++ (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"
2023-04-30 15:30:50 +00:00
substituteInPlace src/bin.js troll/gjspack/bin/gjspack \
2023-01-19 07:03:34 +00:00
--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";
mainProgram = "re.sonny.Tangram";
2021-01-18 21:40:10 +00:00
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
};
}