summary refs log tree commit diff
path: root/pkgs/applications/plasma-mobile/default.nix
blob: 97076070ae6004757617579bc78f3f4002edf6d5 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
/*

# New packages

READ THIS FIRST

This module is for official packages in the Plasma Mobile Gear. All
available packages are listed in `./srcs.nix`, although some are not yet
packaged in Nixpkgs.

IF YOUR PACKAGE IS NOT LISTED IN `./srcs.nix`, IT DOES NOT GO HERE.

See also `pkgs/applications/kde` as this is what this is based on.

# Updates

1. Update the URL in `./fetch.sh`.
2. Run `./maintainers/scripts/fetch-kde-qt.sh pkgs/applications/plasma-mobile`
   from the top of the Nixpkgs tree.
3. Use `nox-review wip` to check that everything builds.
4. Commit the changes and open a pull request.

*/

{ lib
, libsForQt5
, fetchurl
}:

let
  mirror = "mirror://kde";
  srcs = import ./srcs.nix { inherit fetchurl mirror; };

  mkDerivation = args:
    let
      inherit (args) pname;
      inherit (srcs.${pname}) src version;
      mkDerivation =
        libsForQt5.callPackage ({ mkDerivation }: mkDerivation) {};
    in
      mkDerivation (args // {
        inherit pname version src;

        outputs = args.outputs or [ "out" ];

        meta =
          let meta = args.meta or {}; in
          meta // {
            homepage = meta.homepage or "https://www.plasma-mobile.org/";
            platforms = meta.platforms or lib.platforms.linux;
          };
      });

  packages = self:
    let
      callPackage = self.newScope {
        inherit mkDerivation;
      };
    in {
      plasma-dialer = callPackage ./plasma-dialer.nix {};
      plasma-phonebook = callPackage ./plasma-phonebook.nix {};
      plasma-settings = callPackage ./plasma-settings.nix {};
      spacebar = callPackage ./spacebar.nix {};
    };

in lib.makeScope libsForQt5.newScope packages