Created
February 24, 2022 02:17
-
-
Save qbit/55992415f8ae26320d20b499265976ca to your computer and use it in GitHub Desktop.
Nix shell for building Renode
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Things build fine, tests are nto able to run (pip doesn't have robotframework 4.0.1? | |
# Renode executes, but for some reason the UI fails to start. | |
{ pkgs ? import <nixpkgs> { } }: | |
let | |
mybot = pkgs.python3Packages.buildPythonPackage rec { | |
pname = "robotframework"; | |
version = "4.0.1"; | |
src = pkgs.python3Packages.fetchPypi { | |
inherit pname version; | |
sha256 = ""; | |
}; | |
#doCheck = false; | |
}; | |
mythong = pkgs.python3; | |
mythong-packages = mythong.withPackages (p: | |
with p; [ | |
#mybot # Version 4.0.1 seemst to be missing?! | |
robotframework | |
netifaces | |
requests | |
psutil | |
pyyaml | |
]); | |
in pkgs.mkShell { | |
buildInputs = [ mythong-packages ]; | |
shellHook = '' | |
substituteInPlace output/properties.csproj --replace '/usr/bin/gcc' $(type -p gcc) | |
substituteInPlace src/Infrastructure/src/Emulator/Cores/linux-properties.csproj --replace '/usr/bin/gcc' $(type -p gcc) | |
substituteInPlace src/Infrastructure/src/Emulator/Cores/tcg.cproj --replace '/usr/bin/gcc' $(type -p gcc) | |
substituteInPlace src/Infrastructure/src/Emulator/Cores/translate.cproj --replace '/usr/bin/gcc' $(type -p gcc) | |
substituteInPlace tools/packaging/conda/use_conda_cc.patch --replace '/usr/bin/gcc' $(type -p gcc) | |
substituteInPlace output/properties.csproj --replace '/usr/bin/ar' $(type -p ar) | |
substituteInPlace src/Infrastructure/src/Emulator/Cores/linux-properties.csproj --replace '/usr/bin/ar' $(type -p ar) | |
substituteInPlace src/Infrastructure/src/Emulator/Cores/tcg.cproj --replace '/usr/bin/ar' $(type -p ar) | |
substituteInPlace src/Infrastructure/src/Emulator/Cores/translate.cproj --replace '/usr/bin/ar' $(type -p ar) | |
substituteInPlace tools/packaging/conda/use_conda_cc.patch --replace '/usr/bin/ar' $(type -p ar) | |
for f in $(find . -name \*.sh); do | |
substituteInPlace $f --replace '/bin/bash' '/usr/bin/env bash' | |
done | |
substituteInPlace ./renode --replace '/bin/bash' '/usr/bin/env bash' | |
substituteInPlace ./renode-test --replace '/bin/bash' '/usr/bin/env bash' | |
export NO_COLOR=true | |
export PS1="\u@\h:\w; " | |
''; | |
nativeBuildInputs = with pkgs.buildPackages; [ | |
bash | |
gcc | |
gtk2 | |
gtk-sharp-2_0 | |
mono5 | |
pango | |
pkg-config | |
]; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment