at 24.05-pre 42 lines 1.3 kB view raw
1{ buildGoModule, avahi, libusb1, pkg-config, lib, fetchFromGitHub, ronn }: 2buildGoModule rec { 3 pname = "ipp-usb"; 4 version = "0.9.23"; 5 6 src = fetchFromGitHub { 7 owner = "openprinting"; 8 repo = "ipp-usb"; 9 rev = version; 10 sha256 = "sha256-sbPQWKqkTaD3kLNs0noVIzAN9cwDEaULsqO7SMQH2Jo="; 11 }; 12 13 postPatch = '' 14 # rebuild with patched paths 15 rm ipp-usb.8 16 substituteInPlace Makefile --replace "install: all" "install: man" 17 substituteInPlace systemd-udev/ipp-usb.service --replace "/sbin" "$out/bin" 18 for i in Makefile paths.go ipp-usb.8.md; do 19 substituteInPlace $i --replace "/usr" "$out" 20 substituteInPlace $i --replace "/var/ipp-usb" "/var/lib/ipp-usb" 21 done 22 ''; 23 24 nativeBuildInputs = [ pkg-config ronn ]; 25 buildInputs = [ libusb1 avahi ]; 26 27 vendorHash = "sha256-KwW6KgopjF4tVo8eB4OtpXF5R8jfrJ9nibNmaN8U4l8="; 28 29 postInstall = '' 30 # to accomodate the makefile 31 cp $out/bin/ipp-usb . 32 make install DESTDIR=$out 33 ''; 34 35 meta = { 36 description = "Daemon to use the IPP everywhere protocol with USB printers"; 37 homepage = "https://github.com/OpenPrinting/ipp-usb"; 38 maintainers = [ lib.maintainers.symphorien ]; 39 platforms = lib.platforms.linux; 40 license = lib.licenses.bsd2; 41 }; 42}