1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-12-19 03:48:57 +00:00
nixpkgs/pkgs/development/compilers/binaryen/default.nix

42 lines
1.1 KiB
Nix
Raw Normal View History

{ stdenv, cmake, fetchFromGitHub, emscriptenRev ? null }:
let
defaultVersion = "44";
# Map from git revs to SHA256 hashes
sha256s = {
"version_44" = "0zsqppc05fm62807w6vyccxkk2y2gar7kxbxxixq8zz3xsp6w84p";
"1.37.36" = "1wgzfzjjzkiaz0rf2lnwrcvlcsjvjhyvbyh58jxhqq43vi34zyjc";
};
in
2017-06-04 04:49:46 +01:00
stdenv.mkDerivation rec {
version = if emscriptenRev == null
then defaultVersion
else "emscripten-${emscriptenRev}";
rev = if emscriptenRev == null
then "version_${version}"
else emscriptenRev;
2017-06-04 04:49:46 +01:00
name = "binaryen-${version}";
src = fetchFromGitHub {
owner = "WebAssembly";
repo = "binaryen";
sha256 =
if builtins.hasAttr rev sha256s
then builtins.getAttr rev sha256s
else null;
2017-06-04 04:49:46 +01:00
inherit rev;
};
nativeBuildInputs = [ cmake ];
meta = with stdenv.lib; {
homepage = https://github.com/WebAssembly/binaryen;
description = "Compiler infrastructure and toolchain library for WebAssembly, in C++";
platforms = platforms.all;
maintainers = with maintainers; [ asppsa ];
license = licenses.asl20;
};
}