nix-doc -> lix-doc, make self-contained in package.nix
package.nix previously needed this callPackage'd externally, which
didn't make a lot of sense to us since this is an internal dependency.
Thus we changed it to make it more self contained.
Change-Id: I4935bc0bc80e1a132bc9b1519e917791da95037c
This commit is contained in:
parent
b995c17f0e
commit
0145d45806
|
@ -19,7 +19,7 @@ LIBBROTLI_LIBS = @LIBBROTLI_LIBS@
|
||||||
LIBCURL_LIBS = @LIBCURL_LIBS@
|
LIBCURL_LIBS = @LIBCURL_LIBS@
|
||||||
LIBSECCOMP_LIBS = @LIBSECCOMP_LIBS@
|
LIBSECCOMP_LIBS = @LIBSECCOMP_LIBS@
|
||||||
LOWDOWN_LIBS = @LOWDOWN_LIBS@
|
LOWDOWN_LIBS = @LOWDOWN_LIBS@
|
||||||
NIXDOC_LIBS = -lnix_doc
|
NIXDOC_LIBS = -llix_doc
|
||||||
OPENSSL_LIBS = @OPENSSL_LIBS@
|
OPENSSL_LIBS = @OPENSSL_LIBS@
|
||||||
PACKAGE_NAME = @PACKAGE_NAME@
|
PACKAGE_NAME = @PACKAGE_NAME@
|
||||||
PACKAGE_VERSION = @PACKAGE_VERSION@
|
PACKAGE_VERSION = @PACKAGE_VERSION@
|
||||||
|
|
|
@ -148,13 +148,10 @@
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
|
|
||||||
nix-doc = final.callPackage ./nix-doc/package.nix {};
|
|
||||||
|
|
||||||
nix = final.callPackage ./package.nix {
|
nix = final.callPackage ./package.nix {
|
||||||
inherit versionSuffix;
|
inherit versionSuffix;
|
||||||
stdenv = currentStdenv;
|
stdenv = currentStdenv;
|
||||||
busybox-sandbox-shell = final.busybox-sandbox-shell or final.default-busybox-sandbox-shell;
|
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
|
# 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]]
|
[[package]]
|
||||||
name = "nix-doc"
|
name = "lix-doc"
|
||||||
version = "0.0.1"
|
version = "0.0.1"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"expect-test",
|
"expect-test",
|
|
@ -1,9 +1,10 @@
|
||||||
[package]
|
[package]
|
||||||
description = "Nix documentation grepping tool"
|
description = "Nix function documentation tool, stripped down into a library"
|
||||||
edition = "2018"
|
edition = "2018"
|
||||||
name = "nix-doc"
|
name = "lix-doc"
|
||||||
version = "0.0.1"
|
version = "0.0.1"
|
||||||
license = "BSD-2-Clause OR MIT"
|
license = "BSD-2-Clause OR MIT"
|
||||||
|
# upstream details
|
||||||
homepage = "https://github.com/lf-/nix-doc"
|
homepage = "https://github.com/lf-/nix-doc"
|
||||||
repository = "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 {
|
rustPlatform.buildRustPackage {
|
||||||
name = "nix-doc";
|
name = "lix-doc";
|
||||||
|
|
||||||
cargoHash = "sha256-HXL235loBJnRje7KaMCCCTighv6WNYRrZ/jgkAQbEY0=";
|
cargoLock.lockFile = ./Cargo.lock;
|
||||||
src = lib.cleanSource ./.;
|
src = lib.cleanSource ./.;
|
||||||
}
|
}
|
|
@ -233,10 +233,13 @@ deps += toml11
|
||||||
nlohmann_json = dependency('nlohmann_json', required : true)
|
nlohmann_json = dependency('nlohmann_json', required : true)
|
||||||
deps += nlohmann_json
|
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.
|
# 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
|
# Build-time tools
|
||||||
|
|
|
@ -48,7 +48,8 @@
|
||||||
|
|
||||||
busybox-sandbox-shell,
|
busybox-sandbox-shell,
|
||||||
|
|
||||||
nix-doc,
|
# internal fork of nix-doc providing :doc in the repl
|
||||||
|
lix-doc ? __forDefaults.lix-doc,
|
||||||
|
|
||||||
pname ? "nix",
|
pname ? "nix",
|
||||||
versionSuffix ? "",
|
versionSuffix ? "",
|
||||||
|
@ -81,6 +82,8 @@
|
||||||
./boehmgc-traceable_allocator-public.diff
|
./boehmgc-traceable_allocator-public.diff
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
|
|
||||||
|
lix-doc = pkgs.callPackage ./lix-doc/package.nix { };
|
||||||
},
|
},
|
||||||
}: let
|
}: let
|
||||||
inherit (__forDefaults) canRunInstalled;
|
inherit (__forDefaults) canRunInstalled;
|
||||||
|
@ -209,7 +212,7 @@ in stdenv.mkDerivation (finalAttrs: {
|
||||||
lowdown
|
lowdown
|
||||||
libsodium
|
libsodium
|
||||||
toml11
|
toml11
|
||||||
nix-doc
|
lix-doc
|
||||||
]
|
]
|
||||||
++ lib.optionals stdenv.hostPlatform.isLinux [ libseccomp busybox-sandbox-shell ]
|
++ lib.optionals stdenv.hostPlatform.isLinux [ libseccomp busybox-sandbox-shell ]
|
||||||
++ lib.optional stdenv.hostPlatform.isx86_64 libcpuid
|
++ lib.optional stdenv.hostPlatform.isx86_64 libcpuid
|
||||||
|
|
|
@ -45,7 +45,7 @@ libcmd = library(
|
||||||
editline,
|
editline,
|
||||||
lowdown,
|
lowdown,
|
||||||
nlohmann_json,
|
nlohmann_json,
|
||||||
nix_doc
|
lix_doc
|
||||||
],
|
],
|
||||||
install : true,
|
install : true,
|
||||||
# FIXME(Qyriad): is this right?
|
# FIXME(Qyriad): is this right?
|
||||||
|
|
Loading…
Reference in a new issue