mirror of
https://github.com/Universal-Debloater-Alliance/universal-android-debloater-next-generation.git
synced 2026-08-09 07:09:12 +02:00
69 lines
1.7 KiB
Nix
69 lines
1.7 KiB
Nix
{
|
|
description = "devshell for uad-ng";
|
|
|
|
inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
|
|
|
|
outputs =
|
|
{ nixpkgs, ... }:
|
|
let
|
|
forSystems =
|
|
f:
|
|
nixpkgs.lib.genAttrs nixpkgs.lib.systems.flakeExposed (
|
|
system: f (import nixpkgs { inherit system; })
|
|
);
|
|
in
|
|
{
|
|
formatter = forSystems (pkgs: pkgs.nixfmt-tree);
|
|
|
|
devShells = forSystems (
|
|
pkgs:
|
|
let
|
|
inherit (pkgs) lib stdenv;
|
|
runtimeLibs = [
|
|
pkgs.fontconfig
|
|
pkgs.freetype
|
|
]
|
|
++ lib.optionals stdenv.isLinux (
|
|
with pkgs;
|
|
[
|
|
libglvnd
|
|
libX11
|
|
libXcursor
|
|
libXi
|
|
libXrandr
|
|
libxkbcommon
|
|
wayland
|
|
]
|
|
);
|
|
in
|
|
{
|
|
default = pkgs.mkShell (
|
|
{
|
|
nativeBuildInputs = with pkgs; [
|
|
clang
|
|
pkg-config
|
|
];
|
|
buildInputs =
|
|
with pkgs;
|
|
[
|
|
rustc
|
|
cargo
|
|
rustfmt
|
|
rust-analyzer
|
|
clippy
|
|
android-tools
|
|
]
|
|
++ runtimeLibs;
|
|
|
|
RUST_SRC_PATH = "${pkgs.rustPlatform.rustLibSrc}/lib/rustlib/src/rust";
|
|
LIBCLANG_PATH = "${pkgs.llvmPackages.libclang.lib}/lib";
|
|
}
|
|
// lib.optionalAttrs stdenv.isLinux { LD_LIBRARY_PATH = lib.makeLibraryPath runtimeLibs; }
|
|
// lib.optionalAttrs stdenv.isDarwin {
|
|
DYLD_FALLBACK_LIBRARY_PATH = lib.makeLibraryPath runtimeLibs;
|
|
}
|
|
);
|
|
}
|
|
);
|
|
};
|
|
}
|