-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathflake.nix
55 lines (52 loc) · 1.63 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
{
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable";
};
outputs =
{ self, nixpkgs }:
let
forAllSystems =
function:
nixpkgs.lib.genAttrs [
"x86_64-linux"
"aarch64-darwin"
] (system: function nixpkgs.legacyPackages.${system});
in
{
devShells = forAllSystems (pkgs: {
default =
with pkgs;
mkShell {
packages =
let
release = writeShellApplication {
name = "release";
runtimeInputs = [
elixir
gh
];
text = ''
tag=$1
mix test
gh release create "$tag" --draft --generate-notes
mix hex.publish
'';
};
in
[
elixir
qpdf
release
]
++ lib.lists.optional stdenv.isLinux inotify-tools
++ lib.lists.optional stdenv.isDarwin darwin.apple_sdk.frameworks.CoreServices;
shellHook = ''
export ERL_AFLAGS="-kernel shell_history enabled shell_history_file_bytes 1024000"
export FONT_LIBRE_BODONI_REGULAR="${libre-bodoni}/share/fonts/opentype/LibreBodoni-Regular.otf"
export FONT_LIBRE_BODONI_BOLD="${libre-bodoni}/share/fonts/opentype/LibreBodoni-Bold.otf"
export FONT_LIBRE_FRANKLIN_REGULAR="${libre-franklin}/share/fonts/opentype/LibreFranklin-Regular.otf"
'';
};
});
};
}