about summary refs log tree commit diff
path: root/nixpkgs/pkgs/shells/nushell/plugins/formats.nix
diff options
context:
space:
mode:
authorAlyssa Ross <hi@alyssa.is>2023-10-20 22:09:03 +0000
committerAlyssa Ross <hi@alyssa.is>2023-10-20 22:09:03 +0000
commit50c21d167f7114fa1dbd95e5c4fb30eeb1a2d02e (patch)
treef2556b911180125ccbb7ed0e78a54e92da89adce /nixpkgs/pkgs/shells/nushell/plugins/formats.nix
parent4c16d4548a98563c9d9ad76f4e5b2202864ccd54 (diff)
parentcfc75eec4603c06503ae750f88cf397e00796ea8 (diff)
downloadnixlib-50c21d167f7114fa1dbd95e5c4fb30eeb1a2d02e.tar
nixlib-50c21d167f7114fa1dbd95e5c4fb30eeb1a2d02e.tar.gz
nixlib-50c21d167f7114fa1dbd95e5c4fb30eeb1a2d02e.tar.bz2
nixlib-50c21d167f7114fa1dbd95e5c4fb30eeb1a2d02e.tar.lz
nixlib-50c21d167f7114fa1dbd95e5c4fb30eeb1a2d02e.tar.xz
nixlib-50c21d167f7114fa1dbd95e5c4fb30eeb1a2d02e.tar.zst
nixlib-50c21d167f7114fa1dbd95e5c4fb30eeb1a2d02e.zip
Merge commit 'cfc75eec4603c06503ae750f88cf397e00796ea8'
Conflicts:
	nixpkgs/pkgs/build-support/rust/build-rust-package/default.nix
Diffstat (limited to 'nixpkgs/pkgs/shells/nushell/plugins/formats.nix')
-rw-r--r--nixpkgs/pkgs/shells/nushell/plugins/formats.nix29
1 files changed, 18 insertions, 11 deletions
diff --git a/nixpkgs/pkgs/shells/nushell/plugins/formats.nix b/nixpkgs/pkgs/shells/nushell/plugins/formats.nix
index 8c511782e3de..5f75951b8c95 100644
--- a/nixpkgs/pkgs/shells/nushell/plugins/formats.nix
+++ b/nixpkgs/pkgs/shells/nushell/plugins/formats.nix
@@ -5,25 +5,32 @@
 , pkg-config
 , IOKit
 , Foundation
+, nix-update-script
 }:
 
-let
+rustPlatform.buildRustPackage rec {
   pname = "nushell_plugin_formats";
-in
-rustPlatform.buildRustPackage {
-  inherit pname;
-  version = "0.85.0";
-  src = nushell.src;
-  cargoHash = "sha256-OKtktjBOujvljAX260TbC2sQWZOiGgU+sXsbYRhGPRM=";
+  inherit (nushell) version src;
+  cargoHash = "sha256-WS8VRpJnn/VWS7GUkGowFf51ifUx0SbEZzcoTfx2dp0=";
+
   nativeBuildInputs = [ pkg-config ];
-  buildInputs = [ IOKit Foundation ];
+  buildInputs = lib.optionals stdenv.isDarwin [ IOKit Foundation ];
   cargoBuildFlags = [ "--package nu_plugin_formats" ];
-  doCheck = false;
+
+  checkPhase = ''
+    cargo test --manifest-path crates/nu_plugin_formats/Cargo.toml
+  '';
+
+  passthru.updateScript = nix-update-script {
+    # Skip the version check and only check the hash because we inherit version from nushell.
+    extraArgs = [ "--version=skip" ];
+  };
+
   meta = with lib; {
     description = "A formats plugin for Nushell";
-    homepage = "https://github.com/nushell/nushell/tree/main/crates/nu_plugin_formats";
+    homepage = "https://github.com/nushell/nushell/tree/${version}/crates/nu_plugin_formats";
     license = licenses.mpl20;
-    maintainers = with maintainers; [ viraptor ];
+    maintainers = with maintainers; [ viraptor aidalgol ];
     platforms = with platforms; all;
   };
 }