depot/nix/pkgs/fr24feed/default.nix

39 lines
729 B
Nix
Raw Normal View History

{ 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
];
runScript = "${bash}/bin/bash ${
writeText "fr24feed"
''
exec ${fr24feed}/bin/fr24feed "$@"
''
}";
}