Unverified Commit 5b7501db authored by github-actions[bot]'s avatar github-actions[bot] Committed by GitHub
Browse files

Merge master into staging-next

parents b698c4af c8cb4b8b
Loading
Loading
Loading
Loading
+101 −2
Original line number Diff line number Diff line
pkgs:
pkgs: lib: buildPackages:

self: super:

@@ -6,6 +6,54 @@ let
  libExt = pkgs.stdenv.hostPlatform.extensions.sharedLibrary;
in
{
  cl-lib = null; # builtin
  cl-print = null; # builtin
  tle = null; # builtin
  advice = null; # builtin

  # Compilation instructions for the Ada executables:
  # https://www.nongnu.org/ada-mode/
  ada-mode = super.ada-mode.overrideAttrs (
    finalAttrs: previousAttrs: {
      # actually unpack source of ada-mode and wisi
      # which are both needed to compile the tools
      # we need at runtime
      dontUnpack = false;
      srcs = [
        super.ada-mode.src
        self.wisi.src
      ];

      sourceRoot = "ada-mode-${finalAttrs.version}";

      nativeBuildInputs = previousAttrs.nativeBuildInputs or [ ] ++ [
        buildPackages.gnat
        buildPackages.gprbuild
        buildPackages.dos2unix
        buildPackages.re2c
      ];

      buildInputs = previousAttrs.buildInputs or [ ] ++ [ pkgs.gnatPackages.gnatcoll-xref ];

      buildPhase = ''
        runHook preBuild
        ./build.sh -j$NIX_BUILD_CORES
        runHook postBuild
      '';

      postInstall =
        previousAttrs.postInstall or ""
        + "\n"
        + ''
          ./install.sh "$out"
        '';

      meta = previousAttrs.meta // {
        maintainers = [ lib.maintainers.sternenseemann ];
      };
    }
  );

  # TODO delete this when we get upstream fix https://debbugs.gnu.org/cgi/bugreport.cgi?bug=73241
  eglot = super.eglot.overrideAttrs (old: {
    postInstall =
@@ -20,6 +68,57 @@ in
      '';
  });

  jinx = super.jinx.overrideAttrs (old: {
    dontUnpack = false;

    nativeBuildInputs = old.nativeBuildInputs or [ ] ++ [ pkgs.pkg-config ];

    buildInputs = old.buildInputs or [ ] ++ [ pkgs.enchant2 ];

    postBuild =
      old.postBuild or ""
      + "\n"
      + ''
        NIX_CFLAGS_COMPILE="$($PKG_CONFIG --cflags enchant-2) $NIX_CFLAGS_COMPILE"
        $CC -shared -o jinx-mod${libExt} jinx-mod.c -lenchant-2
      '';

    postInstall =
      old.postInstall or ""
      + "\n"
      + ''
        outd=$out/share/emacs/site-lisp/elpa/jinx-*
        install -m444 -t $outd jinx-mod${libExt}
        rm $outd/jinx-mod.c $outd/emacs-module.h
      '';

    meta = old.meta // {
      maintainers = [ lib.maintainers.DamienCassou ];
    };
  });

  plz = super.plz.overrideAttrs (old: {
    dontUnpack = false;
    postPatch =
      old.postPatch or ""
      + "\n"
      + ''
        substituteInPlace plz.el \
          --replace-fail 'plz-curl-program "curl"' 'plz-curl-program "${lib.getExe pkgs.curl}"'
      '';
    preInstall =
      old.preInstall or ""
      + "\n"
      + ''
        tar -cf "$ename-$version.tar" --transform "s,^,$ename-$version/," * .[!.]*
        src="$ename-$version.tar"
      '';
  });

  pq = super.pq.overrideAttrs (old: {
    buildInputs = old.buildInputs or [ ] ++ [ pkgs.postgresql ];
  });

  # native compilation for tests/seq-tests.el never ends
  # delete tests/seq-tests.el to workaround this
  seq = super.seq.overrideAttrs (old: {
@@ -41,7 +140,7 @@ in
    buildPhase =
      old.buildPhase or ""
      + ''
        $CXX -shared -o xapian-lite${libExt} xapian-lite.cc $NIX_CFLAGS_COMPILE -lxapian
        $CXX -shared -o xapian-lite${libExt} xapian-lite.cc -lxapian
      '';
    postInstall =
      old.postInstall or ""
+1 −4
Original line number Diff line number Diff line
@@ -47,12 +47,9 @@ self: let

    super = imported;

    commonOverrides = import ./elpa-common-overrides.nix pkgs;
    commonOverrides = import ./elpa-common-overrides.nix pkgs lib buildPackages;

    overrides = self: super: {
      pq = super.pq.overrideAttrs (old: {
        buildInputs = (old.buildInputs or [ ]) ++ [ pkgs.postgresql ];
      });
    };

    elpaDevelPackages =
+1 −85
Original line number Diff line number Diff line
@@ -47,7 +47,7 @@ self: let

    super = imported;

    commonOverrides = import ./elpa-common-overrides.nix pkgs;
    commonOverrides = import ./elpa-common-overrides.nix pkgs lib buildPackages;

    overrides = self: super: {
      # upstream issue: Wrong type argument: arrayp, nil
@@ -56,90 +56,6 @@ self: let
        then markBroken super.org-transclusion
        else super.org-transclusion;
      rcirc-menu = markBroken super.rcirc-menu; # Missing file header
      cl-lib = null; # builtin
      cl-print = null; # builtin
      tle = null; # builtin
      advice = null; # builtin
      # Compilation instructions for the Ada executables:
      # https://www.nongnu.org/ada-mode/
      ada-mode = super.ada-mode.overrideAttrs (old: {
        # actually unpack source of ada-mode and wisi
        # which are both needed to compile the tools
        # we need at runtime
        dontUnpack = false;
        srcs = [
          super.ada-mode.src
          self.wisi.src
        ];

        sourceRoot = "ada-mode-${self.ada-mode.version}";

        nativeBuildInputs = old.nativeBuildInputs ++ [
          buildPackages.gnat
          buildPackages.gprbuild
          buildPackages.dos2unix
          buildPackages.re2c
        ];

        buildInputs = old.buildInputs ++ [
          pkgs.gnatPackages.gnatcoll-xref
        ];

        buildPhase = ''
          runHook preBuild
          ./build.sh -j$NIX_BUILD_CORES
          runHook postBuild
        '';

        postInstall = (old.postInstall or "") + "\n" + ''
          ./install.sh "$out"
        '';

        meta = old.meta // {
          maintainers = [ lib.maintainers.sternenseemann ];
        };
      });

      jinx = super.jinx.overrideAttrs (old: let
        libExt = pkgs.stdenv.hostPlatform.extensions.sharedLibrary;
      in {
        dontUnpack = false;

        nativeBuildInputs = (old.nativeBuildInputs or [ ]) ++ [
            pkgs.pkg-config
        ];

        buildInputs = (old.buildInputs or [ ]) ++ [ pkgs.enchant2 ];

        postBuild = ''
          NIX_CFLAGS_COMPILE="$($PKG_CONFIG --cflags enchant-2) $NIX_CFLAGS_COMPILE"
          $CC -shared -o jinx-mod${libExt} jinx-mod.c -lenchant-2
        '';

        postInstall = (old.postInstall or "") + "\n" + ''
          outd=$out/share/emacs/site-lisp/elpa/jinx-*
          install -m444 -t $outd jinx-mod${libExt}
          rm $outd/jinx-mod.c $outd/emacs-module.h
        '';

        meta = old.meta // {
          maintainers = [ lib.maintainers.DamienCassou ];
        };
      });

      plz = super.plz.overrideAttrs (
        old: {
          dontUnpack = false;
          postPatch = old.postPatch or "" + ''
            substituteInPlace ./plz.el \
              --replace 'plz-curl-program "curl"' 'plz-curl-program "${pkgs.curl}/bin/curl"'
          '';
          preInstall = ''
            tar -cf "$pname-$version.tar" --transform "s,^,$pname-$version/," * .[!.]*
            src="$pname-$version.tar"
          '';
        }
      );


    };
