mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-26 00:43:20 +00:00
Merge pull request #288465 from abathur/resholve_cross
resholve: partially fix cross-compilation
This commit is contained in:
commit
a9286091ab
@ -4,34 +4,17 @@
|
||||
, callPackage
|
||||
, fetchFromGitHub
|
||||
, makeWrapper
|
||||
, # re2c deps
|
||||
autoreconfHook
|
||||
, # py-yajl deps
|
||||
git
|
||||
, # oil deps
|
||||
file
|
||||
, pkgsBuildBuild
|
||||
pkgsBuildBuild
|
||||
, re2c
|
||||
, file
|
||||
, six
|
||||
, typing
|
||||
}:
|
||||
|
||||
rec {
|
||||
re2c = stdenv.mkDerivation rec {
|
||||
pname = "re2c";
|
||||
version = "1.0.3";
|
||||
sourceRoot = "${src.name}/re2c";
|
||||
src = fetchFromGitHub {
|
||||
owner = "skvadrik";
|
||||
repo = "re2c";
|
||||
rev = version;
|
||||
sha256 = "0grx7nl9fwcn880v5ssjljhcb9c5p2a6xpwil7zxpmv0rwnr3yqi";
|
||||
};
|
||||
nativeBuildInputs = [ autoreconfHook ];
|
||||
preCheck = ''
|
||||
patchShebangs run_tests.sh
|
||||
'';
|
||||
};
|
||||
|
||||
py-yajl = python27.pkgs.buildPythonPackage rec {
|
||||
pname = "oil-pyyajl-unstable";
|
||||
version = "2022-09-01";
|
||||
@ -103,7 +86,9 @@ rec {
|
||||
"--without-readline"
|
||||
];
|
||||
|
||||
nativeBuildInputs = [ re2c file makeWrapper ];
|
||||
depsBuildBuild = [ re2c ];
|
||||
|
||||
nativeBuildInputs = [ file makeWrapper ];
|
||||
|
||||
propagatedBuildInputs = [ six typing py-yajl ];
|
||||
|
||||
|
@ -1,8 +1,7 @@
|
||||
{ lib
|
||||
, fetchFromGitHub
|
||||
, runCommand
|
||||
, yallback
|
||||
, yara
|
||||
, pkgsBuildBuild
|
||||
}:
|
||||
|
||||
/* TODO/CAUTION:
|
||||
@ -59,7 +58,7 @@ let
|
||||
callback = lore: drv: overrides: ''
|
||||
if [[ -d "${drv}/bin" ]] || [[ -d "${drv}/lib" ]] || [[ -d "${drv}/libexec" ]]; then
|
||||
echo generating binlore for $drv by running:
|
||||
echo "${yara}/bin/yara --scan-list --recursive ${lore.rules} <(printf '%s\n' ${drv}/{bin,lib,libexec}) | ${yallback}/bin/yallback ${lore.yallback}"
|
||||
echo "${pkgsBuildBuild.yara}/bin/yara --scan-list --recursive ${lore.rules} <(printf '%s\n' ${drv}/{bin,lib,libexec}) | ${pkgsBuildBuild.yallback}/bin/yallback ${lore.yallback}"
|
||||
else
|
||||
echo "failed to generate binlore for $drv (none of ${drv}/{bin,lib,libexec} exist)"
|
||||
fi
|
||||
@ -84,7 +83,7 @@ let
|
||||
((i--)) || true # don't break build
|
||||
done # || true # don't break build
|
||||
if [[ -d "${drv}/bin" ]] || [[ -d "${drv}/lib" ]] || [[ -d "${drv}/libexec" ]]; then
|
||||
${yara}/bin/yara --scan-list --recursive ${lore.rules} <(printf '%s\n' ${drv}/{bin,lib,libexec}) | ${yallback}/bin/yallback ${lore.yallback} "$filter"
|
||||
${pkgsBuildBuild.yara}/bin/yara --scan-list --recursive ${lore.rules} <(printf '%s\n' ${drv}/{bin,lib,libexec}) | ${pkgsBuildBuild.yallback}/bin/yallback ${lore.yallback} "$filter"
|
||||
fi
|
||||
'';
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user