about summary refs log tree commit diff
path: root/pkgs/applications/editors
diff options
context:
space:
mode:
authorBernardo Meurer <bernardo@meurer.org>2023-03-16 11:10:22 -0300
committerGitHub <noreply@github.com>2023-03-16 11:10:22 -0300
commit6e557333593580724cbe070ef0ab8f46f8faf49d (patch)
tree9a74711c5858544e70c1d998d2be77a8b77e0881 /pkgs/applications/editors
parentfe49120d973443e308ba531f4cfb1ce0a7e89a54 (diff)
parentd10e69c86bcd415f5c4347d3c6b981241e913465 (diff)
Merge pull request #219747 from Stunkymonkey/deprecate-isNull
Diffstat (limited to 'pkgs/applications/editors')
-rw-r--r--pkgs/applications/editors/emacs/elisp-packages/libgenerated.nix14
1 files changed, 7 insertions, 7 deletions
diff --git a/pkgs/applications/editors/emacs/elisp-packages/libgenerated.nix b/pkgs/applications/editors/emacs/elisp-packages/libgenerated.nix
index f45aadfa67b48..36576f7c12398 100644
--- a/pkgs/applications/editors/emacs/elisp-packages/libgenerated.nix
+++ b/pkgs/applications/editors/emacs/elisp-packages/libgenerated.nix
@@ -73,28 +73,28 @@ in {
         error = sourceArgs.error or args.error or null;
         hasSource = lib.hasAttr variant args;
         pname = builtins.replaceStrings [ "@" ] [ "at" ] ename;
-        broken = ! isNull error;
+        broken = error != null;
       in
       if hasSource then
         lib.nameValuePair ename (
           self.callPackage ({ melpaBuild, fetchurl, ... }@pkgargs:
           melpaBuild {
             inherit pname ename commit;
-            version = if isNull version then "" else
-              lib.concatStringsSep "." (map toString
+            version = lib.optionalString (version != null)
+              (lib.concatStringsSep "." (map toString
                 # Hack: Melpa archives contains versions with parse errors such as [ 4 4 -4 413 ] which should be 4.4-413
                 # This filter method is still technically wrong, but it's computationally cheap enough and tapers over the issue
-                (builtins.filter (n: n >= 0) version));
+                (builtins.filter (n: n >= 0) version)));
             # TODO: Broken should not result in src being null (hack to avoid eval errors)
-            src = if (isNull sha256 || broken) then null else
+            src = if (sha256 == null || broken) then null else
               lib.getAttr fetcher (fetcherGenerators args sourceArgs);
-            recipe = if isNull commit then null else
+            recipe = if commit == null then null else
               fetchurl {
                 name = pname + "-recipe";
                 url = "https://raw.githubusercontent.com/melpa/melpa/${commit}/recipes/${ename}";
                 inherit sha256;
               };
-            packageRequires = lib.optionals (! isNull deps)
+            packageRequires = lib.optionals (deps != null)
               (map (dep: pkgargs.${dep} or self.${dep} or null)
                    deps);
             meta = (sourceArgs.meta or {}) // {