Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at release-19.03 52 lines 2.0 kB view raw
1{ stdenv, fetchurl }: 2 3stdenv.mkDerivation rec { 4 name = "clean-3.0"; 5 6 src = 7 if stdenv.hostPlatform.system == "i686-linux" then (fetchurl { 8 url = "https://ftp.cs.ru.nl/Clean/Clean30/linux/clean3.0_32_boot.tar.gz"; 9 sha256 = "0cjxv3vqrg6pz3aicwfdz1zyhk0q650464j3qyl0wzaikh750010"; 10 }) 11 else if stdenv.hostPlatform.system == "x86_64-linux" then (fetchurl { 12 url = "https://ftp.cs.ru.nl/Clean/Clean30/linux/clean3.0_64_boot.tar.gz"; 13 sha256 = "06k283y9adbi28f78k3m5ssg6py73qqkz3sm8dgxc89drv4krl2i"; 14 }) 15 else throw "Architecture not supported"; 16 17 hardeningDisable = [ "format" "pic" ]; 18 19 # clm uses timestamps of dcl, icl, abc and o files to decide what must be rebuild 20 # and for chroot builds all of the library files will have equal timestamps. This 21 # makes clm try to rebuild the library modules (and fail due to absence of write permission 22 # on the Nix store) every time any file is compiled. 23 patches = [ ./chroot-build-support-do-not-rebuild-equal-timestamps.patch ]; 24 25 preBuild = '' 26 substituteInPlace Makefile --replace 'INSTALL_DIR = $(CURRENTDIR)' 'INSTALL_DIR = '$out 27 28 substituteInPlace src/tools/clm/clm.c --replace '/usr/bin/gcc' $(type -p gcc) 29 substituteInPlace src/tools/clm/clm.c --replace '/usr/bin/as' $(type -p as) 30 31 cd src 32 ''; 33 34 postBuild = '' 35 cd .. 36 ''; 37 38 meta = { 39 description = "General purpose, state-of-the-art, pure and lazy functional programming language"; 40 longDescription = '' 41 Clean is a general purpose, state-of-the-art, pure and lazy functional 42 programming language designed for making real-world applications. Some 43 of its most notable language features are uniqueness typing, dynamic typing, 44 and generic functions. 45 ''; 46 47 homepage = http://wiki.clean.cs.ru.nl/Clean; 48 license = stdenv.lib.licenses.lgpl21; 49 maintainers = [ stdenv.lib.maintainers.kkallio ]; 50 platforms = [ "i686-linux" "x86_64-linux" ]; 51 }; 52}