Merge "nix-doc -> lix-doc, make self-contained in package.nix" into main
This commit is contained in:
commit
e55fc5af71
12 changed files with 25 additions and 15 deletions
|
@ -19,7 +19,7 @@ LIBBROTLI_LIBS = @LIBBROTLI_LIBS@
|
|||
LIBCURL_LIBS = @LIBCURL_LIBS@
|
||||
LIBSECCOMP_LIBS = @LIBSECCOMP_LIBS@
|
||||
LOWDOWN_LIBS = @LOWDOWN_LIBS@
|
||||
NIXDOC_LIBS = -lnix_doc
|
||||
NIXDOC_LIBS = -llix_doc
|
||||
OPENSSL_LIBS = @OPENSSL_LIBS@
|
||||
PACKAGE_NAME = @PACKAGE_NAME@
|
||||
PACKAGE_VERSION = @PACKAGE_VERSION@
|
||||
|
|
|
@ -148,13 +148,10 @@
|
|||
'';
|
||||
};
|
||||
|
||||
nix-doc = final.callPackage ./nix-doc/package.nix {};
|
||||
|
||||
nix = final.callPackage ./package.nix {
|
||||
inherit versionSuffix;
|
||||
stdenv = currentStdenv;
|
||||
busybox-sandbox-shell = final.busybox-sandbox-shell or final.default-busybox-sandbox-shell;
|
||||
nix-doc = final.nix-doc;
|
||||
};
|
||||
|
||||
# Export the patched version of boehmgc that Lix uses into the overlay
|
||||
|
|
0
nix-doc/.gitignore → lix-doc/.gitignore
vendored
0
nix-doc/.gitignore → lix-doc/.gitignore
vendored
2
nix-doc/Cargo.lock → lix-doc/Cargo.lock
generated
2
nix-doc/Cargo.lock → lix-doc/Cargo.lock
generated
|
@ -34,7 +34,7 @@ dependencies = [
|
|||
]
|
||||
|
||||
[[package]]
|
||||
name = "nix-doc"
|
||||
name = "lix-doc"
|
||||
version = "0.0.1"
|
||||
dependencies = [
|
||||
"expect-test",
|
|
@ -1,9 +1,10 @@
|
|||
[package]
|
||||
description = "Nix documentation grepping tool"
|
||||
description = "Nix function documentation tool, stripped down into a library"
|
||||
edition = "2018"
|
||||
name = "nix-doc"
|
||||
name = "lix-doc"
|
||||
version = "0.0.1"
|
||||
license = "BSD-2-Clause OR MIT"
|
||||
# upstream details
|
||||
homepage = "https://github.com/lf-/nix-doc"
|
||||
repository = "https://github.com/lf-/nix-doc"
|
||||
|
6
lix-doc/README.md
Normal file
6
lix-doc/README.md
Normal file
|
@ -0,0 +1,6 @@
|
|||
# lix-doc
|
||||
|
||||
This is a stripped down fork of `nix-doc`, used for `:doc` in `nix repl` in
|
||||
Lix. It will be replaced in the future with proper support when we get the new
|
||||
parser working, but it exists today as a low-risk implementation of an
|
||||
important usability feature.
|
|
@ -4,8 +4,8 @@
|
|||
}:
|
||||
|
||||
rustPlatform.buildRustPackage {
|
||||
name = "nix-doc";
|
||||
name = "lix-doc";
|
||||
|
||||
cargoHash = "sha256-HXL235loBJnRje7KaMCCCTighv6WNYRrZ/jgkAQbEY0=";
|
||||
cargoLock.lockFile = ./Cargo.lock;
|
||||
src = lib.cleanSource ./.;
|
||||
}
|
|
@ -233,10 +233,13 @@ deps += toml11
|
|||
nlohmann_json = dependency('nlohmann_json', required : true)
|
||||
deps += nlohmann_json
|
||||
|
||||
# nix-doc is a Rust project provided via buildInputs and unfortunately doesn't have any way to be detected.
|
||||
# lix-doc is a Rust project provided via buildInputs and unfortunately doesn't have any way to be detected.
|
||||
# Just declare it manually to resolve this.
|
||||
nix_doc = declare_dependency(link_args : [ '-lnix_doc' ])
|
||||
deps += nix_doc
|
||||
#
|
||||
# FIXME: build this with meson in the future after we drop Make (with which we
|
||||
# *absolutely* are not going to make it work)
|
||||
lix_doc = declare_dependency(link_args : [ '-llix_doc' ])
|
||||
deps += lix_doc
|
||||
|
||||
#
|
||||
# Build-time tools
|
||||
|
|
|
@ -48,7 +48,8 @@
|
|||
|
||||
busybox-sandbox-shell,
|
||||
|
||||
nix-doc,
|
||||
# internal fork of nix-doc providing :doc in the repl
|
||||
lix-doc ? __forDefaults.lix-doc,
|
||||
|
||||
pname ? "nix",
|
||||
versionSuffix ? "",
|
||||
|
@ -81,6 +82,8 @@
|
|||
./boehmgc-traceable_allocator-public.diff
|
||||
];
|
||||
};
|
||||
|
||||
lix-doc = pkgs.callPackage ./lix-doc/package.nix { };
|
||||
},
|
||||
}: let
|
||||
inherit (__forDefaults) canRunInstalled;
|
||||
|
@ -209,7 +212,7 @@ in stdenv.mkDerivation (finalAttrs: {
|
|||
lowdown
|
||||
libsodium
|
||||
toml11
|
||||
nix-doc
|
||||
lix-doc
|
||||
]
|
||||
++ lib.optionals stdenv.hostPlatform.isLinux [ libseccomp busybox-sandbox-shell ]
|
||||
++ lib.optional stdenv.hostPlatform.isx86_64 libcpuid
|
||||
|
|
|
@ -45,7 +45,7 @@ libcmd = library(
|
|||
editline,
|
||||
lowdown,
|
||||
nlohmann_json,
|
||||
nix_doc
|
||||
lix_doc
|
||||
],
|
||||
install : true,
|
||||
# FIXME(Qyriad): is this right?
|
||||
|
|
Loading…
Reference in a new issue