-
Notifications
You must be signed in to change notification settings - Fork 6
/
flake.nix
107 lines (97 loc) · 3.22 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
107
{
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
utils.url = "github:numtide/flake-utils";
};
outputs = { nixpkgs, utils, ... }:
utils.lib.eachDefaultSystem
(system:
let
pkgs = import nixpkgs {
inherit system;
config.android_sdk.accept_license = true;
config.allowUnfree = true;
};
buildToolsVersion = "34.0.0";
androidComposition = pkgs.androidenv.composeAndroidPackages {
buildToolsVersions = [ buildToolsVersion ];
};
zipAlignPath = "${androidComposition.androidsdk}/libexec/android-sdk/build-tools/${buildToolsVersion}";
in
{
packages.default = pkgs.stdenv.mkDerivation {
pname = "qrookie";
version = "0.4.1";
src = ./.;
nativeBuildInputs = with pkgs; [
cmake
qt6.wrapQtAppsHook
kdePackages.extra-cmake-modules
];
buildInputs = with pkgs; [
kdePackages.qtbase
kdePackages.qtdeclarative
kdePackages.qcoro
kdePackages.kirigami
kdePackages.qtsvg
kdePackages.qtimageformats
] ++ lib.optionals stdenv.isLinux [
kdePackages.qqc2-breeze-style
] ++ lib.optionals stdenv.isDarwin [
kdePackages.breeze-icons
];
qtWrapperArgs = with pkgs;[
''
--prefix PATH : ${lib.makeBinPath [ p7zip apktool xdg-utils android-tools apksigner jdk21_headless ]}
--prefix PATH : ${zipAlignPath}
''
];
cmakeFlags = [ "-DCMAKE_BUILD_TYPE=Release" ];
meta = with pkgs.lib; {
homepage = "https://github.com/glaumar/QRookie";
description = ''
Download and install Quest games from ROOKIE Public Mirror.
'';
licencse = licenses.gpl3;
platforms = platforms.all;
};
};
devShells.default = pkgs.mkShell rec {
buildInputs = with pkgs; [
stdenv.cc.cc
clang-tools # c/c++ lsp and formater
libclang.python # git-clang-format
cmake
ninja
kdePackages.extra-cmake-modules
kdePackages.qtbase
kdePackages.qtdeclarative
kdePackages.qcoro
kdePackages.kirigami
kdePackages.qtsvg
kdePackages.qtimageformats
p7zip
apktool
xdg-utils
android-tools
apksigner
jdk21_headless
] ++ lib.optionals stdenv.isLinux [
gdb
kdePackages.qqc2-breeze-style
] ++ lib.optionals stdenv.isDarwin [
kdePackages.breeze-icons
];
shellHook = ''
PATH="${zipAlignPath}:$PATH"
'';
LD_LIBRARY_PATH = pkgs.lib.makeLibraryPath buildInputs;
};
}
)
// {
overlays.default = self: pkgs: {
qrookie = self.packages."${pkgs.system}".qrookie;
};
};
}