xdg-user-dirs: fix darwin builds

A recent update to xdg-utils added xdg-user-dirs as a dep.
Since then we've had a few reports of people running macOS
with xdg-utils in their system for one reason or another
getting a failure on xdg-user-dirs.

I'm not sure it makes high-level sense to use it on macOS,
but it was easy to get it to build...
This commit is contained in:
Travis A. Everett 2024-02-11 13:01:53 -06:00
parent 92682867ac
commit 28bd8790ad

View file

@ -1,4 +1,4 @@
{ lib, stdenv, fetchurl, libxslt, docbook_xsl, makeWrapper }:
{ lib, stdenv, fetchurl, libxslt, docbook_xsl, gettext, libiconv, makeWrapper }:
stdenv.mkDerivation rec {
pname = "xdg-user-dirs";
@ -9,7 +9,9 @@ stdenv.mkDerivation rec {
sha256 = "sha256-7G8G10lc26N6cyA5+bXhV4vLKWV2/eDaQO2y9SIg3zw=";
};
nativeBuildInputs = [ makeWrapper libxslt docbook_xsl ];
buildInputs = lib.optionals stdenv.isDarwin [ libiconv ];
nativeBuildInputs = [ makeWrapper libxslt docbook_xsl ] ++ lib.optionals stdenv.isDarwin [ gettext ];
preFixup = ''
# fallback values need to be last
@ -22,6 +24,6 @@ stdenv.mkDerivation rec {
description = "A tool to help manage well known user directories like the desktop folder and the music folder";
license = licenses.gpl2;
maintainers = with maintainers; [ ];
platforms = platforms.linux;
platforms = platforms.unix;
};
}