2019-02-26 11:45:54 +00:00
|
|
|
{ stdenv, fetchurl, makeDesktopItem, unzip, jre, runtimeShell }:
|
2015-12-06 01:00:07 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2019-08-15 13:41:18 +01:00
|
|
|
pname = "swingsane";
|
2016-01-24 19:31:44 +00:00
|
|
|
version = "0.2";
|
2015-12-06 01:00:07 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
|
|
|
sha256 = "15pgqgyw46yd2i367ax9940pfyvinyw2m8apmwhrn0ix5nywa7ni";
|
|
|
|
url = "mirror://sourceforge/swingsane/swingsane-${version}-bin.zip";
|
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [ unzip ];
|
|
|
|
|
|
|
|
phases = [ "unpackPhase" "installPhase" ];
|
|
|
|
|
|
|
|
installPhase = let
|
|
|
|
|
|
|
|
execWrapper = ''
|
2019-02-26 11:45:54 +00:00
|
|
|
#!${runtimeShell}
|
2015-12-06 01:00:07 +00:00
|
|
|
exec ${jre}/bin/java -jar $out/share/java/swingsane/swingsane-${version}.jar "$@"
|
|
|
|
'';
|
|
|
|
|
|
|
|
desktopItem = makeDesktopItem {
|
|
|
|
name = "swingsane";
|
|
|
|
exec = "swingsane";
|
|
|
|
icon = "swingsane";
|
|
|
|
desktopName = "SwingSane";
|
|
|
|
genericName = "Scan from local or remote SANE servers";
|
|
|
|
comment = meta.description;
|
2020-06-25 03:18:37 +01:00
|
|
|
categories = "Office;";
|
2015-12-06 01:00:07 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
in ''
|
|
|
|
install -v -m 755 -d $out/share/java/swingsane/
|
|
|
|
install -v -m 644 *.jar $out/share/java/swingsane/
|
|
|
|
|
|
|
|
echo "${execWrapper}" > swingsane
|
|
|
|
install -v -D -m 755 swingsane $out/bin/swingsane
|
|
|
|
|
|
|
|
unzip -j swingsane-${version}.jar "com/swingsane/images/*.png"
|
|
|
|
install -v -D -m 644 swingsane_512x512.png $out/share/pixmaps/swingsane.png
|
|
|
|
|
|
|
|
cp -v -r ${desktopItem}/share/applications $out/share
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
|
|
|
description = "Java GUI for SANE scanner servers (saned)";
|
|
|
|
longDescription = ''
|
|
|
|
SwingSane is a powerful, cross platform, open source Java front-end for
|
|
|
|
using both local and remote Scanner Access Now Easy (SANE) servers.
|
|
|
|
The most powerful feature is its ability to query back-ends for scanner
|
|
|
|
specific options which can be set by the user as a scanner profile.
|
|
|
|
It also has support for authentication, mutlicast DNS discovery,
|
|
|
|
simultaneous scan jobs, image transformation jobs (deskew, binarize,
|
|
|
|
crop, etc), PDF and PNG output.
|
|
|
|
'';
|
2020-04-01 02:11:51 +01:00
|
|
|
homepage = "http://swingsane.com/";
|
2015-12-06 01:00:07 +00:00
|
|
|
license = licenses.asl20;
|
|
|
|
platforms = platforms.all;
|
|
|
|
};
|
|
|
|
}
|