2022-10-30 15:09:59 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
2020-09-25 04:45:31 +00:00
|
|
|
, fetchFromGitHub
|
2022-10-30 15:09:59 +00:00
|
|
|
, cmake
|
2023-05-24 13:37:59 +00:00
|
|
|
, darwin
|
2022-10-30 15:09:59 +00:00
|
|
|
, makeWrapper
|
|
|
|
, shared-mime-info
|
|
|
|
, boost
|
2023-05-24 13:37:59 +00:00
|
|
|
, wxGTK32
|
2020-09-25 04:45:31 +00:00
|
|
|
}:
|
|
|
|
|
2023-05-24 13:37:59 +00:00
|
|
|
stdenv.mkDerivation (finalAttrs: {
|
2023-10-09 19:29:22 +00:00
|
|
|
pname = "wxformbuilder";
|
2024-06-20 14:57:18 +00:00
|
|
|
version = "4.2.1";
|
2020-09-25 04:45:31 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "wxFormBuilder";
|
|
|
|
repo = "wxFormBuilder";
|
2024-01-02 11:29:13 +00:00
|
|
|
rev = "v${finalAttrs.version}";
|
2020-09-25 04:45:31 +00:00
|
|
|
fetchSubmodules = true;
|
2024-01-02 11:29:13 +00:00
|
|
|
leaveDotGit = true;
|
|
|
|
postFetch = ''
|
|
|
|
substituteInPlace $out/.git-properties \
|
2024-06-20 14:57:18 +00:00
|
|
|
--replace-fail "\$Format:%h\$" "$(git -C $out rev-parse --short HEAD)" \
|
|
|
|
--replace-fail "\$Format:%(describe)\$" "$(git -C $out rev-parse --short HEAD)"
|
2024-01-02 11:29:13 +00:00
|
|
|
rm -rf $out/.git
|
|
|
|
'';
|
2024-06-20 14:57:18 +00:00
|
|
|
hash = "sha256-e0oYyUv8EjGDVj/TWx2jGaj22YyFJf1xa6lredV1J0Y=";
|
2020-09-25 04:45:31 +00:00
|
|
|
};
|
|
|
|
|
2023-05-24 13:37:59 +00:00
|
|
|
postPatch = ''
|
2024-01-02 11:29:13 +00:00
|
|
|
substituteInPlace third_party/tinyxml2/cmake/tinyxml2.pc.in \
|
2024-06-20 14:57:18 +00:00
|
|
|
--replace-fail '$'{exec_prefix}/@CMAKE_INSTALL_LIBDIR@ @CMAKE_INSTALL_FULL_LIBDIR@ \
|
|
|
|
--replace-fail '$'{prefix}/@CMAKE_INSTALL_INCLUDEDIR@ @CMAKE_INSTALL_FULL_INCLUDEDIR@
|
2023-05-24 13:37:59 +00:00
|
|
|
sed -i '/fixup_bundle/d' cmake/macros.cmake
|
|
|
|
'';
|
|
|
|
|
2020-09-25 04:45:31 +00:00
|
|
|
nativeBuildInputs = [
|
2022-10-30 15:09:59 +00:00
|
|
|
cmake
|
2024-09-26 11:04:55 +00:00
|
|
|
] ++ lib.optionals stdenv.hostPlatform.isDarwin [
|
2023-05-24 13:37:59 +00:00
|
|
|
darwin.sigtool
|
2022-10-30 15:09:59 +00:00
|
|
|
makeWrapper
|
2024-09-26 11:04:55 +00:00
|
|
|
] ++ lib.optionals stdenv.hostPlatform.isLinux [
|
2022-10-30 15:09:59 +00:00
|
|
|
shared-mime-info
|
2020-09-25 04:45:31 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
buildInputs = [
|
2022-10-30 15:09:59 +00:00
|
|
|
boost
|
2023-05-24 13:37:59 +00:00
|
|
|
wxGTK32
|
2024-09-26 11:04:55 +00:00
|
|
|
] ++ lib.optionals stdenv.hostPlatform.isDarwin [
|
2023-05-24 13:37:59 +00:00
|
|
|
darwin.apple_sdk.frameworks.Cocoa
|
2020-09-25 04:45:31 +00:00
|
|
|
];
|
|
|
|
|
2024-09-26 11:04:55 +00:00
|
|
|
postInstall = lib.optionalString stdenv.hostPlatform.isDarwin ''
|
2022-10-30 15:09:59 +00:00
|
|
|
mkdir -p $out/{Applications,bin}
|
|
|
|
mv $out/wxFormBuilder.app $out/Applications
|
2023-10-09 19:29:22 +00:00
|
|
|
makeWrapper $out/Applications/wxFormBuilder.app/Contents/MacOS/wxFormBuilder $out/bin/wxformbuilder
|
2022-10-30 15:09:59 +00:00
|
|
|
'';
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-09-25 04:45:31 +00:00
|
|
|
description = "RAD tool for wxWidgets GUI design";
|
|
|
|
homepage = "https://github.com/wxFormBuilder/wxFormBuilder";
|
2022-10-30 15:09:59 +00:00
|
|
|
license = licenses.gpl2Only;
|
2023-10-09 19:29:22 +00:00
|
|
|
mainProgram = "wxformbuilder";
|
2022-10-30 15:09:59 +00:00
|
|
|
maintainers = with maintainers; [ matthuszagh wegank ];
|
2022-12-17 10:02:37 +00:00
|
|
|
platforms = platforms.unix;
|
2020-09-25 04:45:31 +00:00
|
|
|
};
|
2023-05-24 13:37:59 +00:00
|
|
|
})
|