direnv.nix-direnv: remove enableFlakes (#2458)

Since https://github.com/NixOS/nixpkgs/pull/144197 flake support is
always available. The upstream `enableFlakes` option is scheduled to be
removed altogether in https://github.com/NixOS/nixpkgs/pull/145236
This commit is contained in:
Bernardo Meurer 2021-11-09 20:59:40 -08:00 committed by GitHub
parent 2917ef23b3
commit 1e5c8e9bff
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -15,6 +15,8 @@ in {
"direnv"
"enableNixDirenvIntegration"
] [ "programs" "direnv" "nix-direnv" "enable" ])
(mkRemovedOptionModule [ "programs" "direnv" "nix-direnv" "enableFlakes" ]
"Flake support is now always enabled.")
];
meta.maintainers = [ maintainers.rycee ];
@ -79,7 +81,6 @@ in {
<link
xlink:href="https://github.com/nix-community/nix-direnv">nix-direnv</link>,
a fast, persistent use_nix implementation for direnv'';
enableFlakes = mkEnableOption "Flake support in nix-direnv";
};
};
@ -92,11 +93,9 @@ in {
};
xdg.configFile."direnv/direnvrc" = let
package =
pkgs.nix-direnv.override { inherit (cfg.nix-direnv) enableFlakes; };
text = concatStringsSep "\n" (optional (cfg.stdlib != "") cfg.stdlib
++ optional cfg.nix-direnv.enable
"source ${package}/share/nix-direnv/direnvrc");
"source ${pkgs.nix-direnv}/share/nix-direnv/direnvrc");
in mkIf (text != "") { inherit text; };
programs.bash.initExtra = mkIf cfg.enableBashIntegration (