biome: 1.9.2 -> 1.9.3
[NixPkgs.git] / pkgs / applications / graphics / shutter / default.nix
blobfe4286aa4b5b1231c07f022ffb0b461220b93bbe
1 { lib
2 , stdenv
3 , fetchFromGitHub
4 , perlPackages
5 , wrapGAppsHook3
6 , imagemagick
7 , gdk-pixbuf
8 , librsvg
9 , hicolor-icon-theme
10 , procps
11 , libwnck
12 , libappindicator-gtk3
13 , xdg-utils
16 let
17   perlModules = with perlPackages; [
18       ImageMagick
19       Cairo
20       FileBaseDir
21       FileWhich
22       FileCopyRecursive
23       XMLSimple
24       XMLTwig
25       XMLParser
26       SortNaturally
27       LocaleGettext
28       ProcProcessTable
29       X11Protocol
30       ProcSimple
31       ImageExifTool
32       JSON
33       JSONMaybeXS
34       NetOAuth
35       PathClass
36       LWP
37       LWPProtocolHttps
38       NetDBus
39       TryTiny
40       WWWMechanize
41       HTTPMessage
42       HTTPDate
43       HTMLForm
44       HTMLParser
45       HTMLTagset
46       HTTPCookies
47       EncodeLocale
48       URI
49       CarpAlways
50       GlibObjectIntrospection
51       NumberBytesHuman
52       CairoGObject
53       Readonly
54       Gtk3ImageView
55       Gtk3
56       Glib
57       Pango
58       GooCanvas2
59       GooCanvas2CairoTypes
60       commonsense
61       TypesSerialiser
62     ];
64 stdenv.mkDerivation rec {
65   pname = "shutter";
66   version = "0.99.2";
68   src = fetchFromGitHub {
69     owner = "shutter-project";
70     repo = "shutter";
71     rev = "v${version}";
72     sha256 = "sha256-o95skSr6rszh0wsHQTpu1GjqCDmde7aygIP+i4XQW9A=";
73   };
75   nativeBuildInputs = [ wrapGAppsHook3 ];
76   buildInputs = [
77     perlPackages.perl
78     procps
79     gdk-pixbuf
80     librsvg
81     libwnck
82     libappindicator-gtk3
83     hicolor-icon-theme
84   ] ++ perlModules;
86   makeFlags = [
87     "prefix=${placeholder "out"}"
88   ];
90   postPatch = ''
91     patchShebangs po2mo.sh
92   '';
94   preFixup = ''
95     # make xdg-open overrideable at runtime
96     gappsWrapperArgs+=(
97       --set PERL5LIB ${perlPackages.makePerlPath perlModules} \
98       --prefix PATH : ${lib.makeBinPath [ imagemagick ] }
99       --suffix PATH : ${lib.makeBinPath [ xdg-utils ] }
100     )
101   '';
103   meta = with lib; {
104     description = "Screenshot and annotation tool";
105     mainProgram = "shutter";
106     homepage = "https://shutter-project.org/";
107     license = licenses.gpl3Plus;
108     platforms = platforms.all;
109     maintainers = [ maintainers.bjornfor ];
110   };