-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
19 changed files
with
2,983 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
use flake |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,114 @@ | ||
# 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. | ||
pkgs = import nixpkgs { | ||
inherit system; | ||
overlays = [ emacs-overlay.overlay ]; | ||
}; | ||
|
||
# List of Emacsen to generate development shells for. | ||
emacsPackages = [ | ||
"emacs-unstable" | ||
"emacs-git" | ||
"emacs28" | ||
"emacs29" | ||
"emacs" | ||
]; | ||
# 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.emacs.version etc describe what's inside. | ||
|
||
# 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 | ||
|
||
# pkgs.git | ||
|
||
# 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. | ||
# epkgs.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.emacs-git; }; | ||
}); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
## 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 | ||
|
||
### Reminder about PR access to upstream CI | ||
|
||
Pull-requests run with the `pull_request_target` Github Actions configuration. | ||
Your PR can access secrets, but it run's the **upstream's** CI, not the CI | ||
changes you are submitting. | ||
|
||
If you need to make changes to CI itself in order to pass checks, you will need | ||
to work with the repository's owner. The owner will pull the branch into a | ||
non-master branch. There, they can trigger the CI manually with the branch's | ||
own configuration using `workflow_dispatch` in the Actions tab. |
Oops, something went wrong.