mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-24 07:53:19 +00:00
9140d4b06f
I think this is due an update. I've chosen to update to the latest version that has been merged into Melpa. Unfortunately we now need to hack around it trying to run VCS commands. My Emacs configuration with thirty-something leaf packages seems fine after the rebuild.
20 lines
691 B
EmacsLisp
20 lines
691 B
EmacsLisp
(require 'package)
|
|
(package-initialize)
|
|
|
|
(require 'package-recipe)
|
|
(require 'package-build)
|
|
|
|
(setq package-build-working-dir (expand-file-name "working/"))
|
|
(setq package-build-archive-dir (expand-file-name "packages/"))
|
|
(setq package-build-recipes-dir (expand-file-name "recipes/"))
|
|
|
|
(defun melpa2nix-build-package ()
|
|
(if (not noninteractive)
|
|
(error "`melpa2nix-build-package' is to be used only with -batch"))
|
|
(pcase command-line-args-left
|
|
(`(,package ,version ,commit)
|
|
;; Monkey-patch package-build so it doesn't shell out to git/hg.
|
|
(defun package-build--get-commit (&rest _)
|
|
commit)
|
|
(package-build--package (package-recipe-lookup package) version))))
|