Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Plasma Mobile Gear 21.05 #125156

Merged
merged 18 commits into from
Oct 6, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions pkgs/applications/kde/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,7 @@ let
ksquares = callPackage ./ksquares.nix {};
kqtquickcharts = callPackage ./kqtquickcharts.nix {};
kpkpass = callPackage ./kpkpass.nix {};
kpublictransport = callPackage ./kpublictransport.nix {};
kreversi = callPackage ./kreversi.nix {};
krdc = callPackage ./krdc.nix {};
krfb = callPackage ./krfb.nix {};
Expand Down
13 changes: 13 additions & 0 deletions pkgs/applications/kde/kpublictransport.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{ mkDerivation
, lib
, extra-cmake-modules
}:

mkDerivation {
pname = "kpublictransport";
meta = with lib; {
license = [ licenses.cc0 ];
maintainers = [ maintainers.samueldr ];
};
nativeBuildInputs = [ extra-cmake-modules ];
}
40 changes: 40 additions & 0 deletions pkgs/applications/plasma-mobile/alligator.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
{ lib
, mkDerivation

, cmake
, extra-cmake-modules

, kconfig
, kcoreaddons
, ki18n
, kirigami2
, qtquickcontrols2
, syndication
}:

mkDerivation rec {
pname = "alligator";

nativeBuildInputs = [
cmake
extra-cmake-modules
];

buildInputs = [
kconfig
kcoreaddons
ki18n
kirigami2
qtquickcontrols2
syndication
];

meta = with lib; {
description = "RSS reader made with kirigami";
homepage = "https://invent.kde.org/plasma-mobile/alligator";
# https://invent.kde.org/plasma-mobile/alligator/-/commit/db30f159c4700244532b17a260deb95551045b7a
# * SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only OR LicenseRef-KDE-Accepted-GPL
license = with licenses; [ gpl2Only gpl3Only ];
maintainers = with maintainers; [ samueldr ];
};
}
46 changes: 46 additions & 0 deletions pkgs/applications/plasma-mobile/calindori.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
{ lib
, mkDerivation

, cmake
, extra-cmake-modules

, kcalendarcore
, kconfig
, kcoreaddons
, kdbusaddons
, ki18n
, kirigami2
, knotifications
, kpeople
, kservice
, qtquickcontrols2
}:

