Fixes to ptitgoron, adding cinny and updates
This commit is contained in:
parent
169912a47b
commit
f287ac426a
9 changed files with 229 additions and 37 deletions
102
pkgs/cinny/cinny-desktop.nix
Normal file
102
pkgs/cinny/cinny-desktop.nix
Normal file
|
|
@ -0,0 +1,102 @@
|
|||
{
|
||||
lib,
|
||||
stdenv,
|
||||
fetchFromGitHub,
|
||||
rustPlatform,
|
||||
cargo-tauri,
|
||||
cinny,
|
||||
desktop-file-utils,
|
||||
wrapGAppsHook4,
|
||||
makeBinaryWrapper,
|
||||
pkg-config,
|
||||
openssl,
|
||||
glib-networking,
|
||||
webkitgtk_4_1,
|
||||
jq,
|
||||
moreutils,
|
||||
}:
|
||||
|
||||
rustPlatform.buildRustPackage (finalAttrs: {
|
||||
pname = "cinny-desktop";
|
||||
version = "4.10.6a";
|
||||
|
||||
# nixpkgs-update: no auto update
|
||||
src = fetchFromGitHub {
|
||||
owner = "cinnyapp";
|
||||
repo = "cinny-desktop";
|
||||
rev = "1e8d28faee9acef767a71ba7fe31243eb703a351";
|
||||
hash = "sha256-rPLz9kfm2cp1zKk7sKrybN8ooCduoM3w+xmn0pdXM8w=";
|
||||
};
|
||||
|
||||
sourceRoot = "${finalAttrs.src.name}/src-tauri";
|
||||
|
||||
cargoHash = "sha256-28kaU/vChINQgrzplIF25s6MQ+S3LcrfqSQMziSAFJk=";
|
||||
|
||||
postPatch =
|
||||
let
|
||||
cinny' =
|
||||
assert lib.assertMsg (
|
||||
cinny.version == finalAttrs.version
|
||||
) "cinny.version (${cinny.version}) != cinny-desktop.version (${finalAttrs.version})";
|
||||
cinny.override {
|
||||
conf = {
|
||||
hashRouter.enabled = true;
|
||||
};
|
||||
};
|
||||
in
|
||||
''
|
||||
${lib.getExe jq} \
|
||||
'del(.app.windows) | del(.plugins.updater) | del(.bundle.createUpdaterArtifacts) | .build.frontendDist = "${cinny'}" | del(.build.beforeBuildCommand)' tauri.conf.json \
|
||||
| ${lib.getExe' moreutils "sponge"} tauri.conf.json
|
||||
cat tauri.conf.json
|
||||
'';
|
||||
|
||||
postInstall =
|
||||
lib.optionalString stdenv.hostPlatform.isDarwin ''
|
||||
mkdir -p "$out/bin"
|
||||
makeWrapper "$out/Applications/Cinny.app/Contents/MacOS/Cinny" "$out/bin/cinny"
|
||||
''
|
||||
+ lib.optionalString stdenv.hostPlatform.isLinux ''
|
||||
desktop-file-edit \
|
||||
--set-comment "Yet another matrix client for desktop" \
|
||||
--set-key="Categories" --set-value="Network;InstantMessaging;" \
|
||||
$out/share/applications/Cinny.desktop
|
||||
'';
|
||||
|
||||
preFixup = ''
|
||||
gappsWrapperArgs+=(
|
||||
--set-default WEBKIT_DISABLE_DMABUF_RENDERER "1"
|
||||
)
|
||||
'';
|
||||
|
||||
nativeBuildInputs = [
|
||||
cargo-tauri.hook
|
||||
]
|
||||
++ lib.optionals stdenv.hostPlatform.isLinux [
|
||||
desktop-file-utils
|
||||
pkg-config
|
||||
wrapGAppsHook4
|
||||
]
|
||||
++ lib.optionals stdenv.hostPlatform.isDarwin [
|
||||
makeBinaryWrapper
|
||||
];
|
||||
|
||||
buildInputs = lib.optionals stdenv.hostPlatform.isLinux [
|
||||
glib-networking
|
||||
openssl
|
||||
webkitgtk_4_1
|
||||
];
|
||||
|
||||
meta = {
|
||||
description = "Yet another matrix client for desktop";
|
||||
homepage = "https://github.com/cinnyapp/cinny-desktop";
|
||||
maintainers = with lib.maintainers; [
|
||||
qyriad
|
||||
rebmit
|
||||
ryand56
|
||||
];
|
||||
license = lib.licenses.agpl3Only;
|
||||
platforms = lib.platforms.linux ++ lib.platforms.darwin;
|
||||
mainProgram = "cinny";
|
||||
};
|
||||
})
|
||||
51
pkgs/cinny/cinny-unwrapped.nix
Normal file
51
pkgs/cinny/cinny-unwrapped.nix
Normal file
|
|
@ -0,0 +1,51 @@
|
|||
{
|
||||
lib,
|
||||
buildNpmPackage,
|
||||
fetchFromGitHub,
|
||||
nodejs_22,
|
||||
}:
|
||||
|
||||
buildNpmPackage {
|
||||
pname = "cinny-unwrapped";
|
||||
# Remember to update cinny-desktop when bumping this version.
|
||||
version = "4.10.6a";
|
||||
|
||||
# nixpkgs-update: no auto update
|
||||
src = fetchFromGitHub {
|
||||
owner = "cinnyapp";
|
||||
repo = "cinny";
|
||||
# rev = "55e83065767645ed7cd510a6f4b5cf4733b000b4";
|
||||
tag = "v4.10.5";
|
||||
# hash = "sha256-2qxmlj4IK6twDh27R6qMJDmYSfsWoofVGuRHxSP72f0=";
|
||||
hash = "sha256-Napy3AcsLRDZPcBh3oq1U30FNtvoNtob0+AZtZSvcbM=";
|
||||
};
|
||||
|
||||
nodejs = nodejs_22;
|
||||
|
||||
# npmDepsHash = "sha256-qyQ0SXkPSUES/tavKzPra0Q+ZnU9qHvkTC1JgAjL0o8=";
|
||||
npmDepsHash = "sha256-2Lrd0jAwAH6HkwLHyivqwaEhcpFAIALuno+MchSIfxo=";
|
||||
|
||||
# Skip rebuilding native modules since they're not needed for the web app
|
||||
npmRebuildFlags = [
|
||||
"--ignore-scripts"
|
||||
];
|
||||
|
||||
installPhase = ''
|
||||
runHook preInstall
|
||||
|
||||
cp -r dist $out
|
||||
|
||||
runHook postInstall
|
||||
'';
|
||||
|
||||
meta = {
|
||||
description = "Yet another Matrix client for the web";
|
||||
homepage = "https://cinny.in/";
|
||||
maintainers = with lib.maintainers; [
|
||||
abbe
|
||||
rebmit
|
||||
];
|
||||
license = lib.licenses.agpl3Only;
|
||||
platforms = lib.platforms.all;
|
||||
};
|
||||
}
|
||||
32
pkgs/cinny/cinny.nix
Normal file
32
pkgs/cinny/cinny.nix
Normal file
|
|
@ -0,0 +1,32 @@
|
|||
{
|
||||
cinny-unwrapped,
|
||||
jq,
|
||||
stdenvNoCC,
|
||||
writeText,
|
||||
conf ? { },
|
||||
}:
|
||||
let
|
||||
configOverrides = writeText "cinny-config-overrides.json" (builtins.toJSON conf);
|
||||
in
|
||||
if (conf == { }) then
|
||||
cinny-unwrapped
|
||||
else
|
||||
stdenvNoCC.mkDerivation {
|
||||
pname = "cinny";
|
||||
inherit (cinny-unwrapped) version meta;
|
||||
|
||||
dontUnpack = true;
|
||||
|
||||
nativeBuildInputs = [ jq ];
|
||||
|
||||
installPhase = ''
|
||||
runHook preInstall
|
||||
|
||||
mkdir -p $out
|
||||
ln -s ${cinny-unwrapped}/* $out
|
||||
rm $out/config.json
|
||||
jq -s '.[0] * .[1]' "${cinny-unwrapped}/config.json" "${configOverrides}" > "$out/config.json"
|
||||
|
||||
runHook postInstall
|
||||
'';
|
||||
}
|
||||
|
|
@ -1,8 +1,11 @@
|
|||
{ pkgs ? import <nixpkgs> { } }:
|
||||
|
||||
{
|
||||
rec {
|
||||
quadcastrgb = pkgs.callPackage ./quadcastrgb { };
|
||||
ens-intel-unite = pkgs.callPackage ./ens-intel-unite { };
|
||||
KhinsiderDownloader = pkgs.qt6Packages.callPackage ./KhinsiderDownloader { };
|
||||
amy-mono = pkgs.callPackage ./amy-mono { };
|
||||
cinny = pkgs.callPackage ./cinny/cinny.nix { inherit cinny-unwrapped; };
|
||||
cinny-unwrapped = pkgs.callPackage ./cinny/cinny-unwrapped.nix { };
|
||||
cinny-desktop = pkgs.callPackage ./cinny/cinny-desktop.nix { inherit cinny; };
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue