-
-
Notifications
You must be signed in to change notification settings - Fork 14.4k
/
package.nix
45 lines (37 loc) · 1 KB
/
package.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
{
lib,
stdenv,
fetchFromGitHub,
deno,
makeWrapper,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "era";
version = "0.1.3";
src = fetchFromGitHub {
owner = "kyoheiu";
repo = "era";
rev = "refs/tags/v${finalAttrs.version}";
hash = "sha256-OOPVLY9kg4TmKSrpHgsOmAmeDPbX5df0bX51lA6DvcY=";
};
nativeBuildInputs = [ makeWrapper ];
dontBuild = true;
installPhase = ''
runHook preInstall
mkdir -p $out/{bin,lib}
cp -r $src/{src,LICENSE,README.md} $out/lib
makeWrapper ${lib.getExe deno} $out/bin/era \
--set DENO_NO_UPDATE_CHECK "1" \
--add-flags "run -A $out/lib/src/main.ts"
runHook postInstall
'';
meta = {
description = "Rainy clock in your terminal";
homepage = "https://github.com/kyoheiu/era";
changelog = "https://github.com/kyoheiu/era/releases/tag/v${finalAttrs.version}";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ natsukium ];
mainProgram = "era";
inherit (deno.meta) platforms;
};
})