Merge pull request #245803 from OPNA2608/init/lomiri/lomiri-app-launch

lomiri.lomiri-app-launch: init at 0.1.8
This commit is contained in:
Peder Bergebakken Sundt 2023-12-07 02:22:49 +01:00 committed by GitHub
commit e46cd8af45
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 130 additions and 0 deletions

View file

@ -21,6 +21,7 @@ let
#### Services
biometryd = callPackage ./services/biometryd { };
hfd-service = callPackage ./services/hfd-service { };
lomiri-app-launch = callPackage ./development/lomiri-app-launch { };
};
in
lib.makeScope libsForQt5.newScope packages

View file

@ -0,0 +1,129 @@
{ stdenv
, lib
, fetchFromGitLab
, gitUpdater
, testers
, cmake
, cmake-extras
, curl
, dbus
, dbus-test-runner
, dpkg
, gobject-introspection
, gtest
, json-glib
, libxkbcommon
, lomiri-api
, lttng-ust
, pkg-config
, properties-cpp
, python3
, systemd
, ubports-click
, zeitgeist
, withDocumentation ? true
, doxygen
, python3Packages
, sphinx
}:
stdenv.mkDerivation (finalAttrs: {
pname = "lomiri-app-launch";
version = "0.1.8";
outputs = [
"out"
"dev"
] ++ lib.optionals withDocumentation [
"doc"
];
src = fetchFromGitLab {
owner = "ubports";
repo = "development/core/lomiri-app-launch";
rev = finalAttrs.version;
hash = "sha256-NIBZk5H0bPwAwkI0Qiq2S9dZvchAFPBCHKi2inUVZmI=";
};
postPatch = ''
patchShebangs tests/{desktop-hook-test.sh.in,repeat-until-pass.sh}
# used pkg_get_variable, cannot replace prefix
substituteInPlace data/CMakeLists.txt \
--replace 'DESTINATION "''${SYSTEMD_USER_UNIT_DIR}"' 'DESTINATION "${placeholder "out"}/lib/systemd/user"'
substituteInPlace tests/jobs-systemd.cpp \
--replace '^(/usr)?' '^(/nix/store/\\w+-bash-.+)?'
'';
strictDeps = true;
nativeBuildInputs = [
cmake
dpkg # for setting LOMIRI_APP_LAUNCH_ARCH
gobject-introspection
pkg-config
] ++ lib.optionals withDocumentation [
doxygen
python3Packages.breathe
sphinx
];
buildInputs = [
cmake-extras
curl
dbus
json-glib
libxkbcommon
lomiri-api
lttng-ust
properties-cpp
systemd
ubports-click
zeitgeist
];
nativeCheckInputs = [
dbus
(python3.withPackages (ps: with ps; [
python-dbusmock
]))
];
checkInputs = [
dbus-test-runner
gtest
];
cmakeFlags = [
"-DENABLE_MIRCLIENT=OFF"
"-DENABLE_TESTS=${lib.boolToString finalAttrs.doCheck}"
];
postBuild = lib.optionalString withDocumentation ''
make -C ../docs html
'';
doCheck = stdenv.buildPlatform.canExecute stdenv.hostPlatform;
postInstall = lib.optionalString withDocumentation ''
mkdir -p $doc/share/doc/lomiri-app-launch
mv ../docs/_build/html $doc/share/doc/lomiri-app-launch/
'';
passthru = {
tests.pkg-config = testers.testMetaPkgConfig finalAttrs.finalPackage;
updateScript = gitUpdater { };
};
meta = with lib; {
description = "System and associated utilities to launch applications in a standard and confined way";
homepage = "https://gitlab.com/ubports/development/core/lomiri-app-launch";
license = licenses.gpl3Only;
maintainers = teams.lomiri.members;
platforms = platforms.linux;
pkgConfigModules = [
"lomiri-app-launch-0"
];
};
})