2018-07-04 13:02:02 +02:00
|
|
|
{ stdenv, fetchFromGitHub, capstone, libbfd, libelf, libiberty, readline }:
|
|
|
|
|
2019-08-13 23:52:01 +02:00
|
|
|
stdenv.mkDerivation {
|
2019-08-15 14:41:18 +02:00
|
|
|
pname = "wcc-unstable";
|
2018-07-04 13:02:02 +02:00
|
|
|
version = "2018-04-05";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "endrazine";
|
|
|
|
repo = "wcc";
|
|
|
|
rev = "f141963ff193d7e1931d41acde36d20d7221e74f";
|
|
|
|
sha256 = "1f0w869x0176n5nsq7m70r344gv5qvfmk7b58syc0jls8ghmjvb4";
|
|
|
|
fetchSubmodules = true;
|
|
|
|
};
|
|
|
|
|
|
|
|
buildInputs = [ capstone libbfd libelf libiberty readline ];
|
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
sed -i src/wsh/include/libwitch/wsh.h src/wsh/scripts/INDEX \
|
|
|
|
-e "s#/usr/share/wcc#$out/share/wcc#"
|
2020-01-25 19:49:56 +01:00
|
|
|
|
|
|
|
sed -i -e '/stropts.h>/d' src/wsh/include/libwitch/wsh.h
|
2018-07-04 13:02:02 +02:00
|
|
|
'';
|
|
|
|
|
|
|
|
installFlags = [ "DESTDIR=$(out)" ];
|
|
|
|
|
|
|
|
preInstall = ''
|
|
|
|
mkdir -p $out/usr/bin
|
|
|
|
'';
|
|
|
|
|
|
|
|
postInstall = ''
|
|
|
|
mv $out/usr/* $out
|
|
|
|
rmdir $out/usr
|
|
|
|
mkdir -p $out/share/man/man1
|
|
|
|
cp doc/manpages/*.1 $out/share/man/man1/
|
|
|
|
'';
|
|
|
|
|
|
|
|
preFixup = ''
|
|
|
|
# Let patchShebangs rewrite shebangs with wsh.
|
|
|
|
PATH+=:$out/bin
|
|
|
|
'';
|
|
|
|
|
|
|
|
enableParallelBuilding = true;
|
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
2020-04-01 03:11:51 +02:00
|
|
|
homepage = "https://github.com/endrazine/wcc";
|
2018-07-04 13:02:02 +02:00
|
|
|
description = "Witchcraft compiler collection: tools to convert and script ELF files";
|
|
|
|
license = licenses.mit;
|
|
|
|
platforms = [ "x86_64-linux" ];
|
|
|
|
maintainers = with maintainers; [ orivej ];
|
|
|
|
};
|
|
|
|
}
|