<commit_before>{ stdenv, fetchurl, qt4, qmake4Hook, muparser, which, boost, pkgconfig }:

stdenv.mkDerivation rec {
  version = "2.1.3";
  name = "librecad-${version}";

  src = fetchurl {
    url = "https://github.com/LibreCAD/LibreCAD/tarball/${version}";
    name = name + ".tar.gz";
    sha256 = "1czp8bja61hfav2m7184cq1np1n76w3w6vn0hlkp81hhz9zc62sx";
  };

  patchPhase = ''
    sed -i -e s,/bin/bash,`type -P bash`, scripts/postprocess-unix.sh
    sed -i -e s,/usr/share,$out/share, librecad/src/lib/engine/rs_system.cpp
  '';

  qmakeFlags = [ "MUPARSER_DIR=${muparser}" "BOOST_DIR=${boost.dev}" ];

  installPhase = ''
    mkdir -p $out/bin $out/share
    cp -R unix/librecad $out/bin<commit_msg>librecad: add .desktop file and icon<commit_after>{ stdenv, fetchurl, qt4, qmake4Hook, muparser, which, boost, pkgconfig }:

stdenv.mkDerivation rec {
  version = "2.1.3";
  name = "librecad-${version}";

  src = fetchurl {
    url = "https://github.com/LibreCAD/LibreCAD/tarball/${version}";
    name = name + ".tar.gz";
    sha256 = "1czp8bja61hfav2m7184cq1np1n76w3w6vn0hlkp81hhz9zc62sx";
  };

  patchPhase = ''
    sed -i -e s,/bin/bash,`type -P bash`, scripts/postprocess-unix.sh
    sed -i -e s,/usr/share,$out/share, librecad/src/lib/engine/rs_system.cpp
  '';

  qmakeFlags = [ "MUPARSER_DIR=${muparser}" "BOOST_DIR=${boost.dev}" ];

  installPhase = ''
    install -m 555 -D unix/librecad $out/bin/librecad
    install -m 444 -D desktop/librecad.desktop $out/share/applications/librecad.desktop
    install -m 444 -D desktop/librecad.sharedmimeinfo $out/share/mime/packages/librecad.xml
    install -m 444 -D desktop/graphics_icons_and_splash/Icon\ LibreCAD/Icon_Librecad.svg \
      $out/share/icons/hicolor/scalable/apps/librecad.svg
{'fraction_non_alphanumeric': 0.15789473684210525, 'fraction_numerical': 0.04004576659038902, 'mean_word_length': 3.626984126984127, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 1}, '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': '2968744', 'n_tokens_mistral': 772, 'n_tokens_neox': 707, 'n_words': 119}