Commit 36f373dd authored by oxalica's avatar oxalica Committed by Matthieu Coudron
Browse files

nil: unstable-2022-09-19 -> 2022-09-26

The date string is the official release name. It does not satisfy
"a package is not a release but a commit from a repository".
We could remove the `unstable` prefix.
parent 241f818f
Loading
Loading
Loading
Loading
+16 −11
Original line number Diff line number Diff line
{ lib, rustPlatform, fetchFromGitHub }:

let
  date = "2022-09-19";
in
{ lib, rustPlatform, fetchFromGitHub, nix, nix-update-script }:

rustPlatform.buildRustPackage rec {
  pname = "nil";
  version = "unstable-${date}";
  version = "2022-09-26";

  src = fetchFromGitHub {
    owner = "oxalica";
    repo = pname;
    rev = date;
    sha256 = "sha256-WdBRfp0shz6Xhwx0fEUQwROK52XNDTkmhC2xkdT+INA=";
    rev = version;
    hash = "sha256-2bcAXcJiFV+xKSIy3oD2/TkijV4302jAtTF3xtHiOhU=";
  };

  cargoSha256 = "sha256-J1CRe5xPl428mwOO4kDxLyPBc0mtzl3iU4mUqW5d4+E=";
  cargoHash = "sha256-RL9n2kfWPpu17qudqSx5DkZbgxqVCf2IRBu/koCAqFA=";

  CFG_DATE = version;
  CFG_REV = "release";

  CFG_DATE = date;
  nativeBuildInputs = [
    (lib.getBin nix)
  ];

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

  meta = with lib; {
    description = "A language server for Nix Expression Language";
    description = "Yet another language server for Nix";
    homepage = "https://github.com/oxalica/nil";
    license = with licenses; [ mit asl20 ];
    maintainers = with maintainers; [ figsoda oxalica ];