-
-
Notifications
You must be signed in to change notification settings - Fork 7
/
flake.nix
69 lines (63 loc) · 1.64 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
{
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable";
};
outputs = inputs: let
nixpkgsForHost = host:
import inputs.nixpkgs {system = host;};
nixpkgs."x86_64-linux" = nixpkgsForHost "x86_64-linux";
in {
devShells."x86_64-linux".default = with nixpkgs."x86_64-linux";
mkShell {
name = "santiago";
packages = [
cargo
cargo-tarpaulin
clippy
entr
jq
linuxPackages_latest.perf
reuse
rustc
];
};
apps."x86_64-linux".dev = with nixpkgs."x86_64-linux"; {
type = "app";
program =
(writeShellScript "license" ''
git ls-files | entr sh -euc '
UPDATE=1 cargo test
cargo doc
cargo tarpaulin -o html
'
'')
.outPath;
};
apps."x86_64-linux".license = with nixpkgs."x86_64-linux"; {
type = "app";
program =
(writeShellScript "license" ''
copyright='Kevin Amado <[email protected]>'
license='GPL-3.0-only'
reuse addheader \
--copyright="$copyright" \
--license="$license" \
--explicit-license \
.envrc \
Cargo.lock \
Cargo.toml \
tests/*/cases/*/* \
tests/*/eval.rs \
tests/*/grammar.rs \
tests/*/lexer.rs \
flake.nix \
flake.lock \
git ls-files | xargs reuse addheader \
--copyright="$copyright" \
--license="$license" \
--skip-unrecognised
'')
.outPath;
};
};
}