nixpkgs/pkgs/applications/emulators/ripes/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

64 lines
1.4 KiB
Nix
Raw Normal View History

2022-04-22 14:12:33 +00:00
{ lib
, stdenv
2022-04-22 14:12:33 +00:00
, fetchFromGitHub
, pkg-config
, qtbase
, qtsvg
, qtcharts
, wrapQtAppsHook
, cmake
, python3
, unstableGitUpdater
2022-04-22 14:12:33 +00:00
}:
stdenv.mkDerivation rec {
2022-04-22 14:12:33 +00:00
pname = "ripes";
# Pulling unstable version as latest stable does not build against gcc-13.
version = "2.2.6-unstable-2024-04-04";
2022-04-22 14:12:33 +00:00
src = fetchFromGitHub {
owner = "mortbopet";
repo = "Ripes";
rev = "878087332afa3558dc8ca657f80a16ecdcf82818";
2022-04-22 14:12:33 +00:00
fetchSubmodules = true;
hash = "sha256-aNJTM/s4GNhWVXQxK1R/rIN/NmeKglibQZMh8ENjIzo=";
2022-04-22 14:12:33 +00:00
};
nativeBuildInputs = [
cmake
pkg-config
python3
wrapQtAppsHook
];
buildInputs = [
qtbase
qtsvg
qtcharts
];
installPhase = ''
2023-09-06 13:31:56 +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-22 14:12:33 +00:00
install -D Ripes $out/bin/Ripes
2023-09-06 13:31:56 +00:00
'' + ''
2022-04-22 14:12:33 +00:00
cp -r ${src}/appdir/usr/share $out/share
2023-09-06 13:31:56 +00:00
runHook postInstall
2022-04-22 14:12:33 +00:00
'';
passthru.updateScript = unstableGitUpdater { };
2022-04-22 14:12:33 +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-09-06 13:31:56 +00:00
platforms = platforms.unix;
mainProgram = "Ripes";
2022-04-22 14:12:33 +00:00
maintainers = with maintainers; [ rewine ];
};
}