Unverified Commit 0b07ca72 authored by Nikolay Korotkiy's avatar Nikolay Korotkiy
Browse files

librecad: adopt, modernize, migrate to by-name

parent 908a2adf
Loading
Loading
Loading
Loading
+16 −22
Original line number Diff line number Diff line
{
  lib,
  stdenv,
  boost,
  fetchFromGitHub,
  installShellFiles,
  mkDerivation,
  muparser,
  pkg-config,
  qmake,
  qtbase,
  qtsvg,
  qttools,
  runtimeShell,
  qt5,
}:

mkDerivation rec {
stdenv.mkDerivation (finalAttrs: {
  pname = "librecad";
  version = "2.2.1";

  src = fetchFromGitHub {
    owner = "LibreCAD";
    repo = "LibreCAD";
    rev = version;
    sha256 = "sha256-GBn4lduzaKWEWzeTNjC9TpioSouVj+jVl32PLjc8FBc=";
    tag = "v${finalAttrs.version}";
    hash = "sha256-GBn4lduzaKWEWzeTNjC9TpioSouVj+jVl32PLjc8FBc=";
  };

  buildInputs = [
    boost
    muparser
    qtbase
    qtsvg
    qt5.qtbase
    qt5.qtsvg
  ];

  nativeBuildInputs = [
    installShellFiles
    pkg-config
    qmake
    qttools
    qt5.qmake
    qt5.qttools
    qt5.wrapQtAppsHook
  ];

  qmakeFlags = [
@@ -44,11 +41,8 @@ mkDerivation rec {
  ];

  postPatch = ''
    substituteInPlace scripts/postprocess-unix.sh \
      --replace /bin/sh ${runtimeShell}

    substituteInPlace librecad/src/main/qc_applicationwindow.cpp \
      --replace __DATE__ 0
      --replace-warn __DATE__ 0
  '';

  installPhase = ''
@@ -68,11 +62,11 @@ mkDerivation rec {
    runHook postInstall
  '';

  meta = with lib; {
  meta = {
    description = "2D CAD package based on Qt";
    homepage = "https://librecad.org";
    license = licenses.gpl2Only;
    maintainers = [ ];
    platforms = platforms.linux;
    license = lib.licenses.gpl2Only;
    maintainers = with lib.maintainers; [ sikmir ];
    platforms = lib.platforms.linux;
  };
}
})
+0 −2
Original line number Diff line number Diff line
@@ -14272,8 +14272,6 @@ with pkgs;
  libkiwix = callPackage ../applications/misc/kiwix/lib.nix { };
  librecad = libsForQt5.callPackage ../applications/misc/librecad { };
  libreoffice-bin = callPackage ../applications/office/libreoffice/darwin { };
  libreoffice = hiPrio libreoffice-still;