From f739c0bbd8c177af36eaaa31849b7fc71b0f8295 Mon Sep 17 00:00:00 2001 From: Lin Jian Date: Sun, 15 Sep 2024 06:11:41 +0800 Subject: [PATCH] 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 --- .../emacs/elisp-packages/melpa-packages.nix | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/pkgs/applications/editors/emacs/elisp-packages/melpa-packages.nix b/pkgs/applications/editors/emacs/elisp-packages/melpa-packages.nix index 3b5dd1c2912b..f875ada48e6a 100644 --- a/pkgs/applications/editors/emacs/elisp-packages/melpa-packages.nix +++ b/pkgs/applications/editors/emacs/elisp-packages/melpa-packages.nix @@ -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 }: