nixpkgs/pkgs/development/compilers/emscripten/fastcomp/default.nix
Matthew Bauer 02297beade treewide: add version to packages
Lots of packages are missing versions in their name. This adds them
where appropriate. These were found with this command:

 $ nix-env -qa -f. | grep -v '\-[0-9A-Za-z.-_+]*$' | grep -v '^hook$'

See issue #41007.
2018-05-25 15:48:05 -05:00

29 lines
983 B
Nix

{ newScope, stdenv, binutils, wrapCCWith, symlinkJoin }:
let
callPackage = newScope (self // {inherit stdenv;});
self = {
emscriptenfastcomp-unwrapped = callPackage ./emscripten-fastcomp.nix {};
emscriptenfastcomp-wrapped = wrapCCWith {
cc = self.emscriptenfastcomp-unwrapped;
# Never want Apple's cctools for WASM target
bintools = binutils;
libc = stdenv.cc.libc;
extraBuildCommands = ''
# hardening flags break WASM support
cat > $out/nix-support/add-hardening.sh
'';
};
emscriptenfastcomp = symlinkJoin {
name = "emscriptenfastcomp-${stdenv.lib.getVersion self.emscriptenfastcomp-unwrapped}";
paths = [ self.emscriptenfastcomp-wrapped self.emscriptenfastcomp-unwrapped ];
preferLocalBuild = false;
allowSubstitutes = true;
postBuild = ''
# replace unwrapped clang-3.9 binary by wrapper
ln -sf $out/bin/clang $out/bin/clang-[0-9]*
'';
};
};
in self