nixpkgs/pkgs/desktops/gnome-3/core/gnome-screenshot/default.nix
2021-01-16 23:49:59 -08:00

44 lines
1.3 KiB
Nix

{ lib, stdenv, gettext, libxml2, libhandy, fetchurl, pkg-config, libcanberra-gtk3
, gtk3, glib, meson, ninja, python3, wrapGAppsHook, appstream-glib, desktop-file-utils
, gnome3, gsettings-desktop-schemas }:
let
pname = "gnome-screenshot";
version = "3.38.0";
in stdenv.mkDerivation rec {
name = "${pname}-${version}";
src = fetchurl {
url = "mirror://gnome/sources/${pname}/${lib.versions.majorMinor version}/${name}.tar.xz";
sha256 = "1h4zsaybjrlkfcrvriyybg4gfr7v9d1ndh2p516k94ad2gfx6mp5";
};
doCheck = true;
postPatch = ''
chmod +x build-aux/postinstall.py # patchShebangs requires executable file
patchShebangs build-aux/postinstall.py
'';
nativeBuildInputs = [ meson ninja pkg-config gettext appstream-glib libxml2 desktop-file-utils python3 wrapGAppsHook ];
buildInputs = [
gtk3 glib libcanberra-gtk3 libhandy gnome3.adwaita-icon-theme
gsettings-desktop-schemas
];
passthru = {
updateScript = gnome3.updateScript {
packageName = pname;
attrPath = "gnome3.${pname}";
};
};
meta = with lib; {
homepage = "https://en.wikipedia.org/wiki/GNOME_Screenshot";
description = "Utility used in the GNOME desktop environment for taking screenshots";
maintainers = teams.gnome.members;
license = licenses.gpl2;
platforms = platforms.linux;
};
}