Giter Site home page Giter Site logo

Twist Nix Library

https://github.com/emacs-twist/twist.nix/actions/workflows/test.yml/badge.svg

Status

This repository is currently in alpha state. It has finished basic functionalities, but there is still room for improvement in API, and it completely lacks proper documentation:

  • Functionalities: Good. The author builds his own config with twist, and the config is already almost as capable as the previous version which used straight.el. Additionally, NoMake is used in some packages. The basic use cases of twist.nix are covered.
  • API: Unstable. It is mostly stable, but options may undergo changes in the future.
  • Documentation: Poor. There is a branch. I will rework on it after I gain more confidence with the API.

Introduction

Twist.nix is a Nix library for building Emacs configurations with packages. It is an infrastructure for configuration (solely with this library) and package development (with nomake).

This repository is an integral component of emacs-twist project. The goal of the project is to provide an alternative Emacs ecosystem that uses Nix. It is experimental, but also aims to be useful.

There are several other components under development. See the following table for comparison with corresponding options:

Twist componentDescriptionCounterpart
twist.nix (this repo)Build machinerypackage-build
twist.el combined with nix3.elEmacs package managerstraight.el, borg, etc.
nomakePackage developmentcask

As a Nix library, Twist.nix is also an alternative to the Emacs wrapper (i.e. emacsWithPackages) on NixOS. Twist.nix depends on Nix utility libraries, but it does not depend on the wrapper.

The biggest difference betweeen twist and the wrapper is that twist is capable of building packages from upstream source repositories. On the contrary, the wrapper fetches pre-built package archives from for most ELPA and MELPA packages, which means it indirectly depends on package-build for MELPA packages.

Here building a package means mapping files into a flat directory, which takes little time. By being smarter in building packages from sources, twist has an advantage in working around existing packages and adding custom packages, like straight.el. It also allows usage for package development, which is what package-build does to cask.

With twist, it is easier to lock and update individual packages, because it tracks package versions in flake.lock. Twist.el, the package management frontend for Twist, should hopefully provide an experience on par with straight.el.

Twist can discover and build packages from the following sources:

  • MELPA recipes (Git)
  • ELPA external/core packages (Git)
  • ELPA/MELPA archives (single elisp files and tarballs)
  • EmacsMirror (Git)

To add custom packages to your configuration, you only have to define MELPA recipes and commit them to your repository. It can already build configurations with a few hundreds of packages from various registries (see examples).

Credits

Twist is a Nix re-implementation of package-build and replicates its build logic. It is also heavily influenced by the Emacs wrapper in nixpkgs, though twist was written from scratch and different in implementation.

Emacs Twist's Projects

examples icon examples

Examples of Emacs configurations using twist.nix

icons icon icons

Icons used in the organization

nix3.el icon nix3.el

(WIP) Emacs interface to experimental commands of Nix

nomake icon nomake

A flake library for developing Emacs Lisp packages

org-babel icon org-babel

A pure Nix implementation of org-babel-tangle

overrides icon overrides

A collection of Emacs Lisp build overrides for twist.nix

recipes-updater icon recipes-updater

(WIP) A flake that provides a command to update only recipes in a MELPA repository

rice-config icon rice-config

(WIP) A repository containing a reusable configuration for Emacs Lisp CI

twist-archiver icon twist-archiver

Build an archive for offline installation of twist configuration

twist.el icon twist.el

Hot-reload Emacs Lisp packages configured with twist.nix

twist.nix icon twist.nix

Build an entire Emacs configuration as a Nix package in a pure, reproducible way

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.