4a7f99d55d
Part of: https://github.com/NixOS/nixpkgs/issues/108938 meta = with stdenv.lib; is a widely used pattern. We want to slowly remove the `stdenv.lib` indirection and encourage people to use `lib` directly. Thus let’s start with the meta field. This used a rewriting script to mostly automatically replace all occurances of this pattern, and add the `lib` argument to the package header if it doesn’t exist yet. The script in its current form is available at https://cs.tvl.fyi/depot@2f807d7f141068d2d60676a89213eaa5353ca6e0/-/blob/users/Profpatsch/nixpkgs-rewriter/default.nix
51 lines
1.4 KiB
Nix
51 lines
1.4 KiB
Nix
{ lib, stdenv, fetchFromGitHub, pkgconfig, intltool, autoreconfHook, wrapGAppsHook
|
|
, gtk3, hicolor-icon-theme, netpbm }:
|
|
|
|
stdenv.mkDerivation rec {
|
|
pname = "yad";
|
|
version = "7.2";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "v1cont";
|
|
repo = "yad";
|
|
rev = "v${version}";
|
|
sha256 = "0ih97hrcra2bg8q19b8819hip1p424z1vj61cl1ym5p477rp37yx";
|
|
};
|
|
|
|
configureFlags = [
|
|
"--enable-icon-browser"
|
|
"--with-gtk=gtk3"
|
|
"--with-rgb=${placeholder "out"}/share/yad/rgb.txt"
|
|
];
|
|
|
|
buildInputs = [ gtk3 hicolor-icon-theme ];
|
|
|
|
nativeBuildInputs = [ autoreconfHook pkgconfig intltool wrapGAppsHook ];
|
|
|
|
postPatch = ''
|
|
sed -i src/file.c -e '21i#include <glib/gprintf.h>'
|
|
sed -i src/form.c -e '21i#include <stdlib.h>'
|
|
|
|
# there is no point to bring in the whole netpbm package just for this file
|
|
install -Dm644 ${netpbm.out}/share/netpbm/misc/rgb.txt $out/share/yad/rgb.txt
|
|
'';
|
|
|
|
postAutoreconf = ''
|
|
intltoolize
|
|
'';
|
|
|
|
meta = with lib; {
|
|
homepage = "https://sourceforge.net/projects/yad-dialog/";
|
|
description = "GUI dialog tool for shell scripts";
|
|
longDescription = ''
|
|
Yad (yet another dialog) is a GUI dialog tool for shell scripts. It is a
|
|
fork of Zenity with many improvements, such as custom buttons, additional
|
|
dialogs, pop-up menu in notification icon and more.
|
|
'';
|
|
|
|
license = licenses.gpl3;
|
|
maintainers = with maintainers; [ smironov ];
|
|
platforms = with platforms; linux;
|
|
};
|
|
}
|