From 8571a669a7e0b77313221e273f4fc19ca4cd624f Mon Sep 17 00:00:00 2001 From: Ioannis Koutras Date: Sat, 2 Mar 2019 13:07:52 +0200 Subject: [PATCH 1/2] pugixml: use fetchFromGitHub --- pkgs/development/libraries/pugixml/default.nix | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/pkgs/development/libraries/pugixml/default.nix b/pkgs/development/libraries/pugixml/default.nix index 19d1328d6bfb..cd774ad85165 100644 --- a/pkgs/development/libraries/pugixml/default.nix +++ b/pkgs/development/libraries/pugixml/default.nix @@ -1,12 +1,14 @@ -{ stdenv, fetchurl, cmake, shared ? false }: +{ stdenv, fetchFromGitHub, cmake, shared ? false }: stdenv.mkDerivation rec { name = "pugixml-${version}"; version = "1.9"; - src = fetchurl { - url = "https://github.com/zeux/pugixml/releases/download/v${version}/${name}.tar.gz"; - sha256 = "19nv3zhik3djp4blc4vrjwrl8dfhzmal8b21sq7y907nhddx6mni"; + src = fetchFromGitHub { + owner = "zeux"; + repo = "pugixml"; + rev = "v${version}"; + sha256 = "0iraznwm78pyyzc9snvd3dyz8gddvmxsm1b3kpw7wixkvcawdviv"; }; nativeBuildInputs = [ cmake ]; From 236c7db82ceae53fbf9adf729e4aed9bdada020b Mon Sep 17 00:00:00 2001 From: Ioannis Koutras Date: Sat, 2 Mar 2019 13:13:26 +0200 Subject: [PATCH 2/2] pugixml: fix pkg-config file installation --- pkgs/development/libraries/pugixml/default.nix | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/pkgs/development/libraries/pugixml/default.nix b/pkgs/development/libraries/pugixml/default.nix index cd774ad85165..74c6e8ef1b30 100644 --- a/pkgs/development/libraries/pugixml/default.nix +++ b/pkgs/development/libraries/pugixml/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchFromGitHub, cmake, shared ? false }: +{ stdenv, fetchFromGitHub, fetchpatch, cmake, shared ? false }: stdenv.mkDerivation rec { name = "pugixml-${version}"; @@ -11,9 +11,17 @@ stdenv.mkDerivation rec { sha256 = "0iraznwm78pyyzc9snvd3dyz8gddvmxsm1b3kpw7wixkvcawdviv"; }; + patches = [ + # To be removed after a version newer than 1.9 is released + (fetchpatch { + url = "https://github.com/zeux/pugixml/pull/193.patch"; + sha256 = "0s4anqlr2ppfibxyl29nrqbcprrg89k7il6303dm91s6620ydmka"; + }) + ]; + nativeBuildInputs = [ cmake ]; - cmakeFlags = [ "-DBUILD_SHARED_LIBS=${if shared then "ON" else "OFF"} -DBUILD_PKGCONFIG=ON" ]; + cmakeFlags = [ "-DBUILD_SHARED_LIBS=${if shared then "ON" else "OFF"}" ]; preConfigure = '' # Enable long long support (required for filezilla)