Created
December 20, 2024 14:45
-
-
Save teburd/37fa1e0c29717ed68d3be8786473bd61 to your computer and use it in GitHub Desktop.
turboprint nix flake
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
description = "Turboprint"; | |
# Nixpkgs / NixOS version to use. | |
inputs.nixpkgs.url = "nixpkgs/nixos-24.05"; | |
outputs = { self, nixpkgs }: { | |
defaultPackage.x86_64-linux = | |
with import nixpkgs { system = "x86_64-linux"; }; | |
stdenv.mkDerivation rec { | |
pname = "turboprint"; | |
version = "2.57-1"; | |
src = fetchurl { | |
url = "https://www.zedonet.com/download/tp2/turboprint-${version}.x86_64.rpm"; | |
hash = "sha256-vluEWmgJcSSqAKLjG3Ony3yCRSEDKWXw9SWZsuX0ii8="; | |
}; | |
dontUnpack = true; | |
nativeBuildInputs = [ | |
rpm | |
cpio | |
autoPatchelfHook | |
makeWrapper | |
]; | |
buildInputs = [ | |
gtk2 | |
gimp | |
]; | |
installPhase = '' | |
runHook preInstall | |
pwd | |
mkdir -p $out | |
cd $out | |
rpm2cpio ${src} | cpio -imdv | |
rm $out/usr/lib/turboprint/gnomeapplet/tpgnomeapplet | |
wrapProgram $out/usr/bin/turboprint | |
runHook postInstall | |
''; | |
meta = with lib; { | |
homepage = "https://turboprint.info"; | |
description = "Turbo Print Drivers for High End Printers"; | |
platforms = platforms.linux; | |
}; | |
}; | |
}; | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment