summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorseth <[email protected]>2023-08-06 02:34:29 -0400
committerseth <[email protected]>2023-08-06 03:57:49 -0400
commita0229f519b150e51d8994c98b639c4df45d82d6f (patch)
tree92e59a3ac321ec37b86de50880119b07a1b67be6
parent836f0a4f529cf1a9b82a0ecc067dcc359d9c7635 (diff)
pkgs/theseus: add darwin support
-rw-r--r--garnix.yaml1
-rw-r--r--pkgs/default.nix5
-rw-r--r--pkgs/theseus.nix35
3 files changed, 25 insertions, 16 deletions
diff --git a/garnix.yaml b/garnix.yaml
index 3d882b1..cf11797 100644
--- a/garnix.yaml
+++ b/garnix.yaml
@@ -3,3 +3,4 @@ builds:
include:
- "packages.x86_64-linux.*"
- "packages.aarch64-linux.*"
+ - "packages.aarch64-darwin.theseus"
diff --git a/pkgs/default.nix b/pkgs/default.nix
index 0c21488..dbdc6f5 100644
--- a/pkgs/default.nix
+++ b/pkgs/default.nix
@@ -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 {};
diff --git a/pkgs/theseus.nix b/pkgs/theseus.nix
index d51b1fe..f610bb9 100644
--- a/pkgs/theseus.nix
+++ b/pkgs/theseus.nix
@@ -2,13 +2,16 @@
lib,
stdenv,
stdenvNoCC,
+ fetchFromGitHub,
rustPlatform,
buildGoModule,
pnpm,
esbuild,
+ CoreServices,
+ Security,
+ WebKit,
dbus,
freetype,
- fetchFromGitHub,
flite,
glfw,
glib-networking,
@@ -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
@@ -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
'';
@@ -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}
)
'';