diff --git a/pkgs/applications/science/logic/mcy/default.nix b/pkgs/applications/science/logic/mcy/default.nix new file mode 100644 index 000000000000..9f239f221b18 --- /dev/null +++ b/pkgs/applications/science/logic/mcy/default.nix @@ -0,0 +1,41 @@ +{ stdenv, fetchFromGitHub +, yosys, symbiyosys, python3 +}: + +let + python = python3.withPackages (p: with p; [ flask ]); +in +stdenv.mkDerivation { + pname = "mcy"; + version = "2020.02.05"; + + src = fetchFromGitHub { + owner = "YosysHQ"; + repo = "mcy"; + rev = "83deeddd12d583a89ad4aa1d2147efa4d6adc33c"; + sha256 = "1i0cabiqr68zflwzc6z894i4n7k6m3hbfck58vzh8zb9jwxwizav"; + }; + + buildInputs = [ python ]; + patchPhase = '' + substituteInPlace mcy.py \ + --replace yosys '${yosys}/bin/yosys' \ + --replace 'os.execvp("mcy-dash"' "os.execvp(\"$out/libexec/mcy/mcy-dash.py\"" + ''; + + # the build needs a bit of work... + buildPhase = "true"; + installPhase = '' + mkdir -p $out/bin $out/libexec/mcy + install mcy.py $out/bin/mcy && chmod +x $out/bin/mcy + install mcy-dash.py $out/libexec/mcy/mcy-dash.py + ''; + + meta = { + description = "Mutation-based coverage testing for hardware designs, with Yosys"; + homepage = "https://github.com/YosysHQ/mcy"; + license = stdenv.lib.licenses.isc; + maintainers = with stdenv.lib.maintainers; [ thoughtpolice ]; + platforms = stdenv.lib.platforms.all; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 0679f2ddd73b..3004e0fac1ee 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -24503,6 +24503,8 @@ in symbiyosys = callPackage ../applications/science/logic/symbiyosys {}; + mcy = callPackage ../applications/science/logic/mcy {}; + lingeling = callPackage ../applications/science/logic/lingeling {}; ### SCIENCE / ELECTRONICS