36 lines
871 B
Nix
36 lines
871 B
Nix
|
{ pkgs, fetchFromGitHub, gradleGen, openjdk11}:
|
||
|
with pkgs;
|
||
|
let
|
||
|
buildGradle = callPackage ./gradle-env.nix { gradleGen = gradleGen.override { java = openjdk11; }; };
|
||
|
in
|
||
|
buildGradle {
|
||
|
envSpec = ./gradle-env.json;
|
||
|
|
||
|
src = fetchFromGitHub {
|
||
|
owner = "DoctorD1501";
|
||
|
repo = "JAVMovieScraper";
|
||
|
rev = "fcd695b2981d36aea01c9153ee2ef1c27cd42c78";
|
||
|
sha256 = "0qwdzyfmscjj75jyh9mnk1rlmy12fnnsqbhvp9xdsnfhwy78x6xm";
|
||
|
};
|
||
|
|
||
|
patches = [ ./disable_spotless.patch ./respectXDG.patch ];
|
||
|
|
||
|
gradleFlags = [ "DistTar" ];
|
||
|
|
||
|
buildInputs = [ openjdk11 ];
|
||
|
|
||
|
installPhase = ''
|
||
|
mkdir -p $out
|
||
|
tar xvf ./build/distributions/source--1.tar
|
||
|
cp -r source--1/lib source--1/bin $out
|
||
|
rm $out/bin/source.bat
|
||
|
cat $out/bin/source | sed 's~$JAVA_HOME~${openjdk11}~' > $out/bin/JAVMovieScraper
|
||
|
chmod +x $out/bin/JAVMovieScraper
|
||
|
rm $out/bin/source
|
||
|
'';
|
||
|
}
|
||
|
|
||
|
|
||
|
|
||
|
|