From e357df0063b76e99268602e49c204e03714380e1 Mon Sep 17 00:00:00 2001 From: Raphael Robatsch Date: Mon, 7 Nov 2022 17:21:12 +0100 Subject: [PATCH] nanodbc: 2.13.0 -> 2.14.0 and fix build --- .../development/libraries/nanodbc/default.nix | 19 +++++++------------ 1 file changed, 7 insertions(+), 12 deletions(-) diff --git a/pkgs/development/libraries/nanodbc/default.nix b/pkgs/development/libraries/nanodbc/default.nix index 64f362e35202..7fca00c1d459 100644 --- a/pkgs/development/libraries/nanodbc/default.nix +++ b/pkgs/development/libraries/nanodbc/default.nix @@ -1,16 +1,20 @@ -{ lib, stdenv, fetchFromGitHub, cmake, unixODBC }: +{ lib, stdenv, fetchFromGitHub, catch2, cmake, unixODBC }: stdenv.mkDerivation rec { pname = "nanodbc"; - version = "2.13.0"; + version = "2.14.0"; src = fetchFromGitHub { owner = "nanodbc"; repo = "nanodbc"; rev = "v${version}"; - sha256 = "1q80p7yv9mcl4hyvnvcjdr70y8nc940ypf368lp97vpqn5yckkgm"; + hash = "sha256-dVUOwA7LfLqcQq2nc6OAha0krmgTy5RUHupBVrNdo4g="; }; + postPatch = '' + cp ${catch2}/include/catch2/catch.hpp test/catch/catch.hpp + ''; + nativeBuildInputs = [ cmake ]; buildInputs = [ unixODBC ]; @@ -20,15 +24,6 @@ stdenv.mkDerivation rec { else [ "-DBUILD_SHARED_LIBS=ON" ]; - # fix compilation on macOS - # https://github.com/nanodbc/nanodbc/issues/274 - # remove after the next version update - postUnpack = if stdenv.isDarwin then '' - mv $sourceRoot/VERSION $sourceRoot/VERSION.txt - substituteInPlace $sourceRoot/CMakeLists.txt \ - --replace 'file(STRINGS VERSION' 'file(STRINGS VERSION.txt' - '' else ""; - meta = with lib; { homepage = "https://github.com/nanodbc/nanodbc"; changelog = "https://github.com/nanodbc/nanodbc/raw/v${version}/CHANGELOG.md";