diff --git a/modules/apt/default.nix b/modules/apt/default.nix index 26be71b..26f4dbd 100644 --- a/modules/apt/default.nix +++ b/modules/apt/default.nix @@ -4,7 +4,6 @@ with lib; let cfg = config.programs.apt; - apt_ = pkgs.callPackage ./apt-patched.nix {}; apt = cfg.package; apt-mock-packages = pkgs.writeShellScriptBin "apt-mock-packages" @@ -24,7 +23,7 @@ in then options.programs.nix-ld.libraries else mkOption { type = types.listOf types.str; default = []; }; - package = lib.mkPackageOption ({ apt = apt_; }) "apt" { }; + package = lib.mkPackageOption pkgs "apt" { }; }; config = mkIf (cfg.enable) { diff --git a/overlay.nix b/overlay.nix index 866a1ff..cc64ba3 100644 --- a/overlay.nix +++ b/overlay.nix @@ -1,5 +1,6 @@ final: prev: (prev.lib.mapAttrs (pkg: _: prev.callPackage "${./pkgs}/${pkg}" {}) (builtins.readDir ./pkgs)) // { + apt_vanilla = prev.apt; mkAnsibleDevShell = { extraAnsiblePy ? [], packages ? [], shellHook ? "", ... }@args: final.mkShell (args // { LOCALE_ARCHIVE = "${final.glibcLocales}/lib/locale/locale-archive"; diff --git a/modules/apt/apt-patched.nix b/pkgs/apt/default.nix similarity index 90% rename from modules/apt/apt-patched.nix rename to pkgs/apt/default.nix index 265f186..ae2d792 100644 --- a/modules/apt/apt-patched.nix +++ b/pkgs/apt/default.nix @@ -1,9 +1,9 @@ { - apt, + apt_vanilla, dpkg, }: -apt.overrideAttrs { +apt_vanilla.overrideAttrs { postInstall = '' ln -s ${dpkg}/bin/dpkg $out/bin/dpkg