From face50edcfb6c5390fa74ae2eb4591d8c2ce08cb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= Date: Thu, 5 Feb 2026 14:32:49 +0100 Subject: [PATCH] c0: remove broken package c0 has been marked broken since NixOS 24.05 and remains unfixed. Per RFC 180, packages broken for a full release cycle are subject to removal. https://github.com/NixOS/rfcs/pull/180 --- pkgs/development/compilers/c0/default.nix | 88 ------------------- .../compilers/c0/use-system-libraries.patch | 53 ----------- pkgs/top-level/aliases.nix | 1 + pkgs/top-level/all-packages.nix | 4 - 4 files changed, 1 insertion(+), 145 deletions(-) delete mode 100644 pkgs/development/compilers/c0/default.nix delete mode 100644 pkgs/development/compilers/c0/use-system-libraries.patch diff --git a/pkgs/development/compilers/c0/default.nix b/pkgs/development/compilers/c0/default.nix deleted file mode 100644 index 0316fcc64b2a..000000000000 --- a/pkgs/development/compilers/c0/default.nix +++ /dev/null @@ -1,88 +0,0 @@ -{ - lib, - stdenv, - fetchFromBitbucket, - mlton, - pkg-config, - getopt, - boehmgc, - darwin, - libbacktrace, - libpng, - ncurses, - readline, - unstableGitUpdater, -}: - -stdenv.mkDerivation rec { - pname = "c0"; - version = "0-unstable-2023-09-05"; - - src = fetchFromBitbucket { - owner = "c0-lang"; - repo = "c0"; - rev = "608f97eef5d81bb85963d66f955730dd93996f67"; - hash = "sha256-lRIEtclx+NKxAO72nsvnxVeEGCEe6glC6w8MXh1HEwY="; - }; - - patches = [ - ./use-system-libraries.patch - ]; - - postPatch = '' - substituteInPlace cc0/Makefile \ - --replace '$(shell ./get_version.sh)' '${version}' - substituteInPlace cc0/compiler/bin/buildid \ - --replace '`../get_version.sh`' '${version}' \ - --replace '`date`' '1970-01-01T00:00:00Z' \ - --replace '`hostname`' 'nixpkgs' - '' - + lib.optionalString stdenv.hostPlatform.isDarwin '' - for f in cc0/compiler/bin/coin-o0-support cc0/compiler/bin/cc0-o0-support; do - substituteInPlace $f --replace '$(brew --prefix gnu-getopt)' '${getopt}' - done - ''; - - preConfigure = '' - cd cc0/ - ''; - - nativeBuildInputs = [ - getopt - mlton - pkg-config - ] - ++ lib.optionals stdenv.hostPlatform.isDarwin [ darwin.sigtool ]; - - buildInputs = [ - boehmgc - libbacktrace - libpng - ncurses - readline - ]; - - strictDeps = true; - - installFlags = [ "PREFIX=$(out)" ]; - - postInstall = '' - mkdir -p $out/share/emacs/site-lisp - mv $out/c0-mode/ $out/share/emacs/site-lisp/ - ''; - - passthru.updateScript = unstableGitUpdater { - url = "https://bitbucket.org/c0-lang/c0.git"; - }; - - meta = { - description = "Small safe subset of the C programming language, augmented with contracts"; - homepage = "https://c0.cs.cmu.edu/"; - license = lib.licenses.mit; - maintainers = [ ]; - platforms = lib.platforms.unix; - # line 1: ../../bin/wrappergen: cannot execute: required file not found - # make[2]: *** [../../lib.mk:83: - broken = stdenv.hostPlatform.isLinux; - }; -} diff --git a/pkgs/development/compilers/c0/use-system-libraries.patch b/pkgs/development/compilers/c0/use-system-libraries.patch deleted file mode 100644 index cc15ef368f33..000000000000 --- a/pkgs/development/compilers/c0/use-system-libraries.patch +++ /dev/null @@ -1,53 +0,0 @@ -Use system libraries - ---- a/cc0/Makefile -+++ b/cc0/Makefile -@@ -22,12 +22,12 @@ MLTON_BASIC = mlton $(MLTON_FLAGS) -verbose $(MLTON_VERB) -output - MLTON_NATIVE := mlton -default-ann "redundantMatch error" -default-ann "sequenceNonUnit error" - MLTON_NATIVE += -link-opt "-lpthread -ldl -rdynamic" -cc-opt "-Iinclude" -default-ann "allowFFI true" - MLTON_NATIVE += -cc-opt "-I../externals/" --MLTON_NATIVE += -link-opt "../externals/readline/libreadline.a ../externals/readline/libhistory.a" -+MLTON_NATIVE += -link-opt "$(shell pkg-config readline --libs)" - MLTON_NATIVE += -link-opt "$(shell pkg-config libpng --libs)" - - # libreadline dependencies - ifeq ($(PLATFORM),osx) --MLTON_NATIVE += -link-opt "-ltermcap" -+MLTON_NATIVE += -link-opt "-lncurses" - else - # (Assuming Linux) - MLTON_NATIVE += -link-opt "-ltinfo" -@@ -122,9 +122,9 @@ endef - - $(foreach rt,$(RUNTIMES),$(eval $(call runtime_template,$(rt)))) - --c0rt/$(call dllname,c0rt): gc libbacktrace -+c0rt/$(call dllname,c0rt): - --unsafe/$(call dllname,unsafe): gc -+unsafe/$(call dllname,unsafe): - - - ### cc0 - the C0 compiler -@@ -222,7 +222,6 @@ NATIVE_COIN = $(NATIVE_CYMBOL) $(NATIVE_CALLING) - NATIVE_COIN += coin/c0readline.c - - COIN_DEPS = $(CC0_DEPS) $(NATIVE_COIN) cymbol/cymbol*.cm cymbol/*.sml cymbol/*.mlb coin/coin*.cm coin/*.sml coin/*.sml --COIN_DEPS += readline - - .PHONY: coin - coin: bin/coin ---- a/cc0/lib.mk -+++ b/cc0/lib.mk -@@ -15,9 +15,9 @@ TARGET = $(call dllname,$(LIBNAME)) - endif - - # These libs are handled specially by this file --NATIVELIBS = gc ncurses backtrace -+NATIVELIBS = - C0LIBS = $(filter-out $(NATIVELIBS),$(REQUIRES)) --LIBS = -L$(abspath $(DEPTH)/lib) $(patsubst %,$(DEPTH)/lib/$(call dllname,%),$(C0LIBS)) -+LIBS = -L$(abspath $(DEPTH)/lib) - LDFLAGS = - - # -fPIC is not supported on Windows and is not necessary there because we link statically diff --git a/pkgs/top-level/aliases.nix b/pkgs/top-level/aliases.nix index 70cfdeb0ebca..3e2efaef7de0 100644 --- a/pkgs/top-level/aliases.nix +++ b/pkgs/top-level/aliases.nix @@ -399,6 +399,7 @@ mapAliases { bullet-roboschool = throw "'bullet-roboschool' has been removed as its build was broken and it was deprecated with its last update in 2019."; # Added 2025-11-15 bwidget = throw "'bwidget' has been renamed to/replaced by 'tclPackages.bwidget'"; # Converted to throw 2025-10-27 bzrtp = throw "'bzrtp' has been moved to 'linphonePackages.bzrtp'"; # Added 2025-09-20 + c0 = throw "'c0' has been removed due to being broken for more than a year; see RFC 180"; # Added 2026-02-05 calculix = throw "'calculix' has been renamed to/replaced by 'calculix-ccx'"; # Converted to throw 2025-10-27 calligra = throw "'calligra' has been renamed to/replaced by 'kdePackages.calligra'"; # Converted to throw 2025-10-27 callPackage_i686 = throw "'callPackage_i686' has been renamed to/replaced by 'pkgsi686Linux.callPackage'"; # Converted to throw 2025-10-27 diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 8a985cf429e7..5e5166bcf723 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -6172,10 +6172,6 @@ with pkgs; sqlmap = with python3Packages; toPythonApplication sqlmap; - c0 = callPackage ../development/compilers/c0 { - stdenv = if stdenv.hostPlatform.isDarwin then gccStdenv else stdenv; - }; - teensyduino = arduino-core.override { withGui = true; withTeensyduino = true;