summary refs log tree commit diff
path: root/pkgs/applications/science/logic/mcy/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/applications/science/logic/mcy/default.nix')
-rw-r--r--pkgs/applications/science/logic/mcy/default.nix19
1 files changed, 13 insertions, 6 deletions
diff --git a/pkgs/applications/science/logic/mcy/default.nix b/pkgs/applications/science/logic/mcy/default.nix
index a9366d56058..eba910e07eb 100644
--- a/pkgs/applications/science/logic/mcy/default.nix
+++ b/pkgs/applications/science/logic/mcy/default.nix
@@ -7,31 +7,38 @@ let
 in
 stdenv.mkDerivation {
   pname = "mcy";
-  version = "2020.03.21";
+  version = "2020.08.03";
 
   src = fetchFromGitHub {
     owner  = "YosysHQ";
     repo   = "mcy";
-    rev    = "bac92b8aad9bf24714fda70d3750bb50d6d96177";
-    sha256 = "0mmg6zd5cbn8g0am9c3naamg0lq67yyy117fzn2ydigcyia7vmnp";
+    rev    = "62048e69df13f8e03670424626755ae8ef4c36ff";
+    sha256 = "15xxgzx1zxzx5kshqyrxnfx33cz6cjzxcdcn6z98jhs9bwyvf96f";
   };
 
   buildInputs = [ python ];
   patchPhase = ''
+    chmod +x scripts/create_mutated.sh
+    patchShebangs .
+
     substituteInPlace mcy.py \
       --replace yosys '${yosys}/bin/yosys' \
       --replace 'os.execvp("mcy-dash"' "os.execvp(\"$out/bin/mcy-dash\""
     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...
   buildPhase = "true";
   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-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 = {