43 lines
829 B
Nix
43 lines
829 B
Nix
{ stdenv
|
|
, lib
|
|
, fetchurl
|
|
, buildFHSUserEnv
|
|
, bash
|
|
, writeText
|
|
}:
|
|
|
|
let
|
|
fr24feed = stdenv.mkDerivation rec {
|
|
pname = "fr24feed-unwrapped";
|
|
version = "1.0.25-3";
|
|
|
|
src = fetchurl {
|
|
url = "https://repo-feed.flightradar24.com/linux_x86_64_binaries/fr24feed_${version}_amd64.tgz";
|
|
sha256 = "sha256:0gvb1p2lhgcrgpid3nqid92sbpg8561yfjlnbmi07bhs3vcilmbq";
|
|
};
|
|
|
|
installPhase = ''
|
|
runHook preInstall
|
|
install -Dm 0755 fr24feed $out/bin/fr24feed
|
|
runHook postInstall
|
|
'';
|
|
};
|
|
in
|
|
buildFHSUserEnv {
|
|
name = "fr24feed";
|
|
targetPkgs = pkgs: with pkgs; [
|
|
bash
|
|
];
|
|
|
|
extraBuildCommands = ''
|
|
chmod +w etc
|
|
ln -s /host/etc/fr24feed.ini etc/fr24feed.ini
|
|
'';
|
|
|
|
runScript = "${bash}/bin/bash ${
|
|
writeText "fr24feed"
|
|
''
|
|
exec ${fr24feed}/bin/fr24feed "$@"
|
|
''
|
|
}";
|
|
}
|