melpa-packages: remove condition about null in helper functions

This is a follow up of [1].  With that PR applied, packages will not
be null.

[1]: https://github.com/NixOS/nixpkgs/pull/83378
This commit is contained in:
Lin Jian
2024-09-15 06:35:13 +08:00
parent dfc36088ba
commit f739c0bbd8
@@ -31,36 +31,34 @@ in
{ lib, pkgs }: variant: self:
let
dontConfigure = pkg:
if pkg != null then pkg.override (args: {
pkg.override (args: {
melpaBuild = drv: args.melpaBuild (drv // {
dontConfigure = true;
});
}) else null;
});
markBroken = pkg:
if pkg != null then pkg.override (args: {
pkg.override (args: {
melpaBuild = drv: args.melpaBuild (drv // {
meta = (drv.meta or { }) // { broken = true; };
});
}) else null;
});
externalSrc = pkg: epkg:
if pkg != null then pkg.override (args: {
pkg.override (args: {
melpaBuild = drv: args.melpaBuild (drv // {
inherit (epkg) src version;
propagatedUserEnvPkgs = [ epkg ];
});
}) else null;
});
buildWithGit = pkg: pkg.overrideAttrs (attrs: {
nativeBuildInputs =
(attrs.nativeBuildInputs or [ ]) ++ [ pkgs.git ];
});
fix-rtags = pkg:
if pkg != null then dontConfigure (externalSrc pkg pkgs.rtags)
else null;
fix-rtags = pkg: dontConfigure (externalSrc pkg pkgs.rtags);
generateMelpa = lib.makeOverridable ({ archiveJson ? defaultArchive
}: