mcy: 2020.03.21 -> 2020.07.06

Signed-off-by: Austin Seipp <aseipp@pobox.com>
This commit is contained in:
Austin Seipp 2020-07-09 10:33:09 -05:00
parent 9058630c2e
commit 44f8640ae4
No known key found for this signature in database
GPG key ID: 25D2038DEB08021D

View file

@ -7,31 +7,38 @@ let
in in
stdenv.mkDerivation { stdenv.mkDerivation {
pname = "mcy"; pname = "mcy";
version = "2020.03.21"; version = "2020.07.06";
src = fetchFromGitHub { src = fetchFromGitHub {
owner = "YosysHQ"; owner = "YosysHQ";
repo = "mcy"; repo = "mcy";
rev = "bac92b8aad9bf24714fda70d3750bb50d6d96177"; rev = "6e8433ed9acbface5e080719110a957d89d849df";
sha256 = "0mmg6zd5cbn8g0am9c3naamg0lq67yyy117fzn2ydigcyia7vmnp"; sha256 = "1vbzg0rgmf7kp735m6p4msxc51vpsrdwk24ir7z0zxsb8lv53gg7";
}; };
buildInputs = [ python ]; buildInputs = [ python ];
patchPhase = '' patchPhase = ''
chmod +x scripts/create_mutated.sh
patchShebangs .
substituteInPlace mcy.py \ substituteInPlace mcy.py \
--replace yosys '${yosys}/bin/yosys' \ --replace yosys '${yosys}/bin/yosys' \
--replace 'os.execvp("mcy-dash"' "os.execvp(\"$out/bin/mcy-dash\"" --replace 'os.execvp("mcy-dash"' "os.execvp(\"$out/bin/mcy-dash\""
substituteInPlace mcy-dash.py \ substituteInPlace mcy-dash.py \
--replace 'app.run(debug=True)' 'app.run(host="0.0.0.0",debug=True)' --replace 'app.run(debug=True)' 'app.run(host="0.0.0.0",debug=True)' \
--replace 'subprocess.Popen(["mcy"' "subprocess.Popen([\"$out/bin/mcy\""
substituteInPlace scripts/create_mutated.sh \
--replace yosys '${yosys}/bin/yosys'
''; '';
# the build needs a bit of work... # the build needs a bit of work...
buildPhase = "true"; buildPhase = "true";
installPhase = '' installPhase = ''
mkdir -p $out/bin $out/share/mcy/dash mkdir -p $out/bin $out/share/mcy/{dash,scripts}
install mcy.py $out/bin/mcy && chmod +x $out/bin/mcy install mcy.py $out/bin/mcy && chmod +x $out/bin/mcy
install mcy-dash.py $out/bin/mcy-dash && chmod +x $out/bin/mcy-dash install mcy-dash.py $out/bin/mcy-dash && chmod +x $out/bin/mcy-dash
cp -r dash/. $out/share/mcy/dash/. cp -r dash/. $out/share/mcy/dash/.
cp -r scripts/. $out/share/mcy/scripts/.
''; '';
meta = { meta = {