Merge remote-tracking branch 'ni/master' into 18.09
This commit is contained in:
commit
ee07881154
@ -1,11 +1,24 @@
|
|||||||
{ mkDerivation, base, fetchgit, stdenv }:
|
with import <stockholm/lib>;
|
||||||
mkDerivation rec {
|
{ mkDerivation, base, fetchgit, stdenv }: let
|
||||||
pname = "blessings";
|
|
||||||
|
cfg = {
|
||||||
|
"18.03" = {
|
||||||
version = "1.1.0";
|
version = "1.1.0";
|
||||||
|
sha256 = "1k908zap3694fcxdk4bb29s54b0lhdh557y10ybjskfwnym7szn1";
|
||||||
|
};
|
||||||
|
"18.09" = {
|
||||||
|
version = "1.2.0";
|
||||||
|
sha256 = "03hz43ixww0h4fwxqrlrlvmj3pxswhb50ijaapwjz8457il2r300";
|
||||||
|
};
|
||||||
|
}.${versions.majorMinor nixpkgsVersion};
|
||||||
|
|
||||||
|
in mkDerivation {
|
||||||
|
pname = "blessings";
|
||||||
|
version = cfg.version;
|
||||||
src = fetchgit {
|
src = fetchgit {
|
||||||
url = http://cgit.ni.krebsco.de/blessings;
|
url = http://cgit.ni.krebsco.de/blessings;
|
||||||
rev = "refs/tags/v${version}";
|
rev = "refs/tags/v${cfg.version}";
|
||||||
sha256 = "1k908zap3694fcxdk4bb29s54b0lhdh557y10ybjskfwnym7szn1";
|
sha256 = cfg.sha256;
|
||||||
};
|
};
|
||||||
libraryHaskellDepends = [ base ];
|
libraryHaskellDepends = [ base ];
|
||||||
doHaddock = false;
|
doHaddock = false;
|
||||||
|
@ -1,15 +1,30 @@
|
|||||||
|
with import <stockholm/lib>;
|
||||||
{ mkDerivation, attoparsec, base, base64-bytestring, bytestring
|
{ mkDerivation, attoparsec, base, base64-bytestring, bytestring
|
||||||
, case-insensitive, containers, exceptions, fetchgit, QuickCheck
|
, case-insensitive, containers, exceptions, fetchgit, QuickCheck
|
||||||
, stdenv, tasty, tasty-quickcheck, text, text-icu, time
|
, stdenv, tasty, tasty-quickcheck, text, text-icu, time
|
||||||
}:
|
}: let
|
||||||
mkDerivation {
|
|
||||||
pname = "email-header";
|
cfg = {
|
||||||
|
"18.03" = {
|
||||||
version = "0.3.0";
|
version = "0.3.0";
|
||||||
src = fetchgit {
|
|
||||||
url = "https://github.com/4z3/email-header";
|
|
||||||
rev = "7b179bd31192ead8afe7a0b6e34bcad4039deaa8";
|
rev = "7b179bd31192ead8afe7a0b6e34bcad4039deaa8";
|
||||||
sha256 = "12j2n3sbvzjnw99gga7kkdygm8n3qx2lh8q26ad6a53xm5whnz59";
|
sha256 = "12j2n3sbvzjnw99gga7kkdygm8n3qx2lh8q26ad6a53xm5whnz59";
|
||||||
};
|
};
|
||||||
|
"18.09" = {
|
||||||
|
version = "0.4.1-tv1";
|
||||||
|
rev = "refs/tags/v${cfg.version}";
|
||||||
|
sha256 = "11xjivpj495r2ss9aqljnpzzycb57cm4sr7yzmf939rzwsd3ib0x";
|
||||||
|
};
|
||||||
|
}.${versions.majorMinor nixpkgsVersion};
|
||||||
|
|
||||||
|
in mkDerivation {
|
||||||
|
pname = "email-header";
|
||||||
|
version = cfg.version;
|
||||||
|
src = fetchgit {
|
||||||
|
url = "https://github.com/4z3/email-header";
|
||||||
|
rev = cfg.rev;
|
||||||
|
sha256 = cfg.sha256;
|
||||||
|
};
|
||||||
buildDepends = [
|
buildDepends = [
|
||||||
attoparsec base base64-bytestring bytestring case-insensitive
|
attoparsec base base64-bytestring bytestring case-insensitive
|
||||||
containers exceptions text text-icu time
|
containers exceptions text text-icu time
|
||||||
|
@ -1,17 +0,0 @@
|
|||||||
# Same as upstream but with doCheck = false because doctest has wrong version.
|
|
||||||
{ mkDerivation, base, bytestring, containers, directory
|
|
||||||
, filepath, unordered-containers, zlib, stdenv
|
|
||||||
}:
|
|
||||||
mkDerivation {
|
|
||||||
pname = "hyphenation";
|
|
||||||
version = "0.6";
|
|
||||||
sha256 = "2f673666c18f63581422f7c6389b78b0ff754406671296a3d680d417942512f7";
|
|
||||||
libraryHaskellDepends = [
|
|
||||||
base bytestring containers unordered-containers zlib
|
|
||||||
];
|
|
||||||
homepage = "http://github.com/ekmett/hyphenation";
|
|
||||||
description = "Configurable Knuth-Liang hyphenation";
|
|
||||||
license = stdenv.lib.licenses.bsd3;
|
|
||||||
hydraPlatforms = stdenv.lib.platforms.none;
|
|
||||||
doCheck = false;
|
|
||||||
}
|
|
@ -3,6 +3,7 @@ with import <stockholm/lib>;
|
|||||||
|
|
||||||
imports = [
|
imports = [
|
||||||
<stockholm/tv>
|
<stockholm/tv>
|
||||||
|
<stockholm/tv/2configs/br.nix>
|
||||||
<stockholm/tv/2configs/exim-retiolum.nix>
|
<stockholm/tv/2configs/exim-retiolum.nix>
|
||||||
<stockholm/tv/2configs/retiolum.nix>
|
<stockholm/tv/2configs/retiolum.nix>
|
||||||
];
|
];
|
||||||
@ -90,20 +91,6 @@ with import <stockholm/lib>;
|
|||||||
pkgs.xlibs.fontschumachermisc
|
pkgs.xlibs.fontschumachermisc
|
||||||
];
|
];
|
||||||
|
|
||||||
# Enable CUPS to print documents.
|
|
||||||
services.printing = {
|
|
||||||
enable = true;
|
|
||||||
#drivers = [
|
|
||||||
# #pkgs.foomatic_filters
|
|
||||||
# #pkgs.gutenprint
|
|
||||||
# #pkgs.cups_pdf_filter
|
|
||||||
# #pkgs.ghostscript
|
|
||||||
#];
|
|
||||||
#cupsdConf = ''
|
|
||||||
# LogLevel debug2
|
|
||||||
#'';
|
|
||||||
};
|
|
||||||
|
|
||||||
services.xserver.enable = true;
|
services.xserver.enable = true;
|
||||||
services.xserver.layout = "de";
|
services.xserver.layout = "de";
|
||||||
services.xserver.xkbOptions = "eurosign:e";
|
services.xserver.xkbOptions = "eurosign:e";
|
||||||
|
@ -2,10 +2,9 @@ with import <stockholm/lib>;
|
|||||||
{ config, pkgs, ... }: {
|
{ config, pkgs, ... }: {
|
||||||
|
|
||||||
imports = [
|
imports = [
|
||||||
<stockholm/krebs>
|
<stockholm/tv>
|
||||||
<stockholm/tv/2configs>
|
|
||||||
<stockholm/tv/3modules>
|
|
||||||
<stockholm/tv/2configs/retiolum.nix>
|
<stockholm/tv/2configs/retiolum.nix>
|
||||||
|
<stockholm/tv/2configs/xp-332.nix>
|
||||||
];
|
];
|
||||||
|
|
||||||
krebs.build.host = config.krebs.hosts.querel;
|
krebs.build.host = config.krebs.hosts.querel;
|
||||||
@ -37,6 +36,7 @@ with import <stockholm/lib>;
|
|||||||
sxiv
|
sxiv
|
||||||
texlive.combined.scheme-full
|
texlive.combined.scheme-full
|
||||||
vim
|
vim
|
||||||
|
xsane
|
||||||
zathura
|
zathura
|
||||||
];
|
];
|
||||||
|
|
||||||
@ -67,10 +67,6 @@ with import <stockholm/lib>;
|
|||||||
|
|
||||||
programs.ssh.startAgent = false;
|
programs.ssh.startAgent = false;
|
||||||
|
|
||||||
services.printing = {
|
|
||||||
enable = true;
|
|
||||||
};
|
|
||||||
|
|
||||||
services.xserver.enable = true;
|
services.xserver.enable = true;
|
||||||
services.xserver.layout = "de";
|
services.xserver.layout = "de";
|
||||||
services.xserver.xkbOptions = "eurosign:e";
|
services.xserver.xkbOptions = "eurosign:e";
|
||||||
|
@ -18,6 +18,7 @@ with import <stockholm/lib>;
|
|||||||
<stockholm/tv/2configs/retiolum.nix>
|
<stockholm/tv/2configs/retiolum.nix>
|
||||||
<stockholm/tv/2configs/binary-cache>
|
<stockholm/tv/2configs/binary-cache>
|
||||||
<stockholm/tv/2configs/br.nix>
|
<stockholm/tv/2configs/br.nix>
|
||||||
|
<stockholm/tv/2configs/xp-332.nix>
|
||||||
<stockholm/tv/2configs/xserver>
|
<stockholm/tv/2configs/xserver>
|
||||||
{
|
{
|
||||||
environment.systemPackages = with pkgs; [
|
environment.systemPackages = with pkgs; [
|
||||||
@ -40,7 +41,6 @@ with import <stockholm/lib>;
|
|||||||
mkpasswd
|
mkpasswd
|
||||||
netcat
|
netcat
|
||||||
netcup
|
netcup
|
||||||
nix-repl
|
|
||||||
nmap
|
nmap
|
||||||
p7zip
|
p7zip
|
||||||
pass
|
pass
|
||||||
@ -147,8 +147,6 @@ with import <stockholm/lib>;
|
|||||||
gptfdisk
|
gptfdisk
|
||||||
];
|
];
|
||||||
|
|
||||||
services.printing.enable = true;
|
|
||||||
|
|
||||||
#services.bitlbee.enable = true;
|
#services.bitlbee.enable = true;
|
||||||
#services.tor.client.enable = true;
|
#services.tor.client.enable = true;
|
||||||
#services.tor.enable = true;
|
#services.tor.enable = true;
|
||||||
|
@ -26,7 +26,7 @@ with import <stockholm/lib>;
|
|||||||
method = "pull";
|
method = "pull";
|
||||||
src = { host = config.krebs.hosts.querel; path = "/home"; };
|
src = { host = config.krebs.hosts.querel; path = "/home"; };
|
||||||
dst = { host = config.krebs.hosts.nomic; path = "/fs/ponyhof/bku/querel-home"; };
|
dst = { host = config.krebs.hosts.nomic; path = "/fs/ponyhof/bku/querel-home"; };
|
||||||
startAt = "00:00";
|
startAt = "22:00";
|
||||||
};
|
};
|
||||||
wu-home-xu = {
|
wu-home-xu = {
|
||||||
method = "push";
|
method = "push";
|
||||||
|
@ -33,11 +33,13 @@ with import <stockholm/lib>;
|
|||||||
PS1="ssh-agent[$SSH_AGENT_PID] $PS1"
|
PS1="ssh-agent[$SSH_AGENT_PID] $PS1"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if test ''${SHLVL-1} = 1; then
|
||||||
case ''${XMONAD_SPAWN_WORKSPACE-} in
|
case ''${XMONAD_SPAWN_WORKSPACE-} in
|
||||||
stockholm)
|
stockholm)
|
||||||
cd ~/stockholm
|
cd ~/stockholm
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
fi
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
45
tv/2configs/xp-332.nix
Normal file
45
tv/2configs/xp-332.nix
Normal file
@ -0,0 +1,45 @@
|
|||||||
|
with import <stockholm/lib>;
|
||||||
|
{ config, pkgs, ... }: {
|
||||||
|
|
||||||
|
environment.etc."utsushi.conf".text = ''
|
||||||
|
[devices]
|
||||||
|
dev1.udi = esci:networkscan://EPSON79678C.fritz.box:1865
|
||||||
|
dev1.model = XP-332
|
||||||
|
dev1.vendor = EPSON
|
||||||
|
'';
|
||||||
|
|
||||||
|
hardware.sane = {
|
||||||
|
enable = true;
|
||||||
|
extraBackends = [
|
||||||
|
pkgs.utsushi
|
||||||
|
];
|
||||||
|
};
|
||||||
|
|
||||||
|
krebs.nixpkgs.allowUnfreePredicate = pkg:
|
||||||
|
elem (parseDrvName pkg.name).name [ "imagescan-plugin-networkscan" ];
|
||||||
|
|
||||||
|
nixpkgs.overlays = singleton (self: super: {
|
||||||
|
utsushi = super.utsushi.override {
|
||||||
|
guiSupport = false;
|
||||||
|
jpegSupport = false;
|
||||||
|
networkSupport = true;
|
||||||
|
ocrSupport = false;
|
||||||
|
saneSupport = true;
|
||||||
|
tiffSupport = true;
|
||||||
|
|
||||||
|
logCategory = "ALL";
|
||||||
|
logLevel = "BRIEF";
|
||||||
|
};
|
||||||
|
});
|
||||||
|
|
||||||
|
services = {
|
||||||
|
printing = {
|
||||||
|
drivers = [
|
||||||
|
pkgs.epson-escpr
|
||||||
|
];
|
||||||
|
enable = true;
|
||||||
|
};
|
||||||
|
saned.enable = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
}
|
@ -41,6 +41,9 @@ in {
|
|||||||
# refs <nixpkgs/nixos/modules/services/x11/desktop-managers>
|
# refs <nixpkgs/nixos/modules/services/x11/desktop-managers>
|
||||||
desktopManager.session = mkForce [];
|
desktopManager.session = mkForce [];
|
||||||
|
|
||||||
|
displayManager.lightdm.enable = mkForce false;
|
||||||
|
displayManager.job.execCmd = mkForce "derp";
|
||||||
|
|
||||||
enable = true;
|
enable = true;
|
||||||
display = 11;
|
display = 11;
|
||||||
tty = 11;
|
tty = 11;
|
||||||
@ -55,7 +58,7 @@ in {
|
|||||||
systemd.services.display-manager.enable = false;
|
systemd.services.display-manager.enable = false;
|
||||||
|
|
||||||
systemd.services.xmonad = {
|
systemd.services.xmonad = {
|
||||||
wantedBy = [ "multi-user.target" ];
|
wantedBy = [ "graphical.target" ];
|
||||||
requires = [ "xserver.service" ];
|
requires = [ "xserver.service" ];
|
||||||
environment = {
|
environment = {
|
||||||
DISPLAY = ":${toString config.services.xserver.display}";
|
DISPLAY = ":${toString config.services.xserver.display}";
|
||||||
@ -101,21 +104,20 @@ in {
|
|||||||
|
|
||||||
systemd.services.xserver = {
|
systemd.services.xserver = {
|
||||||
after = [
|
after = [
|
||||||
"systemd-udev-settle.service"
|
|
||||||
"local-fs.target"
|
|
||||||
"acpid.service"
|
"acpid.service"
|
||||||
|
"local-fs.target"
|
||||||
|
"systemd-udev-settle.service"
|
||||||
];
|
];
|
||||||
reloadIfChanged = true;
|
wants = [
|
||||||
|
"systemd-udev-settle.service"
|
||||||
|
];
|
||||||
|
restartIfChanged = false;
|
||||||
environment = {
|
environment = {
|
||||||
XKB_BINDIR = "${pkgs.xorg.xkbcomp}/bin"; # Needed for the Xkb extension.
|
LD_LIBRARY_PATH = concatStringsSep ":" ([ "/run/opengl-driver/lib" ]
|
||||||
XORG_DRI_DRIVER_PATH = "/run/opengl-driver/lib/dri"; # !!! Depends on the driver selected at runtime.
|
|
||||||
LD_LIBRARY_PATH = concatStringsSep ":" (
|
|
||||||
[ "${pkgs.xorg.libX11}/lib" "${pkgs.xorg.libXext}/lib" ]
|
|
||||||
++ concatLists (catAttrs "libPath" config.services.xserver.drivers));
|
++ concatLists (catAttrs "libPath" config.services.xserver.drivers));
|
||||||
};
|
};
|
||||||
serviceConfig = {
|
serviceConfig = {
|
||||||
SyslogIdentifier = "xserver";
|
SyslogIdentifier = "xserver";
|
||||||
ExecReload = "${pkgs.coreutils}/bin/echo NOP";
|
|
||||||
ExecStart = toString [
|
ExecStart = toString [
|
||||||
"${pkgs.xorg.xorgserver}/bin/X"
|
"${pkgs.xorg.xorgserver}/bin/X"
|
||||||
":${toString config.services.xserver.display}"
|
":${toString config.services.xserver.display}"
|
||||||
@ -123,17 +125,16 @@ in {
|
|||||||
"-config ${import ./xserver.conf.nix args}"
|
"-config ${import ./xserver.conf.nix args}"
|
||||||
"-logfile /dev/null -logverbose 0 -verbose 3"
|
"-logfile /dev/null -logverbose 0 -verbose 3"
|
||||||
"-nolisten tcp"
|
"-nolisten tcp"
|
||||||
"-xkbdir ${pkgs.xkeyboard_config}/etc/X11/xkb"
|
"-xkbdir ${config.services.xserver.xkbDir}"
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
systemd.services.urxvtd = {
|
systemd.services.urxvtd = {
|
||||||
wantedBy = [ "multi-user.target" ];
|
wantedBy = [ "graphical.target" ];
|
||||||
reloadIfChanged = true;
|
restartIfChanged = false;
|
||||||
serviceConfig = {
|
serviceConfig = {
|
||||||
SyslogIdentifier = "urxvtd";
|
SyslogIdentifier = "urxvtd";
|
||||||
ExecReload = "${pkgs.coreutils}/bin/echo NOP";
|
|
||||||
ExecStart = "${pkgs.rxvt_unicode}/bin/urxvtd";
|
ExecStart = "${pkgs.rxvt_unicode}/bin/urxvtd";
|
||||||
Restart = "always";
|
Restart = "always";
|
||||||
RestartSec = "2s";
|
RestartSec = "2s";
|
||||||
|
@ -64,7 +64,7 @@ in {
|
|||||||
ExecStartPre =
|
ExecStartPre =
|
||||||
"${pkgs.coreutils}/bin/ln -s /etc/charybdis-ircd.motd /tmp/ircd.motd";
|
"${pkgs.coreutils}/bin/ln -s /etc/charybdis-ircd.motd /tmp/ircd.motd";
|
||||||
ExecStart = toString [
|
ExecStart = toString [
|
||||||
"${pkgs.charybdis}/bin/charybdis-ircd"
|
"${pkgs.charybdis}/bin/charybdis"
|
||||||
"-configfile ${import ./config.nix args}"
|
"-configfile ${import ./config.nix args}"
|
||||||
"-foreground"
|
"-foreground"
|
||||||
"-logfile /dev/stderr"
|
"-logfile /dev/stderr"
|
||||||
|
1
tv/5pkgs/compat/default.nix
Normal file
1
tv/5pkgs/compat/default.nix
Normal file
@ -0,0 +1 @@
|
|||||||
|
self: super: {}
|
@ -33,4 +33,16 @@ foldl' mergeAttrs {}
|
|||||||
'';
|
'';
|
||||||
|
|
||||||
gnupg = self.gnupg22;
|
gnupg = self.gnupg22;
|
||||||
|
|
||||||
|
pass = {
|
||||||
|
"18.03" =
|
||||||
|
self.callPackage ./compat/18.03/pass {
|
||||||
|
pass-otp = self.callPackage ./compat/18.03/pass-otp {};
|
||||||
|
};
|
||||||
|
"18.09" =
|
||||||
|
super.pass.withExtensions (ext: [
|
||||||
|
ext.pass-otp
|
||||||
|
]);
|
||||||
|
}.${versions.majorMinor nixpkgsVersion};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
207
tv/5pkgs/simple/utsushi.nix
Normal file
207
tv/5pkgs/simple/utsushi.nix
Normal file
@ -0,0 +1,207 @@
|
|||||||
|
{ boost, fetchurl, file, imagemagick, libudev, libusb, pkgconfig, stdenv
|
||||||
|
, coreutils, dash, patchelf, writeScriptBin # for add-rpath
|
||||||
|
|
||||||
|
, guiSupport ? false, gtkmm2 ? null
|
||||||
|
, jpegSupport ? true
|
||||||
|
, networkSupport ? false, dpkg ? null
|
||||||
|
, ocrSupport ? false, tesseract ? null
|
||||||
|
, saneSupport ? true, saneBackends ? null
|
||||||
|
, tiffSupport ? true, libtiff ? null
|
||||||
|
|
||||||
|
# Logging defaults copied from Utsushi source (lib/log.cpp)
|
||||||
|
, logCategory ? "NOTHING"
|
||||||
|
, logLevel ? "FATAL"
|
||||||
|
}:
|
||||||
|
|
||||||
|
# Logging possibilities copied from Utsushi source (utsushi/log.hpp)
|
||||||
|
assert builtins.elem logCategory [
|
||||||
|
"NOTHING"
|
||||||
|
"SANE_BACKEND"
|
||||||
|
"ALL"
|
||||||
|
];
|
||||||
|
assert builtins.elem logLevel [
|
||||||
|
"FATAL" # famous last words
|
||||||
|
"ALERT" # outside intervention required
|
||||||
|
"ERROR" # something went wrong
|
||||||
|
"BRIEF" # short informational notes
|
||||||
|
"TRACE" # more chattery feedback
|
||||||
|
"DEBUG" # the gory details
|
||||||
|
"QUARK" # stack tracing feedback
|
||||||
|
];
|
||||||
|
|
||||||
|
let
|
||||||
|
|
||||||
|
# usage: add-rpath LIBPATH [SOFILE...]
|
||||||
|
# Adds LIBPATH to each SOFILE's RPATH
|
||||||
|
add-rpath = writeScriptBin "add-rpath" ''
|
||||||
|
#! ${dash}/bin/dash
|
||||||
|
set -efu
|
||||||
|
path=$1; shift
|
||||||
|
for file; do
|
||||||
|
file=$(${coreutils}/bin/readlink -f "$file")
|
||||||
|
old_rpath=$(${patchelf}/bin/patchelf --print-rpath "$file")
|
||||||
|
new_rpath=''${old_rpath+$old_rpath:}$path
|
||||||
|
${patchelf}/bin/patchelf --set-rpath "$new_rpath" "$file"
|
||||||
|
done
|
||||||
|
'';
|
||||||
|
|
||||||
|
imagescan-plugin-networkscan = stdenv.mkDerivation rec {
|
||||||
|
name = "imagescan-plugin-networkscan-${meta.version}";
|
||||||
|
|
||||||
|
src =
|
||||||
|
if stdenv.system == "i686-linux" then
|
||||||
|
fetchurl {
|
||||||
|
url = "https://download2.ebz.epson.net/imagescanv3/debian/latest1/deb/x64/imagescan-bundle-debian-9-1.3.21.x86.deb.tar.gz";
|
||||||
|
sha256 = "16xv1pdfm2ryis815fawb7zqg6c4swww726g272ssx044r5dp80r";
|
||||||
|
}
|
||||||
|
else if stdenv.system == "x86_64-linux" then
|
||||||
|
fetchurl {
|
||||||
|
url = "https://download2.ebz.epson.net/imagescanv3/debian/latest1/deb/x64/imagescan-bundle-debian-9-1.3.21.x64.deb.tar.gz";
|
||||||
|
sha256 = "0zik35h2jwrvkwcmq55wc72imidwdnmn1bayhypzhjcz61rasjg2";
|
||||||
|
}
|
||||||
|
else throw "${name} is not supported on ${stdenv.system} (only i686-linux and x86_64 linux are supported)";
|
||||||
|
|
||||||
|
dontBuild = true;
|
||||||
|
|
||||||
|
installPhase = ''
|
||||||
|
# Wildcard * stand for either i386 or amd64
|
||||||
|
${dpkg}/bin/dpkg -x \
|
||||||
|
plugins/imagescan-plugin-networkscan_${meta.version}-1epson4debian9_*.deb \
|
||||||
|
tmp
|
||||||
|
|
||||||
|
mv tmp/usr $out
|
||||||
|
'';
|
||||||
|
|
||||||
|
preFixup = ''
|
||||||
|
patchelf --set-interpreter \
|
||||||
|
${stdenv.glibc}/lib/ld-linux${stdenv.lib.optionalString stdenv.is64bit "-x86-64"}.so.2 \
|
||||||
|
$out/lib/utsushi/networkscan
|
||||||
|
|
||||||
|
# libstdc++.so.6
|
||||||
|
patchelf --set-rpath ${stdenv.cc.cc.lib}/lib \
|
||||||
|
$out/lib/utsushi/networkscan
|
||||||
|
'';
|
||||||
|
|
||||||
|
meta = {
|
||||||
|
description = "Epson Image Scan v3 networkscan plugin";
|
||||||
|
longDescription = ''
|
||||||
|
This package provides the unfree networkscan plugin from the Epson
|
||||||
|
Image Scan v3 scanner driver bundle, which can be used by Utsushi.
|
||||||
|
'';
|
||||||
|
homepage = "http://support.epson.net/linux/en/imagescanv3.php?version=${meta.version}";
|
||||||
|
license = stdenv.lib.licenses.eapl;
|
||||||
|
maintainers = [ stdenv.lib.maintainers.tv ];
|
||||||
|
platforms = stdenv.lib.platforms.linux;
|
||||||
|
version = "1.1.0";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
in
|
||||||
|
|
||||||
|
stdenv.mkDerivation rec {
|
||||||
|
name = "utsushi-${meta.version}";
|
||||||
|
|
||||||
|
src = fetchurl {
|
||||||
|
url = "http://support.epson.net/linux/src/scanner/imagescanv3/debian/imagescan_${meta.version}.orig.tar.gz";
|
||||||
|
sha256 = "12mzq3wc8gzdma84pjs5gb0gp8mga13wax5g7vjfrzq8pjyqrnmw";
|
||||||
|
};
|
||||||
|
|
||||||
|
preConfigure = ''
|
||||||
|
substituteInPlace configure \
|
||||||
|
--replace /usr/bin/file ${file}/bin/file
|
||||||
|
|
||||||
|
substituteInPlace lib/log.cpp \
|
||||||
|
--replace FATAL ${logLevel} \
|
||||||
|
--replace NOTHING ${logCategory}
|
||||||
|
'';
|
||||||
|
|
||||||
|
postInstall = ''
|
||||||
|
# Allow configuration to be done via /etc/utsushi.conf
|
||||||
|
ln -s /etc/utsushi.conf $out/etc/utsushi/utsushi.conf
|
||||||
|
|
||||||
|
${stdenv.lib.optionalString saneSupport ''
|
||||||
|
# Make this package compatible with hardware.sane.extraBackends
|
||||||
|
mkdir $out/etc/sane.d
|
||||||
|
echo utsushi > $out/etc/sane.d/dll.conf
|
||||||
|
mkdir $out/lib/sane
|
||||||
|
ln -s $out/lib/utsushi/sane/libsane-utsushi.* $out/lib/sane
|
||||||
|
''}
|
||||||
|
|
||||||
|
${stdenv.lib.optionalString networkSupport ''
|
||||||
|
ln -s ${imagescan-plugin-networkscan}/lib/utsushi/networkscan \
|
||||||
|
$out/libexec/utsushi/
|
||||||
|
''}
|
||||||
|
'';
|
||||||
|
|
||||||
|
# Fixup libraries which otherwise would end up broken like this:
|
||||||
|
#
|
||||||
|
# $ ldd .../blah.so | grep libboost_system
|
||||||
|
# libboost_system.so.X.Y.Z => not found
|
||||||
|
# libboost_system.so.X.Y.Z => /nix/store/.../libboost_system.so.X.Y.Z (...)
|
||||||
|
#
|
||||||
|
preFixup = ''
|
||||||
|
add-rpath ${boost}/lib $out/lib/utsushi/libdrv-esci.so
|
||||||
|
${stdenv.lib.optionalString saneSupport ''
|
||||||
|
add-rpath ${boost}/lib $out/lib/utsushi/sane/libsane-utsushi.so
|
||||||
|
''}
|
||||||
|
'';
|
||||||
|
|
||||||
|
nativeBuildInputs = [
|
||||||
|
add-rpath
|
||||||
|
pkgconfig
|
||||||
|
];
|
||||||
|
|
||||||
|
buildInputs = [
|
||||||
|
boost
|
||||||
|
imagemagick
|
||||||
|
libudev
|
||||||
|
libusb
|
||||||
|
]
|
||||||
|
++ stdenv.lib.optional guiSupport gtkmm2
|
||||||
|
++ stdenv.lib.optional ocrSupport tesseract
|
||||||
|
++ stdenv.lib.optional saneSupport saneBackends
|
||||||
|
++ stdenv.lib.optional tiffSupport libtiff
|
||||||
|
;
|
||||||
|
|
||||||
|
NIX_CFLAGS_COMPILE = [
|
||||||
|
"-Wno-error=deprecated-declarations"
|
||||||
|
"-Wno-error=unused-variable"
|
||||||
|
];
|
||||||
|
|
||||||
|
configureFlags = [
|
||||||
|
"--with-boost=${boost}"
|
||||||
|
"--with-magick"
|
||||||
|
"--with-magick-pp"
|
||||||
|
]
|
||||||
|
++ stdenv.lib.optionals guiSupport [
|
||||||
|
"--with-gtkmm"
|
||||||
|
]
|
||||||
|
++ stdenv.lib.optionals jpegSupport [
|
||||||
|
"--with-jpeg"
|
||||||
|
]
|
||||||
|
++ stdenv.lib.optionals saneSupport [
|
||||||
|
"--with-sane"
|
||||||
|
]
|
||||||
|
++ stdenv.lib.optionals tiffSupport [
|
||||||
|
"--with-tiff"
|
||||||
|
]
|
||||||
|
;
|
||||||
|
|
||||||
|
meta = {
|
||||||
|
description = "Utsushi - Next Generation Image Acquisition";
|
||||||
|
longDescription = ''
|
||||||
|
This software provides applications to easily turn hard-copy
|
||||||
|
documents and imagery into formats that are more amenable to
|
||||||
|
computer processing.
|
||||||
|
|
||||||
|
Included are a native driver for a number of EPSON scanners
|
||||||
|
and a compatibility driver to interface with software built
|
||||||
|
around the SANE standard.
|
||||||
|
'';
|
||||||
|
homepage = http://download.ebz.epson.net/dsc/search/01/search/?OSC=LX;
|
||||||
|
license = stdenv.lib.licenses.gpl3;
|
||||||
|
maintainers = [ stdenv.lib.maintainers.tv ];
|
||||||
|
platforms = stdenv.lib.platforms.linux;
|
||||||
|
version = "3.48.0";
|
||||||
|
};
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user