push sheeet
Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s

This commit is contained in:
Dark Steveneq
2025-10-09 14:15:47 +02:00
commit 646b892680
49168 changed files with 5897842 additions and 0 deletions

View File

@@ -0,0 +1,52 @@
{
lib,
stdenv,
fetchFromGitHub,
pkg-config,
libtool,
autoconf,
automake,
libjpeg,
libexif,
}:
stdenv.mkDerivation rec {
pname = "epeg";
version = "0.9.3";
src = fetchFromGitHub {
owner = "mattes";
repo = "epeg";
rev = "v${version}";
sha256 = "sha256-lttqarR8gScNIlSrc5uU3FLfvwxxJ2A1S4oESUW7oIw=";
};
enableParallelBuilding = true;
nativeBuildInputs = [
pkg-config
libtool
autoconf
automake
];
propagatedBuildInputs = [
libjpeg
libexif
];
preConfigure = ''
./autogen.sh
'';
meta = with lib; {
homepage = "https://github.com/mattes/epeg";
description = "Insanely fast JPEG/ JPG thumbnail scaling";
platforms = platforms.linux ++ platforms.darwin;
license = {
url = "https://github.com/mattes/epeg#license";
};
maintainers = with maintainers; [ nh2 ];
mainProgram = "epeg";
};
}

View File

@@ -0,0 +1,56 @@
.Dd $Mdocdate$
.Dt EPGSTATION 1
.Os
.Sh NAME
.Nm epgstation
.Nd @DESCRIPTION@
.Sh SYNOPSIS
.Nm
.Bk -words
.Op Ar command Op Ar args
.Ek
.Sh DESCRIPTION
.Nm
is a wrapper command for EPGStation provided by Nix. It's actually a thin
wrapper around the
.Xr npm 1
command line tool which you can use to invoke npm commands from the EPGStation
project directory. The command line arguments are simply passed as-is to
.Xr npm 1 .
.Pp
On NixOS, it is strongly recommended that you enable the epgstation module
instead of invoking this command directly to launch EPGStation. On other
platforms, run
.Pp
.Dl $ epgstation start
.Pp
to start EPGStation.
.Sh FILES
.Bl -tag -width Ds -compact
.It Pa /etc/epgstation/config.yml
.Nm
configuration file.
.El
.Sh EXAMPLES
Start EPGStation.
.Pp
.Dl $ epgstation start
.Pp
Start EPGStation in development mode.
.Pp
.Dl $ epgstation run dev-start
.Pp
Backup the EPGstation database.
.Pp
.Dl $ epgstation run backup /path/to/dst
.Pp
Restore the EPGstation database.
.Pp
.Dl $ epgstation run restore /path/to/src
.Pp
Restore the EPGstation database from the prior v1 release.
.Pp
.Dl $ epgstation run v1migrate /path/to/src
.Pp
.Sh SEE ALSO
.Xr npm 1

View File

