Commit 4ce2e1df authored by OPNA2608's avatar OPNA2608
Browse files

lomiri.lomiri-download-manager: nixfmt, modernise

parent 5cc3c54a
Loading
Loading
Loading
Loading
+45 −50
Original line number Diff line number Diff line
{ stdenv
, lib
, fetchFromGitLab
, fetchpatch
, gitUpdater
, testers
, boost
, cmake
, cmake-extras
, dbus
, dbus-test-runner
, withDocumentation ? true
, doxygen
, glog
, graphviz
, gtest
, lomiri-api
, pkg-config
, python3
, qtbase
, qtdeclarative
, qttools
, validatePkgConfig
, wrapQtAppsHook
, xvfb-run
{
  stdenv,
  lib,
  fetchFromGitLab,
  fetchpatch,
  gitUpdater,
  testers,
  boost,
  cmake,
  cmake-extras,
  dbus,
  dbus-test-runner,
  withDocumentation ? true,
  doxygen,
  glog,
  graphviz,
  gtest,
  lomiri-api,
  pkg-config,
  python3,
  qtbase,
  qtdeclarative,
  qttools,
  validatePkgConfig,
  wrapQtAppsHook,
  xvfb-run,
}:

stdenv.mkDerivation (finalAttrs: {
@@ -39,9 +40,7 @@ stdenv.mkDerivation (finalAttrs: {
  outputs = [
    "out"
    "dev"
  ] ++ lib.optionals withDocumentation [
    "doc"
  ];
  ] ++ lib.optionals withDocumentation [ "doc" ];

  patches = [
    # This change seems incomplete, potentially breaks things on systems that don't use AppArmor mediation
@@ -69,12 +68,14 @@ stdenv.mkDerivation (finalAttrs: {

  strictDeps = true;

  nativeBuildInputs = [
  nativeBuildInputs =
    [
      cmake
      pkg-config
      validatePkgConfig
      wrapQtAppsHook
  ] ++ lib.optionals withDocumentation [
    ]
    ++ lib.optionals withDocumentation [
      doxygen
      graphviz
      qttools # qdoc
@@ -96,9 +97,7 @@ stdenv.mkDerivation (finalAttrs: {
    xvfb-run
  ];

  checkInputs = [
    gtest
  ];
  checkInputs = [ gtest ];

  cmakeFlags = [
    (lib.cmakeBool "ENABLE_DOC" withDocumentation)
@@ -107,11 +106,7 @@ stdenv.mkDerivation (finalAttrs: {
    (lib.cmakeBool "ENABLE_WERROR" false)
  ];

  makeTargets = [
    "all"
  ] ++ lib.optionals withDocumentation [
    "doc"
  ];
  makeTargets = [ "all" ] ++ lib.optionals withDocumentation [ "doc" ];

  doCheck = stdenv.buildPlatform.canExecute stdenv.hostPlatform;

@@ -128,13 +123,13 @@ stdenv.mkDerivation (finalAttrs: {
    updateScript = gitUpdater { };
  };

  meta = with lib; {
  meta = {
    description = "Performs uploads and downloads from a centralized location";
    homepage = "https://gitlab.com/ubports/development/core/lomiri-download-manager";
    changelog = "https://gitlab.com/ubports/development/core/lomiri-download-manager/-/blob/${finalAttrs.version}/ChangeLog";
    license = licenses.lgpl3Only;
    maintainers = teams.lomiri.members;
    platforms = platforms.linux;
    license = lib.licenses.lgpl3Only;
    maintainers = lib.teams.lomiri.members;
    platforms = lib.platforms.linux;
    pkgConfigModules = [
      "ldm-common"
      "lomiri-download-manager-client"