mkDerivation rec {
pname = "calindori";

nativeBuildInputs = [
cmake
extra-cmake-modules
];

buildInputs = [
kcalendarcore
kconfig
kcoreaddons
kdbusaddons
ki18n
kirigami2
knotifications
kpeople
kservice
qtquickcontrols2
];

meta = with lib; {
description = "Calendar for Plasma Mobile";
homepage = "https://invent.kde.org/plasma-mobile/calindori";
license = licenses.gpl3Plus;
maintainers = with maintainers; [ samueldr ];
};
}
76 changes: 76 additions & 0 deletions pkgs/applications/plasma-mobile/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,76 @@
/*

# 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
minQtVersion = "5.15";
broken = lib.versionOlder libsForQt5.qtbase.version minQtVersion;

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;
broken = meta.broken or broken;
};
});

packages = self: with self;
let
callPackage = self.newScope {
inherit mkDerivation;
};
in {
alligator = callPackage ./alligator.nix {};
calindori = callPackage ./calindori.nix {};
kalk = callPackage ./kalk.nix {};
kclock = callPackage ./kclock.nix {};
koko = callPackage ./koko.nix {};
krecorder = callPackage ./krecorder.nix {};
ktrip = callPackage ./ktrip.nix {};
plasma-dialer = callPackage ./plasma-dialer.nix {};
plasma-phonebook = callPackage ./plasma-phonebook.nix {};
spacebar = callPackage ./spacebar.nix {};
};

in lib.makeScope libsForQt5.newScope packages
1 change: 1 addition & 0 deletions pkgs/applications/plasma-mobile/fetch.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
WGET_ARGS=( http://download.kde.org/stable/plasma-mobile/21.05 -A '*.tar.xz' )
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I actually had to cheat to get the 21.05 release. Running the fetch script without changing the version downloads 21.05 and 21.06 packages here. Odd.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's strange... Here's what I know: wget is acting as a (not very smart) link scraper, looking for <a> tags with filenames that match the given pattern. This has broken pretty spectacularly in the past when, for example, KDE modified their website to insert most of the page content with JavaScript. I wonder if, at some point, the page source contained links for both versions? It only seems to have 21.05 now, though.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I made the same observations at the time. But I did not investigate more deeply. I guessed vaguely it might be following the link to the parent directory, but I don't get why it wouldn't download 21.05 with the 21.06.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Figured it out: it needs a trailing slash.

Some other fetch scripts don't because they are one subdirectory in, e.g. https://download.kde.org/stable/release-service/21.08.1/src.

50 changes: 50 additions & 0 deletions pkgs/applications/plasma-mobile/kalk.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
{ lib
, mkDerivation

, cmake
, extra-cmake-modules
, bison
, flex

, gmp
, mpfr

, kconfig
, kcoreaddons
, ki18n
, kirigami2
, kunitconversion
, qtfeedback
, qtquickcontrols2
}:

mkDerivation rec {
pname = "kalk";

nativeBuildInputs = [
cmake
extra-cmake-modules
bison
flex
];

buildInputs = [
gmp
mpfr

kconfig
kcoreaddons
ki18n
kirigami2
kunitconversion
qtfeedback
qtquickcontrols2
];

meta = with lib; {
description = "Calculator built with kirigami";
homepage = "https://invent.kde.org/plasma-mobile/kalk";
license = licenses.gpl3Plus;
maintainers = with maintainers; [ samueldr ];
};
}
44 changes: 44 additions & 0 deletions pkgs/applications/plasma-mobile/kclock.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
{ lib
, mkDerivation

, cmake
, extra-cmake-modules

, kconfig
, kcoreaddons
, kdbusaddons
, ki18n
, kirigami2
, knotifications
, plasma-framework
, qtmultimedia
, qtquickcontrols2
}:

mkDerivation rec {
pname = "kclock";

nativeBuildInputs = [
cmake
extra-cmake-modules
];

buildInputs = [
kconfig
kcoreaddons
kdbusaddons
ki18n
kirigami2
knotifications
plasma-framework
qtmultimedia
qtquickcontrols2
];

meta = with lib; {
description = "Clock app for plasma mobile";
homepage = "https://invent.kde.org/plasma-mobile/kclock";
license = licenses.gpl2Plus;
maintainers = with maintainers; [ samueldr ];
};
}
81 changes: 81 additions & 0 deletions pkgs/applications/plasma-mobile/koko.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
{ lib
, mkDerivation

, fetchurl
, cmake
, extra-cmake-modules

, exiv2
, kconfig
, kcoreaddons
, kdeclarative
, kfilemetadata
, kguiaddons
, ki18n
, kio
, kirigami2
, knotifications
, kpurpose
, kquickimageedit
, qtgraphicaleffects
, qtlocation
, qtquickcontrols2
}:

let
# URLs snapshotted through
# https://web.archive.org/save/$url
# Update when stale enough I guess?
admin1 = fetchurl {
url = "https://web.archive.org/web/20210714035424if_/http://download.geonames.org/export/dump/admin1CodesASCII.txt";
sha256 = "0r783yzajs26hvccdy4jv2v06xfgadx2g90fz3yn7lx8flz4nhwm";
};
admin2 = fetchurl {
url = "https://web.archive.org/web/20210714035427if_/http://download.geonames.org/export/dump/admin2Codes.txt";
sha256 = "1n5nzp3xblhr93rb1sadi5vfbw29slv5lc6cxq21h3x3cg0mwqh3";
};
cities1000 = fetchurl {
url = "https://web.archive.org/web/20210714035406if_/http://download.geonames.org/export/dump/cities1000.zip";
sha256 = "0cwbfff8gzci5zrahh6d53b9b3bfv1cbwlv0k6076531i1c7md9p";
};
in
mkDerivation rec {
pname = "koko";

nativeBuildInputs = [
cmake
extra-cmake-modules
];

buildInputs = [
exiv2
kconfig
kcoreaddons
kdeclarative
kfilemetadata
kguiaddons
ki18n
kio
kirigami2
knotifications
kpurpose
kquickimageedit
qtgraphicaleffects
qtlocation
qtquickcontrols2
];

prePatch = ''
ln -s ${admin1} src/admin1CodesASCII.txt
ln -s ${admin2} src/admin2Codes.txt
ln -s ${cities1000} src/cities1000.zip
'';

meta = with lib; {
description = "Image gallery mobile application";
homepage = "https://apps.kde.org/koko/";
# LGPL-2.1-only OR LGPL-3.0-only OR LicenseRef-KDE-Accepted-LGPL
license = [ licenses.lgpl3Only licenses.lgpl21Only ];
maintainers = with maintainers; [ samueldr ];
};
}
Loading