@@ -0,0 +1,136 @@
{
lib,
fetchpatch,
fetchFromGitHub,
buildNpmPackage,
installShellFiles,
makeWrapper,
bash,
nodejs,
python3,
}:
buildNpmPackage rec {
pname = "epgstation";
version = "2.6.20";
src = fetchFromGitHub {
owner = "l3tnun";
repo = "EPGStation";
rev = "v${version}";
sha256 = "K1cAvmqWEfS6EY4MKAtjXb388XLYHtouxNM70PWgFig=";
};
patches = [
./use-mysql-over-domain-socket.patch
# upgrade dependencies to make it compatible with node 18
(fetchpatch {
url = "https://github.com/midchildan/EPGStation/commit/5d6cad746b7d9b6d246adcdecf9c991b77c9d89e.patch";
sha256 = "sha256-9a8VUjczlyQHVO7w9MYorPIZunAuBuif1HNmtp1yMk8=";
})
(fetchpatch {
url = "https://github.com/midchildan/EPGStation/commit/c948e833e485c2b7cb7fb33b953cca1e20de3a70.patch";
sha256 = "sha256-nM6KkVRURuQFZLXZ2etLU1a1+BoaJnfjngo07TFbe58=";
})
];
npmDepsHash = "sha256-dohencRGuvc+vSoclLVn5iles4GOuTq26BrEVeJ4GC4=";
npmBuildScript = "build-server";
npmRootPath = "/lib/node_modules/epgstation";
buildInputs = [ bash ];
nativeBuildInputs = [
installShellFiles
makeWrapper
python3
];
clientDir = buildNpmPackage {
pname = "${pname}-client";
inherit
version
src
installPhase
meta
;
npmDepsHash = "sha256-a/cDPABWI4lPxvSOI4D90O71A9lm8icPMak/g6DPYQY=";
npmRootPath = "";
sourceRoot = "${src.name}/client";
NODE_OPTIONS = "--openssl-legacy-provider";
};
postBuild = ''
rm -rf client
cp -r ${clientDir} client
'';
# installPhase is shared with clientDir
installPhase = ''
runHook preInstall
npm prune --omit dev --no-save \
$npmInstallFlags \
"''${npmInstallFlagsArray[@]}" \
$npmFlags \
"''${npmFlagsArray[@]}"
mkdir -p $out$npmRootPath
cp -r . $out$npmRootPath
runHook postInstall
'';
postInstall =
let
runtimeDeps = [
nodejs
bash
];
in
''
mkdir -p $out/{bin,libexec,share/doc/epgstation}
pushd $out$npmRootPath
mv config/enc.js.template $out/libexec/enc.js
mv LICENSE Readme.md $out/share/doc/epgstation
mv doc/* $out/share/doc/epgstation
sed 's/@DESCRIPTION@/${meta.description}/g' ${./epgstation.1} > doc/epgstation.1
installManPage doc/epgstation.1
rm -rf doc
# just log to stdout and let journald do its job
rm -rf logs
# Replace the existing configuration and runtime state directories with
# symlinks. Without this, they would all be non-writable because they
# reside in the Nix store. Note that the source path won't be accessible
# at build time.
rm -r config data drop recorded thumbnail src/db/subscribers src/db/migrations
ln -sfT /etc/epgstation config
ln -sfT /var/lib/epgstation data
ln -sfT /var/lib/epgstation/drop drop
ln -sfT /var/lib/epgstation/recorded recorded
ln -sfT /var/lib/epgstation/thumbnail thumbnail
ln -sfT /var/lib/epgstation/db/subscribers src/db/subscribers
ln -sfT /var/lib/epgstation/db/migrations src/db/migrations
makeWrapper ${nodejs}/bin/npm $out/bin/epgstation \
--chdir $out$npmRootPath \
--prefix PATH : ${lib.makeBinPath runtimeDeps} \
--set APP_ROOT_PATH $out$npmRootPath
popd
'';
meta = with lib; {
description = "DVR software compatible with Mirakurun";
homepage = "https://github.com/l3tnun/EPGStation";
license = licenses.mit;
maintainers = with maintainers; [ midchildan ];
mainProgram = "epgstation";
};
}

View File

@@ -0,0 +1,46 @@
diff --git a/ormconfig.js b/ormconfig.js
index 5591853b..838c06cb 100644
--- a/ormconfig.js
+++ b/ormconfig.js
@@ -38,8 +38,6 @@ switch (config.dbtype) {
case 'mysql':
ormConfig.type = 'mysql';
- ormConfig.host = config.mysql.host;
- ormConfig.port = config.mysql.port;
ormConfig.username = config.mysql.user;
ormConfig.password = config.mysql.password;
ormConfig.database = config.mysql.database;
@@ -49,6 +47,12 @@ switch (config.dbtype) {
} else {
ormConfig.charset = config.mysql.charset;
}
+ if (config.mysql.socketPath) {
+ ormConfig.extra = { socketPath: config.mysql.socketPath };
+ } else {
+ ormConfig.host = config.mysql.host;
+ ormConfig.port = config.mysql.port;
+ }
break;
case 'postgres':
diff --git a/src/model/IConfigFile.ts b/src/model/IConfigFile.ts
index 6a502e83..ba84a423 100644
--- a/src/model/IConfigFile.ts
+++ b/src/model/IConfigFile.ts
@@ -61,12 +61,13 @@ export default interface IConfigFile {
regexp?: boolean;
};
mysql?: {
- host: string;
+ host?: string;
user: string;
- port: number;
+ port?: number;
password: string;
database: string;
charset?: string;
+ socketPath?: string;
};
postgres?: {
host: string;

View File

@@ -0,0 +1,37 @@
{
lib,
stdenv,
fetchurl,
postgresql,
getopt,
makeWrapper,
}:
stdenv.mkDerivation rec {
pname = "ephemeralpg";
version = "3.4";
src = fetchurl {
url = "https://eradman.com/ephemeralpg/code/${pname}-${version}.tar.gz";
hash = "sha256-IwAIJFW/ahDXGgINi4N9mG3XKw74JXK6+SLxGMZ8tS0=";
};
nativeBuildInputs = [ makeWrapper ];
installPhase = ''
mkdir -p $out
PREFIX=$out make install
wrapProgram $out/bin/pg_tmp --prefix PATH : ${
lib.makeBinPath [
postgresql
getopt
]
}
'';
meta = with lib; {
description = "Run tests on an isolated, temporary PostgreSQL database";
license = licenses.isc;
homepage = "https://eradman.com/ephemeralpg/";
platforms = platforms.all;
maintainers = with maintainers; [
hrdinka
medv
];
};
}

View File

@@ -0,0 +1,50 @@
{
lib,
stdenv,
ruby,
fetchurl,
openssl,
ncurses,
libiconv,
tcl,
libxcrypt,
perl,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "epic5";
version = "3.0.3";
src = fetchurl {
url = "https://ftp.epicsol.org/pub/epic/EPIC5-PRODUCTION/epic5-${finalAttrs.version}.tar.xz";
hash = "sha256-Y6QRIVwUBAtltdcor/EPdSPVXhcPYpj7AeHPlY150yY=";
};
buildInputs = [
openssl
ncurses
libxcrypt
ruby
]
++ lib.optionals stdenv.hostPlatform.isDarwin [
libiconv
tcl
];
configureFlags = [
"--with-ipv6"
];
nativeBuildInputs = [
perl
];
meta = {
homepage = "https://epicsol.org";
description = "IRC client that offers a great ircII interface";
license = lib.licenses.bsd3;
maintainers = with lib.maintainers; [ bot-wxt1221 ];
platforms = lib.platforms.unix;
mainProgram = "epic5";
};
})

View File

@@ -0,0 +1,60 @@
{
lib,
rustPlatform,
fetchFromGitHub,
stdenv,
pkg-config,
expat,
fontconfig,
freetype,
libGL,
xorg,
}:
rustPlatform.buildRustPackage rec {
pname = "epick";
version = "0.9.0";
src = fetchFromGitHub {
owner = "vv9k";
repo = "epick";
# Upstream has rewritten tags on multiple occasions.
rev = "14ee92e049780406fffdc1e4a83bf1433775663f";
sha256 = "sha256-gjqAQrGJ9KFdzn2a3fOgu0VJ9zrX5stsbzriOGJaD/4=";
};
cargoHash = "sha256-r/0aNzU8jm2AqiZWq4plxXY/H7qKVC8nEI9BwOUKCdA=";
nativeBuildInputs = lib.optionals stdenv.hostPlatform.isLinux [
pkg-config
];
buildInputs = lib.optionals stdenv.hostPlatform.isLinux [
expat
fontconfig
freetype
xorg.libX11
xorg.libXcursor
xorg.libXi
xorg.libXrandr
];
postInstall = ''
install -Dm444 assets/epick.desktop -t $out/share/applications
install -Dm444 assets/icon.svg $out/share/icons/hicolor/scalable/apps/epick.svg
install -Dm444 assets/icon.png $out/share/icons/hicolor/48x48/apps/epick.png
'';
postFixup = lib.optionalString stdenv.hostPlatform.isLinux ''
patchelf $out/bin/epick --add-rpath ${lib.makeLibraryPath [ libGL ]}
'';
meta = {
description = "Simple color picker that lets the user create harmonic palettes with ease";
homepage = "https://github.com/vv9k/epick";
changelog = "https://github.com/vv9k/epick/blob/${version}/CHANGELOG.md";
license = lib.licenses.gpl3Only;
maintainers = with lib.maintainers; [ figsoda ];
mainProgram = "epick";
};
}

View File

@@ -0,0 +1,28 @@
{
lib,
fetchFromGitHub,
rustPlatform,
}:
rustPlatform.buildRustPackage rec {
pname = "epilys-bb";
version = "0.4.4";
src = fetchFromGitHub {
owner = "epilys";
repo = "bb";
rev = "v${version}";
hash = "sha256-szeEBiolg2rVD2XZoNrncUYnA8KPhWwhQPYsjuxp904=";
};
cargoHash = "sha256-xUNvVG5jdAXsro2P8je3LFxqMycJEB4j7w3abf6jilw=";
meta = with lib; {
description = "Clean, simple, and fast process viewer";
homepage = "https://nessuent.xyz/bb.html";
license = licenses.gpl3Plus;
maintainers = with maintainers; [ cafkafk ];
platforms = platforms.linux;
mainProgram = "bb";
};
}

View File

@@ -0,0 +1,115 @@
{
lib,
stdenv,
meson,
ninja,
gettext,
fetchurl,
pkg-config,
gtk4,
glib,
icu,
wrapGAppsHook4,
gnome,
libportal-gtk4,
libxml2,
itstool,
webkitgtk_6_0,
libsoup_3,
glib-networking,
libsecret,
gnome-desktop,
libarchive,
p11-kit,
sqlite,
gcr_4,
isocodes,
desktop-file-utils,
nettle,
gdk-pixbuf,
gst_all_1,
json-glib,
libadwaita,
buildPackages,
withPantheon ? false,
pantheon,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "epiphany";
version = "48.5";
src = fetchurl {
url = "mirror://gnome/sources/epiphany/${lib.versions.major finalAttrs.version}/epiphany-${finalAttrs.version}.tar.xz";
hash = "sha256-D2ZVKtZZPHlSo93uW/UVZWyMQ0hxB22fGpGnr5NGsbQ=";
};
nativeBuildInputs = [
desktop-file-utils
gettext
itstool
meson
ninja
pkg-config
wrapGAppsHook4
buildPackages.glib
buildPackages.gtk4
];
buildInputs = [
gcr_4
gdk-pixbuf
glib
glib-networking
gnome-desktop
gst_all_1.gst-libav
gst_all_1.gst-plugins-bad
gst_all_1.gst-plugins-base
gst_all_1.gst-plugins-good
gst_all_1.gst-plugins-ugly
gst_all_1.gstreamer
gtk4
icu
isocodes
json-glib
libadwaita
libportal-gtk4
libarchive
libsecret
libsoup_3
libxml2
nettle
p11-kit
sqlite
webkitgtk_6_0
]
++ lib.optionals withPantheon [
pantheon.granite7
];
# Tests need an X display
mesonFlags = [
"-Dunit_tests=disabled"
]
++ lib.optionals withPantheon [
"-Dgranite=enabled"
];
passthru = {
updateScript = gnome.updateScript {
packageName = "epiphany";
};
};
meta = with lib; {
homepage = "https://apps.gnome.org/Epiphany/";
description = "WebKit based web browser for GNOME";
mainProgram = "epiphany";
teams = [
teams.gnome
teams.pantheon
];
license = licenses.gpl3Plus;
platforms = platforms.linux;
};
})

View File

@@ -0,0 +1,21 @@
Explanation:
in libesci-interpreter-gt-f720.so in
libesci_interpreter_gt_f720_342::libesci_interpreter_gt_f720_348 at 0xdf74: the
binary blob esfw8b.bin is searched either in /usr/share/esci/ or in
$ESCI_FIRMWARE_DIR. But since this library is to be used wia libsane.so in
every binary in the system, we can't wrapProgram the relevant executables to
set this environment variable. Instead, we patch iscan to set this variable
before loading libesci-interpreter-gt-f720.so.
--- backend/channel-usb.c.orig 2017-08-14 11:24:27.669582456 +0200
+++ backend/channel-usb.c 2017-08-14 11:31:40.509010897 +0200
@@ -169,6 +169,10 @@
{
SANE_Status s;
+ setenv("ESCI_FIRMWARE_DIR", NIX_ESCI_PREFIX, 1);
+ setenv("ISCAN_FW_DIR", NIX_ESCI_PREFIX, 1);
+ setenv("ISCAN_FIRMWARE_DIR", NIX_ESCI_PREFIX, 1);
+
s = sanei_usb_open (self->name, &self->fd);
if (SANE_STATUS_GOOD == s)

View File

@@ -0,0 +1,616 @@
{
lib,
stdenv,
fetchurl,
fetchpatch,
makeWrapper,
symlinkJoin,
pkg-config,
libtool,
gtk2,
libxml2,
libxslt,
libusb-compat-0_1,
sane-backends,
rpm,
cpio,
getopt,
autoPatchelfHook,
gcc,
}:
let
common_meta = {
homepage = "http://download.ebz.epson.net/dsc/search/01/search/?OSC=LX";
sourceProvenance = with lib.sourceTypes; [ binaryNativeCode ];
license = with lib.licenses; epson;
platforms = with lib.platforms; linux;
};
in
############################
#
# PLUGINS
#
############################
# adding a plugin for another printer shouldn't be too difficult, but you need the firmware to test...
let
plugins = {
v330 = stdenv.mkDerivation rec {
name = "iscan-v330-bundle";
version = "2.30.4";
src = fetchurl {
# To find new versions, visit
# http://download.ebz.epson.net/dsc/search/01/search/?OSC=LX and search for
# some printer like for instance "WF-7210" to get to the most recent
# version.
# NOTE: Don't forget to update the webarchive link too!
urls = [
"https://download2.ebz.epson.net/iscan/plugin/perfection-v330/rpm/x64/iscan-perfection-v330-bundle-${version}.x64.rpm.tar.gz"
"https://web.archive.org/web/https://download2.ebz.epson.net/iscan/plugin/perfection-v330/rpm/x64/iscan-perfection-v330-bundle-${version}.x64.rpm.tar.gz"
];
sha256 = "056c04pfsf98nnknphg28l489isqb6y4l2c8g7wqhclwgj7m338i";
};
nativeBuildInputs = [
autoPatchelfHook
rpm
];
installPhase = ''
${rpm}/bin/rpm2cpio plugins/esci-interpreter-perfection-v330-*.x86_64.rpm | ${cpio}/bin/cpio -idmv
mkdir $out{,/share,/lib}
cp -r ./usr/share/{iscan-data,esci}/ $out/share/
cp -r ./usr/lib64/esci $out/lib
'';
passthru = {
registrationCommand = ''
$registry --add interpreter usb 0x04b8 0x0142 "$plugin/lib/esci/libesci-interpreter-perfection-v330 $plugin/share/esci/esfwad.bin"
'';
hw = "Perfection V330 Photo";
};
meta = common_meta // {
description = "Plugin to support " + passthru.hw + " scanner in sane";
};
};
v370 = stdenv.mkDerivation rec {
name = "iscan-v370-bundle";
version = "2.30.4";
src = fetchurl {
urls = [
"https://download2.ebz.epson.net/iscan/plugin/perfection-v370/rpm/x64/iscan-perfection-v370-bundle-${version}.x64.rpm.tar.gz"
"https://web.archive.org/web/https://download2.ebz.epson.net/iscan/plugin/perfection-v370/rpm/x64/iscan-perfection-v370-bundle-${version}.x64.rpm.tar.gz"
];
sha256 = "1ff7adp9mha1i2ibllz540xkagpy8r757h4s3h60bgxbyzv2yggr";
};
nativeBuildInputs = [
autoPatchelfHook
rpm
];
installPhase = ''
cd plugins
${rpm}/bin/rpm2cpio iscan-plugin-perfection-v370-*.x86_64.rpm | ${cpio}/bin/cpio -idmv
mkdir -p $out/share $out/lib
cp -r usr/share/{iscan-data,iscan}/ $out/share
cp -r usr/lib64/iscan $out/lib
mv $out/share/iscan $out/share/esci
mv $out/lib/iscan $out/lib/esci
'';
passthru = {
registrationCommand = ''
$registry --add interpreter usb 0x04b8 0x014a "$plugin/lib/esci/libiscan-plugin-perfection-v370 $plugin/share/esci/esfwdd.bin"
'';
hw = "Perfection V37/V370";
};
meta = common_meta // {
description = "Plugin to support " + passthru.hw + " scanner in sane";
};
};
v550 = stdenv.mkDerivation rec {
pname = "iscan-perfection-v550-bundle";
version = "2.30.4";
nativeBuildInputs = [
autoPatchelfHook
rpm
];
src = fetchurl {
urls = [
"https://download2.ebz.epson.net/iscan/plugin/perfection-v550/rpm/x64/iscan-perfection-v550-bundle-${version}.x64.rpm.tar.gz"
"https://web.archive.org/web/https://download2.ebz.epson.net/iscan/plugin/perfection-v550/rpm/x64/iscan-perfection-v550-bundle-${version}.x64.rpm.tar.gz"
];
sha256 = "f8b3abf21354fc5b9bc87753cef950b6c0f07bf322a94aaff2c163bafcf50cd9";
};
installPhase = ''
cd plugins
${rpm}/bin/rpm2cpio iscan-plugin-perfection-v550-*.x86_64.rpm | ${cpio}/bin/cpio -idmv
mkdir $out
cp -r usr/share $out
cp -r usr/lib64 $out/lib
mv $out/share/iscan $out/share/esci
mv $out/lib/iscan $out/lib/esci
'';
passthru = {
registrationCommand = ''
$registry --add interpreter usb 0x04b8 0x013b "$plugin/lib/esci/libiscan-plugin-perfection-v550 $plugin/share/esci/esfweb.bin"
'';
hw = "Perfection V550 Photo";
};
meta = common_meta // {
description = "Plugin to support " + passthru.hw + " scanner in sane";
};
};
v600 = stdenv.mkDerivation rec {
pname = "iscan-gt-x820-bundle";
version = "2.30.4";
nativeBuildInputs = [
autoPatchelfHook
rpm
];
src = fetchurl {
urls = [
"https://download2.ebz.epson.net/iscan/plugin/gt-x820/rpm/x64/iscan-gt-x820-bundle-${version}.x64.rpm.tar.gz"
"https://web.archive.org/web/https://download2.ebz.epson.net/iscan/plugin/gt-x820/rpm/x64/iscan-gt-x820-bundle-${version}.x64.rpm.tar.gz"
];
sha256 = "1vlba7dsgpk35nn3n7is8nwds3yzlk38q43mppjzwsz2d2n7sr33";
};
installPhase = ''
cd plugins
${rpm}/bin/rpm2cpio iscan-plugin-gt-x820-*.x86_64.rpm | ${cpio}/bin/cpio -idmv
mkdir $out
cp -r usr/share $out
cp -r usr/lib64 $out/lib
mv $out/share/iscan $out/share/esci
mv $out/lib/iscan $out/lib/esci
'';
passthru = {
registrationCommand = ''
$registry --add interpreter usb 0x04b8 0x013a "$plugin/lib/esci/libesintA1 $plugin/share/esci/esfwA1.bin"
'';
hw = "Perfection V600 Photo";
};
meta = common_meta // {
description = "iscan esci x820 plugin for " + passthru.hw;
};
};
x770 = stdenv.mkDerivation rec {
pname = "iscan-gt-x770-bundle";
version = "2.30.4";
nativeBuildInputs = [
autoPatchelfHook
rpm
];
src = fetchurl {
urls = [
"https://download2.ebz.epson.net/iscan/plugin/gt-x770/rpm/x64/iscan-gt-x770-bundle-${version}.x64.rpm.tar.gz"
"https://web.archive.org/web/https://download2.ebz.epson.net/iscan/plugin/gt-x770/rpm/x64/iscan-gt-x770-bundle-${version}.x64.rpm.tar.gz"
];
sha256 = "1chxdm6smv2d14pn2jl9xyd0vr42diy7vpskd3b9a61gf5h3gj03";
};
installPhase = ''
cd plugins
${rpm}/bin/rpm2cpio iscan-plugin-gt-x770-*.x86_64.rpm | ${cpio}/bin/cpio -idmv
mkdir $out
cp -r usr/share $out
cp -r usr/lib64 $out/lib
mv $out/share/iscan $out/share/esci
mv $out/lib/iscan $out/lib/esci
'';
passthru = {
registrationCommand = ''
$registry --add interpreter usb 0x04b8 0x0130 "$plugin/lib/esci/libesint7C $plugin/share/esci/esfw7C.bin"
'';
hw = "Perfection V500 Photo";
};
meta = common_meta // {
description = "iscan esci x770 plugin for " + passthru.hw;
};
};
f720 = stdenv.mkDerivation rec {
pname = "iscan-gt-f720-bundle";
version = "2.30.4";
nativeBuildInputs = [ autoPatchelfHook ];
buildInputs = [ gcc.cc.lib ];
src = fetchurl {
urls = [
"https://download2.ebz.epson.net/iscan/plugin/gt-f720/rpm/x64/iscan-gt-f720-bundle-${version}.x64.rpm.tar.gz"
"https://web.archive.org/web/https://download2.ebz.epson.net/iscan/plugin/gt-f720/rpm/x64/iscan-gt-f720-bundle-${version}.x64.rpm.tar.gz"
];
sha256 = "1xnbmb2rn610kqpg1x6k1cc13zlmx2f3l2xnj6809rnhg96qqn20";
};
installPhase = ''
cd plugins
${rpm}/bin/rpm2cpio esci-interpreter-gt-f720-*.x86_64.rpm | ${cpio}/bin/cpio -idmv
mkdir $out
cp -r usr/share $out
cp -r usr/lib64 $out/lib
'';
passthru = {
registrationCommand = ''
$registry --add interpreter usb 0x04b8 0x0131 "$plugin/lib/esci/libesci-interpreter-gt-f720 $plugin/share/esci/esfw8b.bin"
'';
hw = "GT-F720, GT-S620, Perfection V30, Perfection V300 Photo";
};
meta = common_meta // {
description = "iscan esci f720 plugin for " + passthru.hw;
};
};
s80 = stdenv.mkDerivation rec {
pname = "iscan-gt-s80-bundle";
version = "2.30.4";
nativeBuildInputs = [ autoPatchelfHook ];
buildInputs = [
gcc.cc.lib
libtool
];
src = fetchurl {
urls = [
"https://download2.ebz.epson.net/iscan/plugin/gt-s80/rpm/x64/iscan-gt-s80-bundle-${version}.x64.rpm.tar.gz"
"https://web.archive.org/web/https://download2.ebz.epson.net/iscan/plugin/gt-s80/rpm/x64/iscan-gt-s80-bundle-${version}.x64.rpm.tar.gz"
];
sha256 = "00qfdgs03k7bbs67zjrk8hbxvlyinsmk890amp9cmpfjfzdxgg58";
};
installPhase = ''
cd plugins
${rpm}/bin/rpm2cpio esci-interpreter-gt-s80-*.x86_64.rpm | ${cpio}/bin/cpio -idmv
${rpm}/bin/rpm2cpio iscan-plugin-esdip-*.x86_64.rpm | ${cpio}/bin/cpio -idmv
mkdir $out
cp -r usr/share $out
cp -r usr/lib64 $out/lib
mkdir $out/share/esci
'';
passthru = {
registrationCommand = ''
$registry --add interpreter usb 0x04b8 0x0136 "$plugin/lib/esci/libesci-interpreter-gt-s80.so"
$registry --add interpreter usb 0x04b8 0x0137 "$plugin/lib/esci/libesci-interpreter-gt-s50.so"
$registry --add interpreter usb 0x04b8 0x0143 "$plugin/lib/esci/libesci-interpreter-gt-s50.so"
$registry --add interpreter usb 0x04b8 0x0144 "$plugin/lib/esci/libesci-interpreter-gt-s80.so"
'';
hw = "ES-D200, ED-D350, ES-D400, GT-S50, GT-S55, GT-S80, GT-S85";
};
meta = common_meta // {
description = "iscan esci s80 plugin for " + passthru.hw;
};
};
s600 = stdenv.mkDerivation rec {
name = "iscan-gt-s600-bundle";
version = "2.30.4";
src = fetchurl {
urls = [
"https://download2.ebz.epson.net/iscan/plugin/gt-s600/rpm/x64/iscan-gt-s600-bundle-${version}.x64.rpm.tar.gz"
"https://web.archive.org/web/20240614120113/https://download2.ebz.epson.net/iscan/plugin/gt-s600/rpm/x64/iscan-gt-s600-bundle-${version}.x64.rpm.tar.gz"
];
sha256 = "fe1356b1d5c40bc5ac985a5693166efb9e5049a78b412f49c385eb503eadf2c6";
};
nativeBuildInputs = [
autoPatchelfHook
rpm
];
installPhase = ''
cd plugins
${rpm}/bin/rpm2cpio iscan-plugin-gt-s600-*.x86_64.rpm | ${cpio}/bin/cpio -idmv
mkdir $out
cp -r usr/share $out
cp -r usr/lib64 $out/lib
mv $out/share/iscan $out/share/esci
mv $out/lib/iscan $out/lib/esci
'';
passthru = {
registrationCommand = ''
$registry --add interpreter usb 0x04b8 0x012d "$plugin/lib/esci/libesint66 $plugin/share/esci/esfw66.bin"
'';
hw = "GT-F650, GT-S600, Perfection V10, Perfection V100 Photo";
};
meta = common_meta // {
description = "iscan gt-s600 plugin for " + passthru.hw;
};
};
s650 = stdenv.mkDerivation rec {
name = "iscan-gt-s650-bundle";
version = "2.30.4";
src = fetchurl {
urls = [
"https://download2.ebz.epson.net/iscan/plugin/gt-s650/rpm/x64/iscan-gt-s650-bundle-${version}.x64.rpm.tar.gz"
"https://web.archive.org/web/https://download2.ebz.epson.net/iscan/plugin/gt-s650/rpm/x64/iscan-gt-s650-bundle-${version}.x64.rpm.tar.gz"
];
sha256 = "0fn4lz4g0a8l301v6yv7fwl37wgwhz5y90nf681f655xxc91hqh7";
};
nativeBuildInputs = [
autoPatchelfHook
rpm
];
installPhase = ''
cd plugins
${rpm}/bin/rpm2cpio iscan-plugin-gt-s650-*.x86_64.rpm | ${cpio}/bin/cpio -idmv
mkdir $out
cp -r usr/share $out
cp -r usr/lib64 $out/lib
mv $out/share/iscan $out/share/esci
mv $out/lib/iscan $out/lib/esci
'';
passthru = {
registrationCommand = ''
$registry --add interpreter usb 0x04b8 0x013c "$plugin/lib/esci/libiscan-plugin-gt-s650 $plugin/share/esci/esfw010c.bin"
$registry --add interpreter usb 0x04b8 0x013d "$plugin/lib/esci/libiscan-plugin-gt-s650 $plugin/share/esci/esfw010c.bin"
'';
hw = "GT-S650, Perfection V19, Perfection V39";
};
meta = common_meta // {
description = "iscan GT-S650 for " + passthru.hw;
};
};
x750 = stdenv.mkDerivation rec {
name = "iscan-gt-x750-bundle";
version = "2.30.4";
src = fetchurl {
urls = [
"https://download2.ebz.epson.net/iscan/plugin/gt-x750/rpm/x64/iscan-gt-x750-bundle-${version}.x64.rpm.tar.gz"
"https://web.archive.org/web/https://download2.ebz.epson.net/iscan/plugin/gt-x750/rpm/x64/iscan-gt-x750-bundle-${version}.x64.rpm.tar.gz"
];
sha256 = "sha256-9EeBHmh1nwSxnTnevPP8RZ4WBdyY+itR3VXo2I7f5N0=";
};
nativeBuildInputs = [
autoPatchelfHook
rpm
];
installPhase = ''
cd plugins
${rpm}/bin/rpm2cpio iscan-plugin-gt-x750-*.x86_64.rpm | ${cpio}/bin/cpio -idmv
mkdir $out
cp -r usr/share $out
cp -r usr/lib64 $out/lib
mv $out/share/iscan $out/share/esci
mv $out/lib/iscan $out/lib/esci
'';
passthru = {
registrationCommand = ''
$registry --add interpreter usb 0x04b8 0x0119 "$plugin/lib/esci/libesint54 $plugin/share/esci/esfw54.bin"
'';
hw = "GT-X750, Perfection 4490";
};
meta = common_meta // {
description = "iscan GT-X750 for " + passthru.hw;
};
};
gt1500 = stdenv.mkDerivation rec {
name = "iscan-gt-1500-bundle";
version = "2.30.4";
src = fetchurl {
urls = [
"https://download2.ebz.epson.net/iscan/plugin/gt-1500/rpm/x64/iscan-gt-1500-bundle-${version}.x64.rpm.tar.gz"
"https://web.archive.org/web/https://download2.ebz.epson.net/iscan/plugin/gt-1500/rpm/x64/iscan-gt-1500-bundle-${version}.x64.rpm.tar.gz"
];
sha256 = "sha256-1rVsbBsb+QtCOT1FsyhgvCbZIN6IeQH7rZXNmsD7cl8=";
};
nativeBuildInputs = [
autoPatchelfHook
rpm
];
installPhase = ''
cd plugins
${rpm}/bin/rpm2cpio iscan-plugin-gt-1500-*.x86_64.rpm | ${cpio}/bin/cpio -idmv
mkdir $out
cp -r usr/share $out
cp -r usr/lib64 $out/lib
mv $out/share/iscan $out/share/esci
mv $out/lib/iscan $out/lib/esci
'';
passthru = {
registrationCommand = ''
$registry --add interpreter usb 0x04b8 0x0133 "$plugin/lib/esci/libesint86 $plugin/share/esci/esfw86.bin"
'';
hw = "GT-1500";
};
meta = common_meta // {
description = "iscan GT-1500 for " + passthru.hw;
};
};
ds30 = stdenv.mkDerivation rec {
name = "iscan-ds-30-bundle";
version = "2.30.4";
src = fetchurl {
urls = [
"https://download2.ebz.epson.net/iscan/plugin/ds-30/rpm/x64/iscan-ds-30-bundle-${version}.x64.rpm.tar.gz"
"https://web.archive.org/web/https://download2.ebz.epson.net/iscan/plugin/ds-30/rpm/x64/iscan-ds-30-bundle-${version}.x64.rpm.tar.gz"
];
sha256 = "0d5ef9b83999c56c14bd17ca63537f63ad4f0d70056870dc00888af1b36f4153";
};
nativeBuildInputs = [
autoPatchelfHook
rpm
];
installPhase = ''
${rpm}/bin/rpm2cpio plugins/iscan-plugin-ds-30-*.x86_64.rpm | ${cpio}/bin/cpio -idmv
mkdir $out
cp -r usr/share $out
cp -r usr/lib64 $out/lib
mv $out/lib/iscan $out/lib/esci
mkdir $out/share/esci
'';
passthru = {
registrationCommand = ''
$registry --add interpreter usb 0x04b8 0x0147 "$plugin/lib/esci/libiscan-plugin-ds-30.so"
'';
hw = "DS-30";
};
meta = common_meta // {
description = "Plugin to support " + passthru.hw + " scanner in sane";
};
};
network = stdenv.mkDerivation rec {
pname = "iscan-nt-bundle";
# for the version, look for the driver of XP-750 in the search page
version = "2.30.4";
buildInputs = [ (lib.getLib stdenv.cc.cc) ];
nativeBuildInputs = [ autoPatchelfHook ];
src = fetchurl {
urls = [
"https://download2.ebz.epson.net/iscan/general/rpm/x64/iscan-bundle-${version}.x64.rpm.tar.gz"
"https://web.archive.org/web/https://download2.ebz.epson.net/iscan/general/rpm/x64/iscan-bundle-${version}.x64.rpm.tar.gz"
];
sha256 = "0jssigsgkxb9i7qa7db291a1gbvwl795i4ahvb7bnqp33czkj85k";
};
installPhase = ''
cd plugins
${rpm}/bin/rpm2cpio iscan-network-nt-*.x86_64.rpm | ${cpio}/bin/cpio -idmv
mkdir $out
cp -r usr/share $out
cp -r usr/lib64 $out/lib
mkdir $out/share/esci
'';
passthru = {
registrationCommand = "";
hw = "network";
};
meta = common_meta // {
description = "iscan network plugin";
};
};
};
in
let
fwdir = symlinkJoin {
name = "esci-firmware-dir";
paths = lib.mapAttrsToList (name: value: value + "/share/esci") plugins;
};
in
let
iscan-data = stdenv.mkDerivation rec {
pname = "iscan-data";
version = "1.39.2-1";
src = fetchurl {
urls = [
"http://support.epson.net/linux/src/scanner/iscan/iscan-data_${version}.tar.gz"
"https://web.archive.org/web/http://support.epson.net/linux/src/scanner/iscan/iscan-data_${version}.tar.gz"
];
sha256 = "092qhlnjjgz11ifx6mng7mz20i44gc0nlccrbmw18xr5hipbqqka";
};
buildInputs = [
libxslt
];
meta = common_meta;
};
in
stdenv.mkDerivation rec {
pname = "iscan";
version = "2.30.4-2";
src = fetchurl {
urls = [
"http://support.epson.net/linux/src/scanner/iscan/iscan_${version}.tar.gz"
"https://web.archive.org/web/http://support.epson.net/linux/src/scanner/iscan/iscan_${version}.tar.gz"
];
sha256 = "1ma76jj0k3bz0fy06fiyl4di4y77rcryb0mwjmzs5ms2vq9rjysr";
};
nativeBuildInputs = [
pkg-config
libtool
makeWrapper
];
buildInputs = [
gtk2
libxml2
libusb-compat-0_1
sane-backends
];
patches = [
# Patch for compatibility with libpng versions greater than 10499
(fetchpatch {
urls = [
"https://gitweb.gentoo.org/repo/gentoo.git/plain/media-gfx/iscan/files/iscan-2.28.1.3+libpng-1.5.patch?h=b6e4c805d53b49da79a0f64ef16bb82d6d800fcf"
"https://web.archive.org/web/https://gitweb.gentoo.org/repo/gentoo.git/plain/media-gfx/iscan/files/iscan-2.28.1.3+libpng-1.5.patch?h=b6e4c805d53b49da79a0f64ef16bb82d6d800fcf"
];
sha256 = "04y70qjd220dpyh771fiq50lha16pms98mfigwjczdfmx6kpj1jd";
})
# Patch iscan to search appropriate folders for firmware files
./firmware_location.patch
# Patch deprecated use of sscanf code to use a more modern C99 compatible version
./sscanf.patch
];
patchFlags = [ "-p0" ];
configureFlags = [
"--enable-dependency-reduction"
"--disable-frontend"
];
postConfigure = ''
echo '#define NIX_ESCI_PREFIX "'${fwdir}'"' >> config.h
'';
postInstall = ''
mkdir -p $out/etc/sane.d
cp backend/epkowa.conf $out/etc/sane.d
echo "epkowa" > $out/etc/sane.d/dll.conf
ln -s ${iscan-data}/share/iscan-data $out/share/iscan-data
mkdir -p $out/lib/iscan
ln -s ${plugins.network}/lib/iscan/network $out/lib/iscan/network
'';
postFixup = ''
# iscan-registry is a shell script requiring getopt
wrapProgram $out/bin/iscan-registry --prefix PATH : ${getopt}/bin
registry=$out/bin/iscan-registry;
''
+ lib.concatStrings (
lib.mapAttrsToList (name: value: ''
plugin=${value};
${value.passthru.registrationCommand}
'') plugins
);
meta = common_meta // {
description = "sane-epkowa backend for some epson scanners";
longDescription = ''
Includes gui-less iscan (aka. Image Scan! for Linux).
Supported hardware: at least :
''
+ lib.concatStringsSep ", " (lib.mapAttrsToList (name: value: value.passthru.hw) plugins);
maintainers = with lib.maintainers; [
symphorien
dominikh
];
};
}

View File

@@ -0,0 +1,29 @@
The "%as" verb requests sscanf to allocate a buffer for us. However,
this use of 'a' has been long deprecated, and gcc doesn't support it
in this manner when using -std=c99. The modern replacement is "%ms".
Without this change, iscan couldn't read the interpreter file, in turn
breaking all scanners that require plugins.
--- backend/cfg-obj.c.orig 2020-03-19 01:27:17.254762077 +0100
+++ backend/cfg-obj.c 2020-03-19 02:01:52.293329873 +0100
@@ -1026,7 +1026,7 @@
char *vendor = NULL;
char *model = NULL;
- sscanf (string, "%*s %as %as", &vendor, &model);
+ sscanf (string, "%*s %ms %ms", &vendor, &model);
if (list_append (_cfg->seen[CFG_KEY_SCSI], info))
{
@@ -1108,10 +1112,10 @@
char *library = NULL;
char *firmware = NULL;
- sscanf (string, "%*s %*s %x %x %as %as",
+ sscanf (string, "%*s %*s %x %x %ms %ms",
&vendor, &product, &library, &firmware);
if (library && _cfg_have_interpreter (library, firmware)
&& list_append (_cfg->seen[CFG_KEY_INTERPRETER], info))
{

View File

@@ -0,0 +1,61 @@
{
lib,
stdenv,
fetchurl,
gnuplot,
ruby,
}:
stdenv.mkDerivation {
pname = "eplot";
version = "2.09";
# Upstream has been contacted (2015-03) regarding providing versioned
# download URLs. Initial response was positive, but no action yet.
src = fetchurl {
url = "http://liris.cnrs.fr/christian.wolf/software/eplot/download/eplot";
sha256 = "0y9x82i3sfpgxsqz2w42r6iad6ph7vxb7np1xbwapx5iipciclw5";
};
ecSrc = fetchurl {
url = "http://liris.cnrs.fr/christian.wolf/software/eplot/download/ec";
sha256 = "0fg31g8mrcx14h2rjcf091cbd924n19z55iscaiflspifya30yhd";
};
buildInputs = [ ruby ];
dontUnpack = true;
installPhase = ''
runHook preInstall
mkdir -p "$out/bin"
cp "$src" "$out/bin/eplot"
cp "$ecSrc" "$out/bin/ec"
chmod +x "$out/bin/"*
sed -i -e "s|gnuplot -persist|${gnuplot}/bin/gnuplot -persist|" "$out/bin/eplot"
runHook postInstall
'';
meta = with lib; {
description = "Create plots quickly with gnuplot";
longDescription = ''
eplot ("easy gnuplot") is a ruby script which allows to pipe data easily
through gnuplot and create plots quickly, which can be saved in
postscript, PDF, PNG or EMF files. Plotting of multiple files into a
single diagram is supported.
This package also includes the complementary 'ec' tool (say "extract
column").
'';
homepage = "https://perso.liris.cnrs.fr/christian.wolf/software/eplot/";
license = licenses.gpl2Plus;
platforms = platforms.all;
maintainers = with maintainers; [
bjornfor
shamilton
];
};
}

View File

@@ -0,0 +1,42 @@
{
lib,
stdenv,
fetchFromGitHub,
fetchpatch,
rpm,
}:
stdenv.mkDerivation rec {
pname = "epm";
version = "5.0.0";
src = fetchFromGitHub {
owner = "jimjag";
repo = "epm";
rev = "v${version}";
hash = "sha256-o4B5lWBeve+U70FDgF1DrtNrXxaEY4etkPpwbqF7fmc=";
};
patches = [
# Makefile fix: INSTALL command
(fetchpatch {
url = "https://github.com/jimjag/epm/commit/dc5fcd6fa6e3a74baa28be060769a2b47f9368e7.patch";
sha256 = "1gfyz493w0larin841xx3xalb7m3sp1r2vv1xki6rz35ybrnb96c";
})
# Makefile fix: man pages filenames and docdir target
(fetchpatch {
url = "https://github.com/jimjag/epm/commit/96bb48d4d7b463a09d5a25debfb51c88dcd7398c.patch";
sha256 = "11aws0qac6vyy3w5z39vkjy4symmfzxfq9qgbgkk74fvx9vax42a";
})
];
buildInputs = [ rpm ];
meta = with lib; {
description = "ESP Package Manager generates distribution archives for a variety of platforms";
homepage = "https://jimjag.github.io/epm/";
license = licenses.asl20;
maintainers = with maintainers; [ pSub ];
platforms = platforms.unix;
};
}

View File

@@ -0,0 +1,43 @@
{
lib,
stdenv,
fetchFromGitHub,
cmake,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "epoll-shim";
version = "0.0.20240608";
src = fetchFromGitHub {
owner = "jiixyj";
repo = "epoll-shim";
rev = "v${finalAttrs.version}";
hash = "sha256-PIVzVjXOECGv41KtAUmGzUiQ+4lVIyzGEOzVQQ1Pc54=";
};
nativeBuildInputs = [
cmake
];
cmakeFlags = [
"-DCMAKE_INSTALL_PKGCONFIGDIR=${placeholder "out"}/lib/pkgconfig"
"-DBUILD_TESTING=${lib.boolToString finalAttrs.finalPackage.doCheck}"
]
++ lib.optionals (stdenv.buildPlatform != stdenv.hostPlatform && stdenv.hostPlatform.isFreeBSD) [
# fails in cross configurations for not being able to detect this value
"-DALLOWS_ONESHOT_TIMERS_WITH_TIMEOUT_ZERO=YES"
];
# https://github.com/jiixyj/epoll-shim/issues/41
# https://github.com/jiixyj/epoll-shim/pull/34
doCheck = !stdenv.hostPlatform.isDarwin;
meta = with lib; {
description = "Small epoll implementation using kqueue";
homepage = "https://github.com/jiixyj/epoll-shim";
license = licenses.mit;
platforms = platforms.darwin ++ platforms.freebsd ++ platforms.netbsd ++ platforms.openbsd;
maintainers = with maintainers; [ wegank ];
};
})

View File

@@ -0,0 +1,31 @@
{
lib,
python3Packages,
fetchFromGitHub,
}:
python3Packages.buildPythonApplication rec {
pname = "epr";
version = "2.4.13";
format = "pyproject";
src = fetchFromGitHub {
owner = "wustho";
repo = "epr";
rev = "v${version}";
sha256 = "sha256-1qsqYlqGlCRhl7HINrcTDt5bGlb7g5PmaERylT+UvEg=";
};
build-system = with python3Packages; [
setuptools
];
meta = with lib; {
description = "CLI Epub Reader";
mainProgram = "epr";
homepage = "https://github.com/wustho/epr";
license = licenses.mit;
maintainers = [ maintainers.Br1ght0ne ];
platforms = platforms.all;
};
}

View File

@@ -0,0 +1,41 @@
{
lib,
stdenv,
fetchurl,
which,
enableHO ? false,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "eprover";
version = "3.2";
src = fetchurl {
url = "https://wwwlehre.dhbw-stuttgart.de/~sschulz/WORK/E_DOWNLOAD/V_${finalAttrs.version}/E.tgz";
hash = "sha256-B0yOX8MGJHY0HOeQ/RWtgATTIta2YnhEvSdoqIML1K4=";
};
buildInputs = [ which ];
preConfigure = ''
sed -e 's/ *CC *= *gcc$//' -i Makefile.vars
'';
configureFlags = [
"--exec-prefix=$(out)"
"--man-prefix=$(out)/share/man"
]
++ lib.optionals enableHO [
"--enable-ho"
];
meta = {
description = "Automated theorem prover for full first-order logic with equality";
homepage = "http://www.eprover.org/";
license = lib.licenses.gpl2;
maintainers = with lib.maintainers; [
raskin
];
platforms = lib.platforms.all;
};
})

View File

@@ -0,0 +1,96 @@
{
lib,
stdenv,
fetchurl,
rpmextract,
autoreconfHook,
file,
libjpeg,
cups,
}:
let
version = "1.0.1";
filterVersion = "1.0.0";
in
stdenv.mkDerivation {
pname = "epson-201106w";
inherit version;
src = fetchurl {
# NOTE: Don't forget to update the webarchive link too!
urls = [
"https://download.ebz.epson.net/dsc/op/stable/SRPMS/epson-inkjet-printer-201106w-${version}-1lsb3.2.src.rpm"
"https://web.archive.org/web/https://download.ebz.epson.net/dsc/op/stable/SRPMS/epson-inkjet-printer-201106w-${version}-1lsb3.2.src.rpm"
];
sha256 = "1yig1xrh1ikblbp7sx706n5nnc237wy4mbch23ymy6akbgqg4aig";
};
nativeBuildInputs = [
rpmextract
autoreconfHook
file
];
buildInputs = [
libjpeg
cups
];
unpackPhase = ''
rpmextract $src
tar -zxf epson-inkjet-printer-201106w-${version}.tar.gz
tar -zxf epson-inkjet-printer-filter-${filterVersion}.tar.gz
for ppd in epson-inkjet-printer-201106w-${version}/ppds/*; do
substituteInPlace $ppd --replace "/opt/epson-inkjet-printer-201106w" "$out"
substituteInPlace $ppd --replace "/cups/lib" "/lib/cups"
done
cd epson-inkjet-printer-filter-${filterVersion}
'';
preConfigure = ''
chmod +x configure
export LDFLAGS="$LDFLAGS -Wl,--no-as-needed"
'';
postInstall = ''
cd ../epson-inkjet-printer-201106w-${version}
cp -a lib64 resource watermark $out
mkdir -p $out/share/cups/model/epson-inkjet-printer-201106w
cp -a ppds $out/share/cups/model/epson-inkjet-printer-201106w/
cp -a Manual.txt $out/doc/
cp -a README $out/doc/README.driver
'';
meta = with lib; {
homepage = "https://www.openprinting.org/driver/epson-201106w";
description = "Epson printer driver (BX535WD, BX630FW, BX635FWD, ME940FW, NX530, NX635, NX635, SX535WD, WorkForce 545, WorkForce 645";
longDescription = ''
This software is a filter program used with the Common UNIX Printing
System (CUPS) under Linux. It supplies high quality printing with
Seiko Epson Color Ink Jet Printers.
List of printers supported by this package:
Epson BX535WD Series
Epson BX630FW Series
Epson BX635FWD Series
Epson ME940FW Series
Epson NX530 Series
Epson SX535WD Series
Epson WorkForce 545 Series
Epson WorkForce 645 Series
To use the driver adjust your configuration.nix file:
services.printing = {
enable = true;
drivers = [ pkgs.epson-201106w ];
};
'';
license = with licenses; [
lgpl21
epson
];
platforms = platforms.linux;
maintainers = [ maintainers.nphilou ];
};
}

View File

@@ -0,0 +1,85 @@
{
lib,
stdenv,
fetchurl,
rpmextract,
autoreconfHook,
file,
libjpeg,
cups,
}:
let
version = "1.0.0";
filterVersion = "1.0.0";
in
stdenv.mkDerivation {
pname = "epson-201401w";
inherit version;
src = fetchurl {
# NOTE: Don't forget to update the webarchive link too!
urls = [
"https://download3.ebz.epson.net/dsc/f/03/00/03/45/41/92e9c9254f0ee4230a069545ba27ec2858a2c457/epson-inkjet-printer-201401w-1.0.0-1lsb3.2.src.rpm"
"https://web.archive.org/web/20200725175832/https://download3.ebz.epson.net/dsc/f/03/00/03/45/41/92e9c9254f0ee4230a069545ba27ec2858a2c457/epson-inkjet-printer-201401w-1.0.0-1lsb3.2.src.rpm"
];
sha256 = "0c60m1sd59s4sda38dc5nniwa7dh1b0kv1maajr0x9d38gqlyk3x";
};
nativeBuildInputs = [
rpmextract
autoreconfHook
file
];
buildInputs = [
libjpeg
cups
];
unpackPhase = ''
rpmextract $src
tar -zxf epson-inkjet-printer-201401w-${version}.tar.gz
tar -zxf epson-inkjet-printer-filter-${filterVersion}.tar.gz
for ppd in epson-inkjet-printer-201401w-${version}/ppds/*; do
substituteInPlace $ppd --replace "/opt/epson-inkjet-printer-201401w" "$out"
substituteInPlace $ppd --replace "/cups/lib" "/lib/cups"
done
cd epson-inkjet-printer-filter-${filterVersion}
'';
preConfigure = ''
chmod +x configure
'';
postInstall = ''
cd ../epson-inkjet-printer-201401w-${version}
cp -a lib64 resource watermark $out
mkdir -p $out/share/cups/model/epson-inkjet-printer-201401w
cp -a ppds $out/share/cups/model/epson-inkjet-printer-201401w/
cp -a Manual.txt $out/doc/
cp -a README $out/doc/README.driver
'';
meta = with lib; {
homepage = "https://www.openprinting.org/driver/epson-201401w";
description = "Epson printer driver (L456, L455, L366, L365, L362, L360, L312, L310, L222, L220, L132, L130)";
longDescription = ''
This software is a filter program used with the Common UNIX Printing
System (CUPS) under Linux. It supplies high quality printing with
Seiko Epson Color Ink Jet Printers.
To use the driver adjust your configuration.nix file:
services.printing = {
enable = true;
drivers = [ pkgs.epson-201401w ];
};
'';
license = with licenses; [
lgpl21
epson
];
platforms = platforms.linux;
maintainers = [ maintainers.lunarequest ];
};
}

View File

@@ -0,0 +1,13 @@
diff --git a/configure b/configure
index 0053441..9a6b855 100755
--- a/configure
+++ b/configure
@@ -2833,7 +2833,7 @@ if test $have_cups_config = yes; then
CUPS_LIBS=`cups-config --libs`
CUPS_IMAGE_LIBS=`cups-config --image --libs`
CUPS_SERVER_DIR=`cups-config --serverbin`
- CUPS_DATA_DIR=`cups-config --datadir`
+ CUPS_DATA_DIR="${prefix}/share/cups"
else
{ { echo "$as_me:$LINENO: error: *** 'cups-config' missing, please install CUPS or fix your \$PATH ***" >&5
echo "$as_me: error: *** 'cups-config' missing, please install CUPS or fix your \$PATH ***" >&2;}

View File

@@ -0,0 +1,102 @@
{
lib,
stdenv,
fetchurl,
cups,
pkgsi686Linux,
dpkg,
psutils,
makeWrapper,
ghostscript,
bash,
}:
let
version = "1.2-0";
libstdcpp5 = fetchurl {
url = "mirror://ubuntu/pool/universe/g/gcc-3.3/libstdc++5_3.3.6-17ubuntu1_i386.deb";
sha256 = "10f8zcmqaa7skvg2bz94mnlgqpan4iscvi8913r6iawjh7hiisjy";
};
in
stdenv.mkDerivation {
pname = "epson-alc1100";
inherit version;
src = fetchurl {
url = "https://download3.ebz.epson.net/dsc/f/03/00/11/33/07/4027e99517b5c388d444b8444d719b4b77f7e9db/Epson-ALC1100-filter-1.2.tar.gz";
sha256 = "1dfw75a3kj2aa4iicvlk9kz3jarrsikpnpd4cdpw79scfc5mwm2p";
};
patches = [
./cups-data-dir.patch
./ppd.patch
];
nativeBuildInputs = [
dpkg
makeWrapper
];
buildInputs = [
cups
pkgsi686Linux.glibc
psutils
ghostscript
bash
];
postUnpack = ''
dpkg -x ${libstdcpp5} libstdcpp5_i386;
mkdir -p $out/lib;
mv libstdcpp5_i386/usr/lib/* $out/lib;
'';
postFixup = ''
patchelf --set-interpreter ${pkgsi686Linux.glibc}/lib/ld-linux.so.2 \
--set-rpath "${
lib.makeLibraryPath [
pkgsi686Linux.glibc
"$out"
]
}" $out/bin/alc1100
patchelf --set-rpath "${
lib.makeLibraryPath [
pkgsi686Linux.glibc
]
}" $out/lib/libstdc++.so.5.0.7
wrapProgram $out/bin/alc1100_lprwrapper.sh \
--suffix PATH : "\$PATH:${psutils}/bin:/var/lib/cups/path/bin"
wrapProgram $out/bin/pstoalc1100.sh \
--suffix PATH : "\$PATH:${psutils}/bin:${ghostscript}/bin:${bash}/bin:/var/lib/cups/path/bin"
'';
meta = with lib; {
homepage = "http://download.ebz.epson.net/dsc/search/01/search/";
description = "Epson AcuLaser C1100 Driver";
longDescription = ''
This package provides a print filter for printing to EPSON AL-C1100
printers on Linux systems.
To use the driver adjust your configuration.nix file:
services.printing = {
enable = true;
drivers = [ pkgs.epson-alc1100 ];
};
'';
sourceProvenance = with sourceTypes; [ binaryNativeCode ];
license = with licenses; [
mit
eapl
];
maintainers = [ maintainers.eperuffo ];
platforms = platforms.linux;
};
}

View File

@@ -0,0 +1,13 @@
diff --git a/ppd/Epson-AL-C1100-fm3.ppd b/ppd/Epson-AL-C1100-fm3.ppd
index 75c7fff..ecd04c8 100644
--- a/ppd/Epson-AL-C1100-fm3.ppd
+++ b/ppd/Epson-AL-C1100-fm3.ppd
@@ -68,7 +68,7 @@
*%*********** Foomatic Configulations ************
*%pprRIP: foomatic-rip other
*FoomaticIDs: Epson-AL-C1100 alc1100
-*FoomaticRIPCommandLine: "pstoalc1100.sh %C"
+*FoomaticRIPCommandLine: "/var/lib/cups/path/bin/pstoalc1100.sh %C"
*%**************** Paper Handling ******************

View File

@@ -0,0 +1,62 @@
diff --git a/configure b/configure_new
index 12b4662..6ec641c 100755
--- a/configure
+++ b/configure_new
@@ -12162,55 +12162,8 @@ else
$as_echo "no" >&6; }
fi
-
-
-if test "xNONE" != "x${prefix}" ; then
- cups_default_prefix="${prefix}"
-else
- cups_default_prefix="${ac_default_prefix}"
-fi
-
-
-# Check whether --with-cupsfilterdir was given.
-if test "${with_cupsfilterdir+set}" = set; then :
- withval=$with_cupsfilterdir;
-else
- with_cupsfilterdir=no
-fi
-
-if test "xno" = "x${with_cupsfilterdir}"; then
- if test "xyes" = "x$have_cups_config" ; then
- CUPS_FILTER_DIR="${cups_default_prefix}`cups-config --serverbin | sed -e 's,^/[^/][^/]*,,'`/filter"
- else
- CUPS_FILTER_DIR="${cups_default_prefix}/lib/cups/filter"
- fi
-else
- CUPS_FILTER_DIR="${with_cupsfilterdir}"
-fi
-
-
-# Check whether --with-cupsppddir was given.
-if test "${with_cupsppddir+set}" = set; then :
- withval=$with_cupsppddir;
-else
- with_cupsppddir=no
-fi
-
-if test "xno" = "x${with_cupsppddir}"; then
- if test -d "${cups_default_prefix}/share/ppd" ; then
- CUPS_PPD_DIR="${cups_default_prefix}/share/ppd"
- elif test "xyes" = "x$have_cups_config" ; then
- CUPS_PPD_DIR="${cups_default_prefix}`cups-config --datadir | sed -e 's,^/[^/][^/]*,,'`/model"
- else
- CUPS_PPD_DIR="${cups_default_prefix}/share/cups/model"
- fi
-else
- CUPS_PPD_DIR="${with_cupsppddir}"
-fi
-
-
-
-
+CUPS_FILTER_DIR="${prefix}/lib/cups/filter"
+CUPS_PPD_DIR="${prefix}/share/cups/model"
# Check whether --enable-lsb was given.
if test "${enable_lsb+set}" = set; then :

View File

@@ -0,0 +1,79 @@
{
lib,
stdenv,
fetchurl,
cups,
fetchpatch,
dos2unix,
}:
let
version = "1.8.6-1";
in
stdenv.mkDerivation {
pname = "epson-escpr";
inherit version;
src = fetchurl {
# To find new versions, visit
# http://download.ebz.epson.net/dsc/search/01/search/?OSC=LX and search for
# some printer like for instance "WF-7110" to get to the most recent
# version.
# NOTE: Don't forget to update the webarchive link too!
urls = [
"https://download3.ebz.epson.net/dsc/f/03/00/16/21/81/74d098a47c3a616713079c9cd5904b468bb33dea/epson-inkjet-printer-escpr-${version}.tar.gz"
"https://web.archive.org/web/https://download3.ebz.epson.net/dsc/f/03/00/16/21/81/74d098a47c3a616713079c9cd5904b468bb33dea/epson-inkjet-printer-escpr-${version}.tar.gz"
];
sha256 = "sha256-hVbX4OXPe4y37Szju3uVdXlVdjX4DFSN/A2Emz3eCcQ=";
};
# the patches above are expecting unix line endings, but one of the files
# being patched has dos line endings in the source tarball
prePatch = ''
${dos2unix}/bin/dos2unix lib/epson-escpr-api.h
'';
patches = [
./cups-filter-ppd-dirs.patch
(fetchpatch {
url = "https://gitweb.gentoo.org/repo/gentoo.git/plain/net-print/epson-inkjet-printer-escpr/files/epson-inkjet-printer-escpr-1.8-missing-include.patch";
hash = "sha256-L4WhaxPQnJYyqCH00wiKIlFNMmCEXoGe5d7hJ5TMyEI=";
})
(fetchpatch {
url = "https://gitweb.gentoo.org/repo/gentoo.git/plain/net-print/epson-inkjet-printer-escpr/files/1.8.6-warnings.patch";
hash = "sha256-wSY0LZv2b+1kF7TfPolt554g79y2Ce6N/JqgjJyd3Ag=";
})
];
# To suppress error (Stripping trailing CRs from patch; use --binary to disable.)
patchFlags = [
"-p1"
];
buildInputs = [ cups ];
meta = with lib; {
homepage = "http://download.ebz.epson.net/dsc/search/01/search/";
description = "ESC/P-R Driver (generic driver)";
longDescription = ''
Epson Inkjet Printer Driver (ESC/P-R) for Linux and the
corresponding PPD files. The list of supported printers
can be found at http://www.openprinting.org/driver/epson-escpr/ .
To use the driver adjust your configuration.nix file:
services.printing = {
enable = true;
drivers = [ pkgs.epson-escpr ];
};
To setup a wireless printer, enable Avahi which provides
printer's hostname to CUPS and nss-mdns to make this
hostname resolvable:
services.avahi = {
enable = true;
nssmdns4 = true;
};'';
license = licenses.gpl3Plus;
maintainers = [ ];
platforms = platforms.linux;
};
}

View File

@@ -0,0 +1,57 @@
{
lib,
stdenv,
fetchurl,
autoreconfHook,
cups,
}:
stdenv.mkDerivation {
pname = "epson-inkjet-printer-escpr2";
version = "1.2.35";
src = fetchurl {
# To find the most recent version go to
# https://support.epson.net/linux/Printer/LSB_distribution_pages/en/escpr2.php
# and retrieve the download link for source package for arm CPU for the tar.gz (the x86 link targets to rpm source files)
url = "https://download3.ebz.epson.net/dsc/f/03/00/17/28/09/4e8dc40219d4b52e414b608de92552af4fd46eca/epson-inkjet-printer-escpr2-1.2.35-1.tar.gz";
hash = "sha256-aYEuEION/C32/SnngreX/nqK/6Yzkuxf0k0HpferTYM=";
};
buildInputs = [ cups ];
nativeBuildInputs = [
autoreconfHook
];
patches = [
# Fixes "implicit declaration of function" errors
# source of patch: https://aur.archlinux.org/packages/epson-inkjet-printer-escpr2
(fetchurl {
url = "https://aur.archlinux.org/cgit/aur.git/plain/bug_x86_64.patch?h=epson-inkjet-printer-escpr2&id=8fbca325d6d39fa3ffe001f90a432380bdeacc2f";
sha256 = "sha256-V8ejK33qyHPX4x8EOgR+XWW44KR8DQwHx2w+O71gQwo=";
})
];
configureFlags = [
"--with-cupsfilterdir=${placeholder "out"}/lib/cups/filter"
"--with-cupsppddir=${placeholder "out"}/share/cups/model"
];
meta = {
homepage = "http://download.ebz.epson.net/dsc/search/01/search/";
description = "ESC/P-R 2 Driver (generic driver)";
longDescription = ''
Epson Inkjet Printer Driver 2 (ESC/P-R 2) for Linux and the
corresponding PPD files.
Refer to the description of epson-escpr for usage.
'';
license = lib.licenses.gpl2Plus;
maintainers = with lib.maintainers; [
ma9e
ma27
shawn8901
];
platforms = lib.platforms.linux;
};
}

View File

@@ -0,0 +1,21 @@
diff --git a/src/raster_to_epson.c b/src/raster_to_epson.c
index 6e621c8..a5ca797 100644
--- a/src/raster_to_epson.c
+++ b/src/raster_to_epson.c
@@ -438,14 +438,14 @@ static int print_page (void)
break;
}
- if (eps_raster_print(raster_h, image_raw, pageRegion.bytesPerLine, pageRegion.width, &nraster)) {
+ if (eps_raster_print(raster_h, image_raw, pageRegion.bytesPerLine, pageRegion.width, (int *) &nraster)) {
error = 1;
break;
}
}
// flushing page
- eps_raster_print(raster_h, NULL, 0, 0, &nraster);
+ eps_raster_print(raster_h, NULL, 0, 0, (int *) &nraster);
bAbort = (error) ? TRUE : FALSE;
if (epcgEndPage (bAbort)) {

View File

@@ -0,0 +1,23 @@
diff --git a/src/pagemanager/pagemanager.c b/src/pagemanager/pagemanager.c
index 029e6d3..2881585 100644
--- a/src/pagemanager/pagemanager.c
+++ b/src/pagemanager/pagemanager.c
@@ -23,6 +23,7 @@
#include "debuglog.h"
#include "memory.h"
#include "raster.h"
+#include "raster-helper.h"
#include "pagemanager.h"
extern int JobCanceled;
diff --git a/src/raster_to_epson.c b/src/raster_to_epson.c
index 6e621c8..6eea77c 100644
--- a/src/raster_to_epson.c
+++ b/src/raster_to_epson.c
@@ -36,6 +36,7 @@
#include "raster.h"
#include "memory.h"
#include "raster_to_epson.h"
+#include "raster-helper.h"
#include "pagemanager.h"
#include "filter_option.h"

View File

@@ -0,0 +1,131 @@
{
autoreconfHook,
cups,
libjpeg,
rpmextract,
fetchurl,
lib,
stdenv,
}:
let
srcdirs = {
filter = "epson-inkjet-printer-filter-1.0.0";
driver = "epson-inkjet-printer-workforce-840-series-1.0.0";
};
in
stdenv.mkDerivation (finalAttrs: {
pname = "epson-inkjet-printer-workforce-840-series";
version = "1.0.0";
# The Epson may be unreliable, and it has been since sometime in
# 2024. Non-browser requests using commands like fetchurl receive a
# 403 error, an access denied response -- last checked on
# 2025-08-21.
#
# Therefore, an archive.org link has been added as a fallback
# option just in case.
src = fetchurl {
# NOTE: Don't forget to update the webarchive link too!
urls = [
"https://download.ebz.epson.net/dsc/op/stable/SRPMS/epson-inkjet-printer-workforce-840-series-${finalAttrs.version}-1lsb3.2.src.rpm"
"https://web.archive.org/web/https://download.ebz.epson.net/dsc/op/stable/SRPMS/epson-inkjet-printer-workforce-840-series-${finalAttrs.version}-1lsb3.2.src.rpm"
];
hash = "sha256-rTYnEmgzqR/wOZYYIe2rO9x2cX8s2qDyTuRaTjzJjbg=";
};
sourceRoot = srcdirs.filter;
nativeBuildInputs = [
autoreconfHook
rpmextract
];
buildInputs = [
cups
libjpeg
];
unpackPhase = ''
runHook preUnpack
rpmextract "$src"
for i in ${lib.concatStringsSep " " (builtins.attrValues srcdirs)}; do
tar xvf "$i".tar.gz
done
runHook postUnpack
'';
# Both patches fix errors that occur when building with GCC 14.
#
# eps_raster_print-cast.patch fixes 'error: passing argument 5 of
# eps_raster_print from incompatible pointer type' in file
# raster_to_epson.c
#
# include-raster-helper.patch fixes 'error: implicit declaration of
# function' in files pagemanager.c and raster_to_epson.c
patches = [
./eps_raster_print-cast.patch
./include-raster-helper.patch
];
installPhase =
let
filterdir = "$out/lib/cups/filter";
docdir = "$out/share/doc/epson-inkjet-printer-workforce-840-series";
ppddir = "$out/share/cups/model/epson-inkjet-printer-workforce-840-series";
libdir =
if stdenv.hostPlatform.isx86_64 then
"lib64"
else
throw "Platforms other than x86_64-linux are not (yet) supported.";
in
''
runHook preInstall
mkdir -p "$out" "${docdir}" "${filterdir}" "${ppddir}"
cp src/epson_inkjet_printer_filter "${filterdir}"
cp AUTHORS COPYING COPYING.EPSON COPYING.LIB "${docdir}"
cd ../${srcdirs.driver}
cp Manual.txt README "${docdir}"
for ppd in ppds/*; do
substituteInPlace "$ppd" --replace-fail '/opt/epson-inkjet-printer-workforce-840-series/cups/lib' "$out/lib/cups"
gzip -c "$ppd" > "${ppddir}/''${ppd#*/}"
done
cp -r resource watermark ${libdir} "$out"
runHook postInstall
'';
meta = {
description = "Proprietary CUPS drivers for Epson inkjet printers";
longDescription = ''
This software is a filter program used with the Common UNIX Printing
System (CUPS) under Linux. It supplies high quality printing with
Seiko Epson Color Ink Jet Printers.
This printer driver is supporting the following printers.
Epson Stylus Office BX925
Epson WorkForce 840
To use the driver adjust your configuration.nix file:
```nix
{
services.printing = {
enable = true;
drivers = [ pkgs.epson-inkjet-printer-workforce-840-series ];
};
}
```
'';
downloadPage = "http://download.ebz.epson.net/dsc/du/02/DriverDownloadInfo.do?LG2=EN&CN2=&DSCMI=16839&DSCCHK=3d7bc6bdfca08006abfb859fb1967183156a7252";
license = with lib.licenses; [
lgpl21
epson
];
maintainers = with lib.maintainers; [ heichro ];
platforms = [ "x86_64-linux" ];
};
})

