2019-11-02 03:14:47 +01:00
|
|
|
{ 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 = ''
|
2019-11-02 12:19:33 +01:00
|
|
|
mkdir -p $out/bin
|
2019-11-02 03:14:47 +01:00
|
|
|
tar xvf ./build/distributions/source--1.tar
|
2019-11-02 12:19:33 +01:00
|
|
|
cd source--1/
|
|
|
|
cp -r ./lib $out
|
|
|
|
cat ./bin/source | sed 's~$JAVA_HOME~${openjdk11}~' > $out/bin/JAVMovieScraper
|
2019-11-02 03:14:47 +01:00
|
|
|
chmod +x $out/bin/JAVMovieScraper
|
|
|
|
'';
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|