Unverified Commit a51fdd52 authored by Lin Jian's avatar Lin Jian Committed by GitHub
Browse files

emacs: bump package-build used by melpaBuild (#394260)

parents 1dae54c4 4a760ed5
Loading
Loading
Loading
Loading
+10 −0
Original line number Diff line number Diff line
(require 'package)
(package-initialize)

;; TODO remove this patch when Emacs bug#77143 is fixed
;; see that bug for more info
(defun package--description-file (dir)
  "Return package description file name for package DIR."
  (concat (let ((subdir (file-name-nondirectory
                         (directory-file-name dir))))
            (if (string-match "\\([^.].*?\\)-\\([0-9]+\\(?:[.][0-9]+\\|\\(?:pre\\|beta\\|alpha\\|snapshot\\)[0-9]+\\)*\\)\\'" subdir)
                (match-string 1 subdir) subdir))
          "-pkg.el"))

(defun elpa2nix-install-package ()
  (if (not noninteractive)
      (error "`elpa2nix-install-package' is to be used only with -batch"))
+6 −3
Original line number Diff line number Diff line
@@ -24,11 +24,14 @@ let
    src = fetchFromGitHub {
      owner = "melpa";
      repo = "package-build";
      rev = "d5661f1f1996a893fbcbacb4d290c57acab4fb0e";
      hash = "sha256-zVhFR2kLLkCKC+esPBbIk3qOa033YND1HF9GiNI4JM8=";
      rev = "d1722503145facf96631ac118ec0213a73082b76";
      hash = "sha256-utsZLm9IF9UkTwxFWvJmwA3Ox4tlMeNNTo+f/CqYJGA=";
    };

    patches = [ ./package-build-dont-use-mtime.patch ];
    prePatch = ''
      substituteInPlace package-build.el \
        --replace-fail '(format "--mtime=@%d" time)' '"--mtime=@0"'
    '';

    dontConfigure = true;
    dontBuild = true;
+3 −5
Original line number Diff line number Diff line
@@ -12,11 +12,9 @@
  (let* ((default-directory (package-recipe--working-tree rcp)))
    (unwind-protect
        (let ((files (package-build-expand-files-spec rcp t)))
          (unless files
            (error "Unable to find files matching recipe patterns"))
          (if (> (length files) 1)
              (package-build--build-multi-file-package rcp files)
            (package-build--build-single-file-package rcp files))))))
          (if files
              (funcall package-build-build-function rcp files)
            (error "Unable to find files matching recipe patterns"))))))

(defun melpa2nix-build-package ()
  (unless noninteractive
+0 −21
Original line number Diff line number Diff line
diff --git a/package-build.el b/package-build.el
index 29cdb61..c19be1b 100644
--- a/package-build.el
+++ b/package-build.el
@@ -923,7 +923,6 @@ DIRECTORY is a temporary directory that contains the directory
 that is put in the tarball."
   (let* ((name (oref rcp name))
          (version (oref rcp version))
-         (time (oref rcp time))
          (tar (expand-file-name (concat name "-" version ".tar")
                                 package-build-archive-dir))
          (dir (concat name "-" version)))
@@ -939,7 +938,7 @@ that is put in the tarball."
        ;; prevent a reproducible tarball as described at
        ;; https://reproducible-builds.org/docs/archives.
        "--sort=name"
-       (format "--mtime=@%d" time)
+       "--mtime=@0"
        "--owner=0" "--group=0" "--numeric-owner"
        "--pax-option=exthdr.name=%d/PaxHeaders/%f,delete=atime,delete=ctime"))
     (when (and package-build-verbose noninteractive)
+3 −0
Original line number Diff line number Diff line
@@ -6,6 +6,7 @@

melpaBuild {
  pname = "color-theme-solarized";
  ename = "solarized-theme";
  version = "0-unstable-2023-02-09";

  src = fetchFromGitHub {
@@ -15,6 +16,8 @@ melpaBuild {
    hash = "sha256-7E8r56dzfD06tsQEnqU5mWSbwz9x9QPbzken2J/fhlg=";
  };

  files = ''(:defaults (:exclude "color-theme-solarized-pkg.el"))'';

  # https://github.com/NixOS/nixpkgs/issues/335408
  ignoreCompilationError = true;

Loading