This repository has been archived by the owner on Jan 12, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
flake.nix
61 lines (51 loc) · 1.55 KB
/
flake.nix
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
60
{
description = "daml-mode emacs package for nix";
inputs = {
flake-utils.url = "github:numtide/flake-utils";
nixpkgs.url = "github:nixos/nixpkgs";
};
outputs = { self, nixpkgs, flake-utils}: let
pname = "daml-mode";
daml-mode-recipe = { lib, emacs, trivialBuild, fetchFromGitHub, haskell-mode, lsp-mode }:
trivialBuild {
inherit pname;
version = "0.0.1";
packageRequires = [ haskell-mode lsp-mode ];
src = fetchFromGitHub {
owner = "bartfailt";
repo = "daml-mode";
rev = "d08c10db34331dfe0adfbba22e4079adda8add25";
sha256 = "sha256-IPjN115qwq4GcA0I344WPfvMkPJIHFcG/MQbq+XnA4c=";
};
sourceRoot = "source/lisp";
meta = with lib; {
homepage = "https://github.com/bartfailt/daml-mode";
description = "Emacs mode for editing daml projects, based on haskell-mode.";
license = licenses.gpl3;
inherit (emacs.meta) platforms;
};
};
in
{
overlays = rec {
default = daml-mode;
daml-mode = final: prev: {
daml-mode = final.callPackage daml-mode-recipe {};
};
};
} //
flake-utils.lib.eachDefaultSystem (system:
let
pkgs = import nixpkgs {
inherit system;
};
in
{
packages = {
${pname} = pkgs.emacsPackages.callPackage daml-mode-recipe {};
default = self.packages.${system}.${pname};
};
# devShells.default = with pkgs; mkShell {};
}
);
}