]> git.scottworley.com Git - nix-env-apps/blob - default.nix
Release 1.1.0
[nix-env-apps] / default.nix
1 {
2 pkgs ? import <nixpkgs> { },
3 lint ? false,
4 }:
5 pkgs.python3Packages.callPackage (
6 {
7 autopep8,
8 buildPythonPackage,
9 gobject-introspection,
10 gtk4,
11 lib,
12 makeDesktopItem,
13 mypy,
14 pylint,
15 pygobject3,
16 setuptools,
17 wrapGAppsHook4,
18 }:
19 buildPythonPackage rec {
20 pname = "apps";
21 version = "1.1.0";
22
23 src = lib.cleanSource ./.;
24
25 pyproject = true;
26 build-system = [ setuptools ];
27
28 doCheck = true;
29 checkPhase = "./test.sh";
30
31 nativeBuildInputs = [
32 gobject-introspection
33 wrapGAppsHook4
34 ];
35 nativeCheckInputs = [
36 mypy
37 ]
38 ++ lib.optionals lint [
39 autopep8
40 pylint
41 ];
42 buildInputs = [ gtk4 ];
43 pythonPath = [ pygobject3 ];
44
45 postInstall = ''
46 cp -r $desktopItem/share $out
47 '';
48
49 desktopItem = makeDesktopItem {
50 name = "Apps";
51 exec = "apps";
52 icon = ./apps.png;
53 comment = "Configure nix-env Apps";
54 desktopName = "Apps";
55 genericName = "Configure Apps";
56 categories = [ "Settings" ];
57 };
58
59 meta = {
60 description = "A simple GUI for managing declarative nix-env user environments";
61 homepage = "https://git.scottworley.com/nix-env-apps";
62 license = pkgs.lib.licenses.gpl3;
63 maintainers = with pkgs.lib.maintainers; [ chkno ];
64 };
65
66 }
67 ) { }