2015-02-09 00:29:48 +00:00
|
|
|
(require 'package)
|
|
|
|
(package-initialize)
|
|
|
|
|
2018-07-16 02:52:41 +01:00
|
|
|
(require 'package-recipe)
|
2015-02-09 00:29:48 +00:00
|
|
|
(require 'package-build)
|
|
|
|
|
2018-07-16 02:52:41 +01:00
|
|
|
(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/"))
|
2015-02-09 00:29:48 +00:00
|
|
|
|
|
|
|
(defun melpa2nix-build-package ()
|
|
|
|
(if (not noninteractive)
|
|
|
|
(error "`melpa2nix-build-package' is to be used only with -batch"))
|
|
|
|
(pcase command-line-args-left
|
2018-07-16 02:52:41 +01:00
|
|
|
(`(,package ,version)
|
|
|
|
(package-build--package (package-recipe-lookup package) version))))
|