From f558f1bc0c779cc310ff8a712d4f178db73de6ef Mon Sep 17 00:00:00 2001 From: tv Date: Wed, 2 Jun 2021 00:11:38 +0200 Subject: *: set isSystemUser or isNormalUser This is a requirement for nixpkgs 21.05, or else evaluation will fail with: Exactly one of users.users.${name}.isSystemUser and users.users.${name}.isNormalUser must be set. --- tv/2configs/pulse.nix | 1 + 1 file changed, 1 insertion(+) (limited to 'tv') diff --git a/tv/2configs/pulse.nix b/tv/2configs/pulse.nix index 79c31e9ec..f720ad473 100644 --- a/tv/2configs/pulse.nix +++ b/tv/2configs/pulse.nix @@ -116,6 +116,7 @@ in group = "pulse"; extraGroups = [ "audio" ]; home = "${runDir}/home"; + isSystemUser = true; }; }; } -- cgit v1.2.3 From ef24dd03e1b67353b23227f85aded6f007d23a09 Mon Sep 17 00:00:00 2001 From: tv Date: Wed, 2 Jun 2021 00:13:33 +0200 Subject: tv: remove security.hideProcessInformation It's broken in nixpkgs 21.05 --- tv/2configs/default.nix | 1 - 1 file changed, 1 deletion(-) (limited to 'tv') diff --git a/tv/2configs/default.nix b/tv/2configs/default.nix index 07e7ff11d..19e191b7b 100644 --- a/tv/2configs/default.nix +++ b/tv/2configs/default.nix @@ -38,7 +38,6 @@ with import ; } { i18n.defaultLocale = mkDefault "C.UTF-8"; - security.hideProcessInformation = true; security.sudo.extraConfig = '' Defaults env_keep+="SSH_CLIENT XMONAD_SPAWN_WORKSPACE" Defaults mailto="${config.krebs.users.tv.mail}" -- cgit v1.2.3 From 539fb1f899cdd1924ffd6a7e9547a3728f602057 Mon Sep 17 00:00:00 2001 From: tv Date: Wed, 2 Jun 2021 01:40:51 +0200 Subject: tv gitrepos: use python3 for markdown2 For nixpkgs 21.05 --- tv/2configs/gitrepos.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tv') diff --git a/tv/2configs/gitrepos.nix b/tv/2configs/gitrepos.nix index 2e73640ff..1586f3b33 100644 --- a/tv/2configs/gitrepos.nix +++ b/tv/2configs/gitrepos.nix @@ -33,7 +33,7 @@ let { cgit = { settings = { about-filter = pkgs.exec "krebs.cgit.about-filter" rec { - filename = "${pkgs.pythonPackages.markdown2}/bin/markdown2"; + filename = "${pkgs.python3Packages.markdown2}/bin/markdown2"; argv = [ filename "--extras=fenced-code-blocks" -- cgit v1.2.3 From f0660185cb669fa8635653904ccef27f3fe2cb45 Mon Sep 17 00:00:00 2001 From: tv Date: Wed, 2 Jun 2021 01:15:33 +0200 Subject: tv overrides input-fonts: use fetchzip --- tv/5pkgs/override/default.nix | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'tv') diff --git a/tv/5pkgs/override/default.nix b/tv/5pkgs/override/default.nix index e6aae0f26..3f76a4c6e 100644 --- a/tv/5pkgs/override/default.nix +++ b/tv/5pkgs/override/default.nix @@ -8,10 +8,12 @@ self: super: { ''; }); input-fonts = super.input-fonts.overrideAttrs (old: rec { - src = self.fetchurl { + src = self.fetchzip { url = "http://xu.r/~tv/mirrors/input-fonts/Input-Font-2.zip"; - sha256 = "1vvipqcflz4ximy7xpqy9idrdpq3a0c490hp5137r2dq03h865y0"; + sha256 = "1q58x92nm7dk9ylp09pvgj74nxkywvqny3xmfighnsl30dv42fcr"; + stripRoot = false; }; + sourceRoot = null; outputHash = null; outputHashAlgo = null; outputHashMode = null; -- cgit v1.2.3 From 1132a21b94423535a75ee80daafc8afd7a43d30b Mon Sep 17 00:00:00 2001 From: tv Date: Wed, 2 Jun 2021 00:18:10 +0200 Subject: tv fzf: allow unset patchPhase For nixpkgs 21.05 --- tv/5pkgs/override/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tv') diff --git a/tv/5pkgs/override/default.nix b/tv/5pkgs/override/default.nix index 3f76a4c6e..4fb2e8061 100644 --- a/tv/5pkgs/override/default.nix +++ b/tv/5pkgs/override/default.nix @@ -4,7 +4,7 @@ self: super: { # XXX cannot use `patches` because fzf has a custom patchPhase patchPhase = '' patch -Np1 < ${./fzf.complete1.patch} - ${old.patchPhase} + ${old.patchPhase or ""} ''; }); input-fonts = super.input-fonts.overrideAttrs (old: rec { -- cgit v1.2.3 From 6b8c4dbe8cdc46f17cfa0cb7c8cd7f7c7bd4d1d2 Mon Sep 17 00:00:00 2001 From: tv Date: Wed, 2 Jun 2021 00:21:51 +0200 Subject: tv utsushi: stdenv.lib -> lib Deprecated since nixpkgs 21.05 --- tv/5pkgs/simple/utsushi.nix | 40 +++++++++++++++++++++------------------- 1 file changed, 21 insertions(+), 19 deletions(-) (limited to 'tv') diff --git a/tv/5pkgs/simple/utsushi.nix b/tv/5pkgs/simple/utsushi.nix index 0414eae09..678cdc56c 100644 --- a/tv/5pkgs/simple/utsushi.nix +++ b/tv/5pkgs/simple/utsushi.nix @@ -1,4 +1,6 @@ -{ boost, fetchurl, file, imagemagick, libudev, libusb, pkgconfig, stdenv +{ fetchurl, lib, stdenv + +, boost, file, imagemagick, libudev, libusb, pkgconfig , coreutils, dash, patchelf, writeScriptBin # for add-rpath , guiSupport ? false, gtkmm2 ? null @@ -81,7 +83,7 @@ let preFixup = '' patchelf --set-interpreter \ - ${stdenv.glibc}/lib/ld-linux${stdenv.lib.optionalString stdenv.is64bit "-x86-64"}.so.2 \ + ${stdenv.glibc}/lib/ld-linux${lib.optionalString stdenv.is64bit "-x86-64"}.so.2 \ $out/lib/utsushi/networkscan # libstdc++.so.6 @@ -96,9 +98,9 @@ let Image Scan v3 scanner driver bundle, which can be used by Utsushi. ''; homepage = "http://support.epson.net/linux/en/imagescanv3.php?version=${version}"; - license = stdenv.lib.licenses.eapl; - maintainers = [ stdenv.lib.maintainers.tv ]; - platforms = stdenv.lib.platforms.linux; + license = lib.licenses.eapl; + maintainers = [ lib.maintainers.tv ]; + platforms = lib.platforms.linux; }; }; @@ -129,7 +131,7 @@ stdenv.mkDerivation rec { # Allow configuration to be done via /etc/utsushi.conf ln -s /etc/utsushi.conf $out/etc/utsushi/utsushi.conf - ${stdenv.lib.optionalString saneSupport '' + ${lib.optionalString saneSupport '' # Make this package compatible with hardware.sane.extraBackends mkdir $out/etc/sane.d echo utsushi > $out/etc/sane.d/dll.conf @@ -137,7 +139,7 @@ stdenv.mkDerivation rec { ln -s $out/lib/utsushi/sane/libsane-utsushi.* $out/lib/sane ''} - ${stdenv.lib.optionalString networkSupport '' + ${lib.optionalString networkSupport '' ln -s ${imagescan-plugin-networkscan}/lib/utsushi/networkscan \ $out/libexec/utsushi/ ''} @@ -151,7 +153,7 @@ stdenv.mkDerivation rec { # preFixup = '' add-rpath ${boost}/lib $out/lib/utsushi/libdrv-esci.so - ${stdenv.lib.optionalString saneSupport '' + ${lib.optionalString saneSupport '' add-rpath ${boost}/lib $out/lib/utsushi/sane/libsane-utsushi.so ''} ''; @@ -167,10 +169,10 @@ stdenv.mkDerivation rec { libudev libusb ] - ++ stdenv.lib.optional guiSupport gtkmm2 - ++ stdenv.lib.optional ocrSupport tesseract - ++ stdenv.lib.optional saneSupport saneBackends - ++ stdenv.lib.optional tiffSupport libtiff + ++ lib.optional guiSupport gtkmm2 + ++ lib.optional ocrSupport tesseract + ++ lib.optional saneSupport saneBackends + ++ lib.optional tiffSupport libtiff ; NIX_CFLAGS_COMPILE = [ @@ -184,16 +186,16 @@ stdenv.mkDerivation rec { "--with-magick-pp" "--with-udev-confdir=$(out)/etc/udev" ] - ++ stdenv.lib.optionals guiSupport [ + ++ lib.optionals guiSupport [ "--with-gtkmm" ] - ++ stdenv.lib.optionals jpegSupport [ + ++ lib.optionals jpegSupport [ "--with-jpeg" ] - ++ stdenv.lib.optionals saneSupport [ + ++ lib.optionals saneSupport [ "--with-sane" ] - ++ stdenv.lib.optionals tiffSupport [ + ++ lib.optionals tiffSupport [ "--with-tiff" ] ; @@ -210,8 +212,8 @@ stdenv.mkDerivation rec { 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; + license = lib.licenses.gpl3; + maintainers = [ lib.maintainers.tv ]; + platforms = lib.platforms.linux; }; } -- cgit v1.2.3 From 291dabd3d7fb1ac90b62889c1e54354ad49efd3a Mon Sep 17 00:00:00 2001 From: tv Date: Wed, 2 Jun 2021 00:23:55 +0200 Subject: tv 433Utils: stdenv.lib -> lib Deprecated since nixpkgs 21.05 --- tv/5pkgs/rpi/433Utils/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'tv') diff --git a/tv/5pkgs/rpi/433Utils/default.nix b/tv/5pkgs/rpi/433Utils/default.nix index 78be6de35..136e3dbca 100644 --- a/tv/5pkgs/rpi/433Utils/default.nix +++ b/tv/5pkgs/rpi/433Utils/default.nix @@ -1,4 +1,4 @@ -{ fetchFromGitHub, stdenv +{ fetchFromGitHub, lib, stdenv , wiringPi ? WiringPi.wiringPi , wiringPiDev ? WiringPi.wiringPiDev , WiringPi ? rpiPackages.WiringPi @@ -9,7 +9,7 @@ stdenv.mkDerivation { pname = "433Utils-RPi_utils"; version = "2018-06-07"; - src = fetchFromGitHub (stdenv.lib.importJSON ./src.json); + src = fetchFromGitHub (lib.importJSON ./src.json); patches = [ ./rc-switch.protocols.patch -- cgit v1.2.3 From d91cf6bfaa62255db5885f078dddfcc29d484a97 Mon Sep 17 00:00:00 2001 From: tv Date: Wed, 2 Jun 2021 00:24:34 +0200 Subject: tv WiringPi: stdenv.lib -> lib Deprecated since nixpkgs 21.05 --- tv/5pkgs/rpi/WiringPi/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'tv') diff --git a/tv/5pkgs/rpi/WiringPi/default.nix b/tv/5pkgs/rpi/WiringPi/default.nix index 61c43556d..40fcaeae4 100644 --- a/tv/5pkgs/rpi/WiringPi/default.nix +++ b/tv/5pkgs/rpi/WiringPi/default.nix @@ -1,4 +1,4 @@ -{ fetchFromGitHub, runCommand, stdenv }: +{ fetchFromGitHub, lib, runCommand, stdenv }: let generic = name: extraAttrs: @@ -6,7 +6,7 @@ let pname = "WiringPi-${name}"; version = "2020-09-14"; - src = fetchFromGitHub (stdenv.lib.importJSON ./src.json); + src = fetchFromGitHub (lib.importJSON ./src.json); buildPhase = '' runHook postBuild -- cgit v1.2.3 From 4297b6b3bdee73c24903f6c3150436cd1213e92d Mon Sep 17 00:00:00 2001 From: tv Date: Wed, 2 Jun 2021 00:26:03 +0200 Subject: tv diff-so-fancy: stdenv.lib -> lib Deprecated since nixpkgs 21.05 --- tv/5pkgs/simple/diff-so-fancy.nix | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'tv') diff --git a/tv/5pkgs/simple/diff-so-fancy.nix b/tv/5pkgs/simple/diff-so-fancy.nix index 9ce6d9234..d57e6e75c 100644 --- a/tv/5pkgs/simple/diff-so-fancy.nix +++ b/tv/5pkgs/simple/diff-so-fancy.nix @@ -1,4 +1,6 @@ -{stdenv, git, perl, ncurses, coreutils, fetchFromGitHub, makeWrapper, ...}: +{ fetchFromGitHub, lib, stdenv +, coreutils, git, makeWrapper, ncurses, perl +}: stdenv.mkDerivation rec { name = "diff-so-fancy-${version}"; @@ -34,7 +36,7 @@ stdenv.mkDerivation rec { --prefix PATH : "${ncurses.out}/bin" ''; - meta = with stdenv.lib; { + meta = with lib; { homepage = https://github.com/so-fancy/diff-so-fancy; description = "Good-looking diffs filter for git"; license = licenses.mit; -- cgit v1.2.3 From ea902ce405d6ed0e8160bc46d8a03344d1ae3094 Mon Sep 17 00:00:00 2001 From: tv Date: Wed, 2 Jun 2021 00:27:17 +0200 Subject: tv fzmenu: stdenv.lib -> lib Deprecated since nixpkgs 21.05 --- tv/5pkgs/simple/fzmenu/default.nix | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'tv') diff --git a/tv/5pkgs/simple/fzmenu/default.nix b/tv/5pkgs/simple/fzmenu/default.nix index 35918ff77..1f1b82848 100644 --- a/tv/5pkgs/simple/fzmenu/default.nix +++ b/tv/5pkgs/simple/fzmenu/default.nix @@ -1,4 +1,7 @@ -{ coreutils, dash, gnused, fzf, pass-otp, runCommand, rxvt_unicode, stdenv, utillinux, xdotool }: +{ lib, stdenv +, runCommand +, coreutils, dash, gnused, fzf, pass-otp, rxvt_unicode, utillinux, xdotool +}: runCommand "fzmenu" { } /* sh */ '' @@ -8,7 +11,7 @@ runCommand "fzmenu" { substituteInPlace $out/bin/otpmenu \ --replace '#! /bin/sh' '#! ${dash}/bin/dash' \ - --replace '#PATH=' PATH=${stdenv.lib.makeBinPath [ + --replace '#PATH=' PATH=${lib.makeBinPath [ coreutils dash fzf @@ -21,7 +24,7 @@ runCommand "fzmenu" { substituteInPlace $out/bin/passmenu \ --replace '#! /bin/sh' '#! ${dash}/bin/dash' \ - --replace '#PATH=' PATH=${stdenv.lib.makeBinPath [ + --replace '#PATH=' PATH=${lib.makeBinPath [ coreutils dash fzf -- cgit v1.2.3 From 124925bb780bbfdbf3578ad772ea75dbae437242 Mon Sep 17 00:00:00 2001 From: tv Date: Wed, 2 Jun 2021 00:28:38 +0200 Subject: tv hc: stdenv.lib -> lib Deprecated since nixpkgs 21.05 --- tv/5pkgs/simple/hc.nix | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'tv') diff --git a/tv/5pkgs/simple/hc.nix b/tv/5pkgs/simple/hc.nix index 4d325e16c..086445ec0 100644 --- a/tv/5pkgs/simple/hc.nix +++ b/tv/5pkgs/simple/hc.nix @@ -1,4 +1,6 @@ -{ coreutils, fetchgit, findutils, gawk, gnugrep, makeWrapper, qrencode, stdenv, texlive, utillinux, zbar }: +{ fetchgit, lib, makeWrapper, stdenv +, coreutils, findutils, gawk, gnugrep, qrencode, texlive, utillinux, zbar +}: stdenv.mkDerivation rec { name = "hc-${meta.version}"; @@ -19,7 +21,7 @@ stdenv.mkDerivation rec { cp $src/bin/hc $out/bin/hc wrapProgram $out/bin/hc \ - --prefix PATH : ${stdenv.lib.makeBinPath [ + --prefix PATH : ${lib.makeBinPath [ coreutils findutils gawk -- cgit v1.2.3 From 1462d2e534525792b300136d0071d665db03df86 Mon Sep 17 00:00:00 2001 From: tv Date: Wed, 2 Jun 2021 00:29:38 +0200 Subject: tv rox-filer: stdenv.lib -> lib Deprecated since nixpkgs 21.05 --- tv/5pkgs/simple/rox-filer.nix | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'tv') diff --git a/tv/5pkgs/simple/rox-filer.nix b/tv/5pkgs/simple/rox-filer.nix index bce89cacd..b380bdff9 100644 --- a/tv/5pkgs/simple/rox-filer.nix +++ b/tv/5pkgs/simple/rox-filer.nix @@ -1,4 +1,5 @@ -{ autoconf, stdenv, fetchFromGitLab, pkgconfig, libxml2, libSM, shared-mime-info +{ fetchFromGitLab, lib, stdenv +, autoconf, pkgconfig, libxml2, libSM, shared-mime-info , libxslt, docbook_xml_dtd_412, docbook_xsl , gtk ? gtk2, gtk2 }: @@ -84,7 +85,7 @@ stdenv.mkDerivation { ln -sv application-{msword,rtf}.png ''; - meta = with stdenv.lib; { + meta = with lib; { description = "Fast, lightweight, gtk2 file manager"; homepage = "http://rox.sourceforge.net/desktop"; license = with licenses; [ gpl2 lgpl2 ]; -- cgit v1.2.3 From 7f74d85f8c0574e281fa247be39949e8e670991f Mon Sep 17 00:00:00 2001 From: tv Date: Sat, 5 Jun 2021 00:39:33 +0200 Subject: tv imagescan-plugin-networkscan: init at 1.1.3 --- tv/5pkgs/simple/imagescan-plugin-networkscan.nix | 55 ++++++++++++++++++++++++ 1 file changed, 55 insertions(+) create mode 100644 tv/5pkgs/simple/imagescan-plugin-networkscan.nix (limited to 'tv') diff --git a/tv/5pkgs/simple/imagescan-plugin-networkscan.nix b/tv/5pkgs/simple/imagescan-plugin-networkscan.nix new file mode 100644 index 000000000..c3f2deaca --- /dev/null +++ b/tv/5pkgs/simple/imagescan-plugin-networkscan.nix @@ -0,0 +1,55 @@ +{ fetchurl, lib, pkgs, stdenv }: + +stdenv.mkDerivation rec { + pname = "imagescan-plugin-networkscan"; + version = "1.1.3"; + + src = + if stdenv.system == "x86_64-linux" then + fetchurl { + urls = [ + "https://download2.ebz.epson.net/imagescanv3/debian/latest1/deb/x64/imagescan-bundle-debian-10-3.63.0.x64.deb.tar.gz" + "http://ni.r/~tv/mirrors/epson/imagescan-bundle-debian-10-3.63.0.x64.deb.tar.gz" + ]; + hash = "sha256:1rbz6mjfinag7c2vnyl7lls3gpn8n91sv0p18ilnbw0vaddssn4j"; + } + else throw "${pname} is not supported on ${stdenv.system}; supported systems: x86_64-linux"; + + dontBuild = true; + + nativeBuildInputs = [ + pkgs.dpkg + ]; + + installPhase = '' + # Wildcard * stand for either i386 or amd64 + dpkg -x \ + plugins/imagescan-plugin-networkscan_${version}-1epson4debian10_*.deb \ + tmp + + mv tmp/usr $out + ''; + + preFixup = '' + patchelf --set-interpreter \ + ${stdenv.glibc}/lib/ld-linux-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=${version}"; + license = lib.licenses.eapl; + maintainers = [ lib.maintainers.tv ]; + platforms = lib.platforms.linux; + }; +} -- cgit v1.2.3 From 42f704a4d9dbe57fa3f5417a4c1d1b6f019b5480 Mon Sep 17 00:00:00 2001 From: tv Date: Sat, 5 Jun 2021 00:46:13 +0200 Subject: tv utsushi-customized: use upstream package --- tv/2configs/xp-332.nix | 19 ++-- tv/5pkgs/simple/utsushi.nix | 219 -------------------------------------------- 2 files changed, 8 insertions(+), 230 deletions(-) delete mode 100644 tv/5pkgs/simple/utsushi.nix (limited to 'tv') diff --git a/tv/2configs/xp-332.nix b/tv/2configs/xp-332.nix index a66b884c8..daabe5b6b 100644 --- a/tv/2configs/xp-332.nix +++ b/tv/2configs/xp-332.nix @@ -19,17 +19,14 @@ with import ; packageName pkg == "imagescan-plugin-networkscan"; nixpkgs.overlays = singleton (self: super: { - utsushi-customized = self.utsushi.override { - guiSupport = false; - jpegSupport = false; - networkSupport = true; - ocrSupport = false; - saneSupport = true; - tiffSupport = true; - - logCategory = "ALL"; - logLevel = "BRIEF"; - }; + utsushi-customized = self.utsushi.overrideAttrs (old: { + postInstall = '' + ${old.postInstall or ""} + ln -s /etc/utsushi.conf $out/etc/utsushi/utsushi.conf + ln -s ${pkgs.imagescan-plugin-networkscan}/lib/utsushi/networkscan \ + $out/libexec/utsushi/ + ''; + }); }); services = { diff --git a/tv/5pkgs/simple/utsushi.nix b/tv/5pkgs/simple/utsushi.nix deleted file mode 100644 index 678cdc56c..000000000 --- a/tv/5pkgs/simple/utsushi.nix +++ /dev/null @@ -1,219 +0,0 @@ -{ fetchurl, lib, stdenv - -, boost, file, imagemagick, libudev, libusb, pkgconfig -, 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 { - pname = "imagescan-plugin-networkscan"; - version = "1.1.3"; - - src = - if stdenv.system == "i686-linux" then - fetchurl { - urls = [ - "https://download2.ebz.epson.net/imagescanv3/debian/latest1/deb/x86/imagescan-bundle-debian-9-3.59.2.x86.deb.tar.gz" - "http://ni.r/~tv/mirrors/epson/imagescan-bundle-debian-9-3.59.2.x86.deb.tar.gz" - ]; - sha256 = "1whw96kcfj65h2jnk72xgyr9jj05fa07d0xjxpaqb0zwdag3465g"; - } - else if stdenv.system == "x86_64-linux" then - fetchurl { - urls = [ - "https://download2.ebz.epson.net/imagescanv3/debian/latest1/deb/x64/imagescan-bundle-debian-9-3.59.2.x64.deb.tar.gz" - "http://ni.r/~tv/mirrors/epson/imagescan-bundle-debian-9-3.59.2.x64.deb.tar.gz" - ]; - sha256 = "0kd6mrs48wwss54gw4v9fm7ss5ma2xpn6gd1pz26cgjvp6n8hknn"; - } - else throw "${pname} 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_${version}-1epson4debian9_*.deb \ - tmp - - mv tmp/usr $out - ''; - - preFixup = '' - patchelf --set-interpreter \ - ${stdenv.glibc}/lib/ld-linux${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=${version}"; - license = lib.licenses.eapl; - maintainers = [ lib.maintainers.tv ]; - platforms = lib.platforms.linux; - }; - }; - -in - -stdenv.mkDerivation rec { - pname = "utsushi"; - version = "3.59.2"; - - src = fetchurl { - urls = [ - "http://support.epson.net/linux/src/scanner/imagescanv3/debian/imagescan_${version}.orig.tar.gz" - "http://ni.r/~tv/mirrors/epson/imagescan_${version}.orig.tar.gz" - ]; - sha256 = "1mns10mpyjprkrh2bjcg2nda9iyrnd0pf1did9py84glpapkzrdq"; - }; - - 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 - - ${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 - ''} - - ${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 - ${lib.optionalString saneSupport '' - add-rpath ${boost}/lib $out/lib/utsushi/sane/libsane-utsushi.so - ''} - ''; - - nativeBuildInputs = [ - add-rpath - pkgconfig - ]; - - buildInputs = [ - boost - imagemagick - libudev - libusb - ] - ++ lib.optional guiSupport gtkmm2 - ++ lib.optional ocrSupport tesseract - ++ lib.optional saneSupport saneBackends - ++ lib.optional tiffSupport libtiff - ; - - NIX_CFLAGS_COMPILE = [ - "-Wno-error=deprecated-declarations" - "-Wno-error=unused-variable" - ]; - - configureFlags = [ - "--with-boost=${boost}" - "--with-magick" - "--with-magick-pp" - "--with-udev-confdir=$(out)/etc/udev" - ] - ++ lib.optionals guiSupport [ - "--with-gtkmm" - ] - ++ lib.optionals jpegSupport [ - "--with-jpeg" - ] - ++ lib.optionals saneSupport [ - "--with-sane" - ] - ++ 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 = lib.licenses.gpl3; - maintainers = [ lib.maintainers.tv ]; - platforms = lib.platforms.linux; - }; -} -- cgit v1.2.3 From a461078f13d01693c0da08eb9fd53612b68170eb Mon Sep 17 00:00:00 2001 From: tv Date: Sat, 5 Jun 2021 11:36:05 +0200 Subject: tv xp-332: update hostname --- tv/2configs/xp-332.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'tv') diff --git a/tv/2configs/xp-332.nix b/tv/2configs/xp-332.nix index daabe5b6b..a97fb3679 100644 --- a/tv/2configs/xp-332.nix +++ b/tv/2configs/xp-332.nix @@ -3,7 +3,7 @@ with import ; environment.etc."utsushi.conf".text = '' [devices] - dev1.udi = esci:networkscan://EPSON79678C.fritz.box:1865 + dev1.udi = esci:networkscan://ep.hkw:1865 dev1.model = XP-332 dev1.vendor = EPSON ''; -- cgit v1.2.3