Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

souper: init at 2017-01-05 #22468

Merged
merged 1 commit into from
Feb 8, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
56 changes: 56 additions & 0 deletions pkgs/development/compilers/souper/default.nix
Original file line number Diff line number Diff line change
@@ -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";
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nitpick: You don't need quotes around URLs.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

URL literals complicate parsing for very little benefit (see this issue for more details), so I wouldn't be surprised if they were deprecated in the future.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wasn't are of this issue. Thank you!

Copy link
Member

@vcunat vcunat Feb 8, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Eelco seems to be against deprecating them, so it's unlikely to happen fully. (It might happen for non-URL URIs.)

license = licenses.asl20;
maintainers = with maintainers; [ taktoa ];
platforms = with platforms; linux;
};
}
2 changes: 2 additions & 0 deletions pkgs/top-level/all-packages.nix
Original file line number Diff line number Diff line change
Expand Up @@ -3844,6 +3844,8 @@ with pkgs;

sonata = callPackage ../applications/audio/sonata { };

souper = callPackage ../development/compilers/souper { };

sparsehash = callPackage ../development/libraries/sparsehash { };

spiped = callPackage ../tools/networking/spiped { };
Expand Down