2023-08-22 20:05:09 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, fetchFromGitHub
|
|
|
|
, meson
|
|
|
|
, pkg-config
|
|
|
|
, ninja
|
|
|
|
, rizin
|
|
|
|
, openssl
|
|
|
|
}:
|
|
|
|
|
2024-04-21 15:54:59 +00:00
|
|
|
let
|
|
|
|
libquickjs = fetchFromGitHub {
|
|
|
|
owner = "frida";
|
|
|
|
repo = "quickjs";
|
|
|
|
rev = "c81f05c9859cea5f83a80057416a0c7affe9b876";
|
|
|
|
hash = "sha256-nAws0ae9kAwvCFcw/yR7XRMwU8EbHoq7kp7iBFpZEZc=";
|
|
|
|
};
|
|
|
|
in
|
|
|
|
stdenv.mkDerivation (finalAttrs: {
|
2023-08-22 20:05:09 +00:00
|
|
|
pname = "jsdec";
|
2024-04-21 15:54:59 +00:00
|
|
|
version = "0.7.0";
|
2023-08-22 20:05:09 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "rizinorg";
|
|
|
|
repo = "jsdec";
|
2024-04-21 15:54:59 +00:00
|
|
|
rev = "v${finalAttrs.version}";
|
|
|
|
hash = "sha256-UuFA0YKH+0n4Ec3CTiSUFlKXMY4k+tooaEFJYrj6Law=";
|
2023-08-22 20:05:09 +00:00
|
|
|
};
|
|
|
|
|
2024-04-21 15:54:59 +00:00
|
|
|
postUnpack = ''
|
|
|
|
cp -r --no-preserve=mode ${libquickjs} $sourceRoot/subprojects/libquickjs
|
|
|
|
'';
|
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
cp subprojects/packagefiles/libquickjs/* subprojects/libquickjs
|
2023-08-22 20:05:09 +00:00
|
|
|
'';
|
2024-04-21 15:54:59 +00:00
|
|
|
|
|
|
|
nativeBuildInputs = [ meson ninja pkg-config ];
|
2023-08-22 20:05:09 +00:00
|
|
|
buildInputs = [ openssl rizin ];
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Simple decompiler for Rizin";
|
2024-04-21 15:54:59 +00:00
|
|
|
homepage = finalAttrs.src.meta.homepage;
|
|
|
|
changelog = "${finalAttrs.src.meta.homepage}/releases/tag/${finalAttrs.src.rev}";
|
2023-08-22 20:05:09 +00:00
|
|
|
license = with licenses; [ asl20 bsd3 mit ];
|
|
|
|
maintainers = with maintainers; [ chayleaf ];
|
|
|
|
};
|
2024-04-21 15:54:59 +00:00
|
|
|
})
|