2015-02-09 01:29:48 +01:00
|
|
|
(require 'package)
|
|
|
|
(package-initialize)
|
|
|
|
|
2018-07-16 03:52:41 +02:00
|
|
|
(require 'package-recipe)
|
2015-02-09 01:29:48 +01:00
|
|
|
(require 'package-build)
|
|
|
|
|
2018-07-16 03:52:41 +02: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 01:29:48 +01: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 03:52:41 +02:00
|
|
|
(`(,package ,version)
|
|
|
|
(package-build--package (package-recipe-lookup package) version))))
|