10 # resholve does not yet support `finalAttrs` call pattern hence `rec`
11 # https://github.com/abathur/resholve/issues/107
12 resholve.mkDerivation rec {
16 src = fetchFromGitHub {
17 owner = "nix-community";
20 hash = "sha256-oNqhPqgQT92yxbKmcgX4F3e2yTUPyXYG7b2xQm3TvQw=";
25 install -m400 -D direnvrc $out/share/nix-direnv/direnvrc
31 scripts = [ "share/nix-direnv/direnvrc" ];
33 inputs = [ coreutils ];
44 # not really a function - this is in an else branch for macOS/homebrew that
45 # cannot be reached when built with nix
49 # We want to reference the ambient Nix when possible, and have custom logic
58 # Nix fallback implementation
59 "$_nix_direnv_nix" = true;
60 "$ambient_nix" = true;
61 "$NIX_DIRENV_FALLBACK_NIX" = true;
64 (writeText "prologue.sh" ''
65 NIX_DIRENV_FALLBACK_NIX=''${NIX_DIRENV_FALLBACK_NIX:-${lib.getExe nix}}
71 description = "Fast, persistent use_nix implementation for direnv";
72 homepage = "https://github.com/nix-community/nix-direnv";
73 license = lib.licenses.mit;
74 platforms = lib.platforms.unix;
75 maintainers = with lib.maintainers; [