nixpkgs/pkgs/tools/text/glogg/default.nix
Profpatsch 4a7f99d55d treewide: with stdenv.lib; in meta -> with lib;
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
2021-01-11 10:38:22 +01:00

43 lines
1.3 KiB
Nix

{ mkDerivation, lib, stdenv, fetchFromGitHub, qmake, boost }:
mkDerivation rec {
pname = "glogg";
version = "1.1.4";
src = fetchFromGitHub {
owner = "nickbnf";
repo = "glogg";
rev = "v${version}";
sha256 = "0hf1c2m8n88frmxmyn0ndr8129p7iky49nq565sw1asaydm5z6pb";
};
postPatch = stdenv.lib.optionalString stdenv.isDarwin ''
substituteInPlace glogg.pro \
--replace "boost_program_options-mt" "boost_program_options"
'';
nativeBuildInputs = [ qmake ];
buildInputs = [ boost ];
qmakeFlags = [ "VERSION=${version}" ];
enableParallelBuilding = true;
postInstall = stdenv.lib.optionalString stdenv.isDarwin ''
mkdir -p $out/Applications
mv $out/bin/glogg.app $out/Applications/glogg.app
rm -fr $out/{bin,share}
wrapQtApp $out/Applications/glogg.app/Contents/MacOS/glogg
'';
meta = with lib; {
description = "The fast, smart log explorer";
longDescription = ''
A multi-platform GUI application to browse and search through long or complex log files. It is designed with programmers and system administrators in mind. glogg can be seen as a graphical, interactive combination of grep and less.
'';
homepage = "https://glogg.bonnefon.org/";
license = licenses.gpl3Plus;
platforms = platforms.unix;
maintainers = with maintainers; [ c0bw3b ];
};
}