mirror of
https://github.com/nix-community/emacs-overlay.git
synced 2025-12-06 02:40:25 -08:00
Initial commit
This commit is contained in:
commit
797e2b4547
4 changed files with 64 additions and 0 deletions
47
default.nix
Normal file
47
default.nix
Normal file
|
|
@ -0,0 +1,47 @@
|
|||
self: super:
|
||||
let
|
||||
mkSrc = repoName: super.fetchFromGitHub (let
|
||||
hashes = super.lib.importJSON (./. + "/repos/${repoName}.json");
|
||||
in {
|
||||
owner = "ch11ng";
|
||||
repo = repoName;
|
||||
rev = hashes.rev;
|
||||
sha256 = hashes.sha256;
|
||||
});
|
||||
|
||||
|
||||
in {
|
||||
# emacsPackagesNgFor = emacs: (super.emacsPackagesFor emacs // overridenAttrs);
|
||||
emacsPackagesNgFor = emacs: let
|
||||
emacsPackagesNg = super.emacsPackagesNgFor emacs;
|
||||
overridenAttrs = (with emacsPackagesNg; let
|
||||
xelb = melpaBuild {
|
||||
pname = "xelb";
|
||||
ename = "xelb";
|
||||
version = "0.15";
|
||||
recipe = builtins.toFile "recipe" ''
|
||||
(xelb :fetcher github
|
||||
:repo "ch11ng/xelb")
|
||||
'';
|
||||
|
||||
packageRequires = [ cl-generic super.emacs ];
|
||||
|
||||
src = mkSrc "xelb";
|
||||
};
|
||||
in {
|
||||
exwm = melpaBuild {
|
||||
pname = "exwm";
|
||||
ename = "exwm";
|
||||
version = "0.19";
|
||||
recipe = builtins.toFile "recipe" ''
|
||||
(exwm :fetcher github
|
||||
:repo "ch11ng/exwm")
|
||||
'';
|
||||
|
||||
packageRequires = [ xelb ];
|
||||
|
||||
src = mkSrc "exwm";
|
||||
};
|
||||
});
|
||||
in emacsPackagesNg // overridenAttrs;
|
||||
}
|
||||
1
repos/exwm.json
Normal file
1
repos/exwm.json
Normal file
|
|
@ -0,0 +1 @@
|
|||
{"rev": "2efd7495d9755e12a611dbf27dac6057287cd590", "sha256": "033j40mvmzz1cqhgkfr4hzlq46r8ps5vkbsc2nfrjz9p03rbcrnc"}
|
||||
1
repos/xelb.json
Normal file
1
repos/xelb.json
Normal file
|
|
@ -0,0 +1 @@
|
|||
{"rev": "3226fe29666df74e1cc365e28eb94f31983dd622", "sha256": "1h6mwswswn84in5cd9srivqc32yz8kx34c3h7cdq6z4rpw76177h"}
|
||||
15
update
Executable file
15
update
Executable file
|
|
@ -0,0 +1,15 @@
|
|||
#!/usr/bin/env nix-shell
|
||||
#! nix-shell -i bash -p curl jq nix
|
||||
set -euxo pipefail
|
||||
|
||||
function update_repo() {
|
||||
repo=$1
|
||||
echo $repo
|
||||
|
||||
commit_sha=$(curl "https://api.github.com/repos/ch11ng/$repo/commits?sha=master" | jq -r 'first.sha')
|
||||
digest=$(nix-prefetch-url --unpack "https://github.com/ch11ng/$repo/archive/${commit_sha}.tar.gz")
|
||||
echo "{\"rev\": \"${commit_sha}\", \"sha256\": \"${digest}\"}" > repos/$repo.json
|
||||
}
|
||||
|
||||
update_repo exwm
|
||||
update_repo xelb
|
||||
Loading…
Add table
Add a link
Reference in a new issue