summary refs log tree commit diff
path: root/pkgs/development/compilers/souper
diff options
context:
space:
mode:
authorRemy Goldschmidt <taktoa@gmail.com>2017-02-05 11:55:39 -0600
committerRemy Goldschmidt <taktoa@gmail.com>2017-02-06 21:57:45 -0600
commitac72948c94421bbc714076992e21953d78f67205 (patch)
tree6ed8a12b0cd97f19b8f0f19a3eb5223e8bf19858 /pkgs/development/compilers/souper
parent664360229e00f3774b856358d685602191ffcc0d (diff)
downloadnixlib-ac72948c94421bbc714076992e21953d78f67205.tar
nixlib-ac72948c94421bbc714076992e21953d78f67205.tar.gz
nixlib-ac72948c94421bbc714076992e21953d78f67205.tar.bz2
nixlib-ac72948c94421bbc714076992e21953d78f67205.tar.lz
nixlib-ac72948c94421bbc714076992e21953d78f67205.tar.xz
nixlib-ac72948c94421bbc714076992e21953d78f67205.tar.zst
nixlib-ac72948c94421bbc714076992e21953d78f67205.zip
souper: init at 2017-01-05
Diffstat (limited to 'pkgs/development/compilers/souper')
-rw-r--r--pkgs/development/compilers/souper/default.nix56
1 files changed, 56 insertions, 0 deletions
diff --git a/pkgs/development/compilers/souper/default.nix b/pkgs/development/compilers/souper/default.nix
new file mode 100644
index 000000000000..74e1cbf68d30
--- /dev/null
+++ b/pkgs/development/compilers/souper/default.nix
@@ -0,0 +1,56 @@
+{ stdenv, fetchFromGitHub, cmake, makeWrapper
+, llvmPackages_39, hiredis, z3_opt, gtest
+}:
+
+let
+  klee = fetchFromGitHub {
+    owner = "klee";
+    repo  = "klee";
+    rev   = "a743d7072d9ccf11f96e3df45f25ad07da6ad9d6";
+    sha256 = "0qwzs029vlba8xz362n4b00hdm2z3lzhzmvix1r8kpbfrvs8vv91";
+  };
+in stdenv.mkDerivation {
+  name = "souper-unstable-2017-01-05";
+
+  src = fetchFromGitHub {
+    owner  = "google";
+    repo   = "souper";
+    rev    = "1be75fe6a96993b57dcba038798fe6d1c7d113eb";
+    sha256 = "0r8mjb88lwz9a3syx7gwsxlwfg0krffaml04ggaf3ad0cza2mvm8";
+  };
+
+  nativeBuildInputs = [
+    cmake
+    makeWrapper
+  ];
+
+  buildInputs = [
+    llvmPackages_39.llvm
+    llvmPackages_39.clang-unwrapped
+    hiredis
+    gtest
+  ];
+
+  enableParallelBuilding = true;
+
+  preConfigure = ''
+      mkdir -pv third_party
+      cp -R "${klee}" third_party/klee
+  '';
+
+  installPhase = ''
+      mkdir -pv $out/bin
+      cp -v ./souper       $out/bin/
+      cp -v ./clang-souper $out/bin/
+      wrapProgram "$out/bin/souper" \
+          --add-flags "-z3-path=\"${z3_opt}/bin/z3\""
+  '';
+
+  meta = with stdenv.lib; {
+    description = "A superoptimizer for LLVM IR";
+    homepage    = "https://github.com/google/souper";
+    license     = licenses.asl20;
+    maintainers = with maintainers; [ taktoa ];
+    platforms   = with platforms; linux;
+  };
+}