Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

epkowa: added Perfection V500 support #42436

Merged
merged 2 commits into from Jun 29, 2018
Merged

epkowa: added Perfection V500 support #42436

merged 2 commits into from Jun 29, 2018

Conversation

mredaelli
Copy link
Contributor

Motivation for this change

Add support for Epson Perfection V500 Photo

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nox --run "nox-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Fits CONTRIBUTING.md.

@symphorien
Copy link
Member

Nice ! I checked, the older plugin still works :)
To build this I needed this diff:

diff --git a/pkgs/misc/drivers/epkowa/default.nix b/pkgs/misc/drivers/epkowa/default.nix
index e0196701994..ca7ac4b4152 100644
--- a/pkgs/misc/drivers/epkowa/default.nix
+++ b/pkgs/misc/drivers/epkowa/default.nix
@@ -6,7 +6,7 @@ libxslt,
 libusb,
 sane-backends,
 rpm, cpio,
-eject,
+getopt,
 patchelf, gcc
 }:
 
@@ -55,6 +55,7 @@ let plugins = {
         '';
       hw = "Perfection V500 Photo";
       };
+    meta = common_meta // { description = "iscan esci x770 plugin for "+passthru.hw; };
     };
   f720 = stdenv.mkDerivation rec {
     name = "iscan-gt-f720-bundle";
@@ -155,7 +156,7 @@ stdenv.mkDerivation rec {
     '';
   postFixup = ''
     # iscan-registry is a shell script requiring getopt
-    wrapProgram $out/bin/iscan-registry --prefix PATH : ${eject}/bin
+    wrapProgram $out/bin/iscan-registry --prefix PATH : ${getopt}/bin
     registry=$out/bin/iscan-registry;
     '' +
     stdenv.lib.concatStrings (stdenv.lib.mapAttrsToList (name: value: ''

The part about getopt seems to be due to a refactoring around utillinux (see ce8ce60) and the part about meta is because the plugin is unfree so specifying it explicitely is somewhat important.

@mredaelli
Copy link
Contributor Author

Thanks!

I didn't retest it after rebasing to master. Hope it's OK now

@matthewbauer matthewbauer merged commit 10be4fa into NixOS:master Jun 29, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants