-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathflake.nix
43 lines (38 loc) · 1.09 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
{
description = "a command line OpenTDB interface";
inputs = {
nixpkgs.url = github:nixos/nixpkgs/nixpkgs-unstable;
utils.url = "github:gytis-ivaskevicius/flake-utils-plus";
nix-deno.url = "github:brecert/nix-deno";
};
outputs = inputs@{ self, nixpkgs, utils, nix-deno }:
utils.lib.mkFlake {
inherit self inputs;
sharedOverlays = [ nix-deno.overlay ];
outputsBuilder = channels:
let
pkgs = channels.nixpkgs;
trivia =
let name = "trivia"; in
pkgs.mkDenoDrv {
inherit name;
src = builtins.path {
inherit name;
path = ./.;
};
lockfile = ./bin/lockfile.json;
entrypoint = "./bin/trivia.ts";
denoFlags = [ "--allow-net" ];
};
in
{
packages.trivia = trivia;
apps.trivia = trivia;
defaultPackage = trivia;
defaultApp = trivia;
devShell = pkgs.mkShell {
buildInputs = [ pkgs.deno ];
};
};
};
}