files!
This commit is contained in:
parent
33866c2eb9
commit
6dfedac316
3 changed files with 103 additions and 0 deletions
46
default.nix
Normal file
46
default.nix
Normal file
|
|
@ -0,0 +1,46 @@
|
|||
{
|
||||
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";
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue