@ -3,9 +3,9 @@
, autoreconfHook
, dbus
, fetchFromGitHub
, fetchpatch
, flatpak
, fuse3
, bubblewrap
, systemdMinimal
, geoclue2
, glib
@ -20,12 +20,12 @@
, python3
, pkg-config
, stdenv
, substituteAll
, runCommand
, wrapGAppsHook
, enableGeoLocation ? true
} :
stdenv . mkDerivation rec {
stdenv . mkDerivation ( finalAttrs : {
pname = " x d g - d e s k t o p - p o r t a l " ;
version = " 1 . 1 5 . 0 " ;
@ -33,11 +33,21 @@ stdenv.mkDerivation rec {
src = fetchFromGitHub {
owner = " f l a t p a k " ;
repo = pname ;
rev = version ;
repo = " x d g - d e s k t o p - p o r t a l " ;
rev = finalAttrs . version ;
sha256 = " s h a 2 5 6 - K w 3 z J e G w P f w 1 f D o 8 H s g Y m r p g C k / P U v W Z P R l o K J N A J V c = " ;
} ;
patches = [
# The icon validator copied from Flatpak needs to access the gdk-pixbuf loaders
# in the Nix store and cannot bind FHS paths since those are not available on NixOS.
( runCommand " i c o n - v a l i d a t o r . p a t c h " { } ''
# Flatpak uses a different path
substitute " ${ flatpak . icon-validator-patch } " " $ o u t " \
- - replace " / i c o n - v a l i d a t o r / v a l i d a t e - i c o n . c " " / s r c / v a l i d a t e - i c o n . c "
'' )
] ;
nativeBuildInputs = [
autoreconfHook
libxml2
@ -50,6 +60,7 @@ stdenv.mkDerivation rec {
dbus
flatpak
fuse3
bubblewrap
systemdMinimal # libsystemd
glib
gsettings-desktop-schemas
@ -83,6 +94,11 @@ stdenv.mkDerivation rec {
passthru = {
tests = {
installedTests = nixosTests . installed-tests . xdg-desktop-portal ;
validate-icon = runCommand " t e s t - i c o n - v a l i d a t i o n " { } ''
$ { finalAttrs . finalPackage } /libexec/xdg-desktop-portal-validate-icon - - sandbox 512 512 $ { ../../../applications/audio/zynaddsubfx/ZynLogo.svg } > " $ o u t "
grep format = svg " $ o u t "
'' ;
} ;
} ;
@ -92,4 +108,4 @@ stdenv.mkDerivation rec {
maintainers = with maintainers ; [ jtojnar ] ;
platforms = platforms . linux ;
} ;
}
} )