nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 stdenv,
3 lib,
4 fetchurl,
5 pkg-config,
6 meson,
7 ninja,
8 glib,
9 libintl,
10}:
11
12stdenv.mkDerivation (finalAttrs: {
13 pname = "desktop-file-utils";
14 version = "0.28";
15
16 src = fetchurl {
17 url = "https://www.freedesktop.org/software/desktop-file-utils/releases/desktop-file-utils-${finalAttrs.version}.tar.xz";
18 hash = "sha256-RAHU4jHYQsLegkI5WnSjlcpGjNlvX2ENgi3zNZSJinA=";
19 };
20
21 nativeBuildInputs = [
22 pkg-config
23 meson
24 ninja
25 ];
26
27 buildInputs = [
28 glib
29 libintl
30 ];
31
32 postPatch = ''
33 substituteInPlace src/install.c \
34 --replace \"update-desktop-database\" \"$out/bin/update-desktop-database\"
35 '';
36
37 setupHook = ./setup-hook.sh;
38
39 meta = {
40 homepage = "https://www.freedesktop.org/wiki/Software/desktop-file-utils";
41 description = "Command line utilities for working with .desktop files";
42 platforms = lib.platforms.linux ++ lib.platforms.darwin ++ lib.platforms.freebsd;
43 license = lib.licenses.gpl2Plus;
44 };
45})