Giter VIP home page Giter VIP logo

Comments (10)

ncfavier avatar ncfavier commented on May 25, 2024 2

I'm also hitting compilation failures by using the overlay. If only a particular version of nixpkgs is supported, then the documentation should not recommend using the overlay.

from nixd.

inclyc avatar inclyc commented on May 25, 2024

Are you overriding nixpkgs revision? Something like #53 (comment)

from nixd.

gaelreyrol avatar gaelreyrol commented on May 25, 2024

I did but I removed the override when I've seen those failures and it does not change anything.
Here is my actual flake.lock: https://gist.github.com/gaelreyrol/6ff901f8f171abacff8d2d06ebedab6d#file-flake-lock

from nixd.

inclyc avatar inclyc commented on May 25, 2024

I did but I removed the override when I've seen those failures and it does not change anything. Here is my actual flake.lock: https://gist.github.com/gaelreyrol/6ff901f8f171abacff8d2d06ebedab6d#file-flake-lock

Looks like you did not update the lock after removing such overriding? The locked ref in this lock of nixpkgs for nixd is still indirectly reference to "nixpkgs".

from nixd.

inclyc avatar inclyc commented on May 25, 2024

Are you overriding nixpkgs revision? Something like #53 (comment)

Actually there is a PR #98 to fix nix revision on 2.16.x, might be useful to address this issue.

from nixd.

gaelreyrol avatar gaelreyrol commented on May 25, 2024

I did but I removed the override when I've seen those failures and it does not change anything. Here is my actual flake.lock: https://gist.github.com/gaelreyrol/6ff901f8f171abacff8d2d06ebedab6d#file-flake-lock

Looks like you did not update the lock after removing such overriding? The locked ref in this lock of nixpkgs for nixd is still indirectly reference to "nixpkgs".

Mmh it is referencing this node which refers to the unstable branch:

{
    "nixpkgs": {
      "locked": {
        "lastModified": 1686398752,
        "narHash": "sha256-nGWNQVhSw4VSL+S0D0cbrNR9vs9Bq7rlYR+1K5f5j6w=",
        "owner": "NixOS",
        "repo": "nixpkgs",
        "rev": "a30520bf8eabf8a5c37889d661e67a2dbcaa59e6",
        "type": "github"
      },
      "original": {
        "owner": "NixOS",
        "ref": "nixpkgs-unstable",
        "repo": "nixpkgs",
        "type": "github"
      }
    }
}

from nixd.

inclyc avatar inclyc commented on May 25, 2024

I did but I removed the override when I've seen those failures and it does not change anything. Here is my actual flake.lock: https://gist.github.com/gaelreyrol/6ff901f8f171abacff8d2d06ebedab6d#file-flake-lock

Looks like you did not update the lock after removing such overriding? The locked ref in this lock of nixpkgs for nixd is still indirectly reference to "nixpkgs".

Mmh it is referencing this node which refers to the unstable branch:

{
    "nixpkgs": {
      "locked": {
        "lastModified": 1686398752,
        "narHash": "sha256-nGWNQVhSw4VSL+S0D0cbrNR9vs9Bq7rlYR+1K5f5j6w=",
        "owner": "NixOS",
        "repo": "nixpkgs",
        "rev": "a30520bf8eabf8a5c37889d661e67a2dbcaa59e6",
        "type": "github"
      },
      "original": {
        "owner": "NixOS",
        "ref": "nixpkgs-unstable",
        "repo": "nixpkgs",
        "type": "github"
      }
    }
}

AFAIK, unstable branch changed nix version from 2.15 -> 2.16 a few weeks ago, maybe your branch still points to 2.15 though. Maybe the best solution here is to run:

nix flake update

to update the lock.

Nixpkgs packaging NixOS/nixpkgs#236675 & #98 generally fix this issue, nixd is a project written a month ago, thanks for giving it a try :).

from nixd.

inclyc avatar inclyc commented on May 25, 2024

Our codebase bumped nix version to 2.16 in #86. You can see several APIs changed in that PR.

from nixd.

inclyc avatar inclyc commented on May 25, 2024

I'm also hitting compilation failures by using the overlay. If only a particular version of nixpkgs is supported, then the documentation should not recommend using the overlay.

Thanks for suggesstion :)

I would like to maintain packaging in nixpkgs then.

from nixd.

gaelreyrol avatar gaelreyrol commented on May 25, 2024

I modified a little bit the derivation so It can be customized and updated "automatically".

{ stdenv
, lib
, fetchFromGitHub
, meson
, ninja
, cmake
, pkg-config
, lit
, nixUnstable
, boost182
, gtest
, llvmPackages_16
, libbacktrace
, nix-update-script

  # The default Nix package to use as build dependency
, nixPackage ? nixUnstable
}:

let
  filterMesonBuild = builtins.filterSource
    (path: type: type != "directory" || baseNameOf path != "build");
in
stdenv.mkDerivation rec {
  pname = "nixd";
  version = "1.0.0";

  src = filterMesonBuild (fetchFromGitHub {
    owner = "nix-community";
    repo = "nixd";
    rev = version;
    hash = "sha256-kTDPbsQi9gzFAFkiAPF+V3yI1WBmILEnnsqdgHMqXJA=";
  });

  nativeBuildInputs = [
    meson
    ninja
    cmake
    pkg-config

    # Testing only
    lit

    (lib.getDev nixPackage)
    (lib.getDev boost182)
    (lib.getDev gtest)
    (lib.getDev llvmPackages_16.llvm)
    llvmPackages_16.clang
  ];

  buildInputs = [
    libbacktrace
    nixPackage
    gtest
    (lib.getDev boost182)
    (lib.getLib llvmPackages_16.llvm)
  ];

  CXXFLAGS = "-include ${lib.getDev nixPackage}/include/nix/config.h";

  passthru.updateScript = nix-update-script { };

  meta = {
    description = "Nix language server";
    homepage = "https://github.com/nix-community/nixd";
    changelog = "https://github.com/nix-community/nixd/releases/tag/${version}";
    license = lib.licenses.lgpl3Plus;
    maintainers = [ ];
    platforms = lib.platforms.unix;
  };
}

That way for example it can be overwritten with:

(final: prev: {
  nixd = prev.nixd.override {
    nixPackage = prev.nixVersions.nix_2_16;
  }
})

from nixd.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.