summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--makefu/5pkgs/dex2jar/default.nix48
-rw-r--r--makefu/5pkgs/drozer/default.nix32
2 files changed, 80 insertions, 0 deletions
diff --git a/makefu/5pkgs/dex2jar/default.nix b/makefu/5pkgs/dex2jar/default.nix
new file mode 100644
index 000000000..b519b80a2
--- /dev/null
+++ b/makefu/5pkgs/dex2jar/default.nix
@@ -0,0 +1,48 @@
+{ stdenv, lib, pkgs, fetchurl, jre, makeWrapper, unzip }:
+stdenv.mkDerivation rec {
+ name = "${packageName}-${version}";
+ packageName = "dex2jar";
+ version = "2.0";
+
+ src = fetchurl {
+ url = "mirror://sourceforge/${packageName}/${name}.zip";
+ sha256 = "1g3mrbyl8sdw1nhp17z23qbfzqpa0w2yxrywgphvd04jdr6yn1vr";
+ };
+
+ nativeBuildInputs = [ makeWrapper unzip ];
+
+ unpackPhase = ''
+ unzip $src
+ cd ${name}
+ '';
+
+ configurePhase = ":";
+
+ buildPhase = ''
+ rm *.bat
+ chmod +x *.sh
+ '';
+
+ installPhase = ''
+ f=$out/lib/dex2jar/
+ bin=$out/bin
+
+ mkdir -p $f $bin
+
+ # fixup path to java
+ sed -i 's#^java#${pkgs.jre}/bin/java#' d2j_invoke.sh
+
+ mv * $f
+ for i in $f/*.sh; do
+ n=$(basename ''${i%.sh})
+ makeWrapper $i $bin/$n
+ done
+ '';
+ fixupPhase = ":";
+
+ meta = {
+ homepage = https://sourceforge.net/projects/dex2jar/;
+ description = "convert dex to jar";
+ license = lib.licenses.asl20;
+ };
+}
diff --git a/makefu/5pkgs/drozer/default.nix b/makefu/5pkgs/drozer/default.nix
new file mode 100644
index 000000000..c63f1d0d8
--- /dev/null
+++ b/makefu/5pkgs/drozer/default.nix
@@ -0,0 +1,32 @@
+{ pkgs, lib, fetchFromGitHub, pythonPackages, jre7, jdk7, ... }:
+
+pythonPackages.buildPythonApplication rec {
+ name = "drozer-${version}";
+ version = "2.4.3";
+ buildInputs = [ jdk7 ];
+ propagatedBuildInputs = with pythonPackages; [
+ protobuf
+ pyopenssl
+ pyyaml
+ jre7
+ twisted
+ ];
+ src = fetchFromGitHub {
+ owner = "mwrlabs";
+ repo = "drozer";
+ rev = version;
+ sha256 = "1z437y7rr53dhpi95yc2c3x8g4aix90y7zf52avcdsvhlp4iip3q";
+ };
+ prePatch = ''
+ sed -i 's#^exec java #exec ${jre7}/bin/java #' ./src/drozer/lib/dx
+ patchShebangs ./src/drozer/lib/dx
+ patchelf $(cat $NIX_CC/nix-support/dynamic-linker) ./src/drozer/lib/aapt
+ echo starting build
+ '';
+
+ meta = {
+ homepage = https://github.com/mwrlabs/drozer/;
+ description = "The Leading Security Assessment Framework for Android";
+ license = lib.licenses.bsd2;
+ };
+}