2022-10-30 15:09:59 +00:00
|
|
|
{ lib, stdenv, fetchurl, unzip, libX11, libXt, libnsl, libxcrypt }:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation {
|
|
|
|
pname = "unicon-lang";
|
|
|
|
version = "11.7";
|
|
|
|
src = fetchurl {
|
|
|
|
url = "http://unicon.org/dist/uni-2-4-2010.zip";
|
|
|
|
sha256 = "1g9l2dfp99dqih2ir2limqfjgagh3v9aqly6x0l3qavx3qkkwf61";
|
|
|
|
};
|
2021-03-19 17:17:44 +00:00
|
|
|
nativeBuildInputs = [ unzip ];
|
2022-10-30 15:09:59 +00:00
|
|
|
buildInputs = [ libnsl libX11 libXt libxcrypt ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
hardeningDisable = [ "fortify" ];
|
|
|
|
|
|
|
|
sourceRoot = ".";
|
|
|
|
|
2022-06-16 17:23:12 +00:00
|
|
|
# Workaround build failure on -fno-common toolchains like upstream
|
|
|
|
# gcc-10. Otherwise build fails as:
|
|
|
|
# ld: ../common/ipp.o:(.bss+0x0): multiple definition of `lpath'; tglobals.o:(.bss+0x30): first defined here
|
|
|
|
# TODO: remove the workaround once upstream releases version past:
|
|
|
|
# https://sourceforge.net/p/unicon/unicon/ci/b1a65230233f3825d055aee913b4fdcf178a0eaf/
|
2023-03-04 12:14:45 +00:00
|
|
|
env.NIX_CFLAGS_COMPILE = "-fcommon";
|
2022-06-16 17:23:12 +00:00
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
configurePhase = ''
|
|
|
|
case "$(uname -a | sed 's/ /_/g')" in
|
|
|
|
Darwin*Version_9*i386) sys=intel_macos;;
|
|
|
|
Linux*x86_64*) sys=amd64_linux;;
|
|
|
|
Linux*i686*) sys=intel_linux;;
|
|
|
|
*) sys=unknown;;
|
|
|
|
esac
|
|
|
|
echo "all: ; echo" > uni/3d/makefile
|
|
|
|
make X-Configure name=$sys
|
|
|
|
'';
|
|
|
|
|
|
|
|
buildPhase = ''
|
|
|
|
make Unicon
|
|
|
|
'';
|
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
mkdir -p $out/
|
|
|
|
cp -r bin $out/
|
|
|
|
'';
|
|
|
|
|
2021-02-05 17:12:51 +00:00
|
|
|
meta = with lib; {
|
2022-06-16 17:23:12 +00:00
|
|
|
broken = (stdenv.isLinux && stdenv.isAarch64);
|
2021-01-17 00:15:33 +00:00
|
|
|
description = "A very high level, goal-directed, object-oriented, general purpose applications language";
|
2020-04-24 23:36:52 +00:00
|
|
|
maintainers = with maintainers; [ vrthra ];
|
|
|
|
platforms = platforms.linux;
|
|
|
|
license = licenses.gpl2;
|
|
|
|
homepage = "http://unicon.org";
|
|
|
|
};
|
|
|
|
}
|