+0 −33
Original line number Diff line number Diff line
{
  stdenv,
  lib,
  melpaBuild,
  fetchFromGitLab,
  unstableGitUpdater,
}:

melpaBuild {
  pname = "ligo-mode";
  version = "1.7.0-unstable-2024-08-22";

  src = fetchFromGitLab {
    owner = "ligolang";
    repo = "ligo";
    rev = "47128d41a9329356cbad40a982d8144da19a9218";
    hash = "sha256-IrxPnbWrhqe3TxELsqa2y4NdcfEJMGUcGCdNuDG+rfs=";
  };

  files = ''("tools/emacs/ligo-mode.el")'';

  ignoreCompilationError = false;

  passthru.updateScript = unstableGitUpdater { };

  meta = {
    description = "Major mode for editing LIGO source code";
    homepage = "https://gitlab.com/ligolang/ligo";
    license = lib.licenses.mit;
    maintainers = with lib.maintainers; [ AndersonTorres ];
    broken = stdenv.isDarwin; # different src hash on darwin
  };
}
+8 −10
Original line number Diff line number Diff line
@@ -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
                                       }:
@@ -130,7 +128,7 @@ let
        ligo-mode =
          if super.ligo-mode.version == "0.3"
          then markBroken super.ligo-mode
          else null; # auto-updater is failing; use manual one
          else super.ligo-mode;

        # upstream issue: missing file header
        link = markBroken super.link;
Loading