Skip to content

Commit

Permalink
fix formatting after updating nixpkgs
Browse files Browse the repository at this point in the history
  • Loading branch information
Mic92 committed Nov 7, 2024
1 parent 76e6b82 commit 253cda3
Show file tree
Hide file tree
Showing 9 changed files with 58 additions and 43 deletions.
23 changes: 13 additions & 10 deletions libnixt/default.nix
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
{ lib
, stdenv
, meson
, ninja
, pkg-config
, nix
, gtest
, boost182
{
lib,
stdenv,
meson,
ninja,
pkg-config,
nix,
gtest,
boost182,
}:

stdenv.mkDerivation {
Expand All @@ -14,7 +15,10 @@ stdenv.mkDerivation {

src = ../.;

outputs = [ "out" "dev" ];
outputs = [
"out"
"dev"
];

mesonBuildType = "release";

Expand All @@ -36,7 +40,6 @@ stdenv.mkDerivation {

env.CXXFLAGS = "-include ${nix.dev}/include/nix/config.h";


meta = {
mainProgram = "nixt";
description = "Nix language frontend, parser & semantic analysis";
Expand Down
29 changes: 16 additions & 13 deletions nixd/default.nix
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
{ lib
, stdenv
, meson
, ninja
, pkg-config
, nix
, nixf
, nixt
, llvmPackages
, gtest
, boost182
{
lib,
stdenv,
meson,
ninja,
pkg-config,
nix,
nixf,
nixt,
llvmPackages,
gtest,
boost182,
}:

let
Expand All @@ -20,7 +21,10 @@ stdenv.mkDerivation {

src = ../.;

outputs = [ "out" "dev" ];
outputs = [
"out"
"dev"
];

mesonBuildType = "release";

Expand All @@ -45,7 +49,6 @@ stdenv.mkDerivation {

env.CXXFLAGS = "-include ${nix.dev}/include/nix/config.h";


meta = {
mainProgram = "nixd";
description = "Nix language server";
Expand Down
4 changes: 3 additions & 1 deletion nixd/docs/editors/vscodium.nix
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
{ pkgs ? import <nixpkgs> { } }:
{
pkgs ? import <nixpkgs> { },
}:
with pkgs;
let
codium = vscode-with-extensions.override {
Expand Down
27 changes: 17 additions & 10 deletions nixd/docs/examples/NixOS_Home-Manager/flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@
flake-parts.url = "github:hercules-ci/flake-parts";
};

outputs = inputs@{ self, flake-parts, ... }:
outputs =
inputs@{ self, flake-parts, ... }:
flake-parts.lib.mkFlake { inherit inputs; } {
debug = true;

Expand All @@ -23,12 +24,15 @@
hostname = inputs.nixpkgs.lib.nixosSystem {
system = "x86_64-linux";
modules = [
({ pkgs, ... }: {
networking.hostName = "hostname";
environment.systemPackages = with pkgs; [
nixd
];
})
(
{ pkgs, ... }:
{
networking.hostName = "hostname";
environment.systemPackages = with pkgs; [
nixd
];
}
)
];
};
};
Expand All @@ -42,9 +46,12 @@
home.username = "user";
home.homeDirectory = "/home/user";
}
({ pkgs, ... }: {
wayland.windowManager.hyprland.enable = true;
})
(
{ pkgs, ... }:
{
wayland.windowManager.hyprland.enable = true;
}
)
];
};
};
Expand Down
2 changes: 1 addition & 1 deletion nixd/lib/Controller/Definition.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ class WorkerReportedException : std::exception {
llvm::Error E;

public:
WorkerReportedException(llvm::Error E) : E(std::move(E)){};
WorkerReportedException(llvm::Error E) : E(std::move(E)) {};

llvm::Error takeError() { return std::move(E); }
[[nodiscard]] const char *what() const noexcept override {
Expand Down
2 changes: 1 addition & 1 deletion nixd/lspserver/include/lspserver/Connection.h
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ class InboundPort {

InboundPort(int In = STDIN_FILENO,
JSONStreamStyle StreamStyle = JSONStreamStyle::Standard)
: Close(false), In(In), StreamStyle(StreamStyle){};
: Close(false), In(In), StreamStyle(StreamStyle) {};

/// Read messages specified in LSP standard, and collect standard json string
/// into \p JSONString.
Expand Down
2 changes: 1 addition & 1 deletion nixd/lspserver/include/lspserver/LSPServer.h
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ class LSPServer : public MessageHandler {

public:
LSPServer(std::unique_ptr<InboundPort> In, std::unique_ptr<OutboundPort> Out)
: In(std::move(In)), Out(std::move(Out)){};
: In(std::move(In)), Out(std::move(Out)) {};

/// \brief Close the inbound port.
void closeInbound() { In->close(); }
Expand Down
4 changes: 2 additions & 2 deletions nixd/tools/nixd-attrset-eval/test/lit.cfg.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@

config.name = "nixd-attrset-eval"

config.suffixes = ['.md']
config.suffixes = [".md"]

# testFormat: The test format to use to interpret tests.
config.test_format = lit.formats.ShTest()

test_root = os.path.dirname(__file__)

build_dir = os.getenv('MESON_BUILD_ROOT', default = '/dev/null')
build_dir = os.getenv("MESON_BUILD_ROOT", default="/dev/null")

# test_source_root: The root path where tests are located.
config.test_source_root = test_root
Expand Down
8 changes: 4 additions & 4 deletions nixd/tools/nixd/test/lit.cfg.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,17 @@

config.name = "nixd"

config.suffixes = ['.md']
config.suffixes = [".md"]

# testFormat: The test format to use to interpret tests.
config.test_format = lit.formats.ShTest()

test_root = os.path.dirname(__file__)

build_dir = os.getenv('MESON_BUILD_ROOT', default = '/dev/null')
build_dir = os.getenv("MESON_BUILD_ROOT", default="/dev/null")

config.environment['NIXD_ATTRSET_EVAL'] = os.getenv('NIXD_ATTRSET_EVAL')
config.environment['NIX_PATH'] = os.getenv('NIX_PATH')
config.environment["NIXD_ATTRSET_EVAL"] = os.getenv("NIXD_ATTRSET_EVAL")
config.environment["NIX_PATH"] = os.getenv("NIX_PATH")


# test_source_root: The root path where tests are located.
Expand Down

0 comments on commit 253cda3

Please sign in to comment.