mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-24 16:03:23 +00:00
Merge pull request #149955 from Flakebi/signald
signald: 0.14.1 -> 0.15.0
This commit is contained in:
commit
887da2479d
@ -1,15 +1,15 @@
|
||||
{ lib, stdenv, fetchurl, fetchFromGitLab, jre_headless, coreutils, gradle_6, git, perl
|
||||
{ lib, stdenv, fetchurl, fetchFromGitLab, jdk17_headless, coreutils, gradle_6, git, perl
|
||||
, makeWrapper }:
|
||||
|
||||
let
|
||||
pname = "signald";
|
||||
version = "0.14.1";
|
||||
version = "0.15.0";
|
||||
|
||||
src = fetchFromGitLab {
|
||||
owner = pname;
|
||||
repo = pname;
|
||||
rev = version;
|
||||
sha256 = "K/G5+w1GINLZwJIG5a7u0TxlGe+Cyp4wQm+pgm28qCA=";
|
||||
sha256 = "ftK+oeqzJ+TxrlvqivFkAi5RCcyJ5Y0oQAJuo0YheBg=";
|
||||
};
|
||||
|
||||
buildConfigJar = fetchurl {
|
||||
@ -17,15 +17,10 @@ let
|
||||
sha256 = "0y1f42y7ilm3ykgnm6s3ks54d71n8lsy5649xgd9ahv28lj05x9f";
|
||||
};
|
||||
|
||||
postPatch = ''
|
||||
patchShebangs gradlew
|
||||
sed -i -e 's|BuildConfig.jar|${buildConfigJar}|' build.gradle
|
||||
'';
|
||||
|
||||
# fake build to pre-download deps into fixed-output derivation
|
||||
deps = stdenv.mkDerivation {
|
||||
name = "${pname}-deps";
|
||||
inherit src version postPatch;
|
||||
pname = "${pname}-deps";
|
||||
inherit src version;
|
||||
nativeBuildInputs = [ gradle_6 perl ];
|
||||
buildPhase = ''
|
||||
export GRADLE_USER_HOME=$(mktemp -d)
|
||||
@ -43,16 +38,20 @@ let
|
||||
outputHashMode = "recursive";
|
||||
# Downloaded jars differ by platform
|
||||
outputHash = {
|
||||
x86_64-linux = "/gJFoT+vvdSWr33oI44XiZXlFfyUjtRVB1M6CMzSztM=";
|
||||
aarch64-linux = "v71stMWBbNALasfGAHvsVTBaDOZfpKK3sQrjNJ6FG1A=";
|
||||
x86_64-linux = "gEaOOsELhfKC1cFV8tqRHbBUI6+M/cDOaqN8FQ1J/TE=";
|
||||
aarch64-linux = "UhnQ+Ge48/NdTqUWIxd0VNadHFvQ9awBTtn65Nz3+UM=";
|
||||
}.${stdenv.system} or (throw "Unsupported platform");
|
||||
};
|
||||
|
||||
in stdenv.mkDerivation rec {
|
||||
inherit pname src version postPatch;
|
||||
inherit pname src version;
|
||||
|
||||
patches = [ ./gradle-plugin.patch ];
|
||||
|
||||
postPatch = ''
|
||||
sed -i 's|BuildConfig.jar|${buildConfigJar}|' build.gradle
|
||||
'';
|
||||
|
||||
buildPhase = ''
|
||||
runHook preBuild
|
||||
|
||||
@ -73,7 +72,7 @@ in stdenv.mkDerivation rec {
|
||||
tar xvf ./build/distributions/signald.tar --strip-components=1 --directory $out/
|
||||
wrapProgram $out/bin/signald \
|
||||
--prefix PATH : ${lib.makeBinPath [ coreutils ]} \
|
||||
--set JAVA_HOME "${jre_headless}"
|
||||
--set JAVA_HOME "${jdk17_headless}"
|
||||
|
||||
runHook postInstall
|
||||
'';
|
||||
|
Loading…
Reference in New Issue
Block a user