44 lines
1.3 KiB
Nix
44 lines
1.3 KiB
Nix
|
{
|
||
|
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 = {
|
||
|
url = "github:clojure/tools.build?tag=v0.8.2";
|
||
|
flake = false;
|
||
|
};
|
||
|
gitignore = {
|
||
|
url = "github:hercules-ci/gitignore.nix";
|
||
|
inputs.nixpkgs.follows = "nixpkgs";
|
||
|
};
|
||
|
};
|
||
|
|
||
|
outputs = { self, nixpkgs, utils, clj2nix, build-tools-src, gitignore, ... }:
|
||
|
utils.lib.eachDefaultSystem (system:
|
||
|
let
|
||
|
pkgs = nixpkgs.legacyPackages."${system}";
|
||
|
clojure-build-tools = pkgs.callPackage ./build.tools.nix {
|
||
|
inherit build-tools-src;
|
||
|
inherit (gitignore.lib) gitignoreSource;
|
||
|
};
|
||
|
update-deps = pkgs.callPackage ./update-deps.nix {
|
||
|
inherit build-tools-src;
|
||
|
inherit clj2nix;
|
||
|
};
|
||
|
in {
|
||
|
packages = utils.lib.flattenTree { inherit clojure-build-tools; };
|
||
|
defaultPackage = self.packages."${system}".clojure-build-tools;
|
||
|
overlay = final: prev: { inherit clojure-build-tools; };
|
||
|
devShell = pkgs.mkShell {
|
||
|
buildInputs = with pkgs; [
|
||
|
clojure
|
||
|
jre
|
||
|
clj2nix.packages."${system}".clj2nix
|
||
|
update-deps
|
||
|
];
|
||
|
};
|
||
|
});
|
||
|
}
|