2020-11-20 13:31:19 +00:00
|
|
|
{ stdenv, lib, fetchFromGitHub
|
|
|
|
, qtbase, qttools, qmake, wrapQtAppsHook
|
|
|
|
}:
|
2018-01-11 09:20:00 +00:00
|
|
|
|
2020-11-20 13:31:19 +00:00
|
|
|
stdenv.mkDerivation rec {
|
2019-08-15 13:41:18 +01:00
|
|
|
pname = "librepcb";
|
2020-11-05 18:14:58 +00:00
|
|
|
version = "0.1.5";
|
2018-01-11 09:20:00 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
2020-11-20 13:31:19 +00:00
|
|
|
owner = pname;
|
|
|
|
repo = pname;
|
|
|
|
rev = version;
|
2020-11-05 18:14:58 +00:00
|
|
|
sha256 = "0ag8h3id2c1k9ds22rfrvyhf2vjhkv82xnrdrz4n1hnlr9566vcx";
|
2020-11-20 13:31:19 +00:00
|
|
|
fetchSubmodules = true;
|
2018-01-11 09:20:00 +00:00
|
|
|
};
|
|
|
|
|
2019-10-09 13:59:48 +01:00
|
|
|
nativeBuildInputs = [ qmake qttools wrapQtAppsHook ];
|
2018-01-11 09:20:00 +00:00
|
|
|
buildInputs = [ qtbase ];
|
|
|
|
|
|
|
|
qmakeFlags = ["-r"];
|
2020-11-20 13:31:19 +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-03 00:03:37 +00:00
|
|
|
postPatch = ''
|
2020-11-20 13:31:19 +00:00
|
|
|
substituteInPlace ./libs/librepcb/common/common.pro \
|
|
|
|
--replace 'GIT_COMMIT_SHA' 'GIT_COMMIT_SHA="\\\"${src.rev}\\\"" # '
|
|
|
|
'';
|
2018-06-30 12:56:12 +01:00
|
|
|
|
2021-03-03 00:03:37 +00:00
|
|
|
postInstall = ''
|
|
|
|
mkdir -p $out/share/librepcb/fontobene
|
|
|
|
cp share/librepcb/fontobene/newstroke.bene $out/share/librepcb/fontobene/
|
2019-10-09 13:59:48 +01:00
|
|
|
'';
|
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2018-01-11 09:20:00 +00:00
|
|
|
description = "A free EDA software to develop printed circuit boards";
|
2020-11-20 13:31:19 +00:00
|
|
|
homepage = "https://librepcb.org/";
|
|
|
|
maintainers = with maintainers; [ luz thoughtpolice ];
|
2021-03-03 00:03:37 +00:00
|
|
|
license = licenses.gpl3Plus;
|
2020-11-20 13:31:19 +00:00
|
|
|
platforms = platforms.linux;
|
2018-01-11 09:20:00 +00:00
|
|
|
};
|
|
|
|
}
|