mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-01-07 21:43:32 +00:00
4f0dadbf38
After final improvements to the official formatter implementation, this commit now performs the first treewide reformat of Nix files using it. This is part of the implementation of RFC 166. Only "inactive" files are reformatted, meaning only files that aren't being touched by any PR with activity in the past 2 months. This is to avoid conflicts for PRs that might soon be merged. Later we can do a full treewide reformat to get the rest, which should not cause as many conflicts. A CI check has already been running for some time to ensure that new and already-formatted files are formatted, so the files being reformatted here should also stay formatted. This commit was automatically created and can be verified using nix-builda08b3a4d19
.tar.gz \ --argstr baseRevb32a094368
result/bin/apply-formatting $NIXPKGS_PATH
91 lines
2.0 KiB
Nix
91 lines
2.0 KiB
Nix
{
|
|
stdenv,
|
|
lib,
|
|
fetchFromGitHub,
|
|
fetchpatch,
|
|
gitUpdater,
|
|
cmake,
|
|
pkg-config,
|
|
python3,
|
|
SDL2,
|
|
fontconfig,
|
|
gtk3,
|
|
wrapGAppsHook3,
|
|
darwin,
|
|
}:
|
|
|
|
let
|
|
inherit (darwin.apple_sdk.frameworks) Cocoa;
|
|
in
|
|
stdenv.mkDerivation rec {
|
|
pname = "openboardview";
|
|
version = "9.95.0";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "OpenBoardView";
|
|
repo = "OpenBoardView";
|
|
rev = version;
|
|
hash = "sha256-sKDDOPpCagk7rBRlMlZhx+RYYbtoLzJsrnL8qKZMKW8=";
|
|
fetchSubmodules = true;
|
|
};
|
|
|
|
patches = [
|
|
# Fix gcc-13 build failure
|
|
(fetchpatch {
|
|
name = "gcc-13.patch";
|
|
url = "https://github.com/OpenBoardView/OpenBoardView/commit/b03d0f69ec1611f5eb93f81291b4ba8c58cd29eb.patch";
|
|
hash = "sha256-Hp7KgzulPC2bPtRsd6HJrTLu0oVoQEoBHl0p2DcOLQw=";
|
|
})
|
|
];
|
|
|
|
nativeBuildInputs = [
|
|
cmake
|
|
pkg-config
|
|
python3
|
|
wrapGAppsHook3
|
|
];
|
|
buildInputs =
|
|
[
|
|
SDL2
|
|
fontconfig
|
|
gtk3
|
|
]
|
|
++ lib.optionals stdenv.hostPlatform.isDarwin [
|
|
Cocoa
|
|
];
|
|
|
|
postPatch = ''
|
|
substituteInPlace src/openboardview/CMakeLists.txt \
|
|
--replace "SDL2::SDL2main" ""
|
|
substituteInPlace CMakeLists.txt --replace "fixup_bundle" "#fixup_bundle"
|
|
'';
|
|
|
|
cmakeFlags = [
|
|
"-DGLAD_REPRODUCIBLE=On"
|
|
];
|
|
|
|
dontWrapGApps = true;
|
|
postFixup =
|
|
lib.optionalString stdenv.hostPlatform.isDarwin ''
|
|
mkdir -p "$out/Applications"
|
|
mv "$out/openboardview.app" "$out/Applications/OpenBoardView.app"
|
|
''
|
|
+ lib.optionalString (!stdenv.hostPlatform.isDarwin) ''
|
|
wrapGApp "$out/bin/${pname}" \
|
|
--prefix LD_LIBRARY_PATH : ${lib.makeLibraryPath [ gtk3 ]}
|
|
'';
|
|
|
|
passthru.updateScript = gitUpdater {
|
|
ignoredVersions = ''.*\.90\..*'';
|
|
};
|
|
|
|
meta = with lib; {
|
|
description = "Linux SDL/ImGui edition software for viewing .brd files";
|
|
mainProgram = "openboardview";
|
|
homepage = "https://github.com/OpenBoardView/OpenBoardView";
|
|
license = licenses.mit;
|
|
platforms = platforms.unix;
|
|
maintainers = with maintainers; [ k3a ];
|
|
};
|
|
}
|