This commit is contained in:
muon 2026-03-28 16:16:08 +00:00
parent 0e00821e0e
commit b2a14d5468
5 changed files with 158 additions and 0 deletions

View file

@ -1,4 +1,25 @@
{ {
"dcts-client-shipping": {
"cargoLock": null,
"date": null,
"extract": null,
"name": "dcts-client-shipping",
"passthru": null,
"pinned": false,
"src": {
"deepClone": false,
"fetchSubmodules": false,
"leaveDotGit": false,
"name": null,
"owner": "hackthedev",
"repo": "dcts-client-shipping",
"rev": "v2.5",
"sha256": "sha256-fmU/rUIyHV/+GSgDuot3mDaZrYmxfhF3RXSAwE6HqPU=",
"sparseCheckout": [],
"type": "github"
},
"version": "v2.5"
},
"mender-cli": { "mender-cli": {
"cargoLock": null, "cargoLock": null,
"date": null, "date": null,

View file

@ -6,6 +6,17 @@
dockerTools, dockerTools,
}: }:
{ {
dcts-client-shipping = {
pname = "dcts-client-shipping";
version = "v2.5";
src = fetchFromGitHub {
owner = "hackthedev";
repo = "dcts-client-shipping";
rev = "v2.5";
fetchSubmodules = false;
sha256 = "sha256-fmU/rUIyHV/+GSgDuot3mDaZrYmxfhF3RXSAwE6HqPU=";
};
};
mender-cli = { mender-cli = {
pname = "mender-cli"; pname = "mender-cli";
version = "2.0.0"; version = "2.0.0";

View file

@ -13,6 +13,7 @@
# inherit (pkgs) system; # inherit (pkgs) system;
# config = pkgs.config; # config = pkgs.config;
# }).freetube; # }).freetube;
dcts-client-shipping = pkgs.callPackage ../../../pkgs/dcts-client-shipping/package.nix { inherit sources; };
in { in {
options.mods.social.enable = options.mods.social.enable =
lib.mkEnableOption "enables social media clients"; lib.mkEnableOption "enables social media clients";
@ -26,6 +27,7 @@ in {
# vesktop-nogain # vesktop-nogain
# (callPackage ./packages/librediscord.nix {}) # (callPackage ./packages/librediscord.nix {})
jami jami
dcts-client-shipping
# Video # Video
# freetube-custom # freetube-custom

View file

@ -161,3 +161,7 @@ fetch.tarball = "https://thunderstore.io/package/download/BentoG/MissingPieces/$
src.github = "mendersoftware/mender-cli" src.github = "mendersoftware/mender-cli"
fetch.github = "mendersoftware/mender-cli" fetch.github = "mendersoftware/mender-cli"
["dcts-client-shipping"]
src.github = "hackthedev/dcts-client-shipping"
fetch.github = "hackthedev/dcts-client-shipping"

View file

@ -0,0 +1,120 @@
{
lib,
stdenv,
stdenvNoCC,
bun,
electron,
fetchFromGitHub,
makeWrapper,
makeBinaryWrapper,
makeDesktopItem,
copyDesktopItems,
sources,
writableTmpDirAsHomeHook,
}:
stdenvNoCC.mkDerivation (finalAttrs: {
pname = "dcts-client-shipping";
version = sources.dcts-client-shipping.version;
src = sources.dcts-client-shipping.src;
node_modules = stdenvNoCC.mkDerivation {
pname = "${finalAttrs.pname}-node_modules";
inherit (finalAttrs) version src;
impureEnvVars = lib.fetchers.proxyImpureEnvVars ++ [
"GIT_PROXY_COMMAND"
"SOCKS_SERVER"
];
nativeBuildInputs = [
bun
writableTmpDirAsHomeHook
];
dontConfigure = true;
buildPhase = ''
runHook preBuild
cd electron
bun install \
--cpu="*" \
--frozen-lockfile \
--ignore-scripts \
--no-progress \
--os="*"
runHook postBuild
'';
installPhase = ''
runHook preInstall
mkdir -p $out/electron
cp -R node_modules $out/electron/
runHook postInstall
'';
# NOTE: Required else we get errors that our fixed-output derivation references store paths
dontFixup = true;
outputHash = "sha256-TwfxQeK1KkKY1n/735sTxcAQfR5hUrONJcWeIaM47SE=";
outputHashAlgo = "sha256";
outputHashMode = "recursive";
};
nativeBuildInputs = [
bun
makeBinaryWrapper
copyDesktopItems
writableTmpDirAsHomeHook
];
desktopItems = [
(makeDesktopItem {
name = "dcts";
desktopName = "DCTS";
comment = "DCTS Desktop Client - Secure messaging";
exec = "dcts";
icon = "dcts";
categories = [ "Network" "InstantMessaging" ];
})
];
buildPhase = ''
runHook preBuild
# Copy node_modules from the separate derivation
cp -R ${finalAttrs.node_modules}/electron/node_modules electron/
runHook postBuild
'';
installPhase = ''
runHook preInstall
mkdir -p $out/lib/dcts
cp -R electron/* $out/lib/dcts/
# Create wrapper script
makeWrapper ${electron}/bin/electron $out/bin/dcts \
--add-flags $out/lib/dcts \
--set ELECTRON_OVERRIDE_DIST_PATH ${electron}/bin/
# Install icon
install -Dm644 electron/icon.png $out/share/icons/hicolor/256x256/apps/dcts.png
runHook postInstall
'';
meta = {
description = "DCTS Desktop Client - Electron app for secure messaging";
homepage = "https://github.com/hackthedev/dcts-client-shipping";
license = lib.licenses.isc;
maintainers = [ ];
platforms = lib.platforms.linux;
mainProgram = "dcts";
};
})