diff options
-rw-r--r-- | Makefile.config.in | 2 | ||||
-rw-r--r-- | flake.nix | 3 | ||||
-rw-r--r-- | lix-doc/.gitignore (renamed from nix-doc/.gitignore) | 0 | ||||
-rw-r--r-- | lix-doc/Cargo.lock (renamed from nix-doc/Cargo.lock) | 2 | ||||
-rw-r--r-- | lix-doc/Cargo.toml (renamed from nix-doc/Cargo.toml) | 5 | ||||
-rw-r--r-- | lix-doc/README.md | 6 | ||||
-rw-r--r-- | lix-doc/package.nix (renamed from nix-doc/package.nix) | 4 | ||||
-rw-r--r-- | lix-doc/src/lib.rs (renamed from nix-doc/src/lib.rs) | 0 | ||||
-rw-r--r-- | lix-doc/src/pprint.rs (renamed from nix-doc/src/pprint.rs) | 0 | ||||
-rw-r--r-- | meson.build | 9 | ||||
-rw-r--r-- | package.nix | 7 | ||||
-rw-r--r-- | src/libcmd/meson.build | 2 |
12 files changed, 25 insertions, 15 deletions
diff --git a/Makefile.config.in b/Makefile.config.in index de1ace921..7367d0a3f 100644 --- a/Makefile.config.in +++ b/Makefile.config.in @@ -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 diff --git a/nix-doc/.gitignore b/lix-doc/.gitignore index c0d245929..c0d245929 100644 --- a/nix-doc/.gitignore +++ b/lix-doc/.gitignore diff --git a/nix-doc/Cargo.lock b/lix-doc/Cargo.lock index 6fc63004a..d5028edfe 100644 --- a/nix-doc/Cargo.lock +++ b/lix-doc/Cargo.lock @@ -34,7 +34,7 @@ dependencies = [ ] [[package]] -name = "nix-doc" +name = "lix-doc" version = "0.0.1" dependencies = [ "expect-test", diff --git a/nix-doc/Cargo.toml b/lix-doc/Cargo.toml index 21dc54d1b..df4eed932 100644 --- a/nix-doc/Cargo.toml +++ b/lix-doc/Cargo.toml @@ -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" diff --git a/lix-doc/README.md b/lix-doc/README.md new file mode 100644 index 000000000..26049ebd7 --- /dev/null +++ b/lix-doc/README.md @@ -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. diff --git a/nix-doc/package.nix b/lix-doc/package.nix index 70a49b9a0..86ab7501e 100644 --- a/nix-doc/package.nix +++ b/lix-doc/package.nix @@ -4,8 +4,8 @@ }: rustPlatform.buildRustPackage { - name = "nix-doc"; + name = "lix-doc"; - cargoHash = "sha256-HXL235loBJnRje7KaMCCCTighv6WNYRrZ/jgkAQbEY0="; + cargoLock.lockFile = ./Cargo.lock; src = lib.cleanSource ./.; } diff --git a/nix-doc/src/lib.rs b/lix-doc/src/lib.rs index 9c2e43f2f..9c2e43f2f 100644 --- a/nix-doc/src/lib.rs +++ b/lix-doc/src/lib.rs diff --git a/nix-doc/src/pprint.rs b/lix-doc/src/pprint.rs index 7e73d2d20..7e73d2d20 100644 --- a/nix-doc/src/pprint.rs +++ b/lix-doc/src/pprint.rs diff --git a/meson.build b/meson.build index 89881e190..2cedabad5 100644 --- a/meson.build +++ b/meson.build @@ -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 diff --git a/package.nix b/package.nix index b972407f1..d096b5c73 100644 --- a/package.nix +++ b/package.nix @@ -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 diff --git a/src/libcmd/meson.build b/src/libcmd/meson.build index 167cb0f06..867508926 100644 --- a/src/libcmd/meson.build +++ b/src/libcmd/meson.build @@ -45,7 +45,7 @@ libcmd = library( editline, lowdown, nlohmann_json, - nix_doc + lix_doc ], install : true, # FIXME(Qyriad): is this right? |