1 { lib, stdenv, fetchurl, makeDesktopItem, unzip, jre, runtimeShell }:
3 stdenv.mkDerivation rec {
8 sha256 = "15pgqgyw46yd2i367ax9940pfyvinyw2m8apmwhrn0ix5nywa7ni";
9 url = "mirror://sourceforge/swingsane/swingsane-${version}-bin.zip";
12 nativeBuildInputs = [ unzip ];
20 exec ${jre}/bin/java -jar $out/share/java/swingsane/swingsane-${version}.jar "$@"
23 desktopItem = makeDesktopItem {
27 desktopName = "SwingSane";
28 genericName = "Scan from local or remote SANE servers";
29 comment = meta.description;
30 categories = [ "Office" ];
34 install -v -m 755 -d $out/share/java/swingsane/
35 install -v -m 644 *.jar $out/share/java/swingsane/
37 echo "${execWrapper}" > swingsane
38 install -v -D -m 755 swingsane $out/bin/swingsane
40 unzip -j swingsane-${version}.jar "com/swingsane/images/*.png"
41 install -v -D -m 644 swingsane_512x512.png $out/share/pixmaps/swingsane.png
43 cp -v -r ${desktopItem}/share/applications $out/share
47 description = "Java GUI for SANE scanner servers (saned)";
49 SwingSane is a powerful, cross platform, open source Java front-end for
50 using both local and remote Scanner Access Now Easy (SANE) servers.
51 The most powerful feature is its ability to query back-ends for scanner
52 specific options which can be set by the user as a scanner profile.
53 It also has support for authentication, mutlicast DNS discovery,
54 simultaneous scan jobs, image transformation jobs (deskew, binarize,
55 crop, etc), PDF and PNG output.
57 homepage = "http://swingsane.com/";
58 sourceProvenance = with sourceTypes; [ binaryBytecode ];
59 license = licenses.asl20;
60 platforms = platforms.all;
61 mainProgram = "swingsane";