Files
Dark Steveneq 646b892680
Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
push sheeet
2025-10-09 14:15:47 +02:00

161 lines
3.0 KiB
Nix

{
lib,
stdenv,
fetchFromGitHub,
cmake,
boost,
gtest,
llvmPackages,
meson,
ninja,
nixVersions,
nix-update-script,
nixd,
nixf,
nixt,
nlohmann_json,
pkg-config,
testers,
python3,
}:
let
nixComponents = nixVersions.nixComponents_2_30;
common = rec {
version = "2.7.0";
src = fetchFromGitHub {
owner = "nix-community";
repo = "nixd";
tag = version;
hash = "sha256-VPUX/68ysFUr1S8JW9I1rU5UcRoyZiCjL+9u2owrs6w=";
};
nativeBuildInputs = [
meson
ninja
python3
pkg-config
llvmPackages.llvm # workaround for a meson bug, where llvm-config is not found, making the build fail
];
mesonBuildType = "release";
strictDeps = true;
doCheck = true;
meta = {
homepage = "https://github.com/nix-community/nixd";
changelog = "https://github.com/nix-community/nixd/releases/tag/${version}";
license = lib.licenses.lgpl3Plus;
maintainers = with lib.maintainers; [
inclyc
Ruixi-rebirth
aleksana
redyf
];
platforms = lib.platforms.unix;
};
};
in
{
nixf = stdenv.mkDerivation (
common
// {
pname = "nixf";
sourceRoot = "${common.src.name}/libnixf";
outputs = [
"out"
"dev"
];
buildInputs = [
gtest
boost
nlohmann_json
];
passthru.tests.pkg-config = testers.hasPkgConfigModules {
package = nixf;
moduleNames = [ "nixf" ];
};
meta = common.meta // {
description = "Nix language frontend, parser & semantic analysis";
mainProgram = "nixf-tidy";
};
}
);
nixt = stdenv.mkDerivation (
common
// {
pname = "nixt";
sourceRoot = "${common.src.name}/libnixt";
outputs = [
"out"
"dev"
];
buildInputs = [
nixComponents.nix-main
nixComponents.nix-expr
nixComponents.nix-cmd
nixComponents.nix-flake
gtest
boost
];
passthru.tests.pkg-config = testers.hasPkgConfigModules {
package = nixt;
moduleNames = [ "nixt" ];
};
meta = common.meta // {
description = "Supporting library that wraps C++ nix";
};
}
);
nixd = stdenv.mkDerivation (
common
// {
pname = "nixd";
sourceRoot = "${common.src.name}/nixd";
buildInputs = [
nixComponents.nix-main
nixComponents.nix-expr
nixComponents.nix-cmd
nixComponents.nix-flake
nixf
nixt
llvmPackages.llvm
gtest
boost
];
nativeBuildInputs = common.nativeBuildInputs ++ [ cmake ];
# See https://github.com/nix-community/nixd/issues/519
doCheck = false;
passthru = {
updateScript = nix-update-script { };
tests.version = testers.testVersion { package = nixd; };
};
meta = common.meta // {
description = "Feature-rich Nix language server interoperating with C++ nix";
mainProgram = "nixd";
};
}
);
}