blob: c296d7c85967d8a5412825983cf7b5fd29cc86f0 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
|
{ stdenv
, lib
, fetchFromGitHub
, fetchurl
, autoPatchelfHook
, makeWrapper
, nix-update-script
, glibcLocales
, python3Packages
, gtk-sharp-2_0
, gtk2-x11
, screen
}:
let
pythonLibs = with python3Packages; makePythonPath [
construct
psutil
pyyaml
requests
(robotframework.overrideDerivation (oldAttrs: {
src = fetchFromGitHub {
owner = "robotframework";
repo = "robotframework";
rev = "v6.0.2";
hash = "sha256-c7pPcDgqyqWQtiMbLQbQd0nAgx4TIFUFHrlBVDNdr8M=";
};
}))
];
in
stdenv.mkDerivation (finalAttrs: {
pname = "renode";
version = "1.15.1";
src = fetchurl {
url = "https://github.com/renode/renode/releases/download/v${finalAttrs.version}/renode-${finalAttrs.version}.linux-portable.tar.gz";
hash = "sha256-W+JtyaXcYZD+iaVEFX6eatxV3/Vr4aZrsCLm1Aj+ISs=";
};
nativeBuildInputs = [
autoPatchelfHook
makeWrapper
];
propagatedBuildInputs = [
gtk2-x11
gtk-sharp-2_0
screen
];
strictDeps = true;
installPhase = ''
runHook preInstall
mkdir -p $out/{bin,libexec/renode}
mv * $out/libexec/renode
mv .renode-root $out/libexec/renode
chmod +x $out/libexec/renode/*.so
makeWrapper "$out/libexec/renode/renode" "$out/bin/renode" \
--prefix PATH : "$out/libexec/renode" \
--suffix LD_LIBRARY_PATH : "${gtk2-x11}/lib" \
--set LOCALE_ARCHIVE "${glibcLocales}/lib/locale/locale-archive"
makeWrapper "$out/libexec/renode/renode-test" "$out/bin/renode-test" \
--prefix PATH : "$out/libexec/renode" \
--prefix PYTHONPATH : "${pythonLibs}" \
--suffix LD_LIBRARY_PATH : "${gtk2-x11}/lib" \
--set LOCALE_ARCHIVE "${glibcLocales}/lib/locale/locale-archive"
substituteInPlace "$out/libexec/renode/renode-test" \
--replace '$PYTHON_RUNNER' '${python3Packages.python}/bin/python3'
runHook postInstall
'';
passthru.updateScript = nix-update-script { };
meta = {
description = "Virtual development framework for complex embedded systems";
homepage = "https://renode.io";
license = lib.licenses.bsd3;
maintainers = with lib.maintainers; [ otavio ];
platforms = [ "x86_64-linux" ];
};
})
|