diff options
Diffstat (limited to 'derivations')
-rw-r--r-- | derivations/crazydiskinfo/default.nix | 11 | ||||
-rw-r--r-- | derivations/pavolctld/default.nix | 31 | ||||
-rw-r--r-- | derivations/xerox-workcentre-7800-series-driver/default.nix | 86 |
3 files changed, 93 insertions, 35 deletions
diff --git a/derivations/crazydiskinfo/default.nix b/derivations/crazydiskinfo/default.nix index 69d9fa1..61de338 100644 --- a/derivations/crazydiskinfo/default.nix +++ b/derivations/crazydiskinfo/default.nix @@ -19,19 +19,22 @@ stdenv.mkDerivation rec { }; patches = [ - # Fix build warnings, original maintainer is MIA + # Patch to fix build warnings (fetchpatch { - url = "https://patch-diff.githubusercontent.com/raw/otakuto/crazydiskinfo/pull/33.diff"; + url = "https://github.com/otakuto/crazydiskinfo/compare/1.1.0...8563aa8.diff"; sha256 = "sha256-z9aOQFsivu6sYgsZBOlnTvqnoR2ro/jyuO/WOimLSXk="; }) ]; - buildInputs = [ cmake libatasmart ncurses5 ]; + nativeBuildInputs = [ cmake ]; + buildInputs = [ libatasmart ncurses5 ]; - cmakeFlags = [ "-DCMAKE_INSTALL_PREFIX=$out" ]; + cmakeFlags = [ "-DCMAKE_INSTALL_PREFIX=$(out)" ]; meta = with lib; { description = "CrazyDiskInfo is an interactive TUI S.M.A.R.T viewer for Unix systems"; + homepage = "https://github.com/otakuto/crazydiskinfo"; + mainProgram = "crazy"; license = licenses.mit; maintainers = [ maintainers.tjkeller ]; }; diff --git a/derivations/pavolctld/default.nix b/derivations/pavolctld/default.nix deleted file mode 100644 index fde1430..0000000 --- a/derivations/pavolctld/default.nix +++ /dev/null @@ -1,31 +0,0 @@ -{ - lib, - stdenv, - fetchgit, - libpulseaudio, -}: - -stdenv.mkDerivation (finalAttrs: { - pname = "pavolctld"; - version = "1.0.1"; - - src = fetchgit { - url = "https://git.tjkeller.xyz/pavolctld"; - tag = "v${finalAttrs.version}"; - hash = "sha256-nmN8bQKQNGpCGvHQnZK9YQgB80SxRSds0V9Y7h/Guh8="; - }; - - buildInputs = [ libpulseaudio ]; - - installFlags = [ "PREFIX=$(out)" ]; - - meta = { - description = "Minimal volume control/monitoring daemon for PulseAudio and PipeWire"; - homepage = "https://tjkeller.xyz/projects/pavolctld"; - platforms = lib.platforms.linux; - license = lib.licenses.mit; - maintainers = [ lib.maintainers.tjkeller ]; - mainProgram = "pavolctld"; - }; -}) - diff --git a/derivations/xerox-workcentre-7800-series-driver/default.nix b/derivations/xerox-workcentre-7800-series-driver/default.nix new file mode 100644 index 0000000..cfdaaae --- /dev/null +++ b/derivations/xerox-workcentre-7800-series-driver/default.nix @@ -0,0 +1,86 @@ +{ + stdenv, + lib, + fetchurl, + dpkg, + autoPatchelfHook, + cups, + xorg, +}: +let + debPlatform = + if stdenv.hostPlatform.system == "x86_64-linux" then + "x86_64" + else if stdenv.hostPlatform.system == "i686-linux" then + "i686" + else + throw "Unsupported system: ${stdenv.hostPlatform.system}"; +in +stdenv.mkDerivation rec { + pname = "xerox-workcentre-7800-series-driver"; + version = "5.20.661.4684"; + debpkg = "XeroxOfficev5Pkg-Linux${debPlatform}-${version}.deb"; + + src = fetchurl { + url = "https://download.support.xerox.com/pub/drivers/CQ8580/drivers/linux/pt_BR/${debpkg}"; + sha256 = "014k0r9ij3401mnab1qzv96bjl9x7rf11aw1ibf0q370pk9jqqjb"; # TODO correct hash for i686 + }; + + nativeBuildInputs = [ dpkg autoPatchelfHook ]; + # TODO add support for disable xorg + buildInputs = [ + cups + stdenv.cc.cc.lib + xorg.libX11 + xorg.libXrender + xorg.libXfixes + xorg.libXdamage + xorg.libXcomposite + xorg.libXcursor + xorg.libXrandr + xorg.libXext + xorg.libXinerama + ]; + + sourceRoot = "."; + unpackCmd = "dpkg-deb -x $curSrc ."; + + dontConfigure = true; + dontBuild = true; + + installPhase = '' + runHook preInstall + + mkdir -p $out + + # Copy and patch the binaries and libraries + cp -r opt $out/ + cp -r usr $out/ + + # Move the PPD to CUPS model dir + mkdir -p $out/share/cups/model + cp opt/XeroxOffice/prtsys/ppd/*.ppd $out/share/cups/model/ + + # Install the CUPS filters + mkdir -p $out/lib/cups/filter + cp usr/lib/cups/filter/* $out/lib/cups/filter/ + + # Install man pages + mkdir -p $out/share/man + cp -r usr/share/man/* $out/share/man/ + + runHook postInstall + ''; + + meta = with lib; { + description = "Xerox WorkCentre 7800 Series Linux Printer Driver"; + longDescription = '' + WorkCentre 7830/7835/7845/7855 + ''; + homepage = "https://www.support.xerox.com/en-us/product/workcentre-7800-series/downloads?platform=linux"; + sourceProvenance = with sourceTypes; [ binaryNativeCode ]; + #license = licenses.unfree; + maintainers = []; + platforms = platforms.linux; + }; +} |