From 89607b14e93fe675ee75fa62f35692925c51b58d Mon Sep 17 00:00:00 2001 From: pinage404 Date: Sun, 30 Nov 2025 03:34:50 +0100 Subject: [PATCH 1/2] masklint: 0.3.0 -> 0.4.1 Closes masklint#6 --- pkgs/by-name/ma/masklint/package.nix | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/pkgs/by-name/ma/masklint/package.nix b/pkgs/by-name/ma/masklint/package.nix index 431b43d34200..e865d017eb14 100644 --- a/pkgs/by-name/ma/masklint/package.nix +++ b/pkgs/by-name/ma/masklint/package.nix @@ -2,11 +2,14 @@ lib, rustPlatform, fetchFromGitHub, + shellcheck, + ruff, + rubocop, nix-update-script, }: let - version = "0.3.0"; + version = "0.4.1"; in rustPlatform.buildRustPackage { pname = "masklint"; @@ -16,10 +19,16 @@ rustPlatform.buildRustPackage { owner = "brumhard"; repo = "masklint"; rev = "v${version}"; - hash = "sha256-Dku2pDUCblopHtoj6viUqHVpVH5GDApp+QLjor38j7g="; + hash = "sha256-PhhSJwzLTMFmisrdmsRjxWDBkBr+NjIkENHjdkTeviM="; }; - cargoHash = "sha256-TDk7hEZ628iUnKI0LMBtsSAVNF6BGukHwB8kh70eo4U="; + cargoHash = "sha256-WZwl7fdy1HNKQU1zCwifoOvmFRr/fnsvmIG2wf6ILPY="; + + nativeCheckInputs = [ + shellcheck # shells + ruff # python + rubocop # ruby + ]; passthru.updateScript = nix-update-script { }; From c1eb402afdf0f3b2670b100e6b886bdc551dbb2a Mon Sep 17 00:00:00 2001 From: pinage404 Date: Thu, 11 Dec 2025 16:09:08 +0100 Subject: [PATCH 2/2] masklint: wrap with shell, python and ruby ; make it optional --- pkgs/by-name/ma/masklint/package.nix | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/pkgs/by-name/ma/masklint/package.nix b/pkgs/by-name/ma/masklint/package.nix index e865d017eb14..f3c338ec5765 100644 --- a/pkgs/by-name/ma/masklint/package.nix +++ b/pkgs/by-name/ma/masklint/package.nix @@ -2,8 +2,12 @@ lib, rustPlatform, fetchFromGitHub, + makeWrapper, + withShell ? true, shellcheck, + withPython ? true, ruff, + withRuby ? true, rubocop, nix-update-script, }: @@ -30,6 +34,24 @@ rustPlatform.buildRustPackage { rubocop # ruby ]; + nativeBuildInputs = [ makeWrapper ]; + + postInstall = ( + if (withShell || withPython || withRuby) then + '' + wrapProgram $out/bin/masklint \ + --prefix PATH : ${ + lib.makeBinPath ( + (lib.optional withShell shellcheck) + ++ (lib.optional withPython ruff) + ++ (lib.optional withRuby rubocop) + ) + } + '' + else + "" + ); + passthru.updateScript = nix-update-script { }; meta = {