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