forked from egen/disruptor
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathflake.nix
More file actions
47 lines (45 loc) · 1.28 KB
/
Copy pathflake.nix
File metadata and controls
47 lines (45 loc) · 1.28 KB
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
{
description = "Disruptor";
inputs = {
flake-utils.url = "github:numtide/flake-utils";
flake-compat = {
url = github:edolstra/flake-compat;
flake = false;
};
nixpkgs.url = "github:NixOS/nixpkgs/nixos-21.11";
nixpkgs_latest.url = "github:NixOS/nixpkgs/nixos-unstable";
};
outputs = { self, nixpkgs_latest, nixpkgs, flake-utils, ... }:
flake-utils.lib.eachDefaultSystem (system:
let
pkgs = nixpkgs.legacyPackages.${system};
pkgs_latest = nixpkgs.legacyPackages.${system};
dev_shell = pkgs.stdenv.mkDerivation {
name = "dev-shell";
buildInputs = with pkgs; [
cacert
coreutils-full
curlFull
direnv
gnutar
# Nix 2.5 (as the one from the installator)
nixUnstable
# Dynamically load nix envs
nix-direnv
];
shellHook = ''
export TERM=xterm
export DIRENV_CONFIG=$(pwd)/.cache
export NIX_USER_CONF_FILES=${./scripts/nix.conf}
. ${pkgs.nix-direnv}/share/nix-direnv/direnvrc
eval "$(direnv hook bash)"
'';
TMPDIR = "/tmp";
};
in {
# DO NOT USE nix develop, as it is not hermetic
# use nix-shell --pure, which loads devShell with out any settings from user env
devShell = dev_shell;
}
);
}