clean: init at 3.1 (#393363)

authored by Aleksana and committed by GitHub 559a668d f36201a6

+123 -1
+21
pkgs/by-name/cl/clean/chroot-build-support-do-not-rebuild-equal-timestamps.patch
··· 1 + The clean command line compiler clm uses timestamps of dcl, icl, abc and o files 2 + to decide what must be rebuild. However as for chroot builds, all of the 3 + library files will have equal timestamps, this leads to clm trying to rebuild 4 + the library modules distributed with the Clean installation every time a user 5 + compiles any file, which fails ue to the absence of write permission on the Nix 6 + store. 7 + 8 + This patch changes the freshness check to use less than instead of less than or 9 + equal to in order to avoid this. 10 + 11 + --- b/src/clm/clm.c 12 + +++ a/src/clm/clm.c 13 + @@ -250,7 +250,7 @@ 14 + || (t1.dwHighDateTime==t2.dwHighDateTime && (unsigned)(t1.dwLowDateTime)<=(unsigned)(t2.dwLowDateTime))) 15 + #else 16 + typedef unsigned long FileTime; 17 + -# define FILE_TIME_LE(t1,t2) (t1<=t2) 18 + +# define FILE_TIME_LE(t1,t2) (t1<t2) 19 + #endif 20 + 21 + typedef struct project_node {
+22
pkgs/by-name/cl/clean/declare-functions-explicitly-for-gcc14.patch
··· 1 + --- a/src/RuntimeSystem/scon.c 2 + +++ b/src/RuntimeSystem/scon.c 3 + @@ -858,6 +858,8 @@ 4 + int execution_aborted; 5 + int return_code; 6 + 7 + +extern void abc_main (void); 8 + + 9 + int main (int argc,char **argv) 10 + { 11 + int arg_n; 12 + 13 + --- a/src/clm/cachingcompiler.h 14 + +++ b/src/clm/cachingcompiler.h 15 + @@ -1,6 +1,7 @@ 16 + Clean (:: *Thread :== Int) 17 + int start_caching_compiler (CleanCharArray compiler_path); 18 + Clean (start_caching_compiler :: {#Char} Thread -> (Int, Thread)) 19 + +int start_caching_compiler_with_args (CleanCharArray coc_path, char** cocl_argv, int cocl_argv_size); 20 + int call_caching_compiler (CleanCharArray args); 21 + Clean (call_caching_compiler :: {#Char} Thread -> (Int, Thread)) 22 + int stop_caching_compiler (void);
+80
pkgs/by-name/cl/clean/package.nix
··· 1 + { 2 + binutils, 3 + fetchurl, 4 + gcc, 5 + lib, 6 + runCommand, 7 + stdenv, 8 + }: 9 + 10 + stdenv.mkDerivation (finalAttrs: { 11 + pname = "clean"; 12 + version = "3.1"; 13 + 14 + src = 15 + if stdenv.hostPlatform.system == "i686-linux" then 16 + (fetchurl { 17 + url = "https://ftp.cs.ru.nl/Clean/Clean31/linux/clean3.1_32_boot.tar.gz"; 18 + sha256 = "Ls0IKf+o7yhRLhtSV61jzmnYukfh5x5fogHaP5ke/Ck="; 19 + }) 20 + else if stdenv.hostPlatform.system == "x86_64-linux" then 21 + (fetchurl { 22 + url = "https://ftp.cs.ru.nl/Clean/Clean31/linux/clean3.1_64_boot.tar.gz"; 23 + sha256 = "Gg5CVZjrwDBtV7Vuw21Xj6Rn+qN1Mf6B3ls6r/16oBc="; 24 + }) 25 + else 26 + throw "Architecture not supported"; 27 + 28 + hardeningDisable = [ "pic" ]; 29 + 30 + patches = [ 31 + ./chroot-build-support-do-not-rebuild-equal-timestamps.patch 32 + ./declare-functions-explicitly-for-gcc14.patch 33 + ]; 34 + 35 + postPatch = '' 36 + substituteInPlace Makefile \ 37 + --replace-fail 'INSTALL_DIR = $(CURRENTDIR)' "INSTALL_DIR = $out" 38 + substituteInPlace src/clm/clm.c \ 39 + --replace-fail /usr/bin/as ${binutils}/bin/as \ 40 + --replace-fail /usr/bin/gcc ${gcc}/bin/gcc 41 + ''; 42 + 43 + buildFlags = [ "-C src/" ]; 44 + 45 + # do not strip libraries and executables since all symbols since they are 46 + # required as is for compilation. Especially the labels of unused section need 47 + # to be kept. 48 + dontStrip = true; 49 + 50 + passthru.tests.compile-hello-world = runCommand "compile-hello-world" { } '' 51 + cat >HelloWorld.icl <<EOF 52 + module HelloWorld 53 + Start = "Hello, world!" 54 + EOF 55 + ${finalAttrs.finalPackage}/bin/clm HelloWorld -o hello-world 56 + touch $out 57 + ''; 58 + 59 + meta = { 60 + description = "General purpose, state-of-the-art, pure and lazy functional programming language"; 61 + longDescription = '' 62 + Clean is a general purpose, state-of-the-art, pure and lazy functional 63 + programming language designed for making real-world applications. Some 64 + of its most notable language features are uniqueness typing, dynamic typing, 65 + and generic functions. 66 + ''; 67 + 68 + homepage = "http://wiki.clean.cs.ru.nl/Clean"; 69 + license = lib.licenses.bsd2; 70 + maintainers = with lib.maintainers; [ 71 + bmrips 72 + erin 73 + ]; 74 + platforms = [ 75 + "i686-linux" 76 + "x86_64-linux" 77 + ]; 78 + mainProgram = "clean"; 79 + }; 80 + })
-1
pkgs/top-level/aliases.nix
··· 439 439 citra = throw "citra has been removed from nixpkgs, as it has been taken down upstream"; # added 2024-03-04 440 440 citra-nightly = throw "citra-nightly has been removed from nixpkgs, as it has been taken down upstream"; # added 2024-03-04 441 441 citra-canary = throw "citra-canary has been removed from nixpkgs, as it has been taken down upstream"; # added 2024-03-04 442 - clean = throw "'clean' has been removed from nixpkgs, as it is unmaintained and broken"; # Added 2025-05-18 443 442 cloog = throw "cloog has been removed from Nixpkgs, as it is unmaintained and obsolete"; # Added 2024-09-13 444 443 cloog_0_18_0 = throw "cloog_0_18_0 has been removed from Nixpkgs, as it is unmaintained and obsolete"; # Added 2024-09-13 445 444 cloogppl = throw "cloogppl has been removed from Nixpkgs, as it is unmaintained and obsolete"; # Added 2024-09-13