Skip to content

Commit

Permalink
treesheets: fix darwin build
Browse files Browse the repository at this point in the history
  • Loading branch information
wegank committed Dec 5, 2024
1 parent 3ac4e33 commit 72d4d09
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 15 deletions.
17 changes: 6 additions & 11 deletions pkgs/applications/office/treesheets/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,7 @@
, ninja
, wrapGAppsHook3
, makeWrapper
, wxGTK
, Cocoa
, wxGTK32
, unstableGitUpdater
}:

Expand All @@ -29,19 +28,15 @@ stdenv.mkDerivation rec {
];

buildInputs = [
wxGTK
] ++ lib.optionals stdenv.hostPlatform.isDarwin [
Cocoa
wxGTK32
];

env.NIX_CFLAGS_COMPILE = "-DPACKAGE_VERSION=\"${builtins.replaceStrings [ "unstable-" ] [ "" ] version}\"";

postInstall = lib.optionalString stdenv.hostPlatform.isDarwin ''
shopt -s extglob
mkdir -p $out/{share/treesheets,bin}
mv $out/!(share) $out/share/treesheets
makeWrapper $out/{share/treesheets,bin}/treesheets \
--chdir $out/share/treesheets
mkdir -p $out/{Applications,bin}
mv $out/TreeSheets.app $out/Applications
makeWrapper $out/Applications/TreeSheets.app/Contents/MacOS/TreeSheets $out/bin/TreeSheets
'';

passthru = {
Expand All @@ -52,7 +47,7 @@ stdenv.mkDerivation rec {

meta = with lib; {
description = "Free Form Data Organizer";
mainProgram = "treesheets";
mainProgram = "TreeSheets";

longDescription = ''
The ultimate replacement for spreadsheets, mind mappers, outliners,
Expand Down
5 changes: 1 addition & 4 deletions pkgs/top-level/all-packages.nix
Original file line number Diff line number Diff line change
Expand Up @@ -15851,10 +15851,7 @@ with pkgs;
wlroots = wlroots_0_18;
};

treesheets = callPackage ../applications/office/treesheets {
wxGTK = wxGTK32;
inherit (darwin.apple_sdk.frameworks) Cocoa;
};
treesheets = callPackage ../applications/office/treesheets { };

trojita = libsForQt5.callPackage ../applications/networking/mailreaders/trojita { };

Expand Down

0 comments on commit 72d4d09

Please sign in to comment.