Skip to content

WIP: willow version of tauri-todos #90

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

Draft
wants to merge 16 commits into
base: main
Choose a base branch
from
Draft
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 .envrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
use flake
81 changes: 81 additions & 0 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

88 changes: 88 additions & 0 deletions flake.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
{
description = "tauri-todos";

inputs = {
nixpkgs.url = "nixpkgs/nixos-23.11";
# fixes https://github.com/NixOS/nixpkgs/issues/298285
# using nixpkgs from that branch until it's merged
# nixpkgs-androidenv.url =
# "github:hadilq/nixpkgs/androidenv-fix-ndk-toolchains";
flake-utils.url = "github:numtide/flake-utils";

rust-overlay = {
url = "github:oxalica/rust-overlay";
inputs.nixpkgs.follows = "nixpkgs";
inputs.flake-utils.follows = "flake-utils";
};
};

outputs = { self, nixpkgs, flake-utils, rust-overlay, }:
flake-utils.lib.eachDefaultSystem (system:
let
overlays = [ (import rust-overlay) ];
pkgs = import nixpkgs {
inherit system overlays;
# config.android_sdk.accept_license = true;
config.allowUnfree = true;
};

# androidenvPkgs = import nixpkgs-androidenv {
# inherit system overlays;
# config.android_sdk.accept_license = true;
# config.allowUnfree = true;
# };

nightly-rustfmt = pkgs.rust-bin.nightly.latest.rustfmt;

# androidComposition = androidenvPkgs.androidenv.composeAndroidPackages {
# platformVersions = [ "33" "32" ];
# buildToolsVersions = [ "30.0.3" ];
# includeEmulator = false; # haven't figured it out yet...
# includeNDK = true;
# # may need to wait for https://github.com/NixOS/nixpkgs/pull/300386 to land
# ndkVersion = "26.1.10909125";
# };
in {
devShells.default = pkgs.mkShell rec {
name = "tauri-todos";
nativeBuildInputs = with pkgs; [
nightly-rustfmt
direnv
corepack # includes pnpm
pkg-config
# c libraries needed for tauri on linux desktop
openssl
glib.dev
pango.dev
libsoup.dev
webkitgtk.dev
# needed for rust android compilation (pnpm tauri android dev)
# llvmPackages_13.libcxx
# libxml2
# jdk17
# android development tools
# androidComposition.androidsdk
# ] ++ lib.optionals stdenv.isDarwin [
# darwin.apple_sdk.frameworks.Security
# darwin.apple_sdk.frameworks.CoreFoundation
# darwin.apple_sdk.frameworks.Foundation
];

# env variables so tauri picks up our android sdk install
# ANDROID_SDK_ROOT =
# "${androidComposition.androidsdk}/libexec/android-sdk";
# ANDROID_NDK_ROOT = "${ANDROID_SDK_ROOT}/ndk-bundle";
# ANDROID_HOME = "${ANDROID_SDK_ROOT}";
# NDK_HOME = "${ANDROID_NDK_ROOT}";

# For some reason that's needed for the android NDK's clang setup to work
# LD_LIBRARY_PATH = "${pkgs.libxml2.out}/lib";

# Needed for `tauri android dev` to pick up the jdk
# JAVA_HOME = "${pkgs.jdk17}/lib/openjdk";

# Fixes an empty window bug for me https://github.com/tauri-apps/tauri/issues/8254
WEBKIT_DISABLE_COMPOSITING_MODE = 1;
};
});
}
2 changes: 2 additions & 0 deletions tauri-todos/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ dist
dist-ssr
*.local

.data-dir*

# Editor directories and files
.vscode/*
!.vscode/extensions.json
Expand Down
Loading