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