<commit_before>/*
To use aditional parts libraries
set the variable LEOCAD_LIB=/path/to/libs/ or use option -l /path/to/libs/
*/

{ stdenv, fetchFromGitHub, qt4, qmake4Hook, zlib }:

stdenv.mkDerivation rec {
  name = "leocad-${version}";
  version = "17.02";

  src = fetchFromGitHub {
    owner = "leozide";
    repo = "leocad";
    rev = "v${version}";
    sha256 = "0d7l2il6r4swnmrmaf1bsrgpjgai5xwhwk2mkpcsddnk59790mmc";
  };

  nativeBuildInputs = [ qmake4Hook ];
  buildInputs = [ qt4 zlib ];
  postPatch = ''
    sed '1i#include <cmath>' -i common/camera.cpp
    substituteInPlace common/camera.cpp --replace "isnan(" "std::isnan("
    export qmakeFlags="$qmakeFlags INSTALL_PREFIX=$out"
   '';

  meta = with stdenv.lib; {
    description = "CAD program for creating virtual LEGO models";
    homepage = http://www.leocad.org/;
    license = licenses.gpl2;
    inherit (qt4.meta) platforms;
  };
}
<commit_msg>leocad: remove unnessary patches<commit_after>/*
To use aditional parts libraries
set the variable LEOCAD_LIB=/path/to/libs/ or use option -l /path/to/libs/
*/

{ stdenv, fetchFromGitHub, qt4, qmake4Hook, zlib }:

stdenv.mkDerivation rec {
  name = "leocad-${version}";
  version = "17.02";

  src = fetchFromGitHub {
    owner = "leozide";
    repo = "leocad";
    rev = "v${version}";
    sha256 = "0d7l2il6r4swnmrmaf1bsrgpjgai5xwhwk2mkpcsddnk59790mmc";
  };

  nativeBuildInputs = [ qmake4Hook ];
  buildInputs = [ qt4 zlib ];
  postPatch = ''
    export qmakeFlags="$qmakeFlags INSTALL_PREFIX=$out"
  '';

  meta = with stdenv.lib; {
    description = "CAD program for creating virtual LEGO models";
    homepage = http://www.leocad.org/;
    license = licenses.gpl2;
    inherit (qt4.meta) platforms;
  };
}

{'fraction_non_alphanumeric': 0.1369150779896014, 'fraction_numerical': 0.030618139803581745, 'mean_word_length': 3.557894736842105, 'pattern_counts': {'":': 0, '<': 4, '<?xml version=': 0, '>': 4, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2226357', 'n_tokens_mistral': 700, 'n_tokens_neox': 666, 'n_words': 139}