-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathflake.nix
75 lines (60 loc) · 2.24 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
{
description = "comandr flake";
inputs = {
flake-utils.url = "github:numtide/flake-utils";
fenix = {
url = "github:nix-community/fenix";
inputs.nixpkgs.follows = "nixpkgs";
};
crane = {
url = "github:ipetkov/crane";
};
};
outputs = { self, nixpkgs, flake-utils, fenix, crane, ... }:
flake-utils.lib.eachDefaultSystem (system:
let
pkgs = nixpkgs.legacyPackages.${system};
wasmToolchain = fenix.packages.${system}.combine [
fenix.packages.${system}.targets.wasm32-unknown-unknown.latest.toolchain
fenix.packages.${system}.latest.toolchain
];
wasmCrane = (crane.mkLib pkgs).overrideToolchain wasmToolchain;
osToolchain = fenix.packages.${system}.latest.toolchain;
osCrane = (crane.mkLib pkgs).overrideToolchain osToolchain;
in
{
packages = rec {
hello = pkgs.hello;
default = hello;
};
apps = rec {
hello = flake-utils.lib.mkApp { drv = self.packages.${system}.hello; };
default = hello;
};
devShells.default = pkgs.mkShell {
nativeBuildInputs = with pkgs; [
cargo-generate
pkg-config
patchelf
libsForQt5.full
cmake
wasm-pack
clang
#lldb gdb
(fenix.packages.${system}.combine [ wasmToolchain osToolchain ])
];
buildInputs = with pkgs; [
];
shellHook = ''
echo hiiiiiiiiiiiiii
export LD_LIBRARY_PATH=${pkgs.webkitgtk_4_1}/lib:${pkgs.libsoup_3}/lib:${pkgs.glib.out}/lib:${pkgs.gtk3}/lib:${pkgs.cairo}/lib:${pkgs.gdk-pixbuf}/lib:${pkgs.libxkbcommon}/lib:${pkgs.fontconfig.lib}/lib:${pkgs.libsForQt5.full}/lib:${pkgs.stdenv.cc.cc.lib}/lib
export CPLUS_INCLUDE_PATH=${pkgs.libsForQt5.full}/include:${pkgs.libGL.dev}/include
export MME_QT_LIB=${pkgs.libsForQt5.full}/lib
# i found that this is the env war to set where QT looks for platform plugins
# at: https://forums.fedoraforum.org/showthread.php?326508-How-to-set-QT_QPA_PLATFORM_PLUGIN_PATH
export QT_QPA_PLATFORM_PLUGIN_PATH=${pkgs.libsForQt5.full}/lib/qt-5.15.14/plugins/platforms/
'';
};
}
);
}