depot/third_party/nixpkgs/pkgs/data/themes/adwaita-qt/default.nix
Default email 6064764516 Project import generated by Copybara.
GitOrigin-RevId: 2cf9db0e3d45b9d00f16f2836cb1297bcadc475e
2021-10-14 08:43:12 +08:00

57 lines
1.1 KiB
Nix

{ mkDerivation
, stdenv
, lib
, fetchFromGitHub
, nix-update-script
, cmake
, ninja
, qtbase
, qt5
, xorg
}:
mkDerivation rec {
pname = "adwaita-qt";
version = "1.4.0";
outputs = [ "out" "dev" ];
src = fetchFromGitHub {
owner = "FedoraQt";
repo = pname;
rev = version;
sha256 = "sha256-KkqLUhS0JMwJsgu8fv5iGozH3Xv+cXumxx5IewZTTPc=";
};
nativeBuildInputs = [
cmake
ninja
];
buildInputs = [
qtbase
qt5.qtx11extras
] ++ lib.optionals stdenv.isLinux [
xorg.libxcb
];
postPatch = ''
# Fix plugin dir
substituteInPlace src/style/CMakeLists.txt \
--replace "DESTINATION \"\''${QT_PLUGINS_DIR}/styles" "DESTINATION \"$qtPluginPrefix/styles"
'';
passthru = {
updateScript = nix-update-script {
attrPath = pname;
};
};
meta = with lib; {
description = "A style to bend Qt applications to look like they belong into GNOME Shell";
homepage = "https://github.com/FedoraQt/adwaita-qt";
license = licenses.gpl2Plus;
maintainers = teams.gnome.members ++ (with maintainers; [ ]);
platforms = platforms.all;
};
}