View File

@@ -0,0 +1,21 @@
diff --git a/src/raster_to_epson.c b/src/raster_to_epson.c
index 6e621c8..a5ca797 100644
--- a/src/raster_to_epson.c
+++ b/src/raster_to_epson.c
@@ -438,14 +438,14 @@ static int print_page (void)
break;
}
- if (eps_raster_print(raster_h, image_raw, pageRegion.bytesPerLine, pageRegion.width, &nraster)) {
+ if (eps_raster_print(raster_h, image_raw, pageRegion.bytesPerLine, pageRegion.width, (int *) &nraster)) {
error = 1;
break;
}
}
// flushing page
- eps_raster_print(raster_h, NULL, 0, 0, &nraster);
+ eps_raster_print(raster_h, NULL, 0, 0, (int *) &nraster);
bAbort = (error) ? TRUE : FALSE;
if (epcgEndPage (bAbort)) {

View File

@@ -0,0 +1,24 @@
diff --git a/src/pagemanager/pagemanager.c b/src/pagemanager/pagemanager.c
index 029e6d3..2881585 100644
--- a/src/pagemanager/pagemanager.c
+++ b/src/pagemanager/pagemanager.c
@@ -23,6 +23,7 @@
#include "debuglog.h"
#include "memory.h"
#include "raster.h"
+#include "raster-helper.h"
#include "pagemanager.h"
extern int JobCanceled;
diff --git a/src/raster_to_epson.c b/src/raster_to_epson.c
index 6e621c8..6eea77c 100644
--- a/src/raster_to_epson.c
+++ b/src/raster_to_epson.c
@@ -36,6 +36,7 @@
#include "raster.h"
#include "memory.h"
#include "raster_to_epson.h"
+#include "raster-helper.h"
#include "pagemanager.h"
#include "filter_option.h"

View File

@@ -0,0 +1,129 @@
{
autoreconfHook,
cups,
libjpeg,
rpmextract,
fetchurl,
lib,
stdenv,
}:
let
srcdirs = {
filter = "epson-inkjet-printer-filter-1.0.0";
driver = "epson-inkjet-printer-workforce-635-nx625-series-1.0.1";
};
in
stdenv.mkDerivation rec {
pname = "epson-inkjet-printer-workforce-635-nx625-series";
version = "1.0.1";
src = fetchurl {
# NOTE: Don't forget to update the webarchive link too!
urls = [
"https://download.ebz.epson.net/dsc/op/stable/SRPMS/${pname}-${version}-1lsb3.2.src.rpm"
"https://web.archive.org/web/https://download.ebz.epson.net/dsc/op/stable/SRPMS/${pname}-${version}-1lsb3.2.src.rpm"
];
sha256 = "19nb2h0y9rvv6rg7j262f8sqap9kjvz8kmisxnjg1w0v19zb9zf2";
};
sourceRoot = srcdirs.filter;
nativeBuildInputs = [
autoreconfHook
rpmextract
];
buildInputs = [
cups
libjpeg
];
unpackPhase = ''
rpmextract "$src"
for i in ${lib.concatStringsSep " " (builtins.attrValues srcdirs)}; do
tar xvf "$i".tar.gz
done
'';
patches = [
./eps_raster_print-cast.patch
./include-raster-helper.patch
];
preConfigure = ''
chmod u+x configure
'';
installPhase =
let
filterdir = "$out/cups/lib/filter";
docdir = "$out/share/doc";
ppddir = "$out/share/cups/model/${pname}";
libdir =
if stdenv.system == "x86_64-linux" then
"lib64"
else if stdenv.system == "i686_linux" then
"lib"
else
throw "other platforms than i686_linux and x86_64-linux are not yet supported";
in
''
mkdir -p "$out" "${docdir}" "${filterdir}" "${ppddir}"
cp src/epson_inkjet_printer_filter "${filterdir}"
cd ../${srcdirs.driver}
for ppd in ppds/*; do
substituteInPlace "$ppd" --replace '/opt/${pname}' "$out"
gzip -c "$ppd" > "${ppddir}/''${ppd#*/}"
done
cp COPYING.EPSON README "${docdir}"
cp -r resource watermark ${libdir} "$out"
'';
meta = {
description = "Proprietary CUPS drivers for Epson inkjet printers";
longDescription = ''
This software is a filter program used with Common UNIX Printing
System (CUPS) from the Linux. This can supply the high quality print
with Seiko Epson Color Ink Jet Printers.
This printer driver is supporting the following printers.
WorkForce 60
WorkForce 625
WorkForce 630
WorkForce 633
WorkForce 635
WorkForce T42WD
Epson Stylus NX625
Epson Stylus SX525WD
Epson Stylus SX620FW
Epson Stylus TX560WD
Epson Stylus Office B42WD
Epson Stylus Office BX525WD
Epson Stylus Office BX625FWD
Epson Stylus Office TX620FWD
Epson ME OFFICE 82WD
Epson ME OFFICE 85ND
Epson ME OFFICE 900WD
Epson ME OFFICE 960FWD
License: LGPL and SEIKO EPSON CORPORATION SOFTWARE LICENSE AGREEMENT
To use the driver adjust your configuration.nix file:
services.printing = {
enable = true;
drivers = [ pkgs.${pname} ];
};
'';
downloadPage = "https://download.ebz.epson.net/dsc/du/02/DriverDownloadInfo.do?LG2=EN&CN2=&DSCMI=16857&DSCCHK=4334d3487503d7f916ccf5d58071b05b7687294f";
license = with lib.licenses; [
lgpl21
epson
];
maintainers = [ lib.maintainers.jorsn ];
platforms = [
"x86_64-linux"
"i686-linux"
];
};
}

