-
Notifications
You must be signed in to change notification settings - Fork 9
/
flake.nix
45 lines (40 loc) · 1.56 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
{
description = "A basic flake to help develop treeland";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
flake-utils.url = "github:numtide/flake-utils";
nix-filter.url = "github:numtide/nix-filter";
};
outputs = { self, nixpkgs, flake-utils, nix-filter }@input:
flake-utils.lib.eachSystem [ "x86_64-linux" "aarch64-linux" "riscv64-linux" ]
(system:
let
pkgs = nixpkgs.legacyPackages.${system};
ddm = pkgs.qt6Packages.callPackage ./nix {
nix-filter = nix-filter.lib;
};
in
{
packages = {
default = ddm;
};
devShells.default = pkgs.mkShell {
inputsFrom = [
self.packages.${system}.default
];
shellHook =
let
makeQtpluginPath = pkgs.lib.makeSearchPathOutput "out" pkgs.qt6.qtbase.qtPluginPrefix;
makeQmlpluginPath = pkgs.lib.makeSearchPathOutput "out" pkgs.qt6.qtbase.qtQmlPrefix;
in
''
#export WAYLAND_DEBUG=1
export QT_PLUGIN_PATH=${makeQtpluginPath (with pkgs.qt6; [ qtbase qtdeclarative qtquick3d qtimageformats qtwayland qt5compat qtsvg ])}
export QML2_IMPORT_PATH=${makeQmlpluginPath (with pkgs.qt6; [ qtdeclarative qtquick3d qt5compat ]
++ [ dde-nixos.packages.${system}.qt6.dtkdeclarative ] )}
export QML_IMPORT_PATH=$QML2_IMPORT_PATH
'';
};
}
);
}