]> git.scottworley.com Git - srec/blobdiff - default.nix
25.11: New pyproject boilerplate
[srec] / default.nix
index 6fef4371c6864c17881907af4401d65d7dcc5e6e..65571e5428cca4c682da42146ad1d6276a0ea360 100644 (file)
@@ -1,18 +1,47 @@
-{ pkgs ? import <nixpkgs> { }, lint ? false }:
-pkgs.python3Packages.callPackage ({ autopep8, buildPythonPackage, ffmpeg-full
-  , gobject-introspection, gtk4, lib, makeDesktopItem, makeWrapper, mypy, pylint
-  , pygobject3, wrapGAppsHook4, }:
+{
+  pkgs ? import <nixpkgs> { },
+  lint ? false,
+}:
+pkgs.python3Packages.callPackage (
+  {
+    autopep8,
+    buildPythonPackage,
+    ffmpeg-full,
+    gobject-introspection,
+    gtk4,
+    lib,
+    makeDesktopItem,
+    makeWrapper,
+    mypy,
+    setuptools,
+    pylint,
+    pygobject3,
+    wrapGAppsHook4,
+  }:
   buildPythonPackage rec {
     pname = "srec";
     version = "1.0.2";
 
     src = lib.cleanSource ./.;
 
   buildPythonPackage rec {
     pname = "srec";
     version = "1.0.2";
 
     src = lib.cleanSource ./.;
 
+    pyproject = true;
+    build-system = [ setuptools ];
+
     doCheck = true;
     checkPhase = "./test.sh";
 
     doCheck = true;
     checkPhase = "./test.sh";
 
-    nativeBuildInputs = [ gobject-introspection makeWrapper wrapGAppsHook4 ];
-    nativeCheckInputs = [ mypy ] ++ lib.optionals lint [ autopep8 pylint ];
+    nativeBuildInputs = [
+      gobject-introspection
+      makeWrapper
+      wrapGAppsHook4
+    ];
+    nativeCheckInputs = [
+      mypy
+    ]
+    ++ lib.optionals lint [
+      autopep8
+      pylint
+    ];
     buildInputs = [ gtk4 ];
     pythonPath = [ pygobject3 ];
 
     buildInputs = [ gtk4 ];
     pythonPath = [ pygobject3 ];
 
@@ -33,7 +62,10 @@ pkgs.python3Packages.callPackage ({ autopep8, buildPythonPackage, ffmpeg-full
       comment = "Record video and audio";
       desktopName = "SRec";
       genericName = "Record Screen";
       comment = "Record video and audio";
       desktopName = "SRec";
       genericName = "Record Screen";
-      categories = [ "AudioVideo" "Video" ];
+      categories = [
+        "AudioVideo"
+        "Video"
+      ];
     };
 
     meta = {
     };
 
     meta = {
@@ -43,4 +75,5 @@ pkgs.python3Packages.callPackage ({ autopep8, buildPythonPackage, ffmpeg-full
       maintainers = with pkgs.lib.maintainers; [ chkno ];
     };
 
       maintainers = with pkgs.lib.maintainers; [ chkno ];
     };
 
-  }) { }
+  }
+) { }