-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathflake.nix
61 lines (59 loc) · 1.83 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
{
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable";
flake-utils.url = "github:numtide/flake-utils";
flake-compat = {
url = "github:edolstra/flake-compat";
flake = false;
};
crane = {
url = "github:ipetkov/crane/v0.13.1";
inputs.nixpkgs.follows = "nixpkgs";
inputs.flake-utils.follows = "flake-utils";
inputs.flake-compat.follows = "flake-compat";
};
bats-require = {
url = "github:abathur/bats-require";
inputs.nixpkgs.follows = "nixpkgs";
inputs.flake-utils.follows = "flake-utils";
inputs.flake-compat.follows = "flake-compat";
};
};
description = "A smol (quick) git status prompt plugin";
outputs = { self, nixpkgs, flake-utils, flake-compat, bats-require, crane }:
{
overlays.default = final: prev: {
lilgit = prev.callPackage ./lilgit.nix { craneLib = crane.mkLib prev; };
};
# shell = ./shell.nix;
} // flake-utils.lib.eachDefaultSystem (system:
let
pkgs = import nixpkgs {
inherit system;
overlays = [
bats-require.overlays.default
self.overlays.default
];
};
demo = ./prompt_demo.sh;
in
{
packages = {
inherit (pkgs) lilgit;
default = pkgs.lilgit;
};
checks = pkgs.callPackages ./test.nix {
inherit (pkgs) lilgit;
};
devShells = {
default = pkgs.mkShell {
buildInputs = [ pkgs.lilgit pkgs.bashInteractive ];
shellHook = ''
exec /usr/bin/env -i LILGITBASH="${pkgs.lilgit}/bin/lilgit.bash" ${pkgs.bashInteractive}/bin/bash --rcfile ${demo} --noprofile -i
'';
};
update = pkgs.callPackage ./update.nix { };
};
}
);
}