{ stdenv, pkgs,  unzip, autoPatchelfHook, fetchurl, lib, ... }:

stdenv.mkDerivation {
  pname = "tasklite";
  version = "ci";

  src = fetchurl {
    url = "https://productionresultssa18.blob.core.windows.net/actions-results/3145698a-7fd9-415c-99d6-d74d4dfc1a7a/workflow-job-run-015d34fc-67a3-589c-a72e-541495a912de/artifacts/653fbd898f6c68fd4665912e4d0b14e295fe658fbdd60da07ab9cd8ac0793d65.zip?rscd=attachment%3B+filename%3D%22tasklite_linux_x86_64.zip%22&se=2025-04-03T17%3A06%3A50Z&sig=CVkJI8x6BFh1D2dRJZVAeqUeQ26%2BQpE0VYBfslOYrGM%3D&ske=2025-04-04T04%3A23%3A10Z&skoid=ca7593d4-ee42-46cd-af88-8b886a2f84eb&sks=b&skt=2025-04-03T16%3A23%3A10Z&sktid=398a6654-997b-47e9-b12b-9515b896b4de&skv=2025-01-05&sp=r&spr=https&sr=b&st=2025-04-03T16%3A56%3A45Z&sv=2025-01-05";
    sha256 = "2b8c98d8adbc56ebccf17f175a52e6633c16562924ef2bdca62a21a273f0051a";
  };

  nativeBuildInputs = [ unzip autoPatchelfHook ];

  buildInputs = with pkgs; [
    libz
    gmp
    stdenv
  ];

  unpackPhase = ''
    unzip $src
  '';

  installPhase = ''
    mkdir -p $out/bin
    cp tasklite $out/bin
  '';

  meta = with lib; {
    homepage = "";
    description = "";
    platforms = platforms.linux;
  };
}
