{
  lib,
  stdenv,
  fetchFromGitHub,
  libsForQt5,
}:

stdenv.mkDerivation rec {
  pname = "qbs";

  version = "1.24.1";

  src = fetchFromGitHub {
    owner = "qbs";
    repo = "qbs";
    rev = "v${version}";
    sha256 = "sha256-nL7UZh29Oecu3RvXYg5xsin2IvPWpApleLH37sEdSAI=";
  };

  nativeBuildInputs = [ libsForQt5.qmake ];

  dontWrapQtApps = true;

  qmakeFlags = [
    "QBS_INSTALL_PREFIX=$(out)"
    "qbs.pro"
  ];

  buildInputs = [
    libsForQt5.qtbase
    libsForQt5.qtscript
  ];

  meta = {
    description = "Tool that helps simplify the build process for developing projects across multiple platforms";
    homepage = "https://wiki.qt.io/Qbs";
    license = lib.licenses.lgpl3;
    maintainers = [ ];
    platforms = lib.platforms.linux;
  };
}
