Skip to content

Commit

Permalink
Burocratic setup
Browse files Browse the repository at this point in the history
  • Loading branch information
picnoir committed Apr 1, 2022
0 parents commit ea6631f
Show file tree
Hide file tree
Showing 8 changed files with 792 additions and 0 deletions.
1 change: 1 addition & 0 deletions .envrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
use nix
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
*~
*.elc
load-local-env.el
674 changes: 674 additions & 0 deletions COPYING

Large diffs are not rendered by default.

35 changes: 35 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# Makefile *shamelessly stolen* from https://github.com/purcell/envrc.
# I love the simplicity of it.
# Thanks Steve <3

EMACS ?= emacs

# A space-separated list of required package names
NEEDED_PACKAGES = package-lint seq inheritenv

INIT_PACKAGES="(progn \
(require 'package) \
(push '(\"melpa\" . \"https://melpa.org/packages/\") package-archives) \
(package-initialize) \
(dolist (pkg '(${NEEDED_PACKAGES})) \
(unless (package-installed-p pkg) \
(unless (assoc pkg package-archive-contents) \
(package-refresh-contents)) \
(package-install pkg))) \
)"

all: compile test package-lint clean-elc

test:
${EMACS} -Q --eval ${INIT_PACKAGES} --batch -l h.el -l h-tests.el --eval "(ert t)"

package-lint:
${EMACS} -Q --eval ${INIT_PACKAGES} --batch -f package-lint-batch-and-exit h.el

compile: clean-elc
${EMACS} -Q --eval ${INIT_PACKAGES} -L . --batch -f batch-byte-compile *.el

clean-elc:
rm -f f.elc

.PHONY: all compile clean-elc package-lint
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# H.el

Project checkout and navigation Emacs package heavily inspired by [zimbatm/h](https://github.com/zimbatm/h).
37 changes: 37 additions & 0 deletions h-tests.el
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
;;; h-tests.el --- Project navigation and remote checkout -*- lexical-binding: t; -*-

;; Copyright (C) 2022 Félix Baylac Jacqué
;; Author: Félix Baylac Jacqué <felix at alternativebit.fr>
;; Maintainer: Félix Baylac Jacqué <felix at alternativebit.fr>
;; Version: 1.14.0

;;; License:

;; This program is free software; you can redistribute it and/or modify
;; it under the terms of the GNU General Public License as published by
;; the Free Software Foundation, either version 3 of the License, or
;; (at your option) any later version.

;; This program is distributed in the hope that it will be useful,
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
;; GNU General Public License for more details.

;; You should have received a copy of the GNU General Public License
;; along with this program. If not, see <https://www.gnu.org/licenses/>

;;; Commentary:

;; TODO before publish

;;; Code:

(require 'ert)
(require 'h)

(ert-deftest h-dummy-test ()
"Testing the project setup."
(should (eq h-test 1)))

(provide 'h-tests)
;;; h-tests.el ends here
34 changes: 34 additions & 0 deletions h.el
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
;;; h.el --- Project navigation and remote checkout -*- lexical-binding: t -*-

;; Copyright (C) 2022 Félix Baylac Jacqué
;; Author: Félix Baylac Jacqué <felix at alternativebit.fr>
;; Maintainer: Félix Baylac Jacqué <felix at alternativebit.fr>
;; Version: 1.14.0
;; Homepage: https://alternativebit.fr/TODO
;; Package-Requires: ((emacs "24.1"))

;;; License:

;; This program is free software; you can redistribute it and/or modify
;; it under the terms of the GNU General Public License as published by
;; the Free Software Foundation, either version 3 of the License, or
;; (at your option) any later version.

;; This program is distributed in the hope that it will be useful,
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
;; GNU General Public License for more details.

;; You should have received a copy of the GNU General Public License
;; along with this program. If not, see <https://www.gnu.org/licenses/>

;;; Commentary:

;; TODO before publish

;;; Code:

(defvar h-test 1)

(provide 'h)
;;; h.el ends here
5 changes: 5 additions & 0 deletions shell.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{ pkgs ? import <nixpkgs> {} }:

pkgs.mkShell {
nativeBuildInputs = [ pkgs.gnumake ];
}

0 comments on commit ea6631f

Please sign in to comment.