diff options
Diffstat (limited to 'nixpkgs/pkgs/development/libraries/libredwg/default.nix')
-rw-r--r-- | nixpkgs/pkgs/development/libraries/libredwg/default.nix | 36 |
1 files changed, 30 insertions, 6 deletions
diff --git a/nixpkgs/pkgs/development/libraries/libredwg/default.nix b/nixpkgs/pkgs/development/libraries/libredwg/default.nix index 4a7a125d3ee1..8a01ace46415 100644 --- a/nixpkgs/pkgs/development/libraries/libredwg/default.nix +++ b/nixpkgs/pkgs/development/libraries/libredwg/default.nix @@ -1,21 +1,46 @@ -{ lib, stdenv, fetchFromGitHub, autoreconfHook, pkg-config, texinfo, pcre2 -, enablePython ? false, python ? null, swig, libxml2, ncurses +{ lib +, stdenv +, fetchFromGitHub +, autoreconfHook +, writeShellScript +, pkg-config +, texinfo +, pcre2 +, swig +, libxml2 +, ncurses +, enablePython ? false +, python ? null }: let isPython3 = enablePython && python.pythonAtLeast "3"; in stdenv.mkDerivation rec { pname = "libredwg"; - version = "0.12.4"; + version = "0.12.5"; src = fetchFromGitHub { owner = "LibreDWG"; repo = pname; rev = version; - sha256 = "sha256-CZZ5/uCls2tY3PKmD+hBBvp7d7KX8nZuCPf03sa4iXc="; + sha256 = "sha256-s9aiOKSM7+3LJNE+jRrEMcL1QKRWrlTKbwO7oL9VhuE="; fetchSubmodules = true; }; + postPatch = let + printVersion = writeShellScript "print-version" '' + echo ${lib.escapeShellArg version} + ''; + in '' + # avoid git dependency + cp ${printVersion} build-aux/git-version-gen + ''; + + preConfigure = lib.optionalString (stdenv.isDarwin && enablePython) '' + # prevent configure picking up stack_size from distutils.sysconfig + export PYTHON_EXTRA_LDFLAGS=" " + ''; + nativeBuildInputs = [ autoreconfHook pkg-config texinfo ] ++ lib.optional enablePython swig; @@ -31,10 +56,9 @@ stdenv.mkDerivation rec { doCheck = true; # the "xmlsuite" test requires the libxml2 c library as well as the python module - checkInputs = lib.optionals enablePython [ libxml2 libxml2.dev ]; + nativeCheckInputs = lib.optionals enablePython [ libxml2 libxml2.dev ]; meta = with lib; { - broken = stdenv.isDarwin; description = "Free implementation of the DWG file format"; homepage = "https://savannah.gnu.org/projects/libredwg/"; maintainers = with maintainers; [ tweber ]; |