2022-06-08 14:01:14 +02:00
|
|
|
{ stdenv, lib, requireFile, openssl, qt5, p7zip, unzip }:
|
2020-10-18 14:34:40 +02:00
|
|
|
|
|
|
|
let
|
|
|
|
fname = "LINUX_-_SAM_Suite.zip";
|
|
|
|
sha256 = "0qf7n910kqsiqcbwvgf87hfhiz4c87pi5xfhw02j4qpcvr2x3ca1";
|
|
|
|
forumlink = "https://forums.x-plane.org/index.php?/files/file/59782-scenery-animation-manager-suite/";
|
|
|
|
|
|
|
|
in qt5.mkDerivation {
|
|
|
|
pname = "sam";
|
|
|
|
version = "1.0";
|
|
|
|
src = requireFile {
|
|
|
|
message = ''
|
|
|
|
Download the Beautiful Roads Addon from:
|
|
|
|
${forumlink}
|
|
|
|
|
|
|
|
Then add it to your nix store, e.g., by using
|
|
|
|
"nix-prefetch-url file://\$PWD/${fname}" from the directory where you saved it.
|
|
|
|
'';
|
|
|
|
name = fname;
|
|
|
|
inherit sha256;
|
|
|
|
};
|
|
|
|
nativeBuildInputs = [ unzip ];
|
|
|
|
phases = [ "buildPhase" "patchPhase" "configurePhase" "fixupPhase" ];
|
|
|
|
nativeBuildInptus = [ unzip ];
|
2022-06-08 14:01:14 +02:00
|
|
|
libPath = lib.makeLibraryPath [ qt5.qtbase p7zip openssl stdenv.cc.cc ];
|
2020-10-18 14:34:40 +02:00
|
|
|
buildPhase = ''
|
|
|
|
unzip $src others/samsuite.zip
|
|
|
|
unzip others/samsuite.zip
|
|
|
|
tar xf samsuite.tar.gz
|
|
|
|
mkdir -p $out/bin
|
|
|
|
cp usr/bin/SamSuite $out/bin
|
|
|
|
cp -r usr/share $out
|
|
|
|
patchelf --set-rpath "$libPath" --set-interpreter $(cat $NIX_CC/nix-support/dynamic-linker) $out/bin/SamSuite
|
2022-06-08 14:01:14 +02:00
|
|
|
wrapProgram $out/bin/SamSuite --prefix PATH : ${lib.getBin p7zip}/bin
|
2020-10-18 14:34:40 +02:00
|
|
|
'';
|
|
|
|
}
|