-
Notifications
You must be signed in to change notification settings - Fork 0
/
flake.nix
102 lines (84 loc) · 2.34 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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
{
description = "A zsh plug-in to receive notifications when long processes finish";
inputs = {
futils = {
type = "github";
owner = "numtide";
repo = "flake-utils";
ref = "main";
};
nixpkgs = {
type = "github";
owner = "NixOS";
repo = "nixpkgs";
ref = "nixpkgs-unstable";
};
pre-commit-hooks = {
type = "github";
owner = "cachix";
repo = "pre-commit-hooks.nix";
ref = "master";
inputs = {
flake-utils.follows = "futils";
nixpkgs.follows = "nixpkgs";
nixpkgs-stable.follows = "nixpkgs";
};
};
};
outputs = { self, futils, nixpkgs, pre-commit-hooks } @ inputs:
futils.lib.eachDefaultSystem (system:
let
inherit (nixpkgs) lib;
pkgs = nixpkgs.legacyPackages.${system};
in
rec {
checks = {
pre-commit = pre-commit-hooks.lib.${system}.run {
src = ./.;
hooks = {
nixpkgs-fmt = {
enable = true;
};
shellcheck = {
enable = true;
};
};
};
};
devShells = {
default = pkgs.mkShell {
name = "zsh-done";
inputsFrom = with self.packages.${system}; [
zsh-done
];
inherit (self.checks.${system}.pre-commit) shellHook;
};
};
packages = {
default = packages.zsh-done;
zsh-done = pkgs.stdenvNoCC.mkDerivation rec {
pname = "zsh-done";
version = "0.1.1";
src = ./done.plugin.zsh;
dontUnpack = true;
dontConfigure = true;
dontBuild = true;
installPhase = ''
plugindir="$out/share/zsh/site-functions"
mkdir -p $plugindir
cp $src $plugindir/done.plugin.zsh
'';
meta = with pkgs.lib; {
description = ''
A zsh plug-in to receive notifications when long processes finish
'';
homepage = "https://gitea.belanyi.fr/ambroisie/zsh-done";
license = licenses.mit;
platforms = platforms.unix;
maintainers = with maintainers; [ ambroisie ];
};
};
};
}
);
}