mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-03 20:33:21 +00:00
571c71e6f7
We are migrating packages that meet below requirements: 1. using `callPackage` 2. called path is a directory 3. overriding set is empty (`{ }`) 4. not containing path expressions other than relative path (to makenixpkgs-vet happy) 5. not referenced by nix files outside of the directory, other than`pkgs/top-level/all-packages.nix` 6. not referencing nix files outside of the directory 7. not referencing `default.nix` (since it's changed to `package.nix`) 8. `outPath` doesn't change after migration The tool is here: https://github.com/Aleksanaa/by-name-migrate.
69 lines
1.9 KiB
Nix
69 lines
1.9 KiB
Nix
{ lib
|
|
, stdenv
|
|
, fetchFromGitHub
|
|
, cmake
|
|
, darwin
|
|
, makeWrapper
|
|
, shared-mime-info
|
|
, boost
|
|
, wxGTK32
|
|
}:
|
|
|
|
stdenv.mkDerivation (finalAttrs: {
|
|
pname = "wxformbuilder";
|
|
version = "4.2.1";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "wxFormBuilder";
|
|
repo = "wxFormBuilder";
|
|
rev = "v${finalAttrs.version}";
|
|
fetchSubmodules = true;
|
|
leaveDotGit = true;
|
|
postFetch = ''
|
|
substituteInPlace $out/.git-properties \
|
|
--replace-fail "\$Format:%h\$" "$(git -C $out rev-parse --short HEAD)" \
|
|
--replace-fail "\$Format:%(describe)\$" "$(git -C $out rev-parse --short HEAD)"
|
|
rm -rf $out/.git
|
|
'';
|
|
hash = "sha256-e0oYyUv8EjGDVj/TWx2jGaj22YyFJf1xa6lredV1J0Y=";
|
|
};
|
|
|
|
postPatch = ''
|
|
substituteInPlace third_party/tinyxml2/cmake/tinyxml2.pc.in \
|
|
--replace-fail '$'{exec_prefix}/@CMAKE_INSTALL_LIBDIR@ @CMAKE_INSTALL_FULL_LIBDIR@ \
|
|
--replace-fail '$'{prefix}/@CMAKE_INSTALL_INCLUDEDIR@ @CMAKE_INSTALL_FULL_INCLUDEDIR@
|
|
sed -i '/fixup_bundle/d' cmake/macros.cmake
|
|
'';
|
|
|
|
nativeBuildInputs = [
|
|
cmake
|
|
] ++ lib.optionals stdenv.hostPlatform.isDarwin [
|
|
darwin.sigtool
|
|
makeWrapper
|
|
] ++ lib.optionals stdenv.hostPlatform.isLinux [
|
|
shared-mime-info
|
|
];
|
|
|
|
buildInputs = [
|
|
boost
|
|
wxGTK32
|
|
] ++ lib.optionals stdenv.hostPlatform.isDarwin [
|
|
darwin.apple_sdk.frameworks.Cocoa
|
|
];
|
|
|
|
postInstall = lib.optionalString stdenv.hostPlatform.isDarwin ''
|
|
mkdir -p $out/{Applications,bin}
|
|
mv $out/wxFormBuilder.app $out/Applications
|
|
makeWrapper $out/Applications/wxFormBuilder.app/Contents/MacOS/wxFormBuilder $out/bin/wxformbuilder
|
|
'';
|
|
|
|
meta = with lib; {
|
|
description = "RAD tool for wxWidgets GUI design";
|
|
homepage = "https://github.com/wxFormBuilder/wxFormBuilder";
|
|
license = licenses.gpl2Only;
|
|
mainProgram = "wxformbuilder";
|
|
maintainers = with maintainers; [ matthuszagh wegank ];
|
|
platforms = platforms.unix;
|
|
};
|
|
})
|