about summary refs log tree commit diff
path: root/pkgs/applications
diff options
context:
space:
mode:
authorWeijia Wang <9713184+wegank@users.noreply.github.com>2023-12-09 17:53:30 +0100
committerWeijia Wang <9713184+wegank@users.noreply.github.com>2023-12-09 17:53:30 +0100
commitbcf9e13dffab2157ed75aeca697b63d3114f3eaa (patch)
treeffff7b65532e45370f3c29507d7d307a178b82d8 /pkgs/applications
parent9aedfde2aa20a347e9c4fafeef1ae9686d83ae93 (diff)
downloadnixlib-bcf9e13dffab2157ed75aeca697b63d3114f3eaa.tar
nixlib-bcf9e13dffab2157ed75aeca697b63d3114f3eaa.tar.gz
nixlib-bcf9e13dffab2157ed75aeca697b63d3114f3eaa.tar.bz2
nixlib-bcf9e13dffab2157ed75aeca697b63d3114f3eaa.tar.lz
nixlib-bcf9e13dffab2157ed75aeca697b63d3114f3eaa.tar.xz
nixlib-bcf9e13dffab2157ed75aeca697b63d3114f3eaa.tar.zst
nixlib-bcf9e13dffab2157ed75aeca697b63d3114f3eaa.zip
gosmore: fix src, build with gcc 13
Diffstat (limited to 'pkgs/applications')
-rw-r--r--pkgs/applications/misc/gosmore/default.nix22
1 files changed, 12 insertions, 10 deletions
diff --git a/pkgs/applications/misc/gosmore/default.nix b/pkgs/applications/misc/gosmore/default.nix
index bd87e7b4aeb6..2bc778ff9cb2 100644
--- a/pkgs/applications/misc/gosmore/default.nix
+++ b/pkgs/applications/misc/gosmore/default.nix
@@ -1,24 +1,26 @@
-{ lib, stdenv, fetchsvn, libxml2, gtk2, curl, pkg-config } :
+{ lib, stdenv, fetchFromGitHub, libxml2, gtk2, curl, pkg-config }:
 
 stdenv.mkDerivation rec {
   pname = "gosmore";
-  version = "31801";
-  # the gosmore svn repository does not lock revision numbers of its externals
-  # so we explicitly disable them to avoid breaking the hash
-  # especially as the externals appear to be unused
-  src = fetchsvn {
-    url = "http://svn.openstreetmap.org/applications/rendering/gosmore";
-    sha256 = "0qsckpqx7i7f8gkqhkzdamr65250afk1rpnh3nbman35kdv3dsxi";
-    rev = version;
-    ignoreExternals = true;
+  version = "unstable-2014-03-17";
+
+  src = fetchFromGitHub {
+    owner = "openstreetmap";
+    repo = "svn-archive";
+    rev = "89b1fbfbc9e9a8b5e78795fd40bdfa60550322fc";
+    sparseCheckout = [ "applications/rendering/gosmore" ];
+    hash = "sha256-MfuJVsyGWspGNAFD6Ktbbyawb4bPwUITe7WkyFs6JxI=";
   };
 
+  sourceRoot = "${src.name}/applications/rendering/gosmore";
+
   buildInputs = [ libxml2 gtk2 curl ];
 
   nativeBuildInputs = [ pkg-config ];
 
   prePatch = ''
     sed -e '/curl.types.h/d' -i *.{c,h,hpp,cpp}
+    sed -e "24i #include <ctime>" -e "s/data/dat/g" -i jni/libgosm.cpp
   '';
 
   patches = [ ./pointer_int_comparison.patch ];