Skip to content

Commit

Permalink
apt: patch globally
Browse files Browse the repository at this point in the history
  • Loading branch information
mkg20001 committed Aug 24, 2024
1 parent 4c605cb commit 6540b97
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
3 changes: 1 addition & 2 deletions modules/apt/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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) {
Expand Down
1 change: 1 addition & 0 deletions overlay.nix
Original file line number Diff line number Diff line change
@@ -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";

Expand Down
4 changes: 2 additions & 2 deletions modules/apt/apt-patched.nix → pkgs/apt/default.nix
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{
apt,
apt_vanilla,
dpkg,
}:

apt.overrideAttrs {
apt_vanilla.overrideAttrs {
postInstall = ''
ln -s ${dpkg}/bin/dpkg $out/bin/dpkg
Expand Down

0 comments on commit 6540b97

Please sign in to comment.