about summary refs log tree commit diff
diff options
context:
space:
mode:
authoroxalica <oxalicc@pm.me>2022-09-26 16:47:24 +0800
committerMatthieu Coudron <teto@users.noreply.github.com>2022-09-26 12:44:20 +0200
commit36f373ddca35b06b3543e2fd1d69c0b659e9b146 (patch)
treea9926a35817bd7936f4ae12f4a301b562dd5199d
parent241f818f0e478c37ee5169e745c7919348603e31 (diff)
downloadnixlib-36f373ddca35b06b3543e2fd1d69c0b659e9b146.tar
nixlib-36f373ddca35b06b3543e2fd1d69c0b659e9b146.tar.gz
nixlib-36f373ddca35b06b3543e2fd1d69c0b659e9b146.tar.bz2
nixlib-36f373ddca35b06b3543e2fd1d69c0b659e9b146.tar.lz
nixlib-36f373ddca35b06b3543e2fd1d69c0b659e9b146.tar.xz
nixlib-36f373ddca35b06b3543e2fd1d69c0b659e9b146.tar.zst
nixlib-36f373ddca35b06b3543e2fd1d69c0b659e9b146.zip
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.
-rw-r--r--pkgs/development/tools/nil/default.nix27
1 files 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 = 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 ];