]> git.scottworley.com Git - srec/blob - default.nix
Two virtual cameras
[srec] / default.nix
1 { pkgs ? import <nixpkgs> { }, lint ? false }:
2 pkgs.python3Packages.callPackage ({ autopep8, buildPythonPackage, ffmpeg-full
3 , gobject-introspection, gtk4, lib, makeDesktopItem, makeWrapper, mypy, pylint
4 , pygobject3, wrapGAppsHook4, }:
5 buildPythonPackage rec {
6 pname = "srec";
7 version = "1.0.2";
8
9 src = lib.cleanSource ./.;
10
11 doCheck = true;
12 checkPhase = "./test.sh";
13
14 nativeBuildInputs = [ gobject-introspection makeWrapper wrapGAppsHook4 ];
15 nativeCheckInputs = [ mypy ] ++ lib.optionals lint [ autopep8 pylint ];
16 buildInputs = [ gtk4 ];
17 pythonPath = [ pygobject3 ];
18
19 postInstall = ''
20 wrapProgram "$out/bin/srec" --prefix PATH : ${ffmpeg-full}/bin
21
22 install -D ${./srec48.png} $out/share/icons/hicolor/48x48/apps/srec.png
23 install -D ${./srec.png} $out/share/icons/hicolor/256x256/apps/srec.png
24 install -D ${./srec.svg} $out/share/icons/hicolor/scalable/apps/srec.svg
25
26 cp -r $desktopItem/share/* $out/share
27 '';
28
29 desktopItem = makeDesktopItem {
30 name = "SRec";
31 exec = "srec";
32 icon = ./srec.png;
33 comment = "Record video and audio";
34 desktopName = "SRec";
35 genericName = "Record Screen";
36 categories = [ "AudioVideo" "Video" ];
37 };
38
39 meta = {
40 description = "A simple GUI for screen recording";
41 homepage = "https://git.scottworley.com/srec";
42 license = pkgs.lib.licenses.gpl3;
43 maintainers = with pkgs.lib.maintainers; [ chkno ];
44 };
45
46 }) { }