iceshrimp-flake/iceshrimp.nix
2025-03-23 14:40:22 +01:00

47 lines
991 B
Nix

{
stdenv,
fetchurl,
autoPatchelfHook,
makeWrapper,
zstd,
dotnetCorePackages,
}: let
version = "v2025.1-beta5.patch2.security1";
in
stdenv.mkDerivation {
pname = "iceshrimp";
version = "2025.1";
src = fetchurl {
url = "https://iceshrimp.dev/iceshrimp/Iceshrimp.NET/releases/download/v2025.1-beta5.patch2.security1/Iceshrimp.NET-${version}-linux-amd64-glibc.tar.zst";
hash = "sha256-Uwstie81M3kM9CjukIG+wXpxp91uTuXFMB/fZlFWsMk=";
};
nativeBuildInputs = [
stdenv.cc.cc.lib
zstd
autoPatchelfHook
makeWrapper
];
buildInputs = [
dotnetCorePackages.sdk_9_0
];
unpackPhase = ''
runHook preUnpack
mkdir -p $out
tar xf $src
cp -r Iceshrimp.NET-${version}-linux-amd64-glibc/* $out
runHook postUnpack
'';
postFixup = ''
makeWrapper $out/Iceshrimp.Backend $out/bin/backend \
--set DOTNET_ROOT ${dotnetCorePackages.sdk_9_0}/share/dotnet/
'';
}