Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rizin: init at unstable-2021-01-13 #109305

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
52 changes: 52 additions & 0 deletions pkgs/development/tools/analysis/rizin/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
{ stdenv
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
{ stdenv
{ stdenv
, lib

, fetchFromGitHub
, ninja, meson
, libzip, openssl, xxHash, zlib
}:

stdenv.mkDerivation {
pname = "rizin";
version = "unstable-2021-01-13";

src = fetchFromGitHub {
owner = "rizinorg";
repo = "rizin";
rev = "ca2471ae9596176c656f065ed74c480f13784e1b";
sha256 = "0qigy1px0jy74c5ig73dc2fqjcy6vcy76i25dx9r3as6zfpkkaxj";
};
Copy link
Member

@Mic92 Mic92 Jan 14, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

They still rely on git to set versions etc:

https://github.com/rizinorg/rizin/blob/d4964454765539c61cce7f3f845f8d7fe3a3f076/Makefile#L60

In our radare2 build we generate those automatically (see python script).


postPatch = let
capstone = fetchFromGitHub {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please move this to a let in before mkDerivation.

owner = "aquynh";
repo = "capstone";
# version from $sourceRoot/shlr/Makefile
rev = "4.0.2";
sha256 = "0y5g74yjyliciawpn16zhdwya7bd3d7b1cccpcccc2wg8vni1k2w";
};
in ''
mkdir -p build/shlr
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
mkdir -p build/shlr
mkdir shlr

cp -r ${capstone} capstone-${capstone.rev}
chmod -R +w capstone-${capstone.rev}
tar -czvf shlr/capstone-${capstone.rev}.tar.gz capstone-${capstone.rev}
'';

configureFlags = [
"--with-syszip"
"--with-sysxxhash"
"--with-openssl"
];

enableParallelBuilding = true;

buildInputs = [ openssl zlib ];

propagatedBuildInputs = [ libzip xxHash ];

meta = {
description = "unix-like reverse engineering framework and commandline tools";
homepage = "https://rizin.re/";
license = stdenv.lib.licenses.lgpl3Only;
maintainers = with stdenv.lib.maintainers; [ pamplemousse ];
platforms = with stdenv.lib.platforms; linux;
};
Comment on lines +45 to +51
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
meta = {
description = "unix-like reverse engineering framework and commandline tools";
homepage = "https://rizin.re/";
license = stdenv.lib.licenses.lgpl3Only;
maintainers = with stdenv.lib.maintainers; [ pamplemousse ];
platforms = with stdenv.lib.platforms; linux;
};
meta = with lib; {
description = "unix-like reverse engineering framework and commandline tools";
homepage = "https://rizin.re/";
license = licenses.lgpl3Only;
maintainers = with maintainers; [ pamplemousse ];
platforms = with platforms; linux;
};

}
2 changes: 2 additions & 0 deletions pkgs/top-level/all-packages.nix
Original file line number Diff line number Diff line change
Expand Up @@ -12236,6 +12236,8 @@ in
lua = lua5;
} // (config.radare or {}))) radare2 r2-for-cutter;

rizin = callPackage ../development/tools/analysis/rizin { };

radare2-cutter = libsForQt515.callPackage ../development/tools/analysis/radare2/cutter.nix { };

ragel = ragelStable;
Expand Down