mirror of
https://github.com/tadfisher/gradle2nix.git
synced 2026-01-11 07:20:39 -05:00
39 lines
809 B
Nix
39 lines
809 B
Nix
{ 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
|