mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-22 23:13:19 +00:00
qgrep: 1.1 -> 1.3
This commit is contained in:
parent
97e55af0ee
commit
93254942b1
53
pkgs/by-name/qg/qgrep/package.nix
Normal file
53
pkgs/by-name/qg/qgrep/package.nix
Normal file
@ -0,0 +1,53 @@
|
||||
{ lib
|
||||
, stdenv
|
||||
, fetchFromGitHub
|
||||
, fetchpatch
|
||||
, darwin
|
||||
}:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "qgrep";
|
||||
version = "1.3";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "zeux";
|
||||
repo = "qgrep";
|
||||
rev = "v${version}";
|
||||
fetchSubmodules = true;
|
||||
hash = "sha256-TeXOzfb1Nu6hz9l6dXGZY+xboscPapKm0Z264hv1Aww=";
|
||||
};
|
||||
|
||||
patches = [
|
||||
(fetchpatch {
|
||||
name = "gcc-13.patch";
|
||||
url = "https://github.com/zeux/qgrep/commit/8810ab153ec59717a5d7537b3e7812c01cd80848.patch";
|
||||
hash = "sha256-lCMvpuLZluT6Rw8RFZ2uY9bffPBoq6sRVWYLUmeXfOg=";
|
||||
})
|
||||
];
|
||||
|
||||
buildInputs = lib.optionals stdenv.isDarwin [
|
||||
darwin.apple_sdk.frameworks.CoreServices
|
||||
darwin.apple_sdk.frameworks.CoreFoundation
|
||||
];
|
||||
|
||||
env.NIX_CFLAGS_COMPILE = toString (lib.optionals stdenv.isDarwin [
|
||||
"-Wno-error=unused-command-line-argument"
|
||||
"-Wno-error=unqualified-std-cast-call"
|
||||
]);
|
||||
|
||||
installPhase = ''
|
||||
runHook preInstall
|
||||
|
||||
install -Dm755 qgrep $out/bin/qgrep
|
||||
|
||||
runHook postInstall
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "Fast regular expression grep for source code with incremental index updates";
|
||||
homepage = "https://github.com/zeux/qgrep";
|
||||
license = licenses.mit;
|
||||
maintainers = [ maintainers.yrashk ];
|
||||
platforms = platforms.all;
|
||||
};
|
||||
}
|
@ -1,45 +0,0 @@
|
||||
{ lib, stdenv, fetchFromGitHub, CoreServices, CoreFoundation, fetchpatch }:
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
version = "1.1";
|
||||
pname = "qgrep";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "zeux";
|
||||
repo = "qgrep";
|
||||
rev = "v${version}";
|
||||
sha256 = "046ccw34vz2k5jn6gyxign5gs2qi7i50jy9b74wqv7sjf5zayrh0";
|
||||
fetchSubmodules = true;
|
||||
};
|
||||
|
||||
patches = lib.optionals stdenv.isDarwin [
|
||||
(fetchpatch {
|
||||
url = "https://github.com/zeux/qgrep/commit/21c4d1a5ab0f0bdaa0b5ca993c1315c041418cc6.patch";
|
||||
sha256 = "0wpxzrd9pmhgbgby17vb8279xwvkxfdd99gvv7r74indgdxqg7v8";
|
||||
})
|
||||
];
|
||||
|
||||
buildInputs = lib.optionals stdenv.isDarwin [ CoreServices CoreFoundation ];
|
||||
|
||||
env.NIX_CFLAGS_COMPILE = toString (lib.optionals (stdenv.cc.isGNU && lib.versionAtLeast stdenv.cc.version "12") [
|
||||
# Needed with GCC 12 but breaks on darwin (with clang) or older gcc
|
||||
"-Wno-error=mismatched-new-delete"
|
||||
]);
|
||||
|
||||
postPatch = lib.optionalString stdenv.isAarch64 ''
|
||||
substituteInPlace Makefile \
|
||||
--replace "-msse2" "" --replace "-DUSE_SSE2" ""
|
||||
'';
|
||||
|
||||
installPhase = ''
|
||||
install -Dm755 qgrep $out/bin/qgrep
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "Fast regular expression grep for source code with incremental index updates";
|
||||
homepage = "https://github.com/zeux/qgrep";
|
||||
license = licenses.mit;
|
||||
maintainers = [ maintainers.yrashk ];
|
||||
platforms = platforms.all;
|
||||
};
|
||||
}
|
@ -12508,10 +12508,6 @@ with pkgs;
|
||||
|
||||
qdigidoc = libsForQt5.callPackage ../tools/security/qdigidoc { } ;
|
||||
|
||||
qgrep = pin-to-gcc12-if-gcc13 (callPackage ../tools/text/qgrep {
|
||||
inherit (darwin.apple_sdk.frameworks) CoreServices CoreFoundation;
|
||||
});
|
||||
|
||||
qhull = callPackage ../development/libraries/qhull { };
|
||||
|
||||
qjournalctl = libsForQt5.callPackage ../applications/system/qjournalctl { };
|
||||
|
Loading…
Reference in New Issue
Block a user