nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
at python-updates 89 lines 2.4 kB view raw
1{ 2 lib, 3 stdenv, 4 fetchFromGitHub, 5 cmake, 6 pkg-config, 7 boost, 8 capstone_4, 9 double-conversion, 10 graphviz, 11 qtxmlpatterns, 12 qttools, 13 qtbase, 14 wrapQtAppsHook, 15 testers, 16 nix-update-script, 17}: 18 19stdenv.mkDerivation (finalAttrs: { 20 pname = "edb"; 21 version = "1.5.0"; 22 23 src = fetchFromGitHub { 24 owner = "eteran"; 25 repo = "edb-debugger"; 26 tag = finalAttrs.version; 27 fetchSubmodules = true; 28 hash = "sha256-ALhA/odVwUQHKuOZ1W/i/6L7da/yitdpBsx2kz2ySQE="; 29 }; 30 31 nativeBuildInputs = [ 32 cmake 33 pkg-config 34 wrapQtAppsHook 35 qttools 36 ]; 37 38 buildInputs = [ 39 qtbase 40 boost.dev 41 capstone_4 42 double-conversion 43 graphviz 44 qtxmlpatterns 45 ]; 46 47 cmakeFlags = [ 48 (lib.cmakeFeature "DEFAULT_PLUGIN_DIR" "${placeholder "out"}/lib/edb") 49 ]; 50 51 postPatch = '' 52 # The build script checks for the presence of .git to determine whether 53 # submodules were fetched and will throw an error if it's not there. 54 # Avoid using leaveDotGit in the fetchFromGitHub options as it is non-deterministic. 55 mkdir -p src/qhexview/.git lib/gdtoa-desktop/.git 56 57 # CMake 3.1 is deprecated and is no longer supported by CMake > 4 58 # https://github.com/NixOS/nixpkgs/issues/445447 59 substituteInPlace CMakeLists.txt src/CMakeLists.txt src/test/CMakeLists.txt plugins/CMakeLists.txt plugins/*/CMakeLists.txt --replace-fail \ 60 "cmake_minimum_required (VERSION 3.1)" \ 61 "cmake_minimum_required(VERSION 3.10)" 62 substituteInPlace lib/CMakeLists.txt lib/libELF/CMakeLists.txt lib/libPE/CMakeLists.txt --replace-fail \ 63 "cmake_minimum_required(VERSION 3.1)" \ 64 "cmake_minimum_required(VERSION 3.10)" 65 substituteInPlace lib/gdtoa-desktop/CMakeLists.txt --replace-fail \ 66 "cmake_minimum_required (VERSION 3.0)" \ 67 "cmake_minimum_required (VERSION 3.10)" 68 ''; 69 70 passthru = { 71 tests.version = testers.testVersion { 72 package = finalAttrs.finalPackage; 73 command = "env QT_QPA_PLATFORM=minimal ${lib.getExe finalAttrs.finalPackage} --version"; 74 }; 75 updateScript = nix-update-script { }; 76 }; 77 78 meta = { 79 description = "Cross platform AArch32/x86/x86-64 debugger"; 80 mainProgram = "edb"; 81 homepage = "https://github.com/eteran/edb-debugger"; 82 license = lib.licenses.gpl2Plus; 83 maintainers = with lib.maintainers; [ 84 lihop 85 maxxk 86 ]; 87 platforms = [ "x86_64-linux" ]; 88 }; 89})