Let's see if I can build cinny from source
This commit is contained in:
parent
26cd8835f5
commit
6e4e7a1b88
2 changed files with 53 additions and 25 deletions
50
pkgs/cinny/default.nix
Normal file
50
pkgs/cinny/default.nix
Normal file
|
@ -0,0 +1,50 @@
|
|||
{
|
||||
lib,
|
||||
buildNpmPackage,
|
||||
fetchFromGitHub,
|
||||
pkgs,
|
||||
}: let
|
||||
port = 2143;
|
||||
configFile =
|
||||
pkgs.writeText "config.json"
|
||||
''
|
||||
{
|
||||
"defaultHomeserver": 0,
|
||||
"homeserverList": [
|
||||
"matrix.gladtherescake.eu"
|
||||
],
|
||||
"allowCustomHomeservers": false
|
||||
}
|
||||
'';
|
||||
in
|
||||
buildNpmPackage rec {
|
||||
pname = "cinny";
|
||||
version = "09a0a2d";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "cinnyapp";
|
||||
repo = pname;
|
||||
rev = "${version}";
|
||||
hash = "sha256-ee8YOJ0fGy26OWXb2Uumzy68M4UpERHH3ni0q+tDY14=";
|
||||
};
|
||||
|
||||
npmDepsHash = "sha256-zelk15/rXXjhWuHj1GsSevnyXVBeDkMJ0qZfPyejq4A=";
|
||||
|
||||
# The prepack script runs the build script, which we'd rather do in the build phase.
|
||||
npmPackFlags = ["--ignore-scripts" "--max_old_space_size=4096"];
|
||||
|
||||
installPhase = ''
|
||||
mkdir $out
|
||||
npm run build
|
||||
cp -r dist/* $out
|
||||
mkdir $out/app
|
||||
cp ${configFile} $out/app/config.json
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "Yet another matrix client";
|
||||
homepage = "https://cinny.in/";
|
||||
license = licenses.agpl3O;
|
||||
maintainers = with maintainers; [Lillian-Violet];
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue