From 36f373ddca35b06b3543e2fd1d69c0b659e9b146 Mon Sep 17 00:00:00 2001 From: oxalica Date: Mon, 26 Sep 2022 16:47:24 +0800 Subject: [PATCH] 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. --- pkgs/development/tools/nil/default.nix | 27 +++++++++++++++----------- 1 file changed, 16 insertions(+), 11 deletions(-) diff --git a/pkgs/development/tools/nil/default.nix b/pkgs/development/tools/nil/default.nix index f32f4693ed2f..fca968c909a7 100644 --- a/pkgs/development/tools/nil/default.nix +++ b/pkgs/development/tools/nil/default.nix @@ -1,26 +1,31 @@ -{ 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 = date; + CFG_DATE = version; + CFG_REV = "release"; + + 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 ];