mirror of
https://github.com/tadfisher/gradle2nix.git
synced 2026-01-11 23:40:37 -05:00
Dogfood v2
This commit is contained in:
41
gradle2nix.nix
Normal file
41
gradle2nix.nix
Normal file
@@ -0,0 +1,41 @@
|
||||
{ lib
|
||||
, gradle
|
||||
, buildGradle
|
||||
}:
|
||||
|
||||
buildGradle {
|
||||
pname = "gradle2nix";
|
||||
version = "2.0.0";
|
||||
lockFile = ./gradle.lock;
|
||||
|
||||
src = lib.cleanSourceWith {
|
||||
filter = lib.cleanSourceFilter;
|
||||
src = lib.cleanSourceWith {
|
||||
filter = path: type: let baseName = builtins.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/
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
inherit (gradle.meta) platforms;
|
||||
description = "Wrap Gradle builds with Nix";
|
||||
homepage = "https://github.com/tadfisher/gradle2nix";
|
||||
license = licenses.asl20;
|
||||
maintainers = with maintainers; [ tadfisher ];
|
||||
mainProgram = "gradle2nix";
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user