initial commit

This commit is contained in:
2026-05-04 15:32:04 -04:00
commit 9026b8a5ac
3 changed files with 104 additions and 0 deletions

27
flake.lock generated Normal file
View File

@@ -0,0 +1,27 @@
{
"nodes": {
"nixpkgs": {
"locked": {
"lastModified": 1777673416,
"narHash": "sha256-5c2POKPOjU40Kh0MirOdScBLG0bu9TAuPYAtPRNZMBs=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "26ef669cffa904b6f6832ab57b77892a37c1a671",
"type": "github"
},
"original": {
"owner": "NixOS",
"ref": "nixos-25.11",
"repo": "nixpkgs",
"type": "github"
}
},
"root": {
"inputs": {
"nixpkgs": "nixpkgs"
}
}
},
"root": "root",
"version": 7
}

15
flake.nix Normal file
View File

@@ -0,0 +1,15 @@
{
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-25.11";
};
outputs = { self, nixpkgs }:
let
system = "x86_64-linux";
pkgs = import nixpkgs {
inherit system;
};
in {
packages.${system}.sable = pkgs.callPackage ./pkgs/sable.nix {};
};
}

62
pkgs/sable.nix Normal file
View File

@@ -0,0 +1,62 @@
{
lib,
buildNpmPackage,
pnpm_10,
fetchPnpmDeps,
pnpmConfigHook,
nodejs_24,
fetchFromGitHub,
}:
buildNpmPackage (finalAttrs:
let
pnpm = pnpm_10.override {
nodejs = nodejs_24;
};
in {
pname = "sable-unwrapped";
version = "1.14.0";
src = fetchFromGitHub {
owner = "SableClient";
repo = "Sable";
tag = "v${finalAttrs.version}";
hash = "sha256-zoGKs0pm9m42JrTNAdU33LP139JlVz3RZnkTyY0aiqY=";
};
nodejs = nodejs_24;
nativeBuildInputs = [ pnpm ];
npmConfigHook = pnpmConfigHook;
npmDeps = finalAttrs.pnpmDeps;
pnpmDeps = fetchPnpmDeps {
inherit (finalAttrs) pname version src;
inherit pnpm;
fetcherVersion = 3;
hash = "sha256-2GwUz0jsuVKQZyeidM0F4rDzijm9AFcAxN7x/m/b3Is=";
};
# Skip rebuilding native modules since they're not needed for the web app
npmInstallFlags = [
"--ignore-scripts"
];
installPhase = ''
runHook preInstall
cp -r dist $out
runHook postInstall
'';
meta = {
description = "An almost stable Matrix client";
homepage = "https://app.sable.moe/";
maintainers = with lib.maintainers; [
wymillerlinux
];
license = lib.licenses.agpl3Only;
platforms = lib.platforms.all;
};
})