forked from tadfisher/gradle2nix
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdefault.nix
38 lines (30 loc) · 809 Bytes
/
default.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
{ pkgs ? import <nixpkgs> {} }:
with pkgs;
let
buildGradle = callPackage ./gradle-env.nix {};
gradle2nix = buildGradle {
envSpec = ./gradle-env.json;
src = lib.cleanSourceWith {
filter = lib.cleanSourceFilter;
src = lib.cleanSourceWith {
filter = path: type: let baseName = baseNameOf path; in !(
(type == "directory" && (
baseName == "build" ||
baseName == ".idea" ||
baseName == ".gradle"
)) ||
(lib.hasSuffix ".iml" baseName)
);
src = ./.;
};
};
gradleFlags = [ "installDist" ];
installPhase = ''
mkdir -p $out
cp -r app/build/install/gradle2nix/* $out/
'';
passthru = {
plugin = "${gradle2nix}/share/plugin.jar";
};
};
in gradle2nix