Created
April 25, 2024 07:49
-
-
Save rgoulter/fc8863d085d98276d8d51b1f301e150a to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| { | |
| "nodes": { | |
| "flake-utils": { | |
| "inputs": { | |
| "systems": "systems" | |
| }, | |
| "locked": { | |
| "lastModified": 1710146030, | |
| "narHash": "sha256-SZ5L6eA7HJ/nmkzGG7/ISclqe6oZdOZTNoesiInkXPQ=", | |
| "owner": "numtide", | |
| "repo": "flake-utils", | |
| "rev": "b1d9ab70662946ef0850d488da1c9019f3a9752a", | |
| "type": "github" | |
| }, | |
| "original": { | |
| "owner": "numtide", | |
| "repo": "flake-utils", | |
| "type": "github" | |
| } | |
| }, | |
| "nixpkgs": { | |
| "locked": { | |
| "lastModified": 1713805509, | |
| "narHash": "sha256-YgSEan4CcrjivCNO5ZNzhg7/8ViLkZ4CB/GrGBVSudo=", | |
| "owner": "NixOS", | |
| "repo": "nixpkgs", | |
| "rev": "1e1dc66fe68972a76679644a5577828b6a7e8be4", | |
| "type": "github" | |
| }, | |
| "original": { | |
| "owner": "NixOS", | |
| "ref": "nixpkgs-unstable", | |
| "repo": "nixpkgs", | |
| "type": "github" | |
| } | |
| }, | |
| "root": { | |
| "inputs": { | |
| "flake-utils": "flake-utils", | |
| "nixpkgs": "nixpkgs" | |
| } | |
| }, | |
| "systems": { | |
| "locked": { | |
| "lastModified": 1681028828, | |
| "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", | |
| "owner": "nix-systems", | |
| "repo": "default", | |
| "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", | |
| "type": "github" | |
| }, | |
| "original": { | |
| "owner": "nix-systems", | |
| "repo": "default", | |
| "type": "github" | |
| } | |
| } | |
| }, | |
| "root": "root", | |
| "version": 7 | |
| } |
This file contains hidden or 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
| { | |
| inputs = { | |
| flake-utils.url = "github:numtide/flake-utils"; | |
| nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable"; | |
| }; | |
| outputs = { | |
| self, | |
| flake-utils, | |
| nixpkgs, | |
| }: | |
| flake-utils.lib.eachDefaultSystem | |
| (system: | |
| let pkgs = nixpkgs.legacyPackages.${system}; in | |
| { | |
| packages.hello = | |
| pkgs.callPackage ./hello.nix { | |
| trivialBuild = pkgs.emacs.pkgs.trivialBuild; | |
| }; | |
| } | |
| ); | |
| } |
This file contains hidden or 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
| ;;; hello.el --- Description -*- lexical-binding: t; -*- | |
| (defun hello () | |
| "Say hello." | |
| (interactive) | |
| (message "Hello, world!")) | |
| (provide 'hello) | |
| ;;; hello.el ends here |
This file contains hidden or 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
| { | |
| trivialBuild, | |
| }: | |
| trivialBuild rec { | |
| pname = "hello"; | |
| version = "v1.0.0"; | |
| src = ./.; | |
| } |
Author
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Use this with e.g. a
flake.nixlike:Then running the resulting emacs with
emacs -Q, the following Elisp should echo 'hello world':