46 lines
984 B
Nix
46 lines
984 B
Nix
{
|
|
lib,
|
|
buildNpmPackage,
|
|
fetchFromGitHub,
|
|
electron,
|
|
makeWrapper,
|
|
}:
|
|
|
|
buildNpmPackage rec {
|
|
pname = "sable-client-electron";
|
|
version = "latest";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "7w1";
|
|
repo = "Sable-Client-Electron";
|
|
rev = "master";
|
|
hash = "sha256-oI8dr8Ud5+by2oJYUZ+OS/HDFkBIcyuqDZ59M5hM118=";
|
|
};
|
|
|
|
npmDepsHash = "sha256-XawYnHHuAS4HbsQYKhRQ0qPeZom7KB/2sw4GMFq5C9s=";
|
|
|
|
nativeBuildInputs = [ makeWrapper ];
|
|
|
|
npmFlags = [ "--ignore-scripts" ];
|
|
|
|
dontNpmBuild = true;
|
|
|
|
installPhase = ''
|
|
runHook preInstall
|
|
|
|
mkdir -p $out/lib/sable-client
|
|
cp -r . $out/lib/sable-client
|
|
|
|
makeWrapper ${electron}/bin/electron $out/bin/sable-client \
|
|
--add-flags $out/lib/sable-client/main.js
|
|
|
|
runHook postInstall
|
|
'';
|
|
|
|
meta = with lib; {
|
|
description = "Electron wrapper for Sable Matrix Client";
|
|
homepage = "https://github.com/7w1/Sable-Client-Electron";
|
|
platforms = platforms.linux;
|
|
mainProgram = "sable-client";
|
|
};
|
|
}
|