1{
2 fetchurl,
3 mkKdeDerivation,
4 pkg-config,
5 qtmultimedia,
6 qtpositioning,
7 qtsvg,
8 exiv2,
9}:
10let
11 # URLs snapshotted through
12 # https://web.archive.org/save/$url
13 # Update when stale enough I guess?
14 admin1 = fetchurl {
15 url = "https://web.archive.org/web/20210714035424if_/http://download.geonames.org/export/dump/admin1CodesASCII.txt";
16 sha256 = "0r783yzajs26hvccdy4jv2v06xfgadx2g90fz3yn7lx8flz4nhwm";
17 };
18 admin2 = fetchurl {
19 url = "https://web.archive.org/web/20210714035427if_/http://download.geonames.org/export/dump/admin2Codes.txt";
20 sha256 = "1n5nzp3xblhr93rb1sadi5vfbw29slv5lc6cxq21h3x3cg0mwqh3";
21 };
22 cities1000 = fetchurl {
23 url = "https://web.archive.org/web/20210714035406if_/http://download.geonames.org/export/dump/cities1000.zip";
24 sha256 = "0cwbfff8gzci5zrahh6d53b9b3bfv1cbwlv0k6076531i1c7md9p";
25 };
26in
27mkKdeDerivation {
28 pname = "koko";
29
30 prePatch = ''
31 ln -s ${admin1} src/admin1CodesASCII.txt
32 ln -s ${admin2} src/admin2Codes.txt
33 ln -s ${cities1000} src/cities1000.zip
34 '';
35
36 patches = [
37 ./optional-runtime-dependencies.patch
38 ];
39
40 extraNativeBuildInputs = [ pkg-config ];
41 extraBuildInputs = [
42 qtmultimedia
43 qtpositioning
44 qtsvg
45 exiv2
46 ];
47 meta.mainProgram = "koko";
48}