From 5d65b513e0ffa75e03ecc38d47e4b9e3ed125776 Mon Sep 17 00:00:00 2001 From: Nikolay Korotkiy Date: Mon, 9 Sep 2024 00:46:09 +0400 Subject: [PATCH 1/3] =?UTF-8?q?merkaartor:=200.19.0=20=E2=86=92=200.20.0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pkgs/applications/misc/merkaartor/default.nix | 36 ++++++------------- 1 file changed, 10 insertions(+), 26 deletions(-) diff --git a/pkgs/applications/misc/merkaartor/default.nix b/pkgs/applications/misc/merkaartor/default.nix index ce6cbc2a3b76..5d157382240e 100644 --- a/pkgs/applications/misc/merkaartor/default.nix +++ b/pkgs/applications/misc/merkaartor/default.nix @@ -1,13 +1,14 @@ { lib , stdenv , fetchFromGitHub -, fetchpatch , cmake , pkg-config , qttools , wrapQtAppsHook , gdal , proj +, protobuf +, qtnetworkauth , qtsvg , qtwebengine , withGeoimage ? true, exiv2 @@ -18,31 +19,18 @@ stdenv.mkDerivation rec { pname = "merkaartor"; - version = "0.19.0"; + version = "0.20.0"; src = fetchFromGitHub { owner = "openstreetmap"; repo = "merkaartor"; rev = version; - hash = "sha256-I3QNCXzwhEFa8aOdwl3UJV8MLZ9caN9wuaaVrGFRvbQ="; + hash = "sha256-oxLGhIE1qJ9+GOztD1HvrLGRGVO3gyy7Rc6CyzKTFec="; }; - patches = [ - (fetchpatch { - name = "exiv2-0.28.patch"; - url = "https://github.com/openstreetmap/merkaartor/commit/1e20d2ccd743ea5f8c2358e4ae36fead8b9390fd.patch"; - hash = "sha256-aHjJLKYvqz7V0QwUIg0SbentBe+DaCJusVqy4xRBVWo="; - }) - # https://github.com/openstreetmap/merkaartor/pull/290 - (fetchpatch { - url = "https://github.com/openstreetmap/merkaartor/commit/7dede77370d89e8e7586f6ed5af225f9b5bde6cf.patch"; - hash = "sha256-3oDRPysVNvA50t/b9xOcVQgac3U1lDPrencanl4c6Zk="; - }) - ]; - nativeBuildInputs = [ cmake pkg-config qttools wrapQtAppsHook ]; - buildInputs = [ gdal proj qtsvg qtwebengine ] + buildInputs = [ gdal proj protobuf qtnetworkauth qtsvg qtwebengine ] ++ lib.optional withGeoimage exiv2 ++ lib.optional withGpsdlib gpsd ++ lib.optional withLibproxy libproxy @@ -56,11 +44,7 @@ stdenv.mkDerivation rec { (lib.cmakeBool "ZBAR" withZbar) ]; - postInstall = '' - # Binary is looking for .qm files in share/merkaartor - mv $out/share/merkaartor/{translations/*.qm,} - rm -r $out/share/merkaartor/translations - '' + lib.optionalString stdenv.isDarwin '' + postInstall = lib.optionalString stdenv.isDarwin '' mkdir -p $out/{Applications,bin} mv $out/merkaartor.app $out/Applications # Prevent wrapping, otherwise plugins will not be loaded @@ -68,12 +52,12 @@ stdenv.mkDerivation rec { makeWrapper $out/{Applications/merkaartor.app/Contents/MacOS,bin}/merkaartor ''; - meta = with lib; { + meta = { description = "OpenStreetMap editor"; homepage = "http://merkaartor.be/"; - license = licenses.gpl2Plus; + license = lib.licenses.gpl2Plus; mainProgram = "merkaartor"; - maintainers = with maintainers; [ sikmir ]; - platforms = platforms.unix; + maintainers = with lib.maintainers; [ sikmir ]; + platforms = lib.platforms.unix; }; } From f538320efa76ed85ae6c043114e866ca9403f0dc Mon Sep 17 00:00:00 2001 From: Nikolay Korotkiy Date: Mon, 9 Sep 2024 00:51:21 +0400 Subject: [PATCH 2/3] merkaartor: migrate to by-name --- .../default.nix => by-name/me/merkaartor/package.nix} | 10 +++------- pkgs/top-level/all-packages.nix | 2 -- 2 files changed, 3 insertions(+), 9 deletions(-) rename pkgs/{applications/misc/merkaartor/default.nix => by-name/me/merkaartor/package.nix} (87%) diff --git a/pkgs/applications/misc/merkaartor/default.nix b/pkgs/by-name/me/merkaartor/package.nix similarity index 87% rename from pkgs/applications/misc/merkaartor/default.nix rename to pkgs/by-name/me/merkaartor/package.nix index 5d157382240e..03029a055a1b 100644 --- a/pkgs/applications/misc/merkaartor/default.nix +++ b/pkgs/by-name/me/merkaartor/package.nix @@ -3,14 +3,10 @@ , fetchFromGitHub , cmake , pkg-config -, qttools -, wrapQtAppsHook , gdal , proj , protobuf -, qtnetworkauth -, qtsvg -, qtwebengine +, qt5 , withGeoimage ? true, exiv2 , withGpsdlib ? (!stdenv.isDarwin), gpsd , withLibproxy ? false, libproxy @@ -28,9 +24,9 @@ stdenv.mkDerivation rec { hash = "sha256-oxLGhIE1qJ9+GOztD1HvrLGRGVO3gyy7Rc6CyzKTFec="; }; - nativeBuildInputs = [ cmake pkg-config qttools wrapQtAppsHook ]; + nativeBuildInputs = [ cmake pkg-config qt5.qttools qt5.wrapQtAppsHook ]; - buildInputs = [ gdal proj protobuf qtnetworkauth qtsvg qtwebengine ] + buildInputs = [ gdal proj protobuf qt5.qtnetworkauth qt5.qtsvg qt5.qtwebengine ] ++ lib.optional withGeoimage exiv2 ++ lib.optional withGpsdlib gpsd ++ lib.optional withLibproxy libproxy diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 7deff9c7b8c4..32786879761a 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -31661,8 +31661,6 @@ with pkgs; mercurialFull = mercurial.override { fullBuild = true; }; - merkaartor = libsForQt5.callPackage ../applications/misc/merkaartor { }; - mepo = callPackage ../applications/misc/mepo { }; meshcentral = callPackage ../tools/admin/meshcentral { }; From 4c86b69a15dd979aedce673b7bd4a2a0fab8441f Mon Sep 17 00:00:00 2001 From: Nikolay Korotkiy Date: Mon, 9 Sep 2024 00:53:42 +0400 Subject: [PATCH 3/3] merkaartor: nixfmt-rfc-style --- pkgs/by-name/me/merkaartor/package.nix | 48 ++++++++++++++++++-------- 1 file changed, 33 insertions(+), 15 deletions(-) diff --git a/pkgs/by-name/me/merkaartor/package.nix b/pkgs/by-name/me/merkaartor/package.nix index 03029a055a1b..198992988741 100644 --- a/pkgs/by-name/me/merkaartor/package.nix +++ b/pkgs/by-name/me/merkaartor/package.nix @@ -1,16 +1,21 @@ -{ lib -, stdenv -, fetchFromGitHub -, cmake -, pkg-config -, gdal -, proj -, protobuf -, qt5 -, withGeoimage ? true, exiv2 -, withGpsdlib ? (!stdenv.isDarwin), gpsd -, withLibproxy ? false, libproxy -, withZbar ? false, zbar +{ + lib, + stdenv, + fetchFromGitHub, + cmake, + pkg-config, + gdal, + proj, + protobuf, + qt5, + withGeoimage ? true, + exiv2, + withGpsdlib ? (!stdenv.isDarwin), + gpsd, + withLibproxy ? false, + libproxy, + withZbar ? false, + zbar, }: stdenv.mkDerivation rec { @@ -24,9 +29,22 @@ stdenv.mkDerivation rec { hash = "sha256-oxLGhIE1qJ9+GOztD1HvrLGRGVO3gyy7Rc6CyzKTFec="; }; - nativeBuildInputs = [ cmake pkg-config qt5.qttools qt5.wrapQtAppsHook ]; + nativeBuildInputs = [ + cmake + pkg-config + qt5.qttools + qt5.wrapQtAppsHook + ]; - buildInputs = [ gdal proj protobuf qt5.qtnetworkauth qt5.qtsvg qt5.qtwebengine ] + buildInputs = + [ + gdal + proj + protobuf + qt5.qtnetworkauth + qt5.qtsvg + qt5.qtwebengine + ] ++ lib.optional withGeoimage exiv2 ++ lib.optional withGpsdlib gpsd ++ lib.optional withLibproxy libproxy