Skip to content
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
5 changes: 5 additions & 0 deletions .envrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# SPDX-FileCopyrightText: 2024 Foundation Devices Inc.
#
# SPDX-License-Identifier: MIT

use flake
4 changes: 4 additions & 0 deletions .reuse/dep5
Original file line number Diff line number Diff line change
Expand Up @@ -34,3 +34,7 @@ License: MIT
Files: CHANGELOG.md
Copyright: 2024 Foundation Devices Inc.
License: MIT

Files: flake.lock
Copyright: 2024 Foundation Devices Inc.
License: MIT
82 changes: 82 additions & 0 deletions flake.lock

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

82 changes: 82 additions & 0 deletions flake.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
# SPDX-FileCopyrightText: 2024 Foundation Devices Inc.
#
# SPDX-License-Identifier: MIT
{
description = "tor - Flutter plugin for managing a Tor proxy via arti";

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

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

rustToolchain = pkgs.rust-bin.stable."1.87.0".default;
in
{
devShells.default = pkgs.mkShell {
buildInputs =
with pkgs;
[
# Dart / Flutter
dart
flutter

# Rust (pinned to rust-toolchain)
rustToolchain

# Native build tools
cmake
ninja
pkg-config

# For ffigen (libclang)
libclang
llvmPackages.libclang

# Just (task runner)
just

# Useful for Rust development
cargo-ndk
]
++ pkgs.lib.optionals pkgs.stdenv.isLinux [
# Linux desktop build deps (GTK runner)
gtk3
pcre2
util-linux
libselinux
libsepol
libthai
libdatrie
libxkbcommon
libxdmcp
lerc
libdeflate
at-spi2-core
dbus
libepoxy
];

shellHook = ''
export LIBCLANG_PATH="${pkgs.llvmPackages.libclang.lib}/lib"
'';
};
}
);
}
13 changes: 7 additions & 6 deletions rust/Cargo.lock

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

Loading