Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 0 additions & 20 deletions pkgs/by-name/xd/xdg-user-dirs/gettext-0.25.patch

This file was deleted.

40 changes: 21 additions & 19 deletions pkgs/by-name/xd/xdg-user-dirs/package.nix
Original file line number Diff line number Diff line change
@@ -1,49 +1,51 @@
{
lib,
stdenv,
autoreconfHook,
meson,
ninja,
fetchurl,
libxslt,
docbook_xsl,
docbook_xml_dtd_43,
gettext,
makeWrapper,
makeBinaryWrapper,
libiconv,
libintl,
}:

stdenv.mkDerivation (finalAttrs: {
pname = "xdg-user-dirs";
version = "0.18";
version = "0.19";

src = fetchurl {
url = "https://user-dirs.freedesktop.org/releases/xdg-user-dirs-${finalAttrs.version}.tar.gz";
hash = "sha256-7G8G10lc26N6cyA5+bXhV4vLKWV2/eDaQO2y9SIg3zw=";
url = "https://user-dirs.freedesktop.org/releases/xdg-user-dirs-${finalAttrs.version}.tar.xz";
hash = "sha256-6S3rkpwQ1LKTKTl6+KJYUQEkf35hd6xvHSjoITDtjBk=";
};

patches = [
# https://gitlab.freedesktop.org/xdg/xdg-user-dirs/-/merge_requests/16
./gettext-0.25.patch
];

postPatch = ''
substituteInPlace Makefile.am \
--replace-fail 'libraries = $(LIBINTL)' 'libraries = $(LIBICONV) $(LIBINTL)'
'';

nativeBuildInputs = [
autoreconfHook
makeWrapper
meson
ninja
makeBinaryWrapper
libxslt
docbook_xsl
docbook_xml_dtd_43
]
++ lib.optionals stdenv.hostPlatform.isDarwin [ gettext ];
gettext
];

buildInputs = [
libiconv
libintl
];

NIX_LDFLAGS = if stdenv.isDarwin then "-liconv" else null;

preFixup = ''
# fallback values need to be last
wrapProgram "$out/bin/xdg-user-dirs-update" \
--suffix XDG_CONFIG_DIRS : "$out/etc/xdg"

substituteInPlace "$out/lib/systemd/user/xdg-user-dirs.service" \
--replace-fail "/usr/bin/xdg-user-dirs-update" "$out/bin/xdg-user-dirs-update"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

'';

meta = {
Expand Down
Loading