View File

@@ -0,0 +1,97 @@
{
lib,
stdenv,
fetchurl,
rpmextract,
autoreconfHook,
file,
libjpeg,
cups,
}:
let
version = "1.0.1";
filterVersion = "1.0.2";
in
stdenv.mkDerivation {
pname = "epson_201207w";
inherit version;
src = fetchurl {
# NOTE: Don't forget to update the webarchive link too!
urls = [
"https://download3.ebz.epson.net/dsc/f/03/00/15/64/87/25d34a13841e5e95d80266e6fd8dfcdf67c95634/epson-inkjet-printer-201207w-1.0.1-1.src.rpm"
"https://web.archive.org/web/https://download3.ebz.epson.net/dsc/f/03/00/15/64/87/25d34a13841e5e95d80266e6fd8dfcdf67c95634/epson-inkjet-printer-201207w-1.0.1-1.src.rpm"
];
sha256 = "0icbsd3m8ij1zm55q8vms81dxd79nf5m33i2g4knddljsfv7nxdc";
};
nativeBuildInputs = [
rpmextract
autoreconfHook
file
];
buildInputs = [
libjpeg
cups
];
unpackPhase = ''
rpmextract $src
tar -zxf epson-inkjet-printer-201207w-${version}.tar.gz
tar -zxf epson-inkjet-printer-filter-${filterVersion}.tar.gz
for ppd in epson-inkjet-printer-201207w-${version}/ppds/*; do
substituteInPlace $ppd --replace "/opt/epson-inkjet-printer-201207w" "$out"
substituteInPlace $ppd --replace "/cups/lib" "/lib/cups"
done
cd epson-inkjet-printer-filter-${filterVersion}
'';
preConfigure = ''
chmod +x configure
export LDFLAGS="$LDFLAGS -Wl,--no-as-needed"
'';
postInstall = ''
cd ../epson-inkjet-printer-201207w-${version}
cp -a lib64 resource watermark $out
mkdir -p $out/share/cups/model/epson-inkjet-printer-201207w
cp -a ppds $out/share/cups/model/epson-inkjet-printer-201207w/
cp -a Manual.txt $out/doc/
cp -a README $out/doc/README.driver
'';
meta = with lib; {
homepage = "https://www.openprinting.org/driver/epson-201207w";
description = "Epson printer driver (L110, L210, L300, L350, L355, L550, L555)";
longDescription = ''
This software is a filter program used with the Common UNIX Printing
System (CUPS) under Linux. It supplies high quality printing with
Seiko Epson Color Ink Jet Printers.
List of printers supported by this package:
Epson L110 Series
Epson L210 Series
Epson L300 Series
Epson L350 Series
Epson L355 Series
Epson L550 Series
Epson L555 Series
To use the driver adjust your configuration.nix file:
services.printing = {
enable = true;
drivers = [ pkgs.epson_201207w ];
};
'';
license = with licenses; [
lgpl21Plus
epson
];
maintainers = [ maintainers.romildo ];
platforms = [ "x86_64-linux" ];
};
}

View File

@@ -0,0 +1,74 @@
{
lib,
stdenv,
fetchurl,
rpmextract,
libjpeg,
cups,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "epson_201310w";
version = "1.0.1";
src = fetchurl {
url = "https://download3.ebz.epson.net/dsc/f/03/00/15/64/77/6f825c323a9f4b8429e3f9f0f4e9c50b1b15f583/epson-inkjet-printer-201310w-${finalAttrs.version}-1.src.rpm";
hash = "sha256-596qMon5KmMHe7mh+ykdpWeazJOCGA6HmmtvdGheRmA=";
};
nativeBuildInputs = [ rpmextract ];
buildInputs = [
libjpeg
cups
];
unpackPhase = ''
runHook preUnpack
rpmextract $src
tar -zxf epson-inkjet-printer-201310w-1.0.1.tar.gz
tar -zxf epson-inkjet-printer-filter-1.0.2.tar.gz
runHook postUnpack
'';
preConfigure = ''
cd epson-inkjet-printer-filter-1.0.2
'';
postInstall = ''
cd ../epson-inkjet-printer-201310w-1.0.1
cp -a lib64 resource watermark $out
install --mode=0644 -Dt $out/share/cups/model ppds/EPSON_L120.ppd
mkdir -p $out/doc
cp -a Manual.txt $out/doc
cp -a README $out/doc/README.driver
'';
postFixup = ''
substituteInPlace $out/share/cups/model/EPSON_L120.ppd \
--replace-fail "/home/epson/projects/PrinterDriver/P2/_rpmbuild/SOURCES/epson-inkjet-printer-201310w-1.0.1/watermark" "$out/watermark" \
--replace-fail "Epson_201310w.1.data" "$out/resource/Epson_201310w.1.data"
'';
meta = {
homepage = "https://www.epson.eu/en_EU/support/sc/epson-l120/s/s1346";
description = "Epson printer driver for L120 series inkjet printers";
longDescription = ''
This software is a filter program used with the Common UNIX Printing
System (CUPS) under Linux. It supplies high quality printing with
Seiko Epson L120 series printers.
To use the driver adjust your configuration.nix file:
services.printing = {
enable = true;
drivers = [ pkgs.epson_201310w ];
};
'';
license = with lib.licenses; [
lgpl21
epson
];
sourceProvenance = [ lib.sourceTypes.binaryNativeCode ];
maintainers = with lib.maintainers; [ nukdokplex ];
platforms = [ "x86_64-linux" ];
};
})

View File

@@ -0,0 +1,91 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index a9daee7..7c6da08 100755
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -17,7 +17,6 @@
# CMakeLists.txt -- template and derived ESC/I ESC/I-2 protocol commands
project (epsonscan2)
-set (CMAKE_INSTALL_PREFIX "/usr")
cmake_minimum_required (VERSION 2.8.12.2)
include(GNUInstallDirs)
@@ -86,7 +85,6 @@ set(COMMON_ETC_PATH ${CMAKE_INSTALL_FULL_SYSCONFDIR})
set(EPSON_WORK_PATH /tmp/epsonWork/)
set(EPSON_SETTINGS_PATH $ENV{HOME}/.epsonscan2/)
-SET (CMAKE_INSTALL_PREFIX /usr)
set(EPSON_INSTALL_PATH ${CMAKE_INSTALL_FULL_LIBDIR}/epsonscan2/)
set(COMMON_SHARE_PATH ${CMAKE_INSTALL_FULL_DATAROOTDIR})
@@ -113,8 +111,8 @@ add_subdirectory(src)
install(DIRECTORY Resources DESTINATION ${EPSON_INSTALL_ROOT}${EPSON_INSTALL_PATH})
-install(FILES epsonscan2.rules DESTINATION ${EPSON_INSTALL_ROOT}/lib/udev/rules.d/ RENAME 60-epsonscan2.rules)
-install(FILES epsonscan2 DESTINATION ${EPSON_INSTALL_ROOT}/etc/sane.d/dll.d)
+install(FILES epsonscan2.rules DESTINATION ${EPSON_INSTALL_ROOT}${CMAKE_INSTALL_PREFIX}/lib/udev/rules.d/ RENAME 60-epsonscan2.rules)
+install(FILES epsonscan2 DESTINATION ${EPSON_INSTALL_ROOT}${CMAKE_INSTALL_PREFIX}/etc/sane.d/dll.d)
install(CODE "execute_process(COMMAND ${CMAKE_COMMAND} -E make_directory ${EPSON_INSTALL_ROOT}${CMAKE_INSTALL_FULL_LIBDIR}/sane/)")
install(CODE "execute_process(COMMAND ${CMAKE_COMMAND} -E create_symlink ../epsonscan2/libsane-epsonscan2.so ${EPSON_INSTALL_ROOT}${CMAKE_INSTALL_FULL_LIBDIR}/sane/libsane-epsonscan2.so.1)")
install(CODE "execute_process(COMMAND ${CMAKE_COMMAND} -E create_symlink ../epsonscan2/libsane-epsonscan2.so ${EPSON_INSTALL_ROOT}${CMAKE_INSTALL_FULL_LIBDIR}/sane/libsane-epsonscan2.so.1.0.0)")
diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index c884d83..5ddff0c 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -26,7 +26,9 @@ add_subdirectory(ES2Command/Linux)
add_subdirectory(ES2FileFormat/Linux)
add_subdirectory(Controller)
add_subdirectory(SaneWrapper/Linux)
+if (NOT DEFINED NO_GUI)
add_subdirectory(Standalone)
add_subdirectory(DetectAlert)
+endif ()
add_subdirectory(ScanSDK)
diff --git a/src/Controller/Src/Filter/GetOrientation.cpp b/src/Controller/Src/Filter/GetOrientation.cpp
index 387561e..15448ad 100644
--- a/src/Controller/Src/Filter/GetOrientation.cpp
+++ b/src/Controller/Src/Filter/GetOrientation.cpp
@@ -12,14 +12,7 @@ namespace epsonscan
static std::string GetExecPath()
{
-#ifdef AKBMODE
- std::string strDst = "/usr/libexec/";
- strDst = strDst + DRIVER_NAME;
- strDst = strDst + "-ocr/ocr-engine-getrotate";
- return strDst.c_str() ;
-#else
- return "/usr/libexec/epsonscan2-ocr/ocr-engine-getrotate" ;
-#endif
+ return "@OCR_ENGINE_GETROTATE@";
}
static const int kMaxBuf = 256;
diff --git a/src/Controller/Src/Scanner/Engine.cpp b/src/Controller/Src/Scanner/Engine.cpp
index 8bd842e..d011329 100755
--- a/src/Controller/Src/Scanner/Engine.cpp
+++ b/src/Controller/Src/Scanner/Engine.cpp
@@ -210,8 +210,8 @@ bool Engine::InitWithDeviceInfoDict(const char *deviceInfo) {
SDIError Engine::Open()
{
SDI_TRACE_LOG("Enter");
- system("killall -9 -q es2netif > /dev/null");
- system("killall -9 -q es2intif > /dev/null");
+ system("@KILLALL@ -9 -q es2netif > /dev/null");
+ system("@KILLALL@ -9 -q es2intif > /dev/null");
if (engine_) {
return ExchangeError(engine_->Open());
}
diff --git a/src/Standalone/CMakeLists.txt b/src/Standalone/CMakeLists.txt
index eff3dd3..c2b3803 100644
--- a/src/Standalone/CMakeLists.txt
+++ b/src/Standalone/CMakeLists.txt
@@ -167,5 +167,5 @@ target_link_libraries(es2standalone ${QT_LIBRARIES}
)
QT5_USE_MODULES(es2standalone Widgets)
-install(TARGETS es2standalone DESTINATION "${EPSON_INSTALL_ROOT}/usr/bin")
+install(TARGETS es2standalone DESTINATION "${EPSON_INSTALL_ROOT}${CMAKE_INSTALL_FULL_BINDIR}")

View File

@@ -0,0 +1,37 @@
diff --git a/thirdparty/zlib/gzlib.c b/thirdparty/zlib/gzlib.c
index 4105e6a..eae3a38 100644
--- a/thirdparty/zlib/gzlib.c
+++ b/thirdparty/zlib/gzlib.c
@@ -3,6 +3,7 @@
* For conditions of distribution and use, see copyright notice in zlib.h
*/
+#include <unistd.h>
#include "gzguts.h"
#if defined(_WIN32) && !defined(__BORLANDC__) && !defined(__MINGW32__)
diff --git a/thirdparty/zlib/gzread.c b/thirdparty/zlib/gzread.c
index 956b91e..66089b6 100644
--- a/thirdparty/zlib/gzread.c
+++ b/thirdparty/zlib/gzread.c
@@ -3,6 +3,7 @@
* For conditions of distribution and use, see copyright notice in zlib.h
*/
+#include <unistd.h>
#include "gzguts.h"
/* Local functions */
diff --git a/thirdparty/zlib/gzwrite.c b/thirdparty/zlib/gzwrite.c
index c7b5651..e685f3e 100644
--- a/thirdparty/zlib/gzwrite.c
+++ b/thirdparty/zlib/gzwrite.c
@@ -3,6 +3,7 @@
* For conditions of distribution and use, see copyright notice in zlib.h
*/
+#include <unistd.h>
#include "gzguts.h"
/* Local functions */

View File

@@ -0,0 +1,184 @@
{
lib,
stdenv,
autoPatchelfHook,
boost186,
cmake,
copyDesktopItems,
imagemagick,
fetchpatch,
fetchzip,
killall,
libjpeg,
libpng,
libtiff,
libtool,
libusb1,
makeDesktopItem,
qt5,
withGui ? true,
withNonFreePlugins ? false,
}:
let
pname = "epsonscan2";
description = "Epson Scan 2 scanner driver for many modern Epson scanners and multifunction printers";
# Epson updates projects without changing their version numbers.
# There can be multiple different packages identified by the same
#version, so we also tag them with the month and year shown in
# the Epson download page.
version = "6.7.70.0-01-2025";
system = stdenv.hostPlatform.system;
src = fetchzip {
url = "https://download3.ebz.epson.net/dsc/f/03/00/16/60/70/c7fc14e41ec84255008c6125b63bcac40f55e11c/epsonscan2-6.7.70.0-1.src.tar.gz";
hash = "sha256-WvNBy5hAxNJfwgjBR5VGaXuyTCK2YEiD3i7SMDl3U/U=";
};
bundle =
{
"x86_64-linux" = fetchzip {
name = "${pname}-bundle";
url = "https://download3.ebz.epson.net/dsc/f/03/00/16/14/38/7b1780ace96e2c6033bbb667c7f3ed281e4e9f38/epsonscan2-bundle-6.7.70.0.x86_64.deb.tar.gz";
hash = "sha256-fPNNFgW/VU/YG+jjmSvPZ0WsHibsXY1TNp164GxLHKw=";
};
}
."${system}" or (throw "Unsupported system: ${system}");
in
stdenv.mkDerivation {
inherit pname src version;
patches = [
./build.patch
./gcc14.patch
(fetchpatch {
url = "https://raw.githubusercontent.com/flathub/net.epson.epsonscan2/a489ac2f8cbd03afeda86673930cc17663c31a53/patches/0002-Fix-crash.patch";
hash = "sha256-rNsFnHq//CJcIZl0M6RLRkIY3YhnJZbikO8SeeC2ktg=";
})
(fetchpatch {
url = "https://raw.githubusercontent.com/flathub/net.epson.epsonscan2/a489ac2f8cbd03afeda86673930cc17663c31a53/patches/0004-Fix-a-crash-on-an-OOB-container-access.patch";
hash = "sha256-WmA8pmPSJ1xUdeBbE8Jzi6w9p96aIOm0erF3T4EQ6VA=";
})
(fetchpatch {
url = "https://raw.githubusercontent.com/flathub/net.epson.epsonscan2/a489ac2f8cbd03afeda86673930cc17663c31a53/patches/0003-Use-XDG-open-to-open-the-directory.patch";
hash = "sha256-H3lle1SXkkpbBkozYEwiX0z9oTUubTpB+l91utxH03M=";
})
];
postPatch = ''
substituteInPlace src/Controller/Src/Scanner/Engine.cpp \
--replace-fail '@KILLALL@' ${lib.getExe killall}
substituteInPlace src/Controller/Src/Filter/GetOrientation.cpp \
--replace-fail '@OCR_ENGINE_GETROTATE@' $out/libexec/epsonscan2-ocr/ocr-engine-getrotate
'';
nativeBuildInputs = [
cmake
]
++ lib.optionals withGui [
imagemagick # to make icons
qt5.wrapQtAppsHook
]
++ lib.optionals withNonFreePlugins [
autoPatchelfHook
];
buildInputs = [
boost186 # uses Boost.Optional but epsonscan2 is pre-C++11.
libjpeg
libpng
libtiff
libusb1
]
++ lib.optionals withGui [
copyDesktopItems
qt5.qtbase
]
++ lib.optionals withNonFreePlugins [
libtool.lib
];
cmakeFlags = [
# The non-free (Debian) packages uses this directory structure so do the same when compiling
# from source so we can easily merge them.
"-DCMAKE_INSTALL_LIBDIR=lib/${system}-gnu"
# There are many CMakeLists.txt files with various minimum versions. It's much easier to set this
# here, instead of substituting those everywhere
"-DCMAKE_POLICY_VERSION_MINIMUM=3.10"
]
++ lib.optionals (!withGui) [
"-DNO_GUI=ON"
];
doInstallCheck = true;
postInstall = ''
# But when we put all the libraries in lib/${system}-gnu, then SANE can't find the
# required libraries so create a symlink to where it expects them to be.
mkdir -p $out/lib/sane
for file in $out/lib/${system}-gnu/sane/*.so.*; do
ln -s $file $out/lib/sane/
done
''
+ lib.optionalString withGui ''
# The icon file extension is .ico but it's actually a png!
mkdir -p $out/share/icons/hicolor/{48x48,128x128}/apps
magick $src/Resources/Icons/escan2_app.ico -resize 48x48 -delete 1,2,3 $out/share/icons/hicolor/48x48/apps/epsonscan2.png
magick $src/Resources/Icons/escan2_app.ico -resize 128x128 -delete 1,2,3 $out/share/icons/hicolor/128x128/apps/epsonscan2.png
''
+ lib.optionalString withNonFreePlugins ''
ar xf ${bundle}/plugins/epsonscan2-non-free-plugin_*.deb
tar Jxf data.tar.xz
cp -r usr/* $out
'';
desktopItems = lib.optionals withGui [
(makeDesktopItem {
name = "epsonscan2";
exec = "epsonscan2";
icon = "epsonscan2";
desktopName = "Epson Scan 2";
genericName = "Epson Scan 2";
comment = description;
categories = [
"Graphics"
"Scanning"
];
})
];
meta = {
inherit description;
mainProgram = "epsonscan2";
longDescription = ''
The Epson Scan 2 scanner driver, including optional non-free plugins such
as OCR and network scanning.
To use the SANE backend:
```nix
{
hardware.sane.extraBackends = [ pkgs.epsonscan2 ];
}
```
Overrides can be used to customise this package. For example, to enable
non-free plugins and disable the Epson GUI:
```nix
pkgs.epsonscan2.override {
withNonFreePlugins = true;
withGui = false;
}
```
'';
homepage = "https://support.epson.net/linux/en/epsonscan2.php";
platforms = lib.systems.inspect.patternLogicalAnd lib.systems.inspect.patterns.isLinux lib.systems.inspect.patterns.isx86_64;
sourceProvenance =
with lib.sourceTypes;
[ fromSource ] ++ lib.optionals withNonFreePlugins [ binaryNativeCode ];
license = with lib.licenses; if withNonFreePlugins then unfree else lgpl21Plus;
maintainers = with lib.maintainers; [ james-atkins ];
};
}

View File

@@ -0,0 +1,34 @@
{
lib,
stdenv,
fetchurl,
}:
stdenv.mkDerivation rec {
version = "3.09";
pname = "epstool";
src = fetchurl {
url = "http://ftp.de.debian.org/debian/pool/main/e/epstool/epstool_${version}.orig.tar.xz";
hash = "sha256-HoUknRpE+UGLH5Wjrr2LB4TauOSd62QXrJuZbKCPYBE=";
};
makeFlags = [
"CC=${stdenv.cc.targetPrefix}cc"
"CLINK=${stdenv.cc.targetPrefix}cc"
"LINK=${stdenv.cc.targetPrefix}cc"
];
installPhase = ''
make EPSTOOL_ROOT=$out install
'';
meta = with lib; {
description = "Utility to create or extract preview images in EPS files, fix bounding boxes and convert to bitmaps";
homepage = "http://pages.cs.wisc.edu/~ghost/gsview/epstool.htm";
license = licenses.gpl2Only;
maintainers = [ maintainers.asppsa ];
platforms = platforms.all;
mainProgram = "epstool";
};
}

View File

@@ -0,0 +1,41 @@
{
lib,
python3,
fetchFromGitHub,
unstableGitUpdater,
}:
python3.pkgs.buildPythonApplication {
pname = "epub-thumbnailer";
version = "0-unstable-2024-03-26";
pyproject = true;
src = fetchFromGitHub {
owner = "marianosimone";
repo = "epub-thumbnailer";
rev = "de4b5bf0fcd1817d560f180231f7bd22d330f1be";
hash = "sha256-r0t2enybUEminXOHjx6uH6LvQtmzTRPZm/gY3Vi2c64=";
};
nativeBuildInputs = with python3.pkgs; [
setuptools
];
propagatedBuildInputs = with python3.pkgs; [
pillow
];
postInstall = ''
mv $out/bin/epub-thumbnailer.py $out/bin/epub-thumbnailer
'';
passthru.updateScript = unstableGitUpdater { };
meta = with lib; {
description = "Script to extract the cover of an epub book and create a thumbnail for it";
homepage = "https://github.com/marianosimone/epub-thumbnailer";
license = licenses.gpl3Plus;
maintainers = with maintainers; [ GaetanLepage ];
mainProgram = "epub-thumbnailer";
};
}

View File

@@ -0,0 +1,31 @@
{
lib,
stdenv,
fetchFromGitHub,
}:
stdenv.mkDerivation rec {
pname = "epub2txt2";
version = "2.08";
src = fetchFromGitHub {
owner = "kevinboone";
repo = "epub2txt2";
tag = "v${version}";
sha256 = "sha256-YFaXkcIdat2cn1ITYFyG1hxbbepqcxvyJ6ZzDo4dVYI=";
};
makeFlags = [
"CC:=$(CC)"
"PREFIX:=$(out)"
];
meta = {
description = "Simple command-line utility for Linux, for extracting text from EPUB documents";
homepage = "https://github.com/kevinboone/epub2txt2";
license = lib.licenses.gpl3Only;
platforms = lib.platforms.unix;
maintainers = [ lib.maintainers.leonid ];
mainProgram = "epub2txt";
};
}

View File

@@ -0,0 +1,53 @@
{
lib,
stdenv,
fetchzip,
jre,
makeWrapper,
}:
stdenv.mkDerivation rec {
pname = "epubcheck";
version = "5.3.0";
src = fetchzip {
url = "https://github.com/w3c/epubcheck/releases/download/v${version}/epubcheck-${version}.zip";
sha256 = "sha256-wROsu/s0EuNQQsbMtxWVIwDZvDozBk/kfwxhivCIRAo=";
};
nativeBuildInputs = [ makeWrapper ];
dontBuild = true;
installPhase = ''
mkdir -p $out/lib
cp -r lib/* $out/lib
mkdir -p $out/libexec/epubcheck
cp epubcheck.jar $out/libexec/epubcheck
classpath=$out/libexec/epubcheck/epubcheck.jar
for jar in $out/lib/*.jar; do
classpath="$classpath:$jar"
done
mkdir -p $out/bin
makeWrapper ${jre}/bin/java $out/bin/epubcheck \
--add-flags "-classpath $classpath com.adobe.epubcheck.tool.Checker"
'';
meta = with lib; {
homepage = "https://github.com/w3c/epubcheck";
description = "Validation tool for EPUB";
mainProgram = "epubcheck";
sourceProvenance = with sourceTypes; [ binaryBytecode ];
license = with licenses; [
asl20
bsd3
mpl10
w3c
];
platforms = platforms.all;
maintainers = with maintainers; [ eadwu ];
};
}

View File

@@ -0,0 +1,34 @@
{
lib,
python3Packages,
fetchPypi,
}:
python3Packages.buildPythonApplication rec {
pname = "epy";
version = "2023.6.11";
pyproject = true;
src = fetchPypi {
inherit version;
pname = "epy_reader";
hash = "sha256-gel503e8DXjrMJK9lpAZ6GxQsrahKX+SjiyRwKbiJUY=";
};
dependencies = [ python3Packages.standard-imghdr ];
nativeBuildInputs = [ python3Packages.poetry-core ];
pythonImportsCheck = [
"epy_reader.cli"
"epy_reader.reader"
];
meta = {
description = "CLI Ebook Reader";
homepage = "https://github.com/wustho/epy";
mainProgram = "epy";
license = lib.licenses.gpl3;
maintainers = with lib.maintainers; [ perstark ];
};
}