@ -34,6 +34,11 @@
, extraConfig ? { } # Additional values to be added literally to the final item, e.g. vendor extensions
} :
let
# FIXME: workaround until https://github.com/NixOS/nixpkgs/pull/162246 lands
cleanName = if lib . hasInfix " " name
then throw " N a m e m u s t n o t c o n t a i n s p a c e s ! "
else name ;
# There are multiple places in the FDO spec that make "boolean" values actually tristate,
# e.g. StartupNotify, where "unset" is literally defined as "do something reasonable".
# So, handle null values separately.
@ -111,8 +116,8 @@ let
content = [ mainSectionRendered ] ++ actionsRendered ;
in
writeTextFile {
name = " ${ name } . d e s k t o p " ;
destination = " / s h a r e / a p p l i c a t i o n s / ${ name } . d e s k t o p " ;
name = " ${ clea nN ame} . d e s k t o p " ;
destination = " / s h a r e / a p p l i c a t i o n s / ${ clea nN ame} . d e s k t o p " ;
text = builtins . concatStringsSep " \n " content ;
checkPhase = " ${ desktop-file-utils } / b i n / d e s k t o p - f i l e - v a l i d a t e $ t a r g e t " ;
}