From d69a2737c485234f8f8cba94577fe43239fa533f Mon Sep 17 00:00:00 2001 From: Mario Rodas Date: Mon, 22 Apr 2024 04:20:00 +0000 Subject: [PATCH 1/3] nixd: 1.2.3 -> 2.0.2 Diff: https://github.com/nix-community/nixd/compare/1.2.3...2.0.2 Changelog: https://github.com/nix-community/nixd/releases/tag/2.0.2 --- pkgs/development/tools/language-servers/nixd/default.nix | 6 +++--- pkgs/top-level/all-packages.nix | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/pkgs/development/tools/language-servers/nixd/default.nix b/pkgs/development/tools/language-servers/nixd/default.nix index 601a568554be..98a0151ea258 100644 --- a/pkgs/development/tools/language-servers/nixd/default.nix +++ b/pkgs/development/tools/language-servers/nixd/default.nix @@ -19,13 +19,13 @@ stdenv.mkDerivation rec { pname = "nixd"; - version = "1.2.3"; + version = "2.0.2"; src = fetchFromGitHub { owner = "nix-community"; repo = "nixd"; rev = version; - hash = "sha256-i/z5VnsWPWloQfdk48i+a4XaGnTMPJ6QougChkT9IWw="; + hash = "sha256-K6atInl+/58nzMj4JJHds//HY7luBRmX79g+Arj6iUw="; }; mesonBuildType = "release"; @@ -74,7 +74,7 @@ stdenv.mkDerivation rec { # Disable nixd regression tests, because it uses some features provided by # nix, and does not correctly work in the sandbox - meson test --print-errorlogs server regression/nix-ast-dump + meson test --print-errorlogs unit/libnixf/Basic unit/libnixf/Parse unit/libnixt runHook postCheck ''; diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index dc83c7246644..a1d3dae7b538 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -18059,7 +18059,7 @@ with pkgs; nixd = callPackage ../development/tools/language-servers/nixd { llvmPackages = llvmPackages_16; - nix = nixVersions.nix_2_16; + nix = nixVersions.nix_2_19; }; openscad-lsp = callPackage ../development/tools/language-servers/openscad-lsp { }; From c1f5835e6ba8b2df709d51fa0e81b1f51fd7105c Mon Sep 17 00:00:00 2001 From: Mario Rodas Date: Mon, 22 Apr 2024 04:20:00 +0000 Subject: [PATCH 2/3] nixd: use finalAttrs pattern --- pkgs/development/tools/language-servers/nixd/default.nix | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pkgs/development/tools/language-servers/nixd/default.nix b/pkgs/development/tools/language-servers/nixd/default.nix index 98a0151ea258..c4ba58dbe5cc 100644 --- a/pkgs/development/tools/language-servers/nixd/default.nix +++ b/pkgs/development/tools/language-servers/nixd/default.nix @@ -17,14 +17,14 @@ , pkg-config }: -stdenv.mkDerivation rec { +stdenv.mkDerivation (finalAttrs: { pname = "nixd"; version = "2.0.2"; src = fetchFromGitHub { owner = "nix-community"; repo = "nixd"; - rev = version; + rev = finalAttrs.version; hash = "sha256-K6atInl+/58nzMj4JJHds//HY7luBRmX79g+Arj6iUw="; }; @@ -83,10 +83,10 @@ stdenv.mkDerivation rec { meta = { description = "Nix language server"; homepage = "https://github.com/nix-community/nixd"; - changelog = "https://github.com/nix-community/nixd/releases/tag/${version}"; + changelog = "https://github.com/nix-community/nixd/releases/tag/${finalAttrs.version}"; license = lib.licenses.lgpl3Plus; maintainers = with lib.maintainers; [ inclyc Ruixi-rebirth marsam ]; mainProgram = "nixd"; platforms = lib.platforms.unix; }; -} +}) From 2eee5fcc2a5f87bd7a75bdac7f4b436613c67bc4 Mon Sep 17 00:00:00 2001 From: Mario Rodas Date: Mon, 22 Apr 2024 04:20:00 +0000 Subject: [PATCH 3/3] nixd: add version and pkg-config testers --- .../tools/language-servers/nixd/default.nix | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/pkgs/development/tools/language-servers/nixd/default.nix b/pkgs/development/tools/language-servers/nixd/default.nix index c4ba58dbe5cc..becdbd892a03 100644 --- a/pkgs/development/tools/language-servers/nixd/default.nix +++ b/pkgs/development/tools/language-servers/nixd/default.nix @@ -15,6 +15,7 @@ , nix , nixpkgs-fmt , pkg-config +, testers }: stdenv.mkDerivation (finalAttrs: { @@ -80,6 +81,16 @@ stdenv.mkDerivation (finalAttrs: { passthru.updateScript = nix-update-script { }; + passthru.tests = { + version = testers.testVersion { + package = finalAttrs.finalPackage; + }; + pkg-config = testers.hasPkgConfigModules { + package = finalAttrs.finalPackage; + moduleNames = [ "libnixf" "libnixt" ]; + }; + }; + meta = { description = "Nix language server"; homepage = "https://github.com/nix-community/nixd";