-
Notifications
You must be signed in to change notification settings - Fork 15
/
Copy pathflake.nix
49 lines (44 loc) · 1.26 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
{
description = "Convert deps.edn to a nix expression.";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs";
utils.url = "github:numtide/flake-utils";
flake-compat = {
url = "github:edolstra/flake-compat";
flake = false;
};
gitignore = {
url = "github:hercules-ci/gitignore.nix";
# To avoid pulling in 2 different nixpkgs
inputs.nixpkgs.follows = "nixpkgs";
};
};
outputs = { self, nixpkgs, utils, gitignore, ... }: utils.lib.eachDefaultSystem (system:
let
pkgs = import nixpkgs { inherit system; };
clj2nix = pkgs.callPackage ./clj2nix.nix { inherit gitignore; };
in {
packages = utils.lib.flattenTree {
inherit clj2nix;
};
defaultPackage = self.packages."${system}".clj2nix;
devShell = pkgs.mkShell {
name = "clj2nix-development";
# sorry
SHELL = "${pkgs.fish}/bin/fish";
GIT_TERMINAL_PROMPT = 1;
packages = with pkgs; [
coreutils
clojure
git
nix-prefetch-git
openjdk
];
shellHook = ''
${pkgs.fish}/bin/fish --interactive -C \
'${pkgs.any-nix-shell}/bin/any-nix-shell fish --info-right | source'
exit $?
'';
};
});
}