e0464e4788
In preparation for the deprecation of `stdenv.isX`. These shorthands are not conducive to cross-compilation because they hide the platforms. Darwin might get cross-compilation for which the continued usage of `stdenv.isDarwin` will get in the way One example of why this is bad and especially affects compiler packages https://www.github.com/NixOS/nixpkgs/pull/343059 There are too many files to go through manually but a treewide should get users thinking when they see a `hostPlatform.isX` in a place where it doesn't make sense. ``` fd --type f "\.nix" | xargs sd --fixed-strings "stdenv.is" "stdenv.hostPlatform.is" fd --type f "\.nix" | xargs sd --fixed-strings "stdenv'.is" "stdenv'.hostPlatform.is" fd --type f "\.nix" | xargs sd --fixed-strings "clangStdenv.is" "clangStdenv.hostPlatform.is" fd --type f "\.nix" | xargs sd --fixed-strings "gccStdenv.is" "gccStdenv.hostPlatform.is" fd --type f "\.nix" | xargs sd --fixed-strings "stdenvNoCC.is" "stdenvNoCC.hostPlatform.is" fd --type f "\.nix" | xargs sd --fixed-strings "inherit (stdenv) is" "inherit (stdenv.hostPlatform) is" fd --type f "\.nix" | xargs sd --fixed-strings "buildStdenv.is" "buildStdenv.hostPlatform.is" fd --type f "\.nix" | xargs sd --fixed-strings "effectiveStdenv.is" "effectiveStdenv.hostPlatform.is" fd --type f "\.nix" | xargs sd --fixed-strings "originalStdenv.is" "originalStdenv.hostPlatform.is" ```
42 lines
1.3 KiB
Nix
42 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 = lib.optionalString stdenv.hostPlatform.isDarwin ''
|
|
substituteInPlace glogg.pro \
|
|
--replace "boost_program_options-mt" "boost_program_options"
|
|
'';
|
|
|
|
nativeBuildInputs = [ qmake ];
|
|
buildInputs = [ boost ];
|
|
|
|
qmakeFlags = [ "VERSION=${version}" ];
|
|
|
|
postInstall = lib.optionalString stdenv.hostPlatform.isDarwin ''
|
|
mkdir -p $out/Applications
|
|
mv $out/bin/glogg.app $out/Applications/glogg.app
|
|
rm -fr $out/{bin,share}
|
|
'';
|
|
|
|
meta = with lib; {
|
|
description = "Fast, smart log explorer";
|
|
mainProgram = "glogg";
|
|
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 ];
|
|
};
|
|
}
|