{ fetchFromGitHub, lib, stdenv, }: stdenv.mkDerivation (finalAttrs: { pname = "emacsql-sqlite"; version = "4.0.3"; src = fetchFromGitHub { owner = "magit"; repo = "emacsql"; rev = "v${finalAttrs.version}"; hash = "sha256-MaL3t+2MhWOE6eLmt8m4ImpsKeNeUZ4S8zEoQVu51ZY="; }; sourceRoot = "source/sqlite"; installPhase = '' runHook preInstall install -Dm755 -t $out/bin ${finalAttrs.meta.mainProgram} runHook postInstall ''; meta = with lib; { description = "SQLite interop binary for emacsql-sqlite"; inherit (finalAttrs.src.meta) homepage; license = licenses.unlicense; platforms = platforms.unix; maintainers = with maintainers; [ azahi ]; mainProgram = "emacsql-sqlite"; }; })