Commit 80b26433 authored by John Titor's avatar John Titor Committed by Masum Reza
Browse files

envfs: cleanup, add nix-update-script



Move to finalAttrs, remove with lib;

Signed-off-by: default avatarJohn Titor <50095635+JohnRTitor@users.noreply.github.com>
parent 92729eb5
Loading
Loading
Loading
Loading
+20 −12
Original line number Diff line number Diff line
{
  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;
  };
}
})