From 19962caf691c8b67df3f13f2701fca0b8d2ca542 Mon Sep 17 00:00:00 2001 From: Akira Komamura Date: Sun, 21 Jul 2024 22:07:23 +0900 Subject: [PATCH] chore: Migrate to rice --- .gitattributes | 5 + .github/workflows/check-emacs-lisp.yml | 17 + .github/workflows/test.yml | 33 -- .gitignore | 9 + .nomake/.keep | 0 .nomake/archive.lock | 1 - .rice-lock/default/archive.lock | 15 + {.nomake => .rice-lock/default}/flake.lock | 64 +-- {.nomake => .rice-lock/default}/flake.nix | 17 +- .rice-lock/default/metadata.json | 90 ++++ flake.lock | 567 --------------------- flake.nix | 36 +- justfile | 56 ++ 13 files changed, 214 insertions(+), 696 deletions(-) create mode 100644 .gitattributes create mode 100644 .github/workflows/check-emacs-lisp.yml delete mode 100644 .github/workflows/test.yml create mode 100644 .gitignore delete mode 100644 .nomake/.keep delete mode 100644 .nomake/archive.lock create mode 100644 .rice-lock/default/archive.lock rename {.nomake => .rice-lock/default}/flake.lock (52%) rename {.nomake => .rice-lock/default}/flake.nix (70%) create mode 100644 .rice-lock/default/metadata.json delete mode 100644 flake.lock create mode 100644 justfile diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000..4ef35e2 --- /dev/null +++ b/.gitattributes @@ -0,0 +1,5 @@ +# Copied from the template +justfile linguist-vendored + +# Lock files +.rice-lock/** linguist-generated diff --git a/.github/workflows/check-emacs-lisp.yml b/.github/workflows/check-emacs-lisp.yml new file mode 100644 index 0000000..66c1337 --- /dev/null +++ b/.github/workflows/check-emacs-lisp.yml @@ -0,0 +1,17 @@ +name: Check Emacs Lisp +on: + pull_request: + paths-ignore: + - 'README.*' + push: + branches: + - master + paths-ignore: + - 'README.*' + workflow_dispatch: +jobs: + compile-and-test: + uses: emacs-twist/elisp-workflows/.github/workflows/compile-and-test.yml@master + with: + melpa: github:emacs-twist/melpa/nix3-all + systems: github:nix-systems/x86_64-linux diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml deleted file mode 100644 index 9a5bde0..0000000 --- a/.github/workflows/test.yml +++ /dev/null @@ -1,33 +0,0 @@ -name: Lint and test - -on: - push: - paths-ignore: - - '*.md' - - '*.org' - -concurrency: - group: ${{ github.workflow }}-${{ github.ref }} - cancel-in-progress: true - -jobs: - # lint: - # runs-on: ubuntu-latest - # steps: - # - uses: actions/checkout@v3 - # - uses: cachix/install-nix-action@v18 - # with: - # extra_nix_config: | - # access-tokens = github.com=${{ secrets.GITHUB_TOKEN }} - # - run: nix run .#nomake -- nix3 - - build: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - - uses: cachix/install-nix-action@v18 - with: - extra_nix_config: | - access-tokens = github.com=${{ secrets.GITHUB_TOKEN }} - - run: nix run .#nomake -- nix3 byte-compile-and-load - - run: nix run .#nomake -- magit-nix3 byte-compile-and-load diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..1190d21 --- /dev/null +++ b/.gitignore @@ -0,0 +1,9 @@ +# Emacs Lisp +*.elc + +# Optionally generated by Nix git-hooks +.pre-commit-config.yaml + +# Nix +result +result-* diff --git a/.nomake/.keep b/.nomake/.keep deleted file mode 100644 index e69de29..0000000 diff --git a/.nomake/archive.lock b/.nomake/archive.lock deleted file mode 100644 index 0967ef4..0000000 --- a/.nomake/archive.lock +++ /dev/null @@ -1 +0,0 @@ -{} diff --git a/.rice-lock/default/archive.lock b/.rice-lock/default/archive.lock new file mode 100644 index 0000000..5dce68d --- /dev/null +++ b/.rice-lock/default/archive.lock @@ -0,0 +1,15 @@ +{ + "seq": { + "archive": { + "narHash": "sha256-FH/LPoVKuTY89HciZ7pWs/haqfNeZSAHWaYuy3Qw8mA=", + "type": "tarball", + "url": "https://elpa.gnu.org/packages/seq-2.24.tar" + }, + "inventory": { + "type": "archive", + "url": "https://elpa.gnu.org/packages/" + }, + "packageRequires": {}, + "version": "2.24" + } +} diff --git a/.nomake/flake.lock b/.rice-lock/default/flake.lock similarity index 52% rename from .nomake/flake.lock rename to .rice-lock/default/flake.lock index 7edfc2f..1ab7d5f 100644 --- a/.nomake/flake.lock +++ b/.rice-lock/default/flake.lock @@ -3,27 +3,27 @@ "compat": { "flake": false, "locked": { - "lastModified": 1672943277, - "narHash": "sha256-erpBMvN5QqgRx+H/aroxx4jhFiKQw/J2affwjNkwu3M=", - "ref": "refs/heads/master", - "rev": "8a32564247ad3baee571252a2004c3d347962d01", - "revCount": 750, - "type": "git", - "url": "https://git.sr.ht/~pkal/compat" + "lastModified": 1720462948, + "narHash": "sha256-IrShpeA17hFAzZsOjGk92OifWucL0XrNPFD5qBiShGc=", + "owner": "emacs-compat", + "repo": "compat", + "rev": "09dce8a193c5a70277512263782b82fa1cba84c0", + "type": "github" }, "original": { - "type": "git", - "url": "https://git.sr.ht/~pkal/compat" + "owner": "emacs-compat", + "repo": "compat", + "type": "github" } }, "dash": { "flake": false, "locked": { - "lastModified": 1690893876, - "narHash": "sha256-qZ81ARFpZSKW82q6JwLOC8Q/YX6fRALm4Z5+VeKQPJQ=", + "lastModified": 1715347628, + "narHash": "sha256-at42NCcdF9g7a55asnOCSqsvG+XhWuvVsHFT6kU9f9o=", "owner": "magnars", "repo": "dash.el", - "rev": "6db80c711ce947f6c6fa11e5c2257fff2c79d139", + "rev": "1de9dcb83eacfb162b6d9a118a4770b1281bcd84", "type": "github" }, "original": { @@ -32,30 +32,14 @@ "type": "github" } }, - "magit-nix3": { - "flake": false, - "locked": { - "lastModified": 1701602123, - "narHash": "sha256-lo/kn3g1N7qgOQSIpvQhPZKqa+9qysJaqb/cGvG++G4=", - "owner": "emacs-twist", - "repo": "nix3.el", - "rev": "9ab916a7cf29f86df2c2033e4c6c06f2c1e9209f", - "type": "github" - }, - "original": { - "owner": "emacs-twist", - "repo": "nix3.el", - "type": "github" - } - }, "magit-section": { "flake": false, "locked": { - "lastModified": 1701475220, - "narHash": "sha256-JiH+Q9qr99+75rbwIGXH49O3hNjHjyANEKEzYGklJhM=", + "lastModified": 1721513120, + "narHash": "sha256-7ogxgB/hqEVEe8V7T3wfm+CbyCxExjWQmICjqATy+O8=", "owner": "magit", "repo": "magit", - "rev": "5ec9ae91f6111e34e66e7adc2acc3f9c721af8d6", + "rev": "538cb2f90b5fdd04fcaacd537834f4f3c8c0720f", "type": "github" }, "original": { @@ -64,22 +48,6 @@ "type": "github" } }, - "nix3": { - "flake": false, - "locked": { - "lastModified": 1701602123, - "narHash": "sha256-lo/kn3g1N7qgOQSIpvQhPZKqa+9qysJaqb/cGvG++G4=", - "owner": "emacs-twist", - "repo": "nix3.el", - "rev": "9ab916a7cf29f86df2c2033e4c6c06f2c1e9209f", - "type": "github" - }, - "original": { - "owner": "emacs-twist", - "repo": "nix3.el", - "type": "github" - } - }, "promise": { "flake": false, "locked": { @@ -100,9 +68,7 @@ "inputs": { "compat": "compat", "dash": "dash", - "magit-nix3": "magit-nix3", "magit-section": "magit-section", - "nix3": "nix3", "promise": "promise", "s": "s" } diff --git a/.nomake/flake.nix b/.rice-lock/default/flake.nix similarity index 70% rename from .nomake/flake.nix rename to .rice-lock/default/flake.nix index 6977907..cb3ce91 100644 --- a/.nomake/flake.nix +++ b/.rice-lock/default/flake.nix @@ -4,8 +4,9 @@ inputs = { compat = { flake = false; - type = "git"; - url = "https://git.sr.ht/~pkal/compat"; + owner = "emacs-compat"; + repo = "compat"; + type = "github"; }; dash = { flake = false; @@ -13,24 +14,12 @@ repo = "dash.el"; type = "github"; }; - magit-nix3 = { - flake = false; - owner = "emacs-twist"; - repo = "nix3.el"; - type = "github"; - }; magit-section = { flake = false; owner = "magit"; repo = "magit"; type = "github"; }; - nix3 = { - flake = false; - owner = "emacs-twist"; - repo = "nix3.el"; - type = "github"; - }; promise = { flake = false; owner = "chuntaro"; diff --git a/.rice-lock/default/metadata.json b/.rice-lock/default/metadata.json new file mode 100644 index 0000000..67e4ee1 --- /dev/null +++ b/.rice-lock/default/metadata.json @@ -0,0 +1,90 @@ +{ + "compat": { + "author": "Philip Kaludercic , Daniel Mendler ", + "meta": { + "description": "Emacs Lisp Compatibility Library", + "homepage": "https://github.com/emacs-compat/compat", + "maintainers": [ + "Compat Development <~pkal/compat-devel@lists.sr.ht>" + ] + }, + "narHash": "sha256-IrShpeA17hFAzZsOjGk92OifWucL0XrNPFD5qBiShGc=", + "packageRequires": { + "emacs": "24.4", + "seq": "2.23" + }, + "version": "30.0.0.0" + }, + "dash": { + "author": "Magnar Sveen ", + "meta": { + "description": "A modern list library for Emacs" + }, + "narHash": "sha256-at42NCcdF9g7a55asnOCSqsvG+XhWuvVsHFT6kU9f9o=", + "packageRequires": { + "emacs": "24" + }, + "version": "2.19.1" + }, + "magit-section": { + "author": "Jonas Bernoulli ", + "meta": { + "description": "Sections for read-only buffers", + "license": { + "deprecated": false, + "free": true, + "fullName": "GNU General Public License v3.0 or later", + "redistributable": true, + "shortName": "gpl3Plus", + "spdxId": "GPL-3.0-or-later", + "url": "https://spdx.org/licenses/GPL-3.0-or-later.html" + }, + "maintainers": [ + "Jonas Bernoulli " + ] + }, + "narHash": "sha256-7ogxgB/hqEVEe8V7T3wfm+CbyCxExjWQmICjqATy+O8=", + "packageRequires": { + "compat": "30.0.0.0", + "dash": "20240510", + "emacs": "26.1" + }, + "version": "3.3.0.50-git" + }, + "promise": { + "author": "chuntaro ", + "meta": { + "description": "Promises/A+", + "homepage": "https://github.com/chuntaro/emacs-promise" + }, + "narHash": "sha256-p6HAx+uAQTWfUlPfJu0tk6x6EBxsSuRa+4n7Vd5rus8=", + "packageRequires": { + "emacs": "25.1" + }, + "version": "1.1" + }, + "s": { + "author": "Magnar Sveen ", + "meta": { + "description": "The long lost Emacs string manipulation library.", + "maintainers": [ + "Jason Milkins " + ] + }, + "narHash": "sha256-fbF/SyPwEiJICaPBq0xWj2yLWjdNwkaLF2iYvZ2EO1k=", + "packageRequires": {}, + "version": "1.13.1" + }, + "seq": { + "author": "Nicolas Petton ", + "meta": { + "description": "Sequence manipulation functions", + "maintainers": [ + "emacs-devel@gnu.org" + ] + }, + "narHash": "sha256-FH/LPoVKuTY89HciZ7pWs/haqfNeZSAHWaYuy3Qw8mA=", + "packageRequires": {}, + "version": "2.24" + } +} diff --git a/flake.lock b/flake.lock deleted file mode 100644 index 1638749..0000000 --- a/flake.lock +++ /dev/null @@ -1,567 +0,0 @@ -{ - "nodes": { - "elisp-helpers": { - "flake": false, - "locked": { - "lastModified": 1701229486, - "narHash": "sha256-UEmWT4vMxUiCQj3LADJ4tt9QYD+Y2n8yfKRTSUeJORA=", - "owner": "emacs-twist", - "repo": "elisp-helpers", - "rev": "e4c974d2034cb2b9783e6e737cc29566a6634ebe", - "type": "github" - }, - "original": { - "owner": "emacs-twist", - "repo": "elisp-helpers", - "type": "github" - } - }, - "emacs": { - "flake": false, - "locked": { - "lastModified": 1701529605, - "narHash": "sha256-FmgRw3NlvMuDqz4z3Sk0uM5ZvLi2gQnLnbmi2PrGCUI=", - "owner": "emacs-mirror", - "repo": "emacs", - "rev": "fb4b0b30a24e8192e71c1425dc8a295cf39f64ff", - "type": "github" - }, - "original": { - "owner": "emacs-mirror", - "repo": "emacs", - "type": "github" - } - }, - "emacs-23-4": { - "flake": false, - "locked": { - "narHash": "sha256-OzqhctHmsk30IfS61czooF+1LShToeT614RtqrMNyJw=", - "type": "tarball", - "url": "https://ftp.gnu.org/gnu/emacs/emacs-23.4.tar.bz2" - }, - "original": { - "type": "tarball", - "url": "https://ftp.gnu.org/gnu/emacs/emacs-23.4.tar.bz2" - } - }, - "emacs-24-1": { - "flake": false, - "locked": { - "narHash": "sha256-UVWKuXneNHq1zJtkGo6eLacUl5MdEbCBL68a8NcYEWk=", - "type": "tarball", - "url": "https://ftp.gnu.org/gnu/emacs/emacs-24.1.tar.bz2" - }, - "original": { - "type": "tarball", - "url": "https://ftp.gnu.org/gnu/emacs/emacs-24.1.tar.bz2" - } - }, - "emacs-24-2": { - "flake": false, - "locked": { - "narHash": "sha256-zdhQvRQs1ty4b8E4Khf10dCv+iGNuVl4FDCtUFqt2bI=", - "type": "tarball", - "url": "https://ftp.gnu.org/gnu/emacs/emacs-24.2.tar.xz" - }, - "original": { - "type": "tarball", - "url": "https://ftp.gnu.org/gnu/emacs/emacs-24.2.tar.xz" - } - }, - "emacs-24-3": { - "flake": false, - "locked": { - "narHash": "sha256-kANCrStnnt/0Mxt5qV94iKwcXGgFqqhJVUwRSAC0ez4=", - "type": "tarball", - "url": "https://ftp.gnu.org/gnu/emacs/emacs-24.3.tar.xz" - }, - "original": { - "type": "tarball", - "url": "https://ftp.gnu.org/gnu/emacs/emacs-24.3.tar.xz" - } - }, - "emacs-24-4": { - "flake": false, - "locked": { - "narHash": "sha256-WDPY5n3pMF7o4noS941GLDQ2zFKa8PvDkWjeMw0Wsm0=", - "type": "tarball", - "url": "https://ftp.gnu.org/gnu/emacs/emacs-24.4.tar.xz" - }, - "original": { - "type": "tarball", - "url": "https://ftp.gnu.org/gnu/emacs/emacs-24.4.tar.xz" - } - }, - "emacs-24-5": { - "flake": false, - "locked": { - "narHash": "sha256-jb801XX+fMvQ5OBYKpjPPsqAcqgaeYKPRfeZIP8R/rc=", - "type": "tarball", - "url": "https://ftp.gnu.org/gnu/emacs/emacs-24.5.tar.xz" - }, - "original": { - "type": "tarball", - "url": "https://ftp.gnu.org/gnu/emacs/emacs-24.5.tar.xz" - } - }, - "emacs-25-1": { - "flake": false, - "locked": { - "narHash": "sha256-Lxgh6MOMYYaenkgwFiFw4SZOxkGk+q/4bDv3B8rAAWM=", - "type": "tarball", - "url": "https://ftp.gnu.org/gnu/emacs/emacs-25.1.tar.xz" - }, - "original": { - "type": "tarball", - "url": "https://ftp.gnu.org/gnu/emacs/emacs-25.1.tar.xz" - } - }, - "emacs-25-2": { - "flake": false, - "locked": { - "narHash": "sha256-L+Tgth/sI7aI+xQOu5iRWxhaivsK6BcmNB7wV1bUzg0=", - "type": "tarball", - "url": "https://ftp.gnu.org/gnu/emacs/emacs-25.2.tar.xz" - }, - "original": { - "type": "tarball", - "url": "https://ftp.gnu.org/gnu/emacs/emacs-25.2.tar.xz" - } - }, - "emacs-25-3": { - "flake": false, - "locked": { - "narHash": "sha256-1czqSKUzuoJc+WBwpojicwpZE6VKnAqNJt2V04k2ifc=", - "type": "tarball", - "url": "https://ftp.gnu.org/gnu/emacs/emacs-25.3.tar.xz" - }, - "original": { - "type": "tarball", - "url": "https://ftp.gnu.org/gnu/emacs/emacs-25.3.tar.xz" - } - }, - "emacs-26-1": { - "flake": false, - "locked": { - "narHash": "sha256-amsPbiVbko/Qvsw2cfJdkhq0UHGjhn5uyLN0MEeMq20=", - "type": "tarball", - "url": "https://ftp.gnu.org/gnu/emacs/emacs-26.1.tar.xz" - }, - "original": { - "type": "tarball", - "url": "https://ftp.gnu.org/gnu/emacs/emacs-26.1.tar.xz" - } - }, - "emacs-26-2": { - "flake": false, - "locked": { - "narHash": "sha256-AvO73gk6Tb+aDARgbgAq6RVz71wBSxh12RrnrD/3TM0=", - "type": "tarball", - "url": "https://ftp.gnu.org/gnu/emacs/emacs-26.2.tar.xz" - }, - "original": { - "type": "tarball", - "url": "https://ftp.gnu.org/gnu/emacs/emacs-26.2.tar.xz" - } - }, - "emacs-26-3": { - "flake": false, - "locked": { - "narHash": "sha256-iYPYrf/6Cd6wozabn2D/bj9M591vLqO84uPyj3ZN/+I=", - "type": "tarball", - "url": "https://ftp.gnu.org/gnu/emacs/emacs-26.3.tar.xz" - }, - "original": { - "type": "tarball", - "url": "https://ftp.gnu.org/gnu/emacs/emacs-26.3.tar.xz" - } - }, - "emacs-27-1": { - "flake": false, - "locked": { - "narHash": "sha256-oADGvqBASpU8Q512c+PPF1pwm1/tg2oo2a30ghJ2xVQ=", - "type": "tarball", - "url": "https://ftp.gnu.org/gnu/emacs/emacs-27.1.tar.xz" - }, - "original": { - "type": "tarball", - "url": "https://ftp.gnu.org/gnu/emacs/emacs-27.1.tar.xz" - } - }, - "emacs-27-2": { - "flake": false, - "locked": { - "narHash": "sha256-BaLVKUHuxGuO3F+/YRQ8DCe8FkR/fkoJIh6p4xbF4m0=", - "type": "tarball", - "url": "https://ftp.gnu.org/gnu/emacs/emacs-27.2.tar.xz" - }, - "original": { - "type": "tarball", - "url": "https://ftp.gnu.org/gnu/emacs/emacs-27.2.tar.xz" - } - }, - "emacs-28-1": { - "flake": false, - "locked": { - "narHash": "sha256-EGuOesE+gq6wzF4qiqdBQhPm+TGzZnJ/sHxkd4Liz4s=", - "type": "tarball", - "url": "https://ftp.gnu.org/gnu/emacs/emacs-28.1.tar.xz" - }, - "original": { - "type": "tarball", - "url": "https://ftp.gnu.org/gnu/emacs/emacs-28.1.tar.xz" - } - }, - "emacs-28-2": { - "flake": false, - "locked": { - "narHash": "sha256-+Tmn3gJ+7536KehS3QUGRWFc0ic7xZI/KDl63n/yEp4=", - "type": "tarball", - "url": "https://ftp.gnu.org/gnu/emacs/emacs-28.2.tar.xz" - }, - "original": { - "type": "tarball", - "url": "https://ftp.gnu.org/gnu/emacs/emacs-28.2.tar.xz" - } - }, - "emacs-29-1": { - "flake": false, - "locked": { - "narHash": "sha256-C7920QvXQvrqUNAScIb++H1+3CC54ppPby+/hh6+yo0=", - "type": "tarball", - "url": "https://ftp.gnu.org/gnu/emacs/emacs-29.1.tar.xz" - }, - "original": { - "type": "tarball", - "url": "https://ftp.gnu.org/gnu/emacs/emacs-29.1.tar.xz" - } - }, - "emacs-ci": { - "inputs": { - "emacs-23-4": "emacs-23-4", - "emacs-24-1": "emacs-24-1", - "emacs-24-2": "emacs-24-2", - "emacs-24-3": "emacs-24-3", - "emacs-24-4": "emacs-24-4", - "emacs-24-5": "emacs-24-5", - "emacs-25-1": "emacs-25-1", - "emacs-25-2": "emacs-25-2", - "emacs-25-3": "emacs-25-3", - "emacs-26-1": "emacs-26-1", - "emacs-26-2": "emacs-26-2", - "emacs-26-3": "emacs-26-3", - "emacs-27-1": "emacs-27-1", - "emacs-27-2": "emacs-27-2", - "emacs-28-1": "emacs-28-1", - "emacs-28-2": "emacs-28-2", - "emacs-29-1": "emacs-29-1", - "emacs-release-snapshot": "emacs-release-snapshot", - "emacs-snapshot": "emacs-snapshot", - "flake-compat": "flake-compat", - "flake-utils": "flake-utils", - "nixpkgs": "nixpkgs" - }, - "locked": { - "lastModified": 1701422539, - "narHash": "sha256-Zserr91jO1Q8g8SKvAmZYLvC3f/ki2ZiOFK6456hA5U=", - "owner": "purcell", - "repo": "nix-emacs-ci", - "rev": "c68cfdae7d559805f5b9593c80dd9dba4b5afebe", - "type": "github" - }, - "original": { - "owner": "purcell", - "repo": "nix-emacs-ci", - "type": "github" - } - }, - "emacs-release-snapshot": { - "flake": false, - "locked": { - "lastModified": 1701070496, - "narHash": "sha256-6K+X0EpPlqRrwuhM09A/B1S7yJP64vr/nma5LmVGhck=", - "owner": "emacs-mirror", - "repo": "emacs", - "rev": "30841c71a5ddd70b63908fcbcdcc01ef82d8a770", - "type": "github" - }, - "original": { - "owner": "emacs-mirror", - "ref": "emacs-29", - "repo": "emacs", - "type": "github" - } - }, - "emacs-snapshot": { - "flake": false, - "locked": { - "lastModified": 1701070714, - "narHash": "sha256-sdeQ1KtRXZGcphJGCM4MCT5pK9V+TeNnzokeAAXToAo=", - "owner": "emacs-mirror", - "repo": "emacs", - "rev": "76cf700ecb78cb465bcd05ae2b2fb0d28e4d0aed", - "type": "github" - }, - "original": { - "owner": "emacs-mirror", - "repo": "emacs", - "type": "github" - } - }, - "epkgs": { - "flake": false, - "locked": { - "lastModified": 1701555371, - "narHash": "sha256-Qn1PMGu6ekyDo+MXHvVNKRJXE6bzB3GLQ067uoMyZyE=", - "owner": "emacsmirror", - "repo": "epkgs", - "rev": "0e52dfe28302210371066c7da3948af9281817c0", - "type": "github" - }, - "original": { - "owner": "emacsmirror", - "repo": "epkgs", - "type": "github" - } - }, - "flake-compat": { - "flake": false, - "locked": { - "lastModified": 1673956053, - "narHash": "sha256-4gtG9iQuiKITOjNQQeQIpoIB6b16fm+504Ch3sNKLd8=", - "owner": "edolstra", - "repo": "flake-compat", - "rev": "35bb57c0c8d8b62bbfd284272c928ceb64ddbde9", - "type": "github" - }, - "original": { - "owner": "edolstra", - "repo": "flake-compat", - "type": "github" - } - }, - "flake-utils": { - "inputs": { - "systems": "systems" - }, - "locked": { - "lastModified": 1687709756, - "narHash": "sha256-Y5wKlQSkgEK2weWdOu4J3riRd+kV/VCgHsqLNTTWQ/0=", - "owner": "numtide", - "repo": "flake-utils", - "rev": "dbabf0ca0c0c4bce6ea5eaf65af5cb694d2082c7", - "type": "github" - }, - "original": { - "id": "flake-utils", - "type": "indirect" - } - }, - "flake-utils_2": { - "inputs": { - "systems": "systems_2" - }, - "locked": { - "lastModified": 1694529238, - "narHash": "sha256-zsNZZGTGnMOf9YpHKJqMSsa0dXbfmxeoJ7xHlrt+xmY=", - "owner": "numtide", - "repo": "flake-utils", - "rev": "ff7b65b44d01cf9ba6a71320833626af21126384", - "type": "github" - }, - "original": { - "owner": "numtide", - "repo": "flake-utils", - "type": "github" - } - }, - "gitignore": { - "inputs": { - "nixpkgs": [ - "nomake", - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1694102001, - "narHash": "sha256-vky6VPK1n1od6vXbqzOXnekrQpTL4hbPAwUhT5J9c9E=", - "owner": "hercules-ci", - "repo": "gitignore.nix", - "rev": "9e21c80adf67ebcb077d75bd5e7d724d21eeafd6", - "type": "github" - }, - "original": { - "owner": "hercules-ci", - "repo": "gitignore.nix", - "type": "github" - } - }, - "gnu-elpa": { - "flake": false, - "locked": { - "lastModified": 1700849136, - "narHash": "sha256-vOxA6no1LvPEAktaQpdO6WeuBU7ifb7yNLqVewtiETM=", - "ref": "main", - "rev": "b495b747a5d1836c6722e00e08cd365c7e7adb49", - "revCount": 553, - "type": "git", - "url": "https://git.savannah.gnu.org/git/emacs/elpa.git" - }, - "original": { - "ref": "main", - "type": "git", - "url": "https://git.savannah.gnu.org/git/emacs/elpa.git" - } - }, - "melpa": { - "flake": false, - "locked": { - "lastModified": 1669748711, - "narHash": "sha256-gDVKXVwLvE9zm7Tz4vnbIl9Ll7gFetuDLTGdpMo54xY=", - "owner": "akirak", - "repo": "melpa", - "rev": "cd73894b5dd73d5bee4cd4531851b1ca44857e8d", - "type": "github" - }, - "original": { - "owner": "akirak", - "ref": "nix3", - "repo": "melpa", - "type": "github" - } - }, - "nixpkgs": { - "locked": { - "lastModified": 1698553279, - "narHash": "sha256-T/9P8yBSLcqo/v+FTOBK+0rjzjPMctVymZydbvR/Fak=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "90e85bc7c1a6fc0760a94ace129d3a1c61c3d035", - "type": "github" - }, - "original": { - "id": "nixpkgs", - "ref": "nixpkgs-unstable", - "type": "indirect" - } - }, - "nixpkgs_2": { - "locked": { - "lastModified": 1700097215, - "narHash": "sha256-ODQ3gBTv1iHd7lG21H+ErVISB5wVeOhd/dEogOqHs/I=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "9fb122519e9cd465d532f736a98c1e1eb541ef6f", - "type": "github" - }, - "original": { - "id": "nixpkgs", - "type": "indirect" - } - }, - "nomake": { - "inputs": { - "emacs": "emacs", - "emacs-ci": "emacs-ci", - "epkgs": "epkgs", - "flake-utils": "flake-utils_2", - "gitignore": "gitignore", - "gnu-elpa": [ - "gnu-elpa" - ], - "melpa": [ - "melpa" - ], - "nixpkgs": "nixpkgs_2", - "package-lint": "package-lint", - "twist": "twist" - }, - "locked": { - "lastModified": 1694266409, - "narHash": "sha256-UlmKd9cO+1PsxBFxD4nGvYWCdLBk0v2OYU9Eb6ljNtI=", - "owner": "emacs-twist", - "repo": "nomake", - "rev": "f431104ce28a7157753ccd19d107115498c10e0c", - "type": "github" - }, - "original": { - "owner": "emacs-twist", - "repo": "nomake", - "type": "github" - } - }, - "package-lint": { - "flake": false, - "locked": { - "lastModified": 1701280780, - "narHash": "sha256-BZ+jfrzCp1lPeodpC7Oqy48gDiQlGaS1z+mm5VLwIbg=", - "owner": "purcell", - "repo": "package-lint", - "rev": "b82deb8d5b0d9515f8d026af183758a069ba6f69", - "type": "github" - }, - "original": { - "owner": "purcell", - "repo": "package-lint", - "type": "github" - } - }, - "root": { - "inputs": { - "gnu-elpa": "gnu-elpa", - "melpa": "melpa", - "nomake": "nomake" - } - }, - "systems": { - "locked": { - "lastModified": 1681028828, - "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", - "owner": "nix-systems", - "repo": "default", - "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", - "type": "github" - }, - "original": { - "owner": "nix-systems", - "repo": "default", - "type": "github" - } - }, - "systems_2": { - "locked": { - "lastModified": 1681028828, - "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", - "owner": "nix-systems", - "repo": "default", - "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", - "type": "github" - }, - "original": { - "owner": "nix-systems", - "repo": "default", - "type": "github" - } - }, - "twist": { - "inputs": { - "elisp-helpers": "elisp-helpers" - }, - "locked": { - "lastModified": 1701540078, - "narHash": "sha256-zo64g836o/nW90NTt0RvIIMnCW0rDu06biOUdZJ8duI=", - "owner": "emacs-twist", - "repo": "twist.nix", - "rev": "09742dc587b37a5c6c3488f592c7581b8cbe7b16", - "type": "github" - }, - "original": { - "owner": "emacs-twist", - "repo": "twist.nix", - "type": "github" - } - } - }, - "root": "root", - "version": 7 -} diff --git a/flake.nix b/flake.nix index 83bb13a..a36de5e 100644 --- a/flake.nix +++ b/flake.nix @@ -1,38 +1,10 @@ { - description = "nix3.el"; - - nixConfig = { - extra-substituters = "https://emacs-ci.cachix.org"; - extra-trusted-public-keys = "emacs-ci.cachix.org-1:B5FVOrxhXXrOL0S+tQ7USrhjMT5iOPH+QN9q0NItom4="; - }; - - inputs = { - gnu-elpa = { - url = "git+https://git.savannah.gnu.org/git/emacs/elpa.git?ref=main"; - flake = false; - }; - melpa = { - url = "github:akirak/melpa/nix3"; - flake = false; - }; - - nomake = { - url = "github:emacs-twist/nomake"; - inputs.gnu-elpa.follows = "gnu-elpa"; - inputs.melpa.follows = "melpa"; - }; - }; - - outputs = - { self - , nomake - , ... - } @ inputs: - nomake.lib.mkFlake { - src = ./.; - localPackages = [ + outputs = {...}: { + elisp-rice = { + packages = [ "nix3" "magit-nix3" ]; }; + }; } diff --git a/justfile b/justfile new file mode 100644 index 0000000..13e6565 --- /dev/null +++ b/justfile @@ -0,0 +1,56 @@ +# Update this if you have forked rice-config +rice-config := "github:emacs-twist/rice-config" + +# Specify a flake reference to a repository and branch where the package recipe +# is defined. +# Before it is available on melpa, you need to specify a non-default branch. +melpa := "github:emacs-twist/melpa/nix3-all" + +# Relative path to the lock directory +lock-dir := ".rice-lock/default" + +# This is only to avoid repetition, and you usually don't edit this. +common-options-without-lock := "--override-input rice-src \"path:$PWD\" --override-input melpa " + quote(melpa) + " --override-input twist github:emacs-twist/twist.nix/e0cf766032772d575ba0e289b89dd3cf2d43dee8" + +common-options-with-lock := common-options-without-lock + " --override-input rice-lock \"path:$PWD/" + lock-dir + "\"" + +# The name of an Emacs package from nix-emacs-ci +emacs := "emacs-release-snapshot" + +# Name of the package under test +package := "nix3" + +# Don't edit this +arch := shell('nix eval --expr builtins.currentSystem --impure --raw') + +# Show the flake +show *OPTIONS: + nix flake show {{ rice-config }} {{ OPTIONS }} {{ common-options-with-lock }} + +# Evaluate an attribute on the flake, e.g. just eval melpaRecipes. +eval ATTR *OPTIONS: + nix eval {{rice-config}}\#{{ATTR}} {{OPTIONS}} {{ common-options-with-lock }} + +# Generate a lock directory. +lock *OPTIONS: + mkdir -p "$(dirname {{ lock-dir }})" + nix run "{{ rice-config }}?dir=make-lock#lock-with-{{ emacs }}" {{ common-options-without-lock }} --impure -- {{ OPTIONS }} {{ lock-dir }} + +# Enter a shell for byte-compiling individual source files +shell-compile: + nix develop {{ rice-config }}\#{{ emacs }}-for-{{ package }} {{ common-options-with-lock }} + +# Re-run byte-compile every time a file is modified +watch-compile: + nix develop {{ rice-config }}\#{{ emacs }}-for-{{ package }} {{ common-options-with-lock }} -c bash -c 'echo >&2 Watching *.el; ls *.el | entr -p elisp-byte-compile /_' + +# Byte-compile the package +check-compile: + nix build {{ rice-config }}\#checks.{{ arch }}.{{ package }}-compile-{{ emacs }} {{ common-options-with-lock }} --print-build-logs + +# Enter a shell for running tests +shell-emacs *OPTIONS: + nix shell {{ rice-config }}\#{{ emacs }}-with-packages {{ common-options-with-lock }} {{ OPTIONS }} + +test-buttercup *OPTIONS: + nix run {{ rice-config }}\#test-buttercup-with-{{ emacs }} {{ common-options-with-lock }} {{ OPTIONS }}