2010-12-25 16:13:07 +01:00
|
|
|
{ stdenv, fetchurl }:
|
|
|
|
|
2019-08-13 23:52:01 +02:00
|
|
|
stdenv.mkDerivation {
|
2018-12-14 21:58:25 +01:00
|
|
|
name = "clean-3.0";
|
2010-12-25 16:13:07 +01:00
|
|
|
|
|
|
|
src =
|
2018-08-20 21:11:29 +02:00
|
|
|
if stdenv.hostPlatform.system == "i686-linux" then (fetchurl {
|
2018-12-14 21:58:25 +01:00
|
|
|
url = "https://ftp.cs.ru.nl/Clean/Clean30/linux/clean3.0_32_boot.tar.gz";
|
|
|
|
sha256 = "0cjxv3vqrg6pz3aicwfdz1zyhk0q650464j3qyl0wzaikh750010";
|
2010-12-25 16:13:07 +01:00
|
|
|
})
|
2018-08-20 21:11:29 +02:00
|
|
|
else if stdenv.hostPlatform.system == "x86_64-linux" then (fetchurl {
|
2018-12-14 21:58:25 +01:00
|
|
|
url = "https://ftp.cs.ru.nl/Clean/Clean30/linux/clean3.0_64_boot.tar.gz";
|
|
|
|
sha256 = "06k283y9adbi28f78k3m5ssg6py73qqkz3sm8dgxc89drv4krl2i";
|
2010-12-25 16:13:07 +01:00
|
|
|
})
|
|
|
|
else throw "Architecture not supported";
|
|
|
|
|
2016-02-26 18:38:15 +01:00
|
|
|
hardeningDisable = [ "format" "pic" ];
|
2016-02-08 10:55:18 +01:00
|
|
|
|
2010-12-25 16:13:07 +01:00
|
|
|
# clm uses timestamps of dcl, icl, abc and o files to decide what must be rebuild
|
|
|
|
# and for chroot builds all of the library files will have equal timestamps. This
|
|
|
|
# makes clm try to rebuild the library modules (and fail due to absence of write permission
|
|
|
|
# on the Nix store) every time any file is compiled.
|
|
|
|
patches = [ ./chroot-build-support-do-not-rebuild-equal-timestamps.patch ];
|
|
|
|
|
|
|
|
preBuild = ''
|
|
|
|
substituteInPlace Makefile --replace 'INSTALL_DIR = $(CURRENTDIR)' 'INSTALL_DIR = '$out
|
|
|
|
|
|
|
|
substituteInPlace src/tools/clm/clm.c --replace '/usr/bin/gcc' $(type -p gcc)
|
|
|
|
substituteInPlace src/tools/clm/clm.c --replace '/usr/bin/as' $(type -p as)
|
|
|
|
|
|
|
|
cd src
|
|
|
|
'';
|
|
|
|
|
|
|
|
postBuild = ''
|
|
|
|
cd ..
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = {
|
2013-10-05 16:22:46 +02:00
|
|
|
description = "General purpose, state-of-the-art, pure and lazy functional programming language";
|
2010-12-25 16:13:07 +01:00
|
|
|
longDescription = ''
|
|
|
|
Clean is a general purpose, state-of-the-art, pure and lazy functional
|
|
|
|
programming language designed for making real-world applications. Some
|
|
|
|
of its most notable language features are uniqueness typing, dynamic typing,
|
|
|
|
and generic functions.
|
|
|
|
'';
|
|
|
|
|
2020-04-01 03:11:51 +02:00
|
|
|
homepage = "http://wiki.clean.cs.ru.nl/Clean";
|
2010-12-25 16:13:07 +01:00
|
|
|
license = stdenv.lib.licenses.lgpl21;
|
|
|
|
maintainers = [ stdenv.lib.maintainers.kkallio ];
|
|
|
|
platforms = [ "i686-linux" "x86_64-linux" ];
|
|
|
|
};
|
|
|
|
}
|