From 80b264337de1e9ead6cc7837c07a1bd20798f60d Mon Sep 17 00:00:00 2001 From: John Titor <50095635+JohnRTitor@users.noreply.github.com> Date: Mon, 7 Apr 2025 21:43:15 +0530 Subject: [PATCH] envfs: cleanup, add nix-update-script Move to finalAttrs, remove with lib; Signed-off-by: John Titor <50095635+JohnRTitor@users.noreply.github.com> --- pkgs/by-name/en/envfs/package.nix | 32 +++++++++++++++++++------------ 1 file changed, 20 insertions(+), 12 deletions(-) diff --git a/pkgs/by-name/en/envfs/package.nix b/pkgs/by-name/en/envfs/package.nix index a61d7e2c3501..3c7b57002fb4 100644 --- a/pkgs/by-name/en/envfs/package.nix +++ b/pkgs/by-name/en/envfs/package.nix @@ -1,34 +1,42 @@ { - rustPlatform, lib, fetchFromGitHub, + rustPlatform, nixosTests, + nix-update-script, }: -rustPlatform.buildRustPackage rec { +rustPlatform.buildRustPackage (finalAttrs: { pname = "envfs"; version = "1.1.0"; + src = fetchFromGitHub { owner = "Mic92"; repo = "envfs"; - rev = version; + rev = finalAttrs.version; hash = "sha256-bpATdm/lB+zomPYGCxA7omWK/SKPIaqr94J+fjMaXfE="; }; + useFetchCargoVendor = true; cargoHash = "sha256-nMUdAFRHJZDwvLASBVykzzkwk3HxslDehqqm1U99qYg="; - passthru.tests = { - envfs = nixosTests.envfs; - }; - postInstall = '' ln -s envfs $out/bin/mount.envfs ln -s envfs $out/bin/mount.fuse.envfs ''; - meta = with lib; { + + passthru = { + tests = { + envfs = nixosTests.envfs; + }; + + updateScript = nix-update-script { }; + }; + + meta = { description = "Fuse filesystem that returns symlinks to executables based on the PATH of the requesting process"; homepage = "https://github.com/Mic92/envfs"; - license = licenses.mit; - maintainers = with maintainers; [ mic92 ]; - platforms = platforms.linux; + license = lib.licenses.mit; + maintainers = with lib.maintainers; [ mic92 ]; + platforms = lib.platforms.linux; }; -} +})