From 148e69a477594c6b40061124dd39b5ab704d0b97 Mon Sep 17 00:00:00 2001 From: Nikolay Korotkiy Date: Sun, 6 Aug 2023 02:46:45 +0400 Subject: [PATCH] viking: enable on darwin (#247225) --- pkgs/applications/misc/viking/default.nix | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/pkgs/applications/misc/viking/default.nix b/pkgs/applications/misc/viking/default.nix index cca8032e1834..be642790f386 100644 --- a/pkgs/applications/misc/viking/default.nix +++ b/pkgs/applications/misc/viking/default.nix @@ -1,4 +1,5 @@ -{ lib, stdenv, fetchurl +{ lib, stdenv, fetchurl, fetchpatch +, desktopToDarwinBundle , docbook_xml_dtd_45, docbook_xsl, intltool, itstool, libxslt, pkg-config, wrapGAppsHook, yelp-tools , curl, gdk-pixbuf, gtk3, json-glib, libxml2 , gpsbabel @@ -9,7 +10,7 @@ , withMBTiles ? true, sqlite , withMd5Hash ? true, nettle , withOAuth ? true, liboauth -, withRealtimeGPSTracking ? true, gpsd +, withRealtimeGPSTracking ? (!stdenv.isDarwin), gpsd }: stdenv.mkDerivation rec { @@ -21,7 +22,16 @@ stdenv.mkDerivation rec { sha256 = "sha256-lFXIlfmLwT3iS9ayNM0PHV7NwbBotMvG62ZE9hJuRaw="; }; - nativeBuildInputs = [ docbook_xml_dtd_45 docbook_xsl intltool itstool libxslt pkg-config wrapGAppsHook yelp-tools ]; + patches = [ + # Fix check_md5_hash.sh on macOS + (fetchpatch { + url = "https://github.com/viking-gps/viking/pull/184/commits/b0e110a3cfefea0f1874669525eb3a220dd29f9f.patch"; + hash = "sha256-HdkcZMV570SXOQMIZZAti2HT0gIdF/EwQCVXBaOwpqs="; + }) + ]; + + nativeBuildInputs = [ docbook_xml_dtd_45 docbook_xsl intltool itstool libxslt pkg-config wrapGAppsHook yelp-tools ] + ++ lib.optional stdenv.isDarwin desktopToDarwinBundle; buildInputs = [ curl gdk-pixbuf gtk3 json-glib libxml2 ] ++ lib.optional withGeoClue geoclue2 @@ -66,6 +76,6 @@ stdenv.mkDerivation rec { homepage = "https://sourceforge.net/projects/viking/"; license = licenses.gpl2Plus; maintainers = with maintainers; [ pSub sikmir ]; - platforms = with platforms; linux; + platforms = with platforms; unix; }; }