build.tools.nix/flake.nix

39 lines
1.1 KiB
Nix
Raw Normal View History

2022-05-28 11:51:36 -07:00
{
description = "clojure/tools.build packaged for NixOS.";
inputs = {
nixpkgs.url = "nixpkgs/nixos-21.05";
utils.url = "github:numtide/flake-utils";
clj2nix.url = "github:hlolli/clj2nix";
build-tools-src = {
2022-05-29 22:35:28 -07:00
url = "github:clojure/tools.build?tag=v0.8.2";
2022-05-28 11:51:36 -07:00
flake = false;
};
gitignore = {
url = "github:hercules-ci/gitignore.nix";
inputs.nixpkgs.follows = "nixpkgs";
};
to-edn.url = "git+https://git.fudo.org/fudo-public/to-edn.git";
2022-05-28 11:51:36 -07:00
};
outputs =
{ self, nixpkgs, utils, clj2nix, build-tools-src, gitignore, to-edn, ... }:
2022-05-29 10:22:07 -07:00
let
system = "x86_64-linux";
pkgs = nixpkgs.legacyPackages."${system}";
build-tools-jar = pkgs.callPackage ./build.tools.nix {
inherit build-tools-src;
inherit (gitignore.lib) gitignoreSource;
};
in {
2022-05-29 10:27:08 -07:00
lib = {
mkClojureLib = pkgs.callPackage ./mkClojureLib.nix {
inherit build-tools-jar;
inherit (to-edn.lib) toEDN;
};
2022-05-29 10:22:07 -07:00
};
2022-05-29 22:31:41 -07:00
devShell."${system}" =
pkgs.mkShell { buildInputs = with pkgs; [ clojure clj2nix ]; };
2022-05-29 10:22:07 -07:00
};
2022-05-28 11:51:36 -07:00
}