]> git.scottworley.com Git - nix-env-apps/blobdiff - default.nix
Set the window title
[nix-env-apps] / default.nix
index 17ddac762b2ccbe2e5eb2ae495c7610d2e7baa91..94bc300683180cd22c61882cf3696207c98893eb 100644 (file)
@@ -1,14 +1,19 @@
-{ pkgs ? import <nixpkgs> { } }:
-pkgs.python3Packages.callPackage ({ buildPythonPackage, gobject-introspection
-  , gtk4, lib, pygobject3, wrapGAppsHook4, }:
+{ pkgs ? import <nixpkgs> { }, lint ? false }:
+pkgs.python3Packages.callPackage ({ autopep8, buildPythonPackage
+  , gobject-introspection, gtk4, lib, mypy, pylint, pygobject3, wrapGAppsHook4,
+  }:
   buildPythonPackage rec {
     pname = "apps";
     version = "1.0";
+
     src = lib.cleanSource ./.;
-    nativeBuildInputs = [ gobject-introspection wrapGAppsHook4 ];
 
-    buildInputs = [ gtk4 ];
+    doCheck = true;
+    checkPhase = "./test.sh";
 
+    nativeBuildInputs = [ gobject-introspection wrapGAppsHook4 ];
+    nativeCheckInputs = [ mypy ] ++ lib.optionals lint [ autopep8 pylint ];
+    buildInputs = [ gtk4 ];
     pythonPath = [ pygobject3 ];
 
   }) { }