phosh: build tweaks

This commit is contained in:
Rodney Lorrimar 2024-02-06 11:10:14 +08:00 committed by tomf
parent 1326c3dbb4
commit 42952e0ea2

View File

@ -6,7 +6,7 @@
, ninja , ninja
, pkg-config , pkg-config
, python3 , python3
, wrapGAppsHook , wrapGAppsHook4
, libadwaita , libadwaita
, libhandy , libhandy
, libxkbcommon , libxkbcommon
@ -34,13 +34,13 @@
, nixosTests , nixosTests
}: }:
stdenv.mkDerivation rec { stdenv.mkDerivation (finalAttrs: {
pname = "phosh"; pname = "phosh";
version = "0.35.0"; version = "0.35.0";
src = fetchurl { src = fetchurl {
# Release tarball which includes subprojects gvc and libcall-ui # Release tarball which includes subprojects gvc and libcall-ui
url = "https://sources.phosh.mobi/releases/${pname}/${pname}-${version}.tar.xz"; url = with finalAttrs; "https://sources.phosh.mobi/releases/${pname}/${pname}-${version}.tar.xz";
hash = "sha256-hfm89G9uxVc8j8rDOg1ytI+Pm9s9WQWazH3yLZdWSRg="; hash = "sha256-hfm89G9uxVc8j8rDOg1ytI+Pm9s9WQWazH3yLZdWSRg=";
}; };
@ -50,7 +50,7 @@ stdenv.mkDerivation rec {
ninja ninja
pkg-config pkg-config
python3 python3
wrapGAppsHook wrapGAppsHook4
]; ];
buildInputs = [ buildInputs = [
@ -90,7 +90,10 @@ stdenv.mkDerivation rec {
"-Dsystemd=true" "-Dsystemd=true"
"-Dcompositor=${phoc}/bin/phoc" "-Dcompositor=${phoc}/bin/phoc"
# https://github.com/NixOS/nixpkgs/issues/36468 # https://github.com/NixOS/nixpkgs/issues/36468
# https://gitlab.gnome.org/World/Phosh/phosh/-/merge_requests/1363
"-Dc_args=-I${glib.dev}/include/gio-unix-2.0" "-Dc_args=-I${glib.dev}/include/gio-unix-2.0"
# Save some time building if tests are disabled
"-Dtests=${lib.boolToString finalAttrs.finalPackage.doCheck}"
]; ];
checkPhase = '' checkPhase = ''
@ -128,10 +131,10 @@ stdenv.mkDerivation rec {
meta = with lib; { meta = with lib; {
description = "A pure Wayland shell prototype for GNOME on mobile devices"; description = "A pure Wayland shell prototype for GNOME on mobile devices";
homepage = "https://gitlab.gnome.org/World/Phosh/phosh"; homepage = "https://gitlab.gnome.org/World/Phosh/phosh";
changelog = "https://gitlab.gnome.org/World/Phosh/phosh/-/blob/v${version}/debian/changelog"; changelog = "https://gitlab.gnome.org/World/Phosh/phosh/-/blob/v${finalAttrs.version}/debian/changelog";
license = licenses.gpl3Plus; license = licenses.gpl3Plus;
maintainers = with maintainers; [ masipcat tomfitzhenry zhaofengli ]; maintainers = with maintainers; [ masipcat tomfitzhenry zhaofengli ];
platforms = platforms.linux; platforms = platforms.linux;
mainProgram = "phosh-session"; mainProgram = "phosh-session";
}; };
} })