Merge pull request #120637 from andreisergiu98/ombi-update
This commit is contained in:
commit
a73342b7ce
|
@ -70,6 +70,7 @@ in {
|
||||||
|
|
||||||
users.users = mkIf (cfg.user == "ombi") {
|
users.users = mkIf (cfg.user == "ombi") {
|
||||||
ombi = {
|
ombi = {
|
||||||
|
isSystemUser = true;
|
||||||
group = cfg.group;
|
group = cfg.group;
|
||||||
home = cfg.dataDir;
|
home = cfg.dataDir;
|
||||||
};
|
};
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
{ lib, stdenv, fetchurl, makeWrapper, patchelf, openssl, libunwind, zlib, krb5, icu, nixosTests }:
|
{ lib, stdenv, fetchurl, makeWrapper, autoPatchelfHook, fixDarwinDylibNames, zlib, krb5, openssl, icu, nixosTests }:
|
||||||
|
|
||||||
let
|
let
|
||||||
os = if stdenv.isDarwin then "osx" else "linux";
|
os = if stdenv.isDarwin then "osx" else "linux";
|
||||||
|
@ -10,20 +10,14 @@ let
|
||||||
"Unsupported system: ${stdenv.hostPlatform.system}");
|
"Unsupported system: ${stdenv.hostPlatform.system}");
|
||||||
|
|
||||||
hash = {
|
hash = {
|
||||||
x64-linux_hash = "sha256-Cuvz9Mhwpg8RIaiSXib+QW00DM66qPRQulrchRL2BSk=";
|
x64-linux_hash = "sha256-9m5vWobkibqOHsuIJmvEHuwsuJogvQQe8h0dvFj62tw=";
|
||||||
arm64-linux_hash = "sha256-uyVwa73moHWMZScNNSOU17lALuK3PC/cvTZPJ9qg7JQ=";
|
arm64-linux_hash = "sha256-OBm4j5Ez04XLjp4DHyOrwSOSGanuuI8g2y2wZaotH8M=";
|
||||||
x64-osx_hash = "sha256-FGXLsfEuCW94D786LJ/wvA9TakOn5sG2M1rDXPQicYw=";
|
x64-osx_hash = "sha256-UPf6Yl0nbhmiWq9oGyi7sRhlahB6zHL7nTj7GRlKoII=";
|
||||||
}."${arch}-${os}_hash";
|
}."${arch}-${os}_hash";
|
||||||
|
|
||||||
rpath = lib.makeLibraryPath [
|
|
||||||
stdenv.cc.cc openssl libunwind zlib krb5 icu
|
|
||||||
];
|
|
||||||
|
|
||||||
dynamicLinker = stdenv.cc.bintools.dynamicLinker;
|
|
||||||
|
|
||||||
in stdenv.mkDerivation rec {
|
in stdenv.mkDerivation rec {
|
||||||
pname = "ombi";
|
pname = "ombi";
|
||||||
version = "4.0.1292";
|
version = "4.0.1345";
|
||||||
|
|
||||||
sourceRoot = ".";
|
sourceRoot = ".";
|
||||||
|
|
||||||
|
@ -32,25 +26,20 @@ in stdenv.mkDerivation rec {
|
||||||
sha256 = hash;
|
sha256 = hash;
|
||||||
};
|
};
|
||||||
|
|
||||||
buildInputs = [ makeWrapper patchelf ];
|
nativeBuildInputs = [ makeWrapper autoPatchelfHook ]
|
||||||
|
++ lib.optional stdenv.hostPlatform.isDarwin fixDarwinDylibNames;
|
||||||
|
|
||||||
|
propagatedBuildInputs = [ stdenv.cc.cc zlib krb5 ];
|
||||||
|
|
||||||
installPhase = ''
|
installPhase = ''
|
||||||
mkdir -p $out/{bin,share/${pname}-${version}}
|
mkdir -p $out/{bin,share/${pname}-${version}}
|
||||||
cp -r * $out/share/${pname}-${version}
|
cp -r * $out/share/${pname}-${version}
|
||||||
|
|
||||||
makeWrapper $out/share/${pname}-${version}/Ombi $out/bin/Ombi \
|
makeWrapper $out/share/${pname}-${version}/Ombi $out/bin/Ombi \
|
||||||
|
--prefix LD_LIBRARY_PATH : ${lib.makeLibraryPath [ openssl icu ]} \
|
||||||
--run "cd $out/share/${pname}-${version}"
|
--run "cd $out/share/${pname}-${version}"
|
||||||
'';
|
'';
|
||||||
|
|
||||||
dontPatchELF = true;
|
|
||||||
postFixup = ''
|
|
||||||
patchelf --set-interpreter "${dynamicLinker}" \
|
|
||||||
--set-rpath "$ORIGIN:${rpath}" $out/share/${pname}-${version}/Ombi
|
|
||||||
|
|
||||||
find $out -type f -name "*.so" -exec \
|
|
||||||
patchelf --set-rpath '$ORIGIN:${rpath}' {} ';'
|
|
||||||
'';
|
|
||||||
|
|
||||||
passthru = {
|
passthru = {
|
||||||
updateScript = ./update.sh;
|
updateScript = ./update.sh;
|
||||||
tests.smoke-test = nixosTests.ombi;
|
tests.smoke-test = nixosTests.ombi;
|
||||||
|
|
Loading…
Reference in New Issue