diff --git a/pkgs/applications/version-management/sourcehut/default.nix b/pkgs/applications/version-management/sourcehut/default.nix index 7faca39e2fe..9c9f6f40333 100644 --- a/pkgs/applications/version-management/sourcehut/default.nix +++ b/pkgs/applications/version-management/sourcehut/default.nix @@ -2,6 +2,7 @@ , callPackage , recurseIntoAttrs , nixosTests +, config }: # To expose the *srht modules, they have to be a python module so we use `buildPythonModule` @@ -28,12 +29,10 @@ let }; }; in -with python.pkgs; recurseIntoAttrs { +with python.pkgs; recurseIntoAttrs ({ inherit python; coresrht = toPythonApplication srht; buildsrht = toPythonApplication buildsrht; - # Added 2022-10-29 - dispatchsrht = throw "dispatch is deprecated. See https://sourcehut.org/blog/2022-08-01-dispatch-deprecation-plans/ for more information."; gitsrht = toPythonApplication gitsrht; hgsrht = toPythonApplication hgsrht; hubsrht = toPythonApplication hubsrht; @@ -46,4 +45,7 @@ with python.pkgs; recurseIntoAttrs { passthru.tests = { nixos-sourcehut = nixosTests.sourcehut; }; -} +} // lib.optionalAttrs config.allowAliases { + # Added 2022-10-29 + dispatchsrht = throw "dispatch is deprecated. See https://sourcehut.org/blog/2022-08-01-dispatch-deprecation-plans/ for more information."; +})