depot/third_party/nixpkgs/pkgs/tools/misc/desktop-file-utils/default.nix
Default email 504525a148 Project import generated by Copybara.
GitOrigin-RevId: bd645e8668ec6612439a9ee7e71f7eac4099d4f6
2024-01-02 12:29:13 +01:00

44 lines
895 B
Nix

{ stdenv
, lib
, fetchurl
, pkg-config
, meson
, ninja
, glib
, libintl
}:
stdenv.mkDerivation rec {
pname = "desktop-file-utils";
version = "0.27";
src = fetchurl {
url = "https://www.freedesktop.org/software/${pname}/releases/${pname}-${version}.tar.xz";
hash = "sha256-oIF985zjhbZiGIBAfFbx8pgWjAQMIDLO34jVt2r/6DY=";
};
nativeBuildInputs = [
pkg-config
meson
ninja
];
buildInputs = [
glib
libintl
];
postPatch = ''
substituteInPlace src/install.c \
--replace \"update-desktop-database\" \"$out/bin/update-desktop-database\"
'';
setupHook = ./setup-hook.sh;
meta = with lib; {
homepage = "https://www.freedesktop.org/wiki/Software/desktop-file-utils";
description = "Command line utilities for working with .desktop files";
platforms = platforms.linux ++ platforms.darwin;
license = licenses.gpl2Plus;
};
}