chore: format with alejandra

This commit is contained in:
steveej 2023-02-07 18:24:28 +01:00
parent 05f0cbdfb4
commit 89f5f65f2d
181 changed files with 2720 additions and 2560 deletions

View file

@ -1,22 +1,30 @@
{ pkgsi686Linux, stdenv, fetchurl, dpkg, makeWrapper, coreutils, ghostscript
, gnugrep, gnused, which, perl, lib }:
let
{
pkgsi686Linux,
stdenv,
fetchurl,
dpkg,
makeWrapper,
coreutils,
ghostscript,
gnugrep,
gnused,
which,
perl,
lib,
}: let
model = "mfcl3770cdw";
version = "1.0.2-0";
src = fetchurl {
url =
"https://download.brother.com/welcome/dlf103935/${model}pdrv-${version}.i386.deb";
url = "https://download.brother.com/welcome/dlf103935/${model}pdrv-${version}.i386.deb";
sha256 = "09fhbzhpjymhkwxqyxzv24b06ybmajr6872yp7pri39595mhrvay";
};
reldir = "opt/brother/Printers/${model}/";
in rec {
driver = stdenv.mkDerivation rec {
inherit src version;
name = "${model}drv-${version}";
nativeBuildInputs = [ dpkg makeWrapper ];
nativeBuildInputs = [dpkg makeWrapper];
unpackPhase = "dpkg-deb -x $src $out";
@ -28,8 +36,8 @@ in rec {
--replace "PRINTER =~" "PRINTER = \"${model}\"; #"
wrapProgram $dir/lpd/filter_${model} \
--prefix PATH : ${
lib.makeBinPath [ coreutils ghostscript gnugrep gnused which ]
}
lib.makeBinPath [coreutils ghostscript gnugrep gnused which]
}
# need to use i686 glibc here, these are 32bit proprietary binaries
interpreter=${pkgsi686Linux.glibc}/lib/ld-linux.so.2
patchelf --set-interpreter "$interpreter" $dir/lpd/brmfcl3770cdwfilter
@ -39,8 +47,8 @@ in rec {
description = "Brother ${lib.strings.toUpper model} driver";
homepage = "http://www.brother.com/";
license = lib.licenses.unfree;
platforms = [ "x86_64-linux" "i686-linux" ];
maintainers = [ lib.maintainers.steveej ];
platforms = ["x86_64-linux" "i686-linux"];
maintainers = [lib.maintainers.steveej];
};
};
@ -48,7 +56,7 @@ in rec {
inherit version src;
name = "${model}cupswrapper-${version}";
nativeBuildInputs = [ dpkg makeWrapper ];
nativeBuildInputs = [dpkg makeWrapper];
unpackPhase = "dpkg-deb -x $src $out";
@ -60,7 +68,7 @@ in rec {
--replace "basedir =~" "basedir = \"$basedir\"; #" \
--replace "PRINTER =~" "PRINTER = \"${model}\"; #"
wrapProgram $dir/cupswrapper/brother_lpdwrapper_${model} \
--prefix PATH : ${lib.makeBinPath [ coreutils gnugrep gnused ]}
--prefix PATH : ${lib.makeBinPath [coreutils gnugrep gnused]}
mkdir -p $out/lib/cups/filter
mkdir -p $out/share/cups/model
ln $dir/cupswrapper/brother_lpdwrapper_${model} $out/lib/cups/filter
@ -71,8 +79,8 @@ in rec {
description = "Brother ${lib.strings.toUpper model} CUPS wrapper driver";
homepage = "http://www.brother.com/";
license = lib.licenses.gpl2;
platforms = [ "x86_64-linux" "i686-linux" ];
maintainers = [ lib.maintainers.steveej ];
platforms = ["x86_64-linux" "i686-linux"];
maintainers = [lib.maintainers.steveej];
};
};
}