From 6391b9f659300f2d209f2776a6befe534262d8e1 Mon Sep 17 00:00:00 2001 From: Jade Lovelace Date: Mon, 18 Nov 2024 13:05:18 -0800 Subject: [PATCH] nix-doc hacks: remove Not required anymore :3 --- flake.nix | 2 +- nix-doc/package.nix | 64 --------------------------------------------- overlay.nix | 2 +- 3 files changed, 2 insertions(+), 66 deletions(-) delete mode 100644 nix-doc/package.nix diff --git a/flake.nix b/flake.nix index 72245f3..cb7710e 100644 --- a/flake.nix +++ b/flake.nix @@ -57,7 +57,7 @@ checks = { inherit (self.packages.${system}) default nix-eval-jobs; - inherit (pkgs) nixos-option; + inherit (pkgs) nixos-option nix-doc; } // lib.optionalAttrs (lib.elem system linux64BitSystems) { # wrongMajor intentionally not included here since it is expected to fail inherit (self.nixosTests.${system}) it-builds; diff --git a/nix-doc/package.nix b/nix-doc/package.nix deleted file mode 100644 index 48ed473..0000000 --- a/nix-doc/package.nix +++ /dev/null @@ -1,64 +0,0 @@ -# Temporary replacement of the nix-doc package with -# https://github.com/NixOS/nixpkgs/pull/296523 so that we can have working Lix -# with nix-doc on 23.11 and 24.05-pre -# -# Can be removed when that commit is in 23.11 and 24.05-pre, or 24.05 is -# released with the commit. -{ lib -, stdenv -, rustPlatform -, fetchFromGitHub -, boost -, nix -, pkg-config -# Whether to build the nix-doc plugin for Nix -, withPlugin ? true -}: - -let - packageFlags = [ "-p" "nix-doc" ] ++ lib.optionals withPlugin [ "-p" "nix-doc-plugin" ]; -in -rustPlatform.buildRustPackage rec { - pname = "nix-doc"; - version = "0.6.5"; - - src = fetchFromGitHub { - rev = "v${version}"; - owner = "lf-"; - repo = "nix-doc"; - sha256 = "sha256-9cuNzq+CBA2jz0LkZb7lh/WISIlKklfovGBAbSo1Mgk="; - }; - - doCheck = true; - buildInputs = lib.optionals withPlugin [ boost nix ]; - - nativeBuildInputs = lib.optionals withPlugin [ pkg-config nix ]; - - cargoBuildFlags = packageFlags; - cargoTestFlags = packageFlags; - - # Packaging support for making the nix-doc plugin load cleanly as a no-op on - # the wrong Nix version (disabling bindnow permits loading libraries - # requiring unavailable symbols if they are unreached) - hardeningDisable = lib.optionals withPlugin [ "bindnow" ]; - # Due to a Rust bug, setting -Z relro-level to anything including "off" on - # macOS will cause link errors - env = lib.optionalAttrs (withPlugin && stdenv.isLinux) { - # nix-doc does not use nightly features, however, there is no other way to - # set relro-level - RUSTC_BOOTSTRAP = 1; - RUSTFLAGS = "-Z relro-level=partial"; - }; - - cargoSha256 = "sha256-CHagzXTG9AfrFd3WmHanQ+YddMgmVxSuB8vK98A1Mlw="; - - meta = with lib; { - description = "An interactive Nix documentation tool"; - longDescription = "An interactive Nix documentation tool providing a CLI for function search, a Nix plugin for docs in the REPL, and a ctags implementation for Nix script"; - homepage = "https://github.com/lf-/nix-doc"; - license = licenses.lgpl3Plus; - maintainers = [ maintainers.lf- ]; - platforms = platforms.unix; - mainProgram = "nix-doc"; - }; -} diff --git a/overlay.nix b/overlay.nix index 3c37b9e..cafae8a 100644 --- a/overlay.nix +++ b/overlay.nix @@ -118,7 +118,7 @@ let } ); - nix-doc = prev.callPackage ./nix-doc/package.nix { withPlugin = false; }; + nix-doc = prev.nix-doc.override { withPlugin = false; }; }; in # Make the overlay idempotent, since flakes passing nixos modules around by