Files
qt-nix/flake.nix
2026-07-07 12:44:31 -05:00

50 lines
1.0 KiB
Nix

{
description = "QT Flake";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
};
outputs = {self, nixpkgs}: {
defaultPackage.x86_64-linux = let
pkgs = import nixpkgs { system = "x86_64-linux"; };
in
pkgs.stdenv.mkDerivation {
name = "QT";
src = builtins.path { path = ./.; filter = path: type: baseNameOf path != "build"; };
nativeBuildInputs = with pkgs; [
cmake
qt6.wrapQtAppsHook
];
buildInputs = with pkgs; [
qt6.qtbase
qt6.qtdeclarative
qt6.qtwayland
];
};
devShell.x86_64-linux = let
pkgs = import nixpkgs { system = "x86_64-linux"; };
in
pkgs.mkShell {
buildInputs = with pkgs; [
cmake
gcc
clang-tools
qt6.qtbase
qt6.qtdeclarative
qt6.qtlanguageserver
qt6.qttools
qt6.qtwayland
# qtcreator
];
shellHook = ''
export QML_IMPORT_PATH="${pkgs.qt6.qtdeclarative}/lib/qml"
'';
};
};
}