about summary refs log tree commit diff
path: root/pkgs/applications/plasma-mobile
diff options
context:
space:
mode:
authorSamuel Dionne-Riel <samuel@dionne-riel.com>2021-07-13 23:52:07 -0400
committerSamuel Dionne-Riel <samuel@dionne-riel.com>2021-10-05 23:21:45 -0400
commit25a433d286078c90e59fb5dcba9b91dc627708cc (patch)
treea29a18d377707760939988ef2b7ec73f41c7e168 /pkgs/applications/plasma-mobile
parentea73dda9217b1c3ef4d58a9efc3e728568c0b593 (diff)
koko: init at 21.05
requires data that is not versioned:

 - https://invent.kde.org/graphics/koko#packaging

Snapshotted because... Obviously that won't do with Nix.
Diffstat (limited to 'pkgs/applications/plasma-mobile')
-rw-r--r--pkgs/applications/plasma-mobile/default.nix1
-rw-r--r--pkgs/applications/plasma-mobile/koko.nix81
2 files changed, 82 insertions, 0 deletions
diff --git a/pkgs/applications/plasma-mobile/default.nix b/pkgs/applications/plasma-mobile/default.nix
index d5295a8b439bf..781ca7298a803 100644
--- a/pkgs/applications/plasma-mobile/default.nix
+++ b/pkgs/applications/plasma-mobile/default.nix
@@ -65,6 +65,7 @@ let
       calindori = callPackage ./calindori.nix {};
       kalk = callPackage ./kalk.nix {};
       kclock = callPackage ./kclock.nix {};
+      koko = callPackage ./koko.nix {};
       krecorder = callPackage ./krecorder.nix {};
       plasma-dialer = callPackage ./plasma-dialer.nix {};
       plasma-phonebook = callPackage ./plasma-phonebook.nix {};
diff --git a/pkgs/applications/plasma-mobile/koko.nix b/pkgs/applications/plasma-mobile/koko.nix
new file mode 100644
index 0000000000000..3543a7284bffd
--- /dev/null
+++ b/pkgs/applications/plasma-mobile/koko.nix
@@ -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 ];
+  };
+}