2021-01-11 08:54:33 +01:00
|
|
|
{ lib, stdenv, fetchurl, rpmextract, patchelf, bash }:
|
2020-02-29 09:06:38 +01:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "scaleft";
|
2020-08-29 10:12:07 +02:00
|
|
|
version = "1.45.4";
|
2020-02-29 09:06:38 +01:00
|
|
|
|
|
|
|
src =
|
|
|
|
fetchurl {
|
|
|
|
url = "http://pkg.scaleft.com/rpm/scaleft-client-tools-${version}-1.x86_64.rpm";
|
2020-08-29 10:12:07 +02:00
|
|
|
sha256 = "1yskybjba9ljy1wazddgrm7a4cc72i1xbk7sxnjpcq4hdy3b50l0";
|
2020-02-29 09:06:38 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [ patchelf rpmextract ];
|
|
|
|
|
|
|
|
libPath =
|
2021-01-15 14:21:58 +01:00
|
|
|
lib.makeLibraryPath
|
2020-02-29 09:06:38 +01:00
|
|
|
[ stdenv.cc stdenv.cc.cc.lib ];
|
|
|
|
|
|
|
|
buildCommand = ''
|
|
|
|
mkdir -p $out/bin/
|
|
|
|
cd $out
|
|
|
|
rpmextract $src
|
|
|
|
patchelf \
|
|
|
|
--set-interpreter $(cat $NIX_CC/nix-support/dynamic-linker) \
|
|
|
|
usr/bin/sft
|
|
|
|
patchelf \
|
|
|
|
--set-rpath ${libPath} \
|
|
|
|
usr/bin/sft
|
|
|
|
ln -s $out/usr/bin/sft $out/bin/sft
|
|
|
|
chmod +x $out/bin/sft
|
|
|
|
patchShebangs $out
|
|
|
|
'';
|
|
|
|
|
2021-01-11 08:54:33 +01:00
|
|
|
meta = with lib; {
|
2020-02-29 09:06:38 +01:00
|
|
|
description = "ScaleFT provides Zero Trust software which you can use to secure your internal servers and services";
|
|
|
|
homepage = "https://www.scaleft.com";
|
|
|
|
license = licenses.unfree;
|
|
|
|
maintainers = with maintainers; [ jloyet ];
|
|
|
|
platforms = [ "x86_64-linux" ];
|
|
|
|
};
|
|
|
|
}
|