1
0
Fork 0
piped-flake/packages/proxy/default.nix

43 lines
798 B
Nix
Raw Normal View History

2023-09-08 10:59:27 +01:00
{
rustPlatform,
fetchFromGitHub,
nasm,
withWebP ? true,
withAVIF ? true,
2023-09-08 10:59:27 +01:00
}: let
meta = builtins.fromJSON (builtins.readFile ../../meta.json);
rev = meta.proxy.rev;
in
rustPlatform.buildRustPackage rec {
pname = "piped-proxy";
version = "latest-${rev}";
src = fetchFromGitHub {
owner = "TeamPiped";
repo = "piped-proxy";
inherit rev;
sha256 = "${meta.proxy.sha256}";
};
buildNoDefaultFeatures = true;
buildFeatures =
[]
++ (
if withAVIF
then ["avif"]
else []
)
++ (
if withWebP
then ["webp"]
else []
);
nativeBuildInputs =
if withAVIF
then [nasm]
else [];
2023-09-08 10:59:27 +01:00
cargoLock = {lockFile = "${src}/Cargo.lock";};
doCheck = false;
}