config/packages/apps/identity/default.nix
2022-02-05 20:47:50 +01:00

80 lines
1.5 KiB
Nix

{ lib, stdenv
, desktop-file-utils
, fetchFromGitLab
, nix-update-script
, meson
, ninja
, gettext
, python3
, rustPlatform
, pkg-config
, glib
, libhandy
, gtk3
, dbus
, gst_all_1
, wrapGAppsHook
}:
stdenv.mkDerivation rec {
pname = "identity";
version = "0.1.3";
src = fetchFromGitLab {
domain = "gitlab.gnome.org";
owner = "YaLTeR";
repo = "identity";
rev = "v${version}";
sha256 = "sha256-LvBDzI8x42npiRSR3uNTYGuz7H7ClaUR9zp9rchpMyk=";
};
cargoDeps = rustPlatform.fetchCargoTarball {
inherit src;
name = "${pname}-${version}";
hash = "sha256-2xURbda1fIQr+nWPL5yilDBT7ji3uTHwhYKgL77vYek=";
};
nativeBuildInputs = [
desktop-file-utils
gettext
meson
ninja
pkg-config
python3
rustPlatform.rust.cargo
rustPlatform.cargoSetupHook
rustPlatform.rust.rustc
wrapGAppsHook
glib
];
buildInputs = [
dbus
glib
gst_all_1.gst-editing-services
gst_all_1.gst-plugins-bad
gst_all_1.gst-plugins-base
(gst_all_1.gst-plugins-good.override {
gtkSupport = true;
})
gst_all_1.gstreamer
gst_all_1.gst-devtools
gtk3
libhandy
];
postPatch = ''
patchShebangs build-aux/meson_post_install.py
'';
passthru = {
updateScript = nix-update-script {
attrPath = pname;
};
};
postFixup = ''
substituteInPlace $out/share/applications/org.gnome.gitlab.YaLTeR.Identity.desktop --replace Icon=org.gnome.gitlab.YaLTeR.Identity Icon=$out/share/icons/hicolor/symbolic/apps/org.gnome.gitlab.YaLTeR.Identity-symbolic.svg
'';
}