Merge pull request #195114 from wegank/treesheets-darwin

treesheets: add darwin support
This commit is contained in:
Robert Scott 2022-10-08 20:19:50 +01:00 committed by GitHub
commit dfe4cc1d91
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
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

@ -31953,7 +31953,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 { };