about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--pkgs/development/misc/resholve/oildev.nix27
-rw-r--r--pkgs/development/tools/analysis/binlore/default.nix7
2 files changed, 9 insertions, 25 deletions
diff --git a/pkgs/development/misc/resholve/oildev.nix b/pkgs/development/misc/resholve/oildev.nix
index 4e7cdb5e6043..b862d261b4fa 100644
--- a/pkgs/development/misc/resholve/oildev.nix
+++ b/pkgs/development/misc/resholve/oildev.nix
@@ -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 ];
 
diff --git a/pkgs/development/tools/analysis/binlore/default.nix b/pkgs/development/tools/analysis/binlore/default.nix
index 54ea108b7d46..e081f43a768f 100644
--- a/pkgs/development/tools/analysis/binlore/default.nix
+++ b/pkgs/development/tools/analysis/binlore/default.nix
@@ -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
     '';
   };