Skip to content

Commit

Permalink
first commit (。◕‿◕。)
Browse files Browse the repository at this point in the history
Signed-off-by: Psionik K <[email protected]>
  • Loading branch information
psionic-k committed Oct 20, 2023
0 parents commit 041c6f7
Show file tree
Hide file tree
Showing 19 changed files with 1,417 additions and 0 deletions.
1 change: 1 addition & 0 deletions .github/.envrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
use flake
2 changes: 2 additions & 0 deletions .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# This is the bootstrap solution. It will live for approximately a year.
github: positron-solutions
84 changes: 84 additions & 0 deletions .github/flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

111 changes: 111 additions & 0 deletions .github/flake.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,111 @@
# Copyright (C) 2022 Positron Solutions

# Permission is hereby granted, free of charge, to any person obtaining a copy of
# this software and associated documentation files (the "Software"), to deal in
# the Software without restriction, including without limitation the rights to
# use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
# the Software, and to permit persons to whom the Software is furnished to do so,
# subject to the following conditions:

# The above copyright notice and this permission notice shall be included in all
# copies or substantial portions of the Software.

# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
# FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
# COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
# IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
# CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

{
description = "This flake provides CI & local development dependencies";

# inputs are pinned via flake.lock. The normal way to update an individual
# version is:
# nix flake lock --update-input emacs-overlay
# Tracking can be accomplished via CI and machine commits
inputs = {
# stable branches are recommended for CI, regression spotting. Testing with
# multiple versions can be done via input overrides, such as:
# nix build .#ci --override-input nixpkgs github:nixpkgs/nixpkgs/unstable
nixpkgs.url = "github:nixos/nixpkgs?ref=release-22.11";
flake-utils.url = "github:numtide/flake-utils";
emacs-overlay.url = "github:nix-community/emacs-overlay";
# slave Emacs overlay to our nixpkgs. This doesn't do a lot except reduce
# the closure size and allow us to control both nixpkgs versions with one
# declaration.
emacs-overlay.inputs.nixpkgs.follows = "nixpkgs";
emacs-overlay.inputs.flake-utils.follows = "flake-utils";
};

outputs = inputs:
with inputs;
flake-utils.lib.eachDefaultSystem (system:
let

# instantaite nixpkgs with the emacs overlay applied.
# to explore available attributes, you can instantiate nixpkgs with the emacs overlay in a nix repl:
# pkgs = import (builtins.getFlake "nixpkgs") { system = builtins.currentSystem; overlays = [ (builtins.getFlake ("emacs-overlay")).overlay ];}
# pkgs.emacs will tab complete
pkgs = import nixpkgs {
inherit system;
overlays = [ emacs-overlay.overlay ];
};

# List of Emacsen to generate development shells for
emacsPackages = [
"emacsUnstable"
"emacsGit"
"emacs28"
"emacs"
];

# let's have a development shell per Emacs!
devShells = pkgs.lib.genAttrs emacsPackages (emacsPkg:
pkgs.mkShell {
packages = [
# pkgs, contains many dependencies you can provide to your elisp
# programs. Search for packages here:
# https://search.nixos.org/packages

# https://github.com/nix-community/emacs-overlay
# The emacs overlay provides up-to-date snapshots of Melpa packages.
# These will be pure & pinned, so you need to update the flake lock
# or use appropriate options.
#
# This expression builds an Emacs that loads the packages passed
# to emacsWithPackages on startup.
((pkgs.emacsPackagesFor pkgs.${emacsPkg}).emacsWithPackages
(epkgs: [
# List your project's dependencies here:
# epkgs.melpaPackages.dash
# epkgs.melpaStablePackages.dash
# epkgs.elpaPackages.dash
# epkgs.dash

# Development dependencies
epkgs.elpaPackages.relint
epkgs.melpaPackages.elisp-lint
# epkgs.melpaPackages.buttercup # XXX finish after #218 on buttercup
# epkgs.melpaPackages.elsa # XXX did not work out of the box


# Optionally override derivations.
# melpaPackages.weechat.overrideAttrs(old: {
# # probably you want to override the src attribute
# patches = [ ./weechat-el.patch ];
# })
]))
];
});
in {
# The output set, where all useful things go. If your nix flake exposes
# packages, overlays, shells, or nix utils, they can be exposed here for
# downstream consumption.

# Augment the devShells with a default so that `nix develop` knows what
# to do. Run `nix flake show` to see the results. Per-system,
# per-Emacs, we have a development environment avaialble.
devShells = devShells // { default = devShells.emacsGit; };
});
}
20 changes: 20 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
## Pull Requests

**Generated** changes to the documentation and flake.lock should be kept in a
separate commit for the reviewer. Title your commit as "generated".

Keeping these changes isolated in specific commits makes it much easier to pull
in your changes in parallel with other features. Maintainers may harvest your
changes. We only guarantee to preserve authorship, signature, and sign-off in
the git log.

### Creating pull requests

1. Fork this repository into the personal GitHub account
1. Make changes on the personal fork
1. Remember to sign off and sign all commits in your PR branch (instructions in readme)
1. Make a Pull Request against this repository
1. **Allow maintainers to make changes to your pull request** (there's a
checkbox)
1. Once the pull request has been approved, you will be thanked and observe your
changes applied with authorship, signature, and sign-off in the git log
Loading

0 comments on commit 041c6f7

Please sign in to comment.