571c71e6f7
We are migrating packages that meet below requirements: 1. using `callPackage` 2. called path is a directory 3. overriding set is empty (`{ }`) 4. not containing path expressions other than relative path (to makenixpkgs-vet happy) 5. not referenced by nix files outside of the directory, other than`pkgs/top-level/all-packages.nix` 6. not referencing nix files outside of the directory 7. not referencing `default.nix` (since it's changed to `package.nix`) 8. `outPath` doesn't change after migration The tool is here: https://github.com/Aleksanaa/by-name-migrate.
48 lines
1.2 KiB
Nix
48 lines
1.2 KiB
Nix
{ lib, stdenv, fetchFromGitHub, fetchpatch
|
|
, python3
|
|
}:
|
|
|
|
stdenv.mkDerivation rec {
|
|
pname = "libinjection";
|
|
version = "3.10.0";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "client9";
|
|
repo = pname;
|
|
rev = "refs/tags/v${version}";
|
|
sha256 = "0chsgam5dqr9vjfhdcp8cgk7la6nf3lq44zs6z6si98cq743550g";
|
|
};
|
|
|
|
nativeBuildInputs = [ python3 ];
|
|
|
|
strictDeps = true;
|
|
|
|
patches = [
|
|
(fetchpatch {
|
|
name = "support-python3-for-building";
|
|
url = "https://raw.githubusercontent.com/sysown/proxysql/bed58f92917eb651b80fd8ffa627a485eb320805/deps/libinjection/update-build-py3.diff";
|
|
hash = "sha256-SPdf57FIDDNpatWe5pjhAiZl5yPMDEv50k0Wj+eWTEM=";
|
|
})
|
|
];
|
|
|
|
postPatch = ''
|
|
patchShebangs src
|
|
substituteInPlace src/Makefile \
|
|
--replace /usr/local $out
|
|
'';
|
|
|
|
configurePhase = "cd src";
|
|
buildPhase = "make all";
|
|
|
|
# no binaries, so out = library, dev = headers
|
|
outputs = [ "out" "dev" ];
|
|
|
|
meta = with lib; {
|
|
description = "SQL / SQLI tokenizer parser analyzer";
|
|
homepage = "https://github.com/client9/libinjection";
|
|
license = licenses.bsd3;
|
|
platforms = platforms.all;
|
|
maintainers = with maintainers; [ thoughtpolice ];
|
|
};
|
|
}
|