2020-11-21 19:51:51 +00:00
|
|
|
{ stdenv, lib, fetchFromGitHub
|
|
|
|
, qtbase, qttools, qmake, wrapQtAppsHook
|
|
|
|
}:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2020-11-21 19:51:51 +00:00
|
|
|
stdenv.mkDerivation rec {
|
2020-04-24 23:36:52 +00:00
|
|
|
pname = "librepcb";
|
2020-11-09 15:59:12 +00:00
|
|
|
version = "0.1.5";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
2020-11-21 19:51:51 +00:00
|
|
|
owner = pname;
|
|
|
|
repo = pname;
|
|
|
|
rev = version;
|
2020-11-09 15:59:12 +00:00
|
|
|
sha256 = "0ag8h3id2c1k9ds22rfrvyhf2vjhkv82xnrdrz4n1hnlr9566vcx";
|
2020-11-21 19:51:51 +00:00
|
|
|
fetchSubmodules = true;
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [ qmake qttools wrapQtAppsHook ];
|
|
|
|
buildInputs = [ qtbase ];
|
|
|
|
|
|
|
|
qmakeFlags = ["-r"];
|
2020-11-21 19:51:51 +00:00
|
|
|
|
|
|
|
# the build system tries to use 'git' at build time to find the HEAD hash.
|
|
|
|
# that's a no-no, so replace it with a quick hack. NOTE: the # adds a comment
|
|
|
|
# at the end of the line to remove the git call.
|
2021-03-09 03:18:52 +00:00
|
|
|
postPatch = ''
|
2020-11-21 19:51:51 +00:00
|
|
|
substituteInPlace ./libs/librepcb/common/common.pro \
|
|
|
|
--replace 'GIT_COMMIT_SHA' 'GIT_COMMIT_SHA="\\\"${src.rev}\\\"" # '
|
|
|
|
'';
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-03-09 03:18:52 +00:00
|
|
|
postInstall = ''
|
|
|
|
mkdir -p $out/share/librepcb/fontobene
|
|
|
|
cp share/librepcb/fontobene/newstroke.bene $out/share/librepcb/fontobene/
|
2020-04-24 23:36:52 +00:00
|
|
|
'';
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "A free EDA software to develop printed circuit boards";
|
2020-11-21 19:51:51 +00:00
|
|
|
homepage = "https://librepcb.org/";
|
|
|
|
maintainers = with maintainers; [ luz thoughtpolice ];
|
2021-03-09 03:18:52 +00:00
|
|
|
license = licenses.gpl3Plus;
|
2020-11-21 19:51:51 +00:00
|
|
|
platforms = platforms.linux;
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|