-
-
Notifications
You must be signed in to change notification settings - Fork 79
Expand file tree
/
Copy pathflake.nix
More file actions
59 lines (56 loc) · 1.61 KB
/
Copy pathflake.nix
File metadata and controls
59 lines (56 loc) · 1.61 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
{
description = "An emacs major mode for editing Nix expressions";
inputs.nixpkgs.url = "nixpkgs/nixos-unstable";
outputs =
{ self, nixpkgs }:
let
systems = [
"x86_64-linux"
"i686-linux"
"x86_64-darwin"
"aarch64-linux"
"aarch64-darwin"
];
forAllSystems = f: nixpkgs.lib.genAttrs systems (system: f system);
in
{
packages = forAllSystems (
system: with (import nixpkgs { inherit system; }); {
default =
let
emacs = (pkgs.emacsPackagesFor pkgs.emacs).emacsWithPackages (
epkgs: with epkgs; [
org-contrib
company
mmm-mode
magit-section
transient
reformatter
]
);
in
stdenv.mkDerivation {
pname = "nix-mode";
version = "1.5.0";
src = self;
nativeBuildInputs = [
emacs
texinfo
git
];
makeFlags = [ "PREFIX=$(out)" ];
shellHook = ''
echo Run make run to get vanilla emacs with nix-mode loaded.
'';
doCheck = true;
meta.description = "An emacs major mode for editing Nix expressions";
};
}
);
# checks are run in ‘make check’ right now we should probably move
# these to its own derivation
checks = forAllSystems (system: {
inherit (self.packages.${system}) default;
});
};
}