Merge pull request #200048 from raphaelr/nanodbc
This commit is contained in:
commit
a12791de20
1 changed files with 7 additions and 12 deletions
|
@ -1,16 +1,20 @@
|
||||||
{ lib, stdenv, fetchFromGitHub, cmake, unixODBC }:
|
{ lib, stdenv, fetchFromGitHub, catch2, cmake, unixODBC }:
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
pname = "nanodbc";
|
pname = "nanodbc";
|
||||||
version = "2.13.0";
|
version = "2.14.0";
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "nanodbc";
|
owner = "nanodbc";
|
||||||
repo = "nanodbc";
|
repo = "nanodbc";
|
||||||
rev = "v${version}";
|
rev = "v${version}";
|
||||||
sha256 = "1q80p7yv9mcl4hyvnvcjdr70y8nc940ypf368lp97vpqn5yckkgm";
|
hash = "sha256-dVUOwA7LfLqcQq2nc6OAha0krmgTy5RUHupBVrNdo4g=";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
postPatch = ''
|
||||||
|
cp ${catch2}/include/catch2/catch.hpp test/catch/catch.hpp
|
||||||
|
'';
|
||||||
|
|
||||||
nativeBuildInputs = [ cmake ];
|
nativeBuildInputs = [ cmake ];
|
||||||
|
|
||||||
buildInputs = [ unixODBC ];
|
buildInputs = [ unixODBC ];
|
||||||
|
@ -20,15 +24,6 @@ stdenv.mkDerivation rec {
|
||||||
else
|
else
|
||||||
[ "-DBUILD_SHARED_LIBS=ON" ];
|
[ "-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; {
|
meta = with lib; {
|
||||||
homepage = "https://github.com/nanodbc/nanodbc";
|
homepage = "https://github.com/nanodbc/nanodbc";
|
||||||
changelog = "https://github.com/nanodbc/nanodbc/raw/v${version}/CHANGELOG.md";
|
changelog = "https://github.com/nanodbc/nanodbc/raw/v${version}/CHANGELOG.md";
|
||||||
|
|
Loading…
Reference in a new issue