You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
20 lines
691 B
20 lines
691 B
9 years ago
|
(require 'package)
|
||
|
(package-initialize)
|
||
|
|
||
6 years ago
|
(require 'package-recipe)
|
||
9 years ago
|
(require 'package-build)
|
||
|
|
||
6 years ago
|
(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/"))
|
||
9 years ago
|
|
||
|
(defun melpa2nix-build-package ()
|
||
|
(if (not noninteractive)
|
||
|
(error "`melpa2nix-build-package' is to be used only with -batch"))
|
||
|
(pcase command-line-args-left
|
||
3 years ago
|
(`(,package ,version ,commit)
|
||
|
;; Monkey-patch package-build so it doesn't shell out to git/hg.
|
||
|
(defun package-build--get-commit (&rest _)
|
||
|
commit)
|
||
6 years ago
|
(package-build--package (package-recipe-lookup package) version))))
|