Merge pull request #211431 from chuangzhu/tangram
tangram: 1.3.2 -> 2.0
This commit is contained in:
commit
d87febe795
|
@ -1,22 +1,40 @@
|
||||||
{ stdenv, lib, fetchFromGitHub, appstream-glib, desktop-file-utils, gdk-pixbuf
|
{ stdenv
|
||||||
, gettext, gjs, glib, gobject-introspection, gsettings-desktop-schemas, gtk3
|
, lib
|
||||||
, hicolor-icon-theme, meson, ninja, pkg-config, python3, webkitgtk, wrapGAppsHook
|
, 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
|
||||||
}:
|
}:
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
pname = "tangram";
|
pname = "tangram";
|
||||||
version = "1.3.2";
|
version = "2.0";
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "sonnyp";
|
owner = "sonnyp";
|
||||||
repo = "Tangram";
|
repo = "Tangram";
|
||||||
rev = "v${version}";
|
rev = "v${version}";
|
||||||
sha256 = "sha256-WI0H3bforQ6Jc/+TWFT1zUs4KRtWwvXY2/va+Fnd+iU=";
|
hash = "sha256-ocHE8IztiNm9A1hbzzHXstWpPaOau/IrQ44ccxbsGb0=";
|
||||||
fetchSubmodules = true;
|
fetchSubmodules = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
buildInputs = [ gdk-pixbuf gjs glib gsettings-desktop-schemas gtk3 webkitgtk ];
|
|
||||||
|
|
||||||
nativeBuildInputs = [
|
nativeBuildInputs = [
|
||||||
appstream-glib
|
appstream-glib
|
||||||
desktop-file-utils
|
desktop-file-utils
|
||||||
|
@ -27,23 +45,39 @@ stdenv.mkDerivation rec {
|
||||||
ninja
|
ninja
|
||||||
pkg-config
|
pkg-config
|
||||||
python3
|
python3
|
||||||
|
blueprint-compiler
|
||||||
wrapGAppsHook
|
wrapGAppsHook
|
||||||
];
|
];
|
||||||
|
|
||||||
dontWrapGApps = true;
|
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;
|
||||||
|
|
||||||
# Fixes https://github.com/NixOS/nixpkgs/issues/31168
|
|
||||||
postPatch = ''
|
postPatch = ''
|
||||||
chmod +x build-aux/meson/postinstall.py
|
substituteInPlace src/meson.build --replace "/app/bin/blueprint-compiler" "blueprint-compiler"
|
||||||
patchShebangs build-aux/meson/postinstall.py
|
substituteInPlace {src/,}re.sonny.Tangram troll/gjspack/bin/gjspack \
|
||||||
|
--replace "#!/usr/bin/env -S gjs -m" "#!${gjs}/bin/gjs -m"
|
||||||
'';
|
'';
|
||||||
|
|
||||||
postFixup = ''
|
# https://github.com/NixOS/nixpkgs/issues/31168#issuecomment-341793501
|
||||||
for file in $out/bin/re.sonny.Tangram; do
|
preFixup = ''
|
||||||
sed -e $"2iimports.package._findEffectiveEntryPointName = () => \'$(basename $file)\' " \
|
sed -e '2iimports.package._findEffectiveEntryPointName = () => "re.sonny.Tangram"' \
|
||||||
-i $file
|
-i $out/bin/re.sonny.Tangram
|
||||||
wrapGApp "$file"
|
|
||||||
done
|
|
||||||
'';
|
'';
|
||||||
|
|
||||||
meta = with lib; {
|
meta = with lib; {
|
||||||
|
@ -51,6 +85,6 @@ stdenv.mkDerivation rec {
|
||||||
homepage = "https://github.com/sonnyp/Tangram";
|
homepage = "https://github.com/sonnyp/Tangram";
|
||||||
license = licenses.gpl3Only;
|
license = licenses.gpl3Only;
|
||||||
platforms = platforms.linux;
|
platforms = platforms.linux;
|
||||||
maintainers = with maintainers; [ austinbutler ];
|
maintainers = with maintainers; [ austinbutler chuangzhu ];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue