diff options
| author | Gregor Kleen <gkleen@yggdrasil.li> | 2025-04-19 13:03:24 +0200 |
|---|---|---|
| committer | Gregor Kleen <gkleen@yggdrasil.li> | 2025-04-19 13:03:24 +0200 |
| commit | 828f036e26f947f58e639b70301c984246bcf4c7 (patch) | |
| tree | 200584814f5e6b89202321d579cad1b966d5d54f /overlays/nix-direnv/default.nix | |
| parent | 3d577fd69bfe89a9b8497367fdc55d75174e34bd (diff) | |
| download | nixos-828f036e26f947f58e639b70301c984246bcf4c7.tar nixos-828f036e26f947f58e639b70301c984246bcf4c7.tar.gz nixos-828f036e26f947f58e639b70301c984246bcf4c7.tar.bz2 nixos-828f036e26f947f58e639b70301c984246bcf4c7.tar.xz nixos-828f036e26f947f58e639b70301c984246bcf4c7.zip | |
...
Diffstat (limited to 'overlays/nix-direnv/default.nix')
| -rw-r--r-- | overlays/nix-direnv/default.nix | 53 |
1 files changed, 53 insertions, 0 deletions
diff --git a/overlays/nix-direnv/default.nix b/overlays/nix-direnv/default.nix new file mode 100644 index 00000000..7c488e4e --- /dev/null +++ b/overlays/nix-direnv/default.nix | |||
| @@ -0,0 +1,53 @@ | |||
| 1 | { final, prev, ... }: { | ||
| 2 | nix-direnv = prev.resholve.mkDerivation rec { | ||
| 3 | pname = "nix-direnv"; | ||
| 4 | version = "3.0.6"; | ||
| 5 | |||
| 6 | patches = [ | ||
| 7 | ./static-nix.patch | ||
| 8 | ]; | ||
| 9 | |||
| 10 | src = prev.fetchFromGitHub { | ||
| 11 | owner = "nix-community"; | ||
| 12 | repo = "nix-direnv"; | ||
| 13 | rev = version; | ||
| 14 | hash = "sha256-oNqhPqgQT92yxbKmcgX4F3e2yTUPyXYG7b2xQm3TvQw="; | ||
| 15 | }; | ||
| 16 | |||
| 17 | installPhase = '' | ||
| 18 | runHook preInstall | ||
| 19 | install -m400 -D direnvrc $out/share/nix-direnv/direnvrc | ||
| 20 | runHook postInstall | ||
| 21 | ''; | ||
| 22 | |||
| 23 | solutions = { | ||
| 24 | default = { | ||
| 25 | scripts = [ "share/nix-direnv/direnvrc" ]; | ||
| 26 | interpreter = "none"; | ||
| 27 | inputs = with final; [ coreutils nix-monitored ]; | ||
| 28 | fake = { | ||
| 29 | builtin = [ | ||
| 30 | "PATH_add" | ||
| 31 | "direnv_layout_dir" | ||
| 32 | "has" | ||
| 33 | "log_error" | ||
| 34 | "log_status" | ||
| 35 | "watch_file" | ||
| 36 | ]; | ||
| 37 | function = [ | ||
| 38 | # not really a function - this is in an else branch for macOS/homebrew that | ||
| 39 | # cannot be reached when built with nix | ||
| 40 | "shasum" | ||
| 41 | ]; | ||
| 42 | }; | ||
| 43 | keep = { | ||
| 44 | "$cmd" = true; | ||
| 45 | "$direnv" = true; | ||
| 46 | }; | ||
| 47 | execer = [ | ||
| 48 | "cannot:${prev.lib.getExe' final.nix-monitored "nix"}" | ||
| 49 | ]; | ||
| 50 | }; | ||
| 51 | }; | ||
| 52 | }; | ||
| 53 | } | ||
