{ pkgs ? import { }, lint ? false }: pkgs.python3Packages.callPackage ({ autopep8, buildPythonPackage, ffmpeg-full , gobject-introspection, gtk4, lib, makeDesktopItem, makeWrapper, mypy, pylint , pygobject3, wrapGAppsHook4, }: buildPythonPackage rec { pname = "srec"; version = "1.0.2"; src = lib.cleanSource ./.; doCheck = true; checkPhase = "./test.sh"; nativeBuildInputs = [ gobject-introspection makeWrapper wrapGAppsHook4 ]; nativeCheckInputs = [ mypy ] ++ lib.optionals lint [ autopep8 pylint ]; buildInputs = [ gtk4 ]; pythonPath = [ pygobject3 ]; postInstall = '' wrapProgram "$out/bin/srec" --prefix PATH : ${ffmpeg-full}/bin install -D ${./srec48.png} $out/share/icons/hicolor/48x48/apps/srec.png install -D ${./srec.png} $out/share/icons/hicolor/256x256/apps/srec.png install -D ${./srec.svg} $out/share/icons/hicolor/scalable/apps/srec.svg cp -r $desktopItem/share/* $out/share ''; desktopItem = makeDesktopItem { name = "SRec"; exec = "srec"; icon = ./srec.png; comment = "Record video and audio"; desktopName = "SRec"; genericName = "Record Screen"; categories = [ "AudioVideo" "Video" ]; }; meta = { description = "A simple GUI for screen recording"; homepage = "https://git.scottworley.com/srec"; license = pkgs.lib.licenses.gpl3; maintainers = with pkgs.lib.maintainers; [ chkno ]; }; }) { }