Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pkgs: add darwin support to theseus #9

Merged
merged 1 commit into from
Aug 6, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions garnix.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@ builds:
include:
- "packages.x86_64-linux.*"
- "packages.aarch64-linux.*"
- "packages.aarch64-darwin.theseus"
5 changes: 4 additions & 1 deletion pkgs/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,10 @@ in {
fastfetch = callPackage ./fastfetch.nix {};
huion = callPackage ./huion.nix {};
mommy = callPackage ./mommy.nix {};
theseus = callPackage ./theseus.nix {inherit (pkgs.nodePackages) pnpm;};
theseus = callPackage ./theseus.nix {
inherit (pkgs.nodePackages) pnpm;
inherit (pkgs.darwin.apple_sdk.frameworks) CoreServices Security WebKit;
};
treefetch = callPackage ./treefetch.nix {};
swhkd = callPackage ./swhkd {};
vim-just = callPackage ./vim-just.nix {};
Expand Down
35 changes: 20 additions & 15 deletions pkgs/theseus.nix
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,16 @@
lib,
stdenv,
stdenvNoCC,
fetchFromGitHub,
rustPlatform,
buildGoModule,
pnpm,
esbuild,
CoreServices,
Security,
WebKit,
dbus,
freetype,
fetchFromGitHub,
flite,
glfw,
glib-networking,
Expand Down Expand Up @@ -78,16 +81,19 @@ rustPlatform.buildRustPackage rec {
outputHash = "sha256-jFA8FTl1pi4pyuOzyg9kzzDTGjqtWiuI8hR6HkhrslU=";
};

buildInputs = [
dbus
freetype
gtk3
libappindicator-gtk3
librsvg
libsoup
openssl
webkitgtk
];
buildInputs =
[openssl]
++ lib.optionals stdenv.isLinux [
dbus
freetype
gtk3
libappindicator-gtk3
librsvg
libsoup
openssl
webkitgtk
]
++ lib.optionals stdenv.isDarwin [CoreServices Security WebKit];

nativeBuildInputs = [
pkg-config
Expand Down Expand Up @@ -121,7 +127,6 @@ rustPlatform.buildRustPackage rec {
pnpm config set store-dir "$STORE_PATH"
pnpm install --offline --frozen-lockfile --no-optional --ignore-script
pnpm build
ls

popd
'';
Expand All @@ -142,11 +147,11 @@ rustPlatform.buildRustPackage rec {
libXxf86vm
libXrandr
]));
binPath = lib.makeBinPath ([xorg.xrandr] ++ jdks);
binPath = lib.makeBinPath (lib.optionals stdenv.isLinux [xorg.xrandr] ++ jdks);
in ''
gappsWrapperArgs+=(
--set LD_LIBRARY_PATH /run/opengl-driver/lib:${libPath}
--prefix GIO_MODULE_DIR : ${glib-networking}/lib/gio/modules/
${lib.optionalString stdenv.isLinux "--set LD_LIBRARY_PATH /run/opengl-driver/lib:${libPath}"}
${lib.optionalString stdenv.isLinux "--prefix GIO_MODULE_DIR : ${glib-networking}/lib/gio/modules/"}
--prefix PATH : ${binPath}
)
'';
Expand Down