2022-04-27 09:35:20 +00:00
|
|
|
{ lib
|
2024-02-29 20:09:43 +00:00
|
|
|
, stdenv
|
2022-04-27 09:35:20 +00:00
|
|
|
, fetchFromGitHub
|
|
|
|
, pkg-config
|
|
|
|
, qtbase
|
|
|
|
, qtsvg
|
|
|
|
, qtcharts
|
|
|
|
, wrapQtAppsHook
|
|
|
|
, cmake
|
|
|
|
, python3
|
2024-02-29 20:09:43 +00:00
|
|
|
, unstableGitUpdater
|
2022-04-27 09:35:20 +00:00
|
|
|
}:
|
|
|
|
|
2024-02-29 20:09:43 +00:00
|
|
|
stdenv.mkDerivation rec {
|
2022-04-27 09:35:20 +00:00
|
|
|
pname = "ripes";
|
2024-02-29 20:09:43 +00:00
|
|
|
# Pulling unstable version as latest stable does not build against gcc-13.
|
2024-04-21 15:54:59 +00:00
|
|
|
version = "2.2.6-unstable-2024-04-02";
|
2022-04-27 09:35:20 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "mortbopet";
|
|
|
|
repo = "Ripes";
|
2024-04-21 15:54:59 +00:00
|
|
|
rev = "027e678a44b7b9f3e81e5b6863b0d68af05fd69c";
|
2022-04-27 09:35:20 +00:00
|
|
|
fetchSubmodules = true;
|
2024-04-21 15:54:59 +00:00
|
|
|
hash = "sha256-u6JxXCX1BMdbHTF7EBGEnXOV+eF6rgoZZcHqB/1nVjE=";
|
2022-04-27 09:35:20 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
cmake
|
|
|
|
pkg-config
|
|
|
|
python3
|
|
|
|
wrapQtAppsHook
|
|
|
|
];
|
|
|
|
|
|
|
|
buildInputs = [
|
|
|
|
qtbase
|
|
|
|
qtsvg
|
|
|
|
qtcharts
|
|
|
|
];
|
|
|
|
|
|
|
|
installPhase = ''
|
2023-10-09 19:29:22 +00:00
|
|
|
runHook preInstall
|
|
|
|
'' + lib.optionalString stdenv.isDarwin ''
|
|
|
|
mkdir -p $out/Applications
|
|
|
|
cp -r Ripes.app $out/Applications/
|
|
|
|
makeBinaryWrapper $out/Applications/Ripes.app/Contents/MacOS/Ripes $out/bin/Ripes
|
|
|
|
'' + lib.optionalString stdenv.isLinux ''
|
2022-04-27 09:35:20 +00:00
|
|
|
install -D Ripes $out/bin/Ripes
|
2023-10-09 19:29:22 +00:00
|
|
|
'' + ''
|
2022-04-27 09:35:20 +00:00
|
|
|
cp -r ${src}/appdir/usr/share $out/share
|
2023-10-09 19:29:22 +00:00
|
|
|
runHook postInstall
|
2022-04-27 09:35:20 +00:00
|
|
|
'';
|
|
|
|
|
2024-02-29 20:09:43 +00:00
|
|
|
passthru.updateScript = unstableGitUpdater { };
|
|
|
|
|
2022-04-27 09:35:20 +00:00
|
|
|
meta = with lib; {
|
|
|
|
description = "A graphical processor simulator and assembly editor for the RISC-V ISA";
|
|
|
|
homepage = "https://github.com/mortbopet/Ripes";
|
|
|
|
license = licenses.mit;
|
2023-10-09 19:29:22 +00:00
|
|
|
platforms = platforms.unix;
|
2024-02-29 20:09:43 +00:00
|
|
|
mainProgram = "Ripes";
|
2022-04-27 09:35:20 +00:00
|
|
|
maintainers = with maintainers; [ rewine ];
|
|
|
|
};
|
|
|
|
}
|