-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathflake.nix
106 lines (103 loc) · 2.63 KB
/
flake.nix
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
{
description = "Wavify-sdk developtment environment";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
rust-overlay.url = "github:oxalica/rust-overlay";
flake-utils.url = "github:numtide/flake-utils";
android.url = "github:tadfisher/android-nixpkgs";
};
outputs = { self, nixpkgs, rust-overlay, flake-utils, android }:
flake-utils.lib.eachDefaultSystem (system:
let
overlays = [
(import rust-overlay)
(self: super: {
rustToolchain = super.rust-bin.stable.latest.default.override {
extensions = [ "rust-src" "rust-analyzer"];
targets = [ "armv7-linux-androideabi" "aarch64-linux-android" "i686-linux-android" "x86_64-unknown-linux-gnu" ];
};
})
(
final: prev: {
inherit (self.packages.${final.system}) android-sdk android-studio;
}
)
];
pkgs = import nixpkgs {
inherit system overlays;
};
pythonPackages = pkgs.python310Packages;
python = pythonPackages.python;
pythonDeps = p: with p; [
# sdk
wheel
twine
build
hatchling
black
isort
# demo
pip
pyaudio
# benchmark
soundfile
inflect
matplotlib
numpy
pytube
requests
editdistance
more-itertools
regex
];
in
with pkgs;
{
devShells.default = mkShell {
packages = (with pkgs; [
# tools
just
openssl
pkg-config
libclang
cmake
gfortran9
mold
gcc
nix-tree
ffmpeg
sox
portaudio
libsndfile
# rust
rustToolchain
# python
ruff
(python.withPackages pythonDeps)
# kotlin
gradle
jdk
gnupg
]);
RUST_SRC_PATH = rustPlatform.rustLibSrc;
LD_LIBRARY_PATH = lib.makeLibraryPath [
stdenv.cc.cc
zlib
portaudio
libsndfile
];
};
packages = {
android-sdk = android.sdk.${system} (sdkPkgs: with sdkPkgs; [
build-tools-30-0-2
cmdline-tools-latest
emulator
platform-tools
platforms-android-3
ndk-bundle
]);
android-studio = pkgs.androidStudioPackages.stable;
};
}
);
}