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

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

60 lines
1.2 KiB
Nix
Raw Normal View History

2022-04-22 14:12:33 +00:00
{ lib
, mkDerivation
, fetchFromGitHub
, pkg-config
, qtbase
, qtsvg
, qtcharts
, wrapQtAppsHook
, cmake
, python3
2023-09-06 13:31:56 +00:00
, stdenv
2022-04-22 14:12:33 +00:00
}:
mkDerivation rec {
pname = "ripes";
2023-01-13 00:39:39 +00:00
version = "2.2.6";
2022-04-22 14:12:33 +00:00
src = fetchFromGitHub {
owner = "mortbopet";
repo = "Ripes";
rev = "v${version}";
fetchSubmodules = true;
2023-01-13 00:39:39 +00:00
sha256 = "sha256-fRkab0G2zjK1VYzH21yhL7Cr0rS4I8ir8gwH9ALy60A=";
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
'';
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;
2022-04-22 14:12:33 +00:00
maintainers = with maintainers; [ rewine ];
};
}