ripasso-cursive: cosmetic changes (#361736)
[NixPkgs.git] / pkgs / by-name / gn / gnome-screenshot / package.nix
blobec62a734686ee6336b1171844a53ee6ed7b6cd7e
1 { stdenv
2 , lib
3 , gettext
4 , libxml2
5 , libhandy
6 , fetchurl
7 , fetchpatch
8 , pkg-config
9 , libcanberra-gtk3
10 , gtk3
11 , glib
12 , meson
13 , ninja
14 , python3
15 , wrapGAppsHook3
16 , appstream-glib
17 , desktop-file-utils
18 , gnome
19 , adwaita-icon-theme
20 , gsettings-desktop-schemas
23 stdenv.mkDerivation rec {
24   pname = "gnome-screenshot";
25   version = "41.0";
27   src = fetchurl {
28     url = "mirror://gnome/sources/gnome-screenshot/${lib.versions.major version}/gnome-screenshot-${version}.tar.xz";
29     hash = "sha256-Stt97JJkKPdCY9V5ZnPPFC5HILbnaPVGio0JM/mMlZc=";
30   };
32   patches = [
33     # Fix build with meson 0.61
34     # https://gitlab.gnome.org/GNOME/gnome-screenshot/-/issues/186
35     (fetchpatch {
36       url = "https://gitlab.gnome.org/GNOME/gnome-screenshot/-/commit/b60dad3c2536c17bd201f74ad8e40eb74385ed9f.patch";
37       hash = "sha256-Js83h/3xxcw2hsgjzGa5lAYFXVrt6MPhXOTh5dZTx/w=";
38     })
39   ];
41   nativeBuildInputs = [
42     meson
43     ninja
44     pkg-config
45     gettext
46     appstream-glib
47     libxml2
48     desktop-file-utils
49     python3
50     wrapGAppsHook3
51   ];
53   buildInputs = [
54     gtk3
55     glib
56     libcanberra-gtk3
57     libhandy
58     adwaita-icon-theme
59     gsettings-desktop-schemas
60   ];
62   doCheck = true;
64   postPatch = ''
65     chmod +x build-aux/postinstall.py # patchShebangs requires executable file
66     patchShebangs build-aux/postinstall.py
67   '';
69   passthru = {
70     updateScript = gnome.updateScript {
71       packageName = "gnome-screenshot";
72     };
73   };
75   meta = with lib; {
76     homepage = "https://gitlab.gnome.org/GNOME/gnome-screenshot";
77     description = "Utility used in the GNOME desktop environment for taking screenshots";
78     mainProgram = "gnome-screenshot";
79     maintainers = teams.gnome.members;
80     license = licenses.gpl2Plus;
81     platforms = platforms.linux;
82   };