treesheets: add darwin support

This commit is contained in:
Weijia Wang 2022-10-08 20:25:01 +02:00
parent a989aa4619
commit 3d675948c5
2 changed files with 17 additions and 3 deletions

View File

@ -1,10 +1,12 @@
{ lib
, stdenv
, fetchFromGitHub
, wxGTK
, cmake
, ninja
, wrapGAppsHook
, makeWrapper
, wxGTK
, Cocoa
, unstableGitUpdater
}:
@ -23,14 +25,25 @@ stdenv.mkDerivation rec {
cmake
ninja
wrapGAppsHook
makeWrapper
];
buildInputs = [
wxGTK
] ++ lib.optionals stdenv.isDarwin [
Cocoa
];
NIX_CFLAGS_COMPILE = "-DPACKAGE_VERSION=\"${builtins.replaceStrings [ "unstable-" ] [ "" ] version}\"";
postInstall = lib.optionalString stdenv.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
'';
passthru = {
updateScript = unstableGitUpdater { };
};
@ -49,7 +62,7 @@ stdenv.mkDerivation rec {
homepage = "https://strlen.com/treesheets/";
maintainers = with maintainers; [ obadz avery ];
platforms = platforms.linux;
platforms = platforms.unix;
license = licenses.zlib;
};
}

View File

@ -31892,7 +31892,8 @@ with pkgs;
tree = callPackage ../tools/system/tree {};
treesheets = callPackage ../applications/office/treesheets {
wxGTK = wxGTK31-gtk3;
wxGTK = wxGTK32;
inherit (darwin.apple_sdk.frameworks) Cocoa;
};
tremc = callPackage ../applications/networking/p2p/tremc { };