nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
at python-updates 485 lines 16 kB view raw
1{ 2 lib, 3 stdenv, 4 fetchurl, 5 autoPatchelfHook, 6 rpm, 7 cpio, 8 gcc, 9 libtool, 10 common_meta, 11}: 12 13# adding a plugin for another printer shouldn't be too difficult, but you need the firmware to test... 14{ 15 v330 = stdenv.mkDerivation rec { 16 name = "iscan-v330-bundle"; 17 version = "2.30.4"; 18 19 src = fetchurl { 20 # To find new versions, visit 21 # http://download.ebz.epson.net/dsc/search/01/search/?OSC=LX and search for 22 # some printer like for instance "WF-7210" to get to the most recent 23 # version. 24 # NOTE: Don't forget to update the webarchive link too! 25 urls = [ 26 "https://download2.ebz.epson.net/iscan/plugin/perfection-v330/rpm/x64/iscan-perfection-v330-bundle-${version}.x64.rpm.tar.gz" 27 "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" 28 ]; 29 sha256 = "056c04pfsf98nnknphg28l489isqb6y4l2c8g7wqhclwgj7m338i"; 30 }; 31 32 nativeBuildInputs = [ 33 autoPatchelfHook 34 rpm 35 ]; 36 37 installPhase = '' 38 ${rpm}/bin/rpm2cpio plugins/esci-interpreter-perfection-v330-*.x86_64.rpm | ${cpio}/bin/cpio -idmv 39 mkdir $out{,/share,/lib} 40 cp -r ./usr/share/{iscan-data,esci}/ $out/share/ 41 cp -r ./usr/lib64/esci $out/lib 42 ''; 43 44 passthru = { 45 registrationCommand = '' 46 $registry --add interpreter usb 0x04b8 0x0142 "$plugin/lib/esci/libesci-interpreter-perfection-v330 $plugin/share/esci/esfwad.bin" 47 ''; 48 hw = "Perfection V330 Photo"; 49 }; 50 meta = common_meta // { 51 description = "Plugin to support " + passthru.hw + " scanner in sane"; 52 }; 53 }; 54 v370 = stdenv.mkDerivation rec { 55 name = "iscan-v370-bundle"; 56 version = "2.30.4"; 57 58 src = fetchurl { 59 urls = [ 60 "https://download2.ebz.epson.net/iscan/plugin/perfection-v370/rpm/x64/iscan-perfection-v370-bundle-${version}.x64.rpm.tar.gz" 61 "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" 62 ]; 63 sha256 = "1ff7adp9mha1i2ibllz540xkagpy8r757h4s3h60bgxbyzv2yggr"; 64 }; 65 66 nativeBuildInputs = [ 67 autoPatchelfHook 68 rpm 69 ]; 70 71 installPhase = '' 72 cd plugins 73 ${rpm}/bin/rpm2cpio iscan-plugin-perfection-v370-*.x86_64.rpm | ${cpio}/bin/cpio -idmv 74 75 76 mkdir -p $out/share $out/lib 77 cp -r usr/share/{iscan-data,iscan}/ $out/share 78 cp -r usr/lib64/iscan $out/lib 79 mv $out/share/iscan $out/share/esci 80 mv $out/lib/iscan $out/lib/esci 81 ''; 82 83 passthru = { 84 registrationCommand = '' 85 $registry --add interpreter usb 0x04b8 0x014a "$plugin/lib/esci/libiscan-plugin-perfection-v370 $plugin/share/esci/esfwdd.bin" 86 ''; 87 hw = "Perfection V37/V370"; 88 }; 89 meta = common_meta // { 90 description = "Plugin to support " + passthru.hw + " scanner in sane"; 91 }; 92 }; 93 v550 = stdenv.mkDerivation rec { 94 pname = "iscan-perfection-v550-bundle"; 95 version = "2.30.4"; 96 97 nativeBuildInputs = [ 98 autoPatchelfHook 99 rpm 100 ]; 101 src = fetchurl { 102 urls = [ 103 "https://download2.ebz.epson.net/iscan/plugin/perfection-v550/rpm/x64/iscan-perfection-v550-bundle-${version}.x64.rpm.tar.gz" 104 "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" 105 ]; 106 sha256 = "f8b3abf21354fc5b9bc87753cef950b6c0f07bf322a94aaff2c163bafcf50cd9"; 107 }; 108 installPhase = '' 109 cd plugins 110 ${rpm}/bin/rpm2cpio iscan-plugin-perfection-v550-*.x86_64.rpm | ${cpio}/bin/cpio -idmv 111 mkdir $out 112 cp -r usr/share $out 113 cp -r usr/lib64 $out/lib 114 mv $out/share/iscan $out/share/esci 115 mv $out/lib/iscan $out/lib/esci 116 ''; 117 passthru = { 118 registrationCommand = '' 119 $registry --add interpreter usb 0x04b8 0x013b "$plugin/lib/esci/libiscan-plugin-perfection-v550 $plugin/share/esci/esfweb.bin" 120 ''; 121 hw = "Perfection V550 Photo"; 122 }; 123 meta = common_meta // { 124 description = "Plugin to support " + passthru.hw + " scanner in sane"; 125 }; 126 }; 127 v600 = stdenv.mkDerivation rec { 128 pname = "iscan-gt-x820-bundle"; 129 version = "2.30.4"; 130 131 nativeBuildInputs = [ 132 autoPatchelfHook 133 rpm 134 ]; 135 src = fetchurl { 136 urls = [ 137 "https://download2.ebz.epson.net/iscan/plugin/gt-x820/rpm/x64/iscan-gt-x820-bundle-${version}.x64.rpm.tar.gz" 138 "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" 139 ]; 140 sha256 = "1vlba7dsgpk35nn3n7is8nwds3yzlk38q43mppjzwsz2d2n7sr33"; 141 }; 142 installPhase = '' 143 cd plugins 144 ${rpm}/bin/rpm2cpio iscan-plugin-gt-x820-*.x86_64.rpm | ${cpio}/bin/cpio -idmv 145 mkdir $out 146 cp -r usr/share $out 147 cp -r usr/lib64 $out/lib 148 mv $out/share/iscan $out/share/esci 149 mv $out/lib/iscan $out/lib/esci 150 ''; 151 passthru = { 152 registrationCommand = '' 153 $registry --add interpreter usb 0x04b8 0x013a "$plugin/lib/esci/libesintA1 $plugin/share/esci/esfwA1.bin" 154 ''; 155 hw = "Perfection V600 Photo"; 156 }; 157 meta = common_meta // { 158 description = "iscan esci x820 plugin for " + passthru.hw; 159 }; 160 }; 161 x770 = stdenv.mkDerivation rec { 162 pname = "iscan-gt-x770-bundle"; 163 version = "2.30.4"; 164 165 nativeBuildInputs = [ 166 autoPatchelfHook 167 rpm 168 ]; 169 src = fetchurl { 170 urls = [ 171 "https://download2.ebz.epson.net/iscan/plugin/gt-x770/rpm/x64/iscan-gt-x770-bundle-${version}.x64.rpm.tar.gz" 172 "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" 173 ]; 174 sha256 = "1chxdm6smv2d14pn2jl9xyd0vr42diy7vpskd3b9a61gf5h3gj03"; 175 }; 176 installPhase = '' 177 cd plugins 178 ${rpm}/bin/rpm2cpio iscan-plugin-gt-x770-*.x86_64.rpm | ${cpio}/bin/cpio -idmv 179 mkdir $out 180 cp -r usr/share $out 181 cp -r usr/lib64 $out/lib 182 mv $out/share/iscan $out/share/esci 183 mv $out/lib/iscan $out/lib/esci 184 ''; 185 passthru = { 186 registrationCommand = '' 187 $registry --add interpreter usb 0x04b8 0x0130 "$plugin/lib/esci/libesint7C $plugin/share/esci/esfw7C.bin" 188 ''; 189 hw = "Perfection V500 Photo"; 190 }; 191 meta = common_meta // { 192 description = "iscan esci x770 plugin for " + passthru.hw; 193 }; 194 }; 195 f720 = stdenv.mkDerivation rec { 196 pname = "iscan-gt-f720-bundle"; 197 version = "2.30.4"; 198 199 nativeBuildInputs = [ autoPatchelfHook ]; 200 buildInputs = [ gcc.cc.lib ]; 201 src = fetchurl { 202 urls = [ 203 "https://download2.ebz.epson.net/iscan/plugin/gt-f720/rpm/x64/iscan-gt-f720-bundle-${version}.x64.rpm.tar.gz" 204 "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" 205 ]; 206 sha256 = "1xnbmb2rn610kqpg1x6k1cc13zlmx2f3l2xnj6809rnhg96qqn20"; 207 }; 208 installPhase = '' 209 cd plugins 210 ${rpm}/bin/rpm2cpio esci-interpreter-gt-f720-*.x86_64.rpm | ${cpio}/bin/cpio -idmv 211 mkdir $out 212 cp -r usr/share $out 213 cp -r usr/lib64 $out/lib 214 ''; 215 216 passthru = { 217 registrationCommand = '' 218 $registry --add interpreter usb 0x04b8 0x0131 "$plugin/lib/esci/libesci-interpreter-gt-f720 $plugin/share/esci/esfw8b.bin" 219 ''; 220 hw = "GT-F720, GT-S620, Perfection V30, Perfection V300 Photo"; 221 }; 222 223 meta = common_meta // { 224 description = "iscan esci f720 plugin for " + passthru.hw; 225 }; 226 }; 227 s80 = stdenv.mkDerivation rec { 228 pname = "iscan-gt-s80-bundle"; 229 version = "2.30.4"; 230 231 nativeBuildInputs = [ autoPatchelfHook ]; 232 buildInputs = [ 233 gcc.cc.lib 234 libtool 235 ]; 236 src = fetchurl { 237 urls = [ 238 "https://download2.ebz.epson.net/iscan/plugin/gt-s80/rpm/x64/iscan-gt-s80-bundle-${version}.x64.rpm.tar.gz" 239 "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" 240 ]; 241 sha256 = "00qfdgs03k7bbs67zjrk8hbxvlyinsmk890amp9cmpfjfzdxgg58"; 242 }; 243 installPhase = '' 244 cd plugins 245 ${rpm}/bin/rpm2cpio esci-interpreter-gt-s80-*.x86_64.rpm | ${cpio}/bin/cpio -idmv 246 ${rpm}/bin/rpm2cpio iscan-plugin-esdip-*.x86_64.rpm | ${cpio}/bin/cpio -idmv 247 mkdir $out 248 cp -r usr/share $out 249 cp -r usr/lib64 $out/lib 250 mkdir $out/share/esci 251 ''; 252 253 passthru = { 254 registrationCommand = '' 255 $registry --add interpreter usb 0x04b8 0x0136 "$plugin/lib/esci/libesci-interpreter-gt-s80.so" 256 $registry --add interpreter usb 0x04b8 0x0137 "$plugin/lib/esci/libesci-interpreter-gt-s50.so" 257 $registry --add interpreter usb 0x04b8 0x0143 "$plugin/lib/esci/libesci-interpreter-gt-s50.so" 258 $registry --add interpreter usb 0x04b8 0x0144 "$plugin/lib/esci/libesci-interpreter-gt-s80.so" 259 ''; 260 hw = "ES-D200, ED-D350, ES-D400, GT-S50, GT-S55, GT-S80, GT-S85"; 261 }; 262 263 meta = common_meta // { 264 description = "iscan esci s80 plugin for " + passthru.hw; 265 }; 266 }; 267 s600 = stdenv.mkDerivation rec { 268 name = "iscan-gt-s600-bundle"; 269 version = "2.30.4"; 270 271 src = fetchurl { 272 urls = [ 273 "https://download2.ebz.epson.net/iscan/plugin/gt-s600/rpm/x64/iscan-gt-s600-bundle-${version}.x64.rpm.tar.gz" 274 "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" 275 ]; 276 sha256 = "fe1356b1d5c40bc5ac985a5693166efb9e5049a78b412f49c385eb503eadf2c6"; 277 }; 278 279 nativeBuildInputs = [ 280 autoPatchelfHook 281 rpm 282 ]; 283 284 installPhase = '' 285 cd plugins 286 ${rpm}/bin/rpm2cpio iscan-plugin-gt-s600-*.x86_64.rpm | ${cpio}/bin/cpio -idmv 287 mkdir $out 288 cp -r usr/share $out 289 cp -r usr/lib64 $out/lib 290 mv $out/share/iscan $out/share/esci 291 mv $out/lib/iscan $out/lib/esci 292 ''; 293 294 passthru = { 295 registrationCommand = '' 296 $registry --add interpreter usb 0x04b8 0x012d "$plugin/lib/esci/libesint66 $plugin/share/esci/esfw66.bin" 297 ''; 298 hw = "GT-F650, GT-S600, Perfection V10, Perfection V100 Photo"; 299 }; 300 meta = common_meta // { 301 description = "iscan gt-s600 plugin for " + passthru.hw; 302 }; 303 }; 304 s650 = stdenv.mkDerivation rec { 305 name = "iscan-gt-s650-bundle"; 306 version = "2.30.4"; 307 308 src = fetchurl { 309 urls = [ 310 "https://download2.ebz.epson.net/iscan/plugin/gt-s650/rpm/x64/iscan-gt-s650-bundle-${version}.x64.rpm.tar.gz" 311 "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" 312 ]; 313 sha256 = "0fn4lz4g0a8l301v6yv7fwl37wgwhz5y90nf681f655xxc91hqh7"; 314 }; 315 316 nativeBuildInputs = [ 317 autoPatchelfHook 318 rpm 319 ]; 320 321 installPhase = '' 322 cd plugins 323 ${rpm}/bin/rpm2cpio iscan-plugin-gt-s650-*.x86_64.rpm | ${cpio}/bin/cpio -idmv 324 mkdir $out 325 cp -r usr/share $out 326 cp -r usr/lib64 $out/lib 327 mv $out/share/iscan $out/share/esci 328 mv $out/lib/iscan $out/lib/esci 329 ''; 330 331 passthru = { 332 registrationCommand = '' 333 $registry --add interpreter usb 0x04b8 0x013c "$plugin/lib/esci/libiscan-plugin-gt-s650 $plugin/share/esci/esfw010c.bin" 334 $registry --add interpreter usb 0x04b8 0x013d "$plugin/lib/esci/libiscan-plugin-gt-s650 $plugin/share/esci/esfw010c.bin" 335 ''; 336 hw = "GT-S650, Perfection V19, Perfection V39"; 337 }; 338 meta = common_meta // { 339 description = "iscan GT-S650 for " + passthru.hw; 340 }; 341 }; 342 x750 = stdenv.mkDerivation rec { 343 name = "iscan-gt-x750-bundle"; 344 version = "2.30.4"; 345 346 src = fetchurl { 347 urls = [ 348 "https://download2.ebz.epson.net/iscan/plugin/gt-x750/rpm/x64/iscan-gt-x750-bundle-${version}.x64.rpm.tar.gz" 349 "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" 350 ]; 351 sha256 = "sha256-9EeBHmh1nwSxnTnevPP8RZ4WBdyY+itR3VXo2I7f5N0="; 352 }; 353 354 nativeBuildInputs = [ 355 autoPatchelfHook 356 rpm 357 ]; 358 359 installPhase = '' 360 cd plugins 361 ${rpm}/bin/rpm2cpio iscan-plugin-gt-x750-*.x86_64.rpm | ${cpio}/bin/cpio -idmv 362 mkdir $out 363 cp -r usr/share $out 364 cp -r usr/lib64 $out/lib 365 mv $out/share/iscan $out/share/esci 366 mv $out/lib/iscan $out/lib/esci 367 ''; 368 369 passthru = { 370 registrationCommand = '' 371 $registry --add interpreter usb 0x04b8 0x0119 "$plugin/lib/esci/libesint54 $plugin/share/esci/esfw54.bin" 372 ''; 373 hw = "GT-X750, Perfection 4490"; 374 }; 375 meta = common_meta // { 376 description = "iscan GT-X750 for " + passthru.hw; 377 }; 378 }; 379 gt1500 = stdenv.mkDerivation rec { 380 name = "iscan-gt-1500-bundle"; 381 version = "2.30.4"; 382 383 src = fetchurl { 384 urls = [ 385 "https://download2.ebz.epson.net/iscan/plugin/gt-1500/rpm/x64/iscan-gt-1500-bundle-${version}.x64.rpm.tar.gz" 386 "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" 387 ]; 388 sha256 = "sha256-1rVsbBsb+QtCOT1FsyhgvCbZIN6IeQH7rZXNmsD7cl8="; 389 }; 390 391 nativeBuildInputs = [ 392 autoPatchelfHook 393 rpm 394 ]; 395 396 installPhase = '' 397 cd plugins 398 ${rpm}/bin/rpm2cpio iscan-plugin-gt-1500-*.x86_64.rpm | ${cpio}/bin/cpio -idmv 399 mkdir $out 400 cp -r usr/share $out 401 cp -r usr/lib64 $out/lib 402 mv $out/share/iscan $out/share/esci 403 mv $out/lib/iscan $out/lib/esci 404 ''; 405 406 passthru = { 407 registrationCommand = '' 408 $registry --add interpreter usb 0x04b8 0x0133 "$plugin/lib/esci/libesint86 $plugin/share/esci/esfw86.bin" 409 ''; 410 hw = "GT-1500"; 411 }; 412 meta = common_meta // { 413 description = "iscan GT-1500 for " + passthru.hw; 414 }; 415 }; 416 ds30 = stdenv.mkDerivation rec { 417 name = "iscan-ds-30-bundle"; 418 version = "2.30.4"; 419 420 src = fetchurl { 421 urls = [ 422 "https://download2.ebz.epson.net/iscan/plugin/ds-30/rpm/x64/iscan-ds-30-bundle-${version}.x64.rpm.tar.gz" 423 "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" 424 ]; 425 sha256 = "0d5ef9b83999c56c14bd17ca63537f63ad4f0d70056870dc00888af1b36f4153"; 426 }; 427 428 nativeBuildInputs = [ 429 autoPatchelfHook 430 rpm 431 ]; 432 433 installPhase = '' 434 ${rpm}/bin/rpm2cpio plugins/iscan-plugin-ds-30-*.x86_64.rpm | ${cpio}/bin/cpio -idmv 435 mkdir $out 436 cp -r usr/share $out 437 cp -r usr/lib64 $out/lib 438 mv $out/lib/iscan $out/lib/esci 439 mkdir $out/share/esci 440 ''; 441 442 passthru = { 443 registrationCommand = '' 444 $registry --add interpreter usb 0x04b8 0x0147 "$plugin/lib/esci/libiscan-plugin-ds-30.so" 445 ''; 446 hw = "DS-30"; 447 }; 448 meta = common_meta // { 449 description = "Plugin to support " + passthru.hw + " scanner in sane"; 450 }; 451 }; 452 network = stdenv.mkDerivation rec { 453 pname = "iscan-nt-bundle"; 454 # for the version, look for the driver of XP-750 in the search page 455 version = "2.30.4"; 456 457 buildInputs = [ (lib.getLib stdenv.cc.cc) ]; 458 nativeBuildInputs = [ autoPatchelfHook ]; 459 460 src = fetchurl { 461 urls = [ 462 "https://download2.ebz.epson.net/iscan/general/rpm/x64/iscan-bundle-${version}.x64.rpm.tar.gz" 463 "https://web.archive.org/web/https://download2.ebz.epson.net/iscan/general/rpm/x64/iscan-bundle-${version}.x64.rpm.tar.gz" 464 ]; 465 sha256 = "0jssigsgkxb9i7qa7db291a1gbvwl795i4ahvb7bnqp33czkj85k"; 466 }; 467 installPhase = '' 468 cd plugins 469 ${rpm}/bin/rpm2cpio iscan-network-nt-*.x86_64.rpm | ${cpio}/bin/cpio -idmv 470 471 mkdir $out 472 cp -r usr/share $out 473 cp -r usr/lib64 $out/lib 474 mkdir $out/share/esci 475 ''; 476 passthru = { 477 registrationCommand = ""; 478 hw = "network"; 479 }; 480 481 meta = common_meta // { 482 description = "iscan network plugin"; 483 }; 484 }; 485}