2024-08-28 00:37:44 +00:00
|
|
|
{
|
|
|
|
fetchurl,
|
|
|
|
writeFennel,
|
|
|
|
fennel,
|
|
|
|
fennelrepl,
|
|
|
|
runCommand,
|
|
|
|
jose,
|
|
|
|
lua,
|
|
|
|
anoia,
|
|
|
|
lualinux,
|
|
|
|
fetch-freebsd,
|
|
|
|
openssl,
|
|
|
|
rxi-json,
|
|
|
|
makeWrapper,
|
2025-02-10 21:55:08 +00:00
|
|
|
stdenv,
|
2024-08-28 00:37:44 +00:00
|
|
|
}:
|
2025-02-10 21:55:08 +00:00
|
|
|
let
|
|
|
|
name = "tangc";
|
|
|
|
in
|
|
|
|
stdenv.mkDerivation {
|
2024-08-28 00:37:44 +00:00
|
|
|
inherit name;
|
|
|
|
src = ./.;
|
|
|
|
|
2025-02-10 21:55:08 +00:00
|
|
|
buildInputs = [
|
|
|
|
fetch-freebsd
|
|
|
|
rxi-json
|
|
|
|
openssl
|
|
|
|
lua
|
|
|
|
jose
|
|
|
|
];
|
2024-08-28 00:37:44 +00:00
|
|
|
nativeBuildInputs = [ makeWrapper ];
|
|
|
|
|
|
|
|
buildPhase = "";
|
|
|
|
installPhase = ''
|
|
|
|
mkdir -p $out/bin
|
2025-02-10 21:55:08 +00:00
|
|
|
cp -p ${
|
|
|
|
writeFennel name {
|
|
|
|
packages = [
|
|
|
|
fetch-freebsd
|
|
|
|
rxi-json
|
|
|
|
fennel
|
|
|
|
anoia
|
|
|
|
lualinux
|
|
|
|
jose
|
|
|
|
];
|
|
|
|
mainFunction = "run";
|
|
|
|
} ./tangc.fnl
|
|
|
|
} $out/bin/${name}
|
2024-08-28 00:37:44 +00:00
|
|
|
wrapProgram $out/bin/${name} --set JOSE_BIN ${jose}/bin/jose
|
|
|
|
'';
|
|
|
|
}
|