push sheeet
Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s

This commit is contained in:
Dark Steveneq
2025-10-09 14:15:47 +02:00
commit 646b892680
49168 changed files with 5897842 additions and 0 deletions

View File

@@ -0,0 +1,47 @@
{
lib,
rustPlatform,
fetchFromGitHub,
installShellFiles,
nasm,
}:
rustPlatform.buildRustPackage rec {
pname = "sic-image-cli";
version = "0.22.4";
src = fetchFromGitHub {
owner = "foresterre";
repo = "sic";
rev = "v${version}";
hash = "sha256-PFbHHO3m4mnV5s8DVev/iao9sC3FYht0whTHYzO25Yo=";
};
cargoHash = "sha256-HL/KCC8Y42OFL1LXoewmH1Bxp6FICuDjkTnK5DE94Ms=";
nativeBuildInputs = [
installShellFiles
nasm
];
postBuild = ''
cargo run --example gen_completions
'';
postInstall = ''
installShellCompletion sic.{bash,fish}
installShellCompletion --zsh _sic
'';
meta = {
description = "Accessible image processing and conversion from the terminal";
homepage = "https://github.com/foresterre/sic";
changelog = "https://github.com/foresterre/sic/blob/v${version}/CHANGELOG.md";
license = with lib.licenses; [
asl20 # or
mit
];
maintainers = with lib.maintainers; [ figsoda ];
mainProgram = "sic";
};
}

View File

@@ -0,0 +1,27 @@
{
lib,
stdenv,
fetchurl,
}:
stdenv.mkDerivation rec {
pname = "sic";
version = "1.3";
src = fetchurl {
url = "https://dl.suckless.org/tools/sic-${version}.tar.gz";
hash = "sha256-MEePqz68dfLrXQjLtbL+3K9IkRbnWi3XGX4+nHM9ZdI=";
};
makeFlags = [ "CC:=$(CC)" ];
installFlags = [ "PREFIX=$(out)" ];
meta = {
description = "Simple IRC client";
mainProgram = "sic";
homepage = "https://tools.suckless.org/sic/";
license = lib.licenses.mit;
platforms = lib.platforms.unix;
};
}

View File

@@ -0,0 +1,57 @@
{
lib,
stdenv,
fetchFromGitHub,
python3,
makeWrapper,
libarchive,
}:
let
pythonEnv = python3.withPackages (
ps: with ps; [
cheetah3
lxml
]
);
in
stdenv.mkDerivation rec {
pname = "sickgear";
version = "3.33.2";
src = fetchFromGitHub {
owner = "SickGear";
repo = "SickGear";
rev = "release_${version}";
hash = "sha256-8cynBaVbFDI1hNwP03crkOf8Av+NCWr0xJLsZJpHLGs=";
};
patches = [
./patches/override-python-version-check.patch
];
dontBuild = true;
doCheck = false;
nativeBuildInputs = [ makeWrapper ];
buildInputs = [
pythonEnv
libarchive
];
installPhase = ''
mkdir -p $out/bin $out/opt/sickgear
cp -R {autoProcessTV,gui,lib,sickgear,sickgear.py} $out/opt/sickgear/
makeWrapper $out/opt/sickgear/sickgear.py $out/bin/sickgear \
--suffix PATH : ${lib.makeBinPath [ libarchive ]}
'';
meta = with lib; {
description = "Most reliable stable TV fork of the great Sick-Beard to fully automate TV enjoyment with innovation";
mainProgram = "sickgear";
license = licenses.gpl3;
homepage = "https://github.com/SickGear/SickGear";
maintainers = with lib.maintainers; [ rembo10 ];
};
}

View File

@@ -0,0 +1,16 @@
diff --git a/sickgear.py b/sickgear.py
index c37e2b01..d69704a3 100755
--- a/sickgear.py
+++ b/sickgear.py
@@ -41,10 +41,7 @@ versions = [((3, 8, 0), (3, 8, 16)),
((3, 10, 0), (3, 11, 3))] # inclusive version ranges
if not any(list(map(lambda v: v[0] <= sys.version_info[:3] <= v[1], versions))) and not int(os.environ.get('PYT', 0)):
major, minor, micro = sys.version_info[:3]
- print('Python %s.%s.%s detected.' % (major, minor, micro))
- print('Sorry, SickGear requires a Python version %s' % ', '.join(map(
- lambda r: '%s - %s' % tuple(map(lambda v: str(v).replace(',', '.')[1:-1], r)), versions)))
- sys.exit(1)
+ pass
sys.path.insert(1, os.path.abspath(os.path.join(os.path.dirname(__file__), 'lib')))
is_win = 'win' == sys.platform[0:3]

View File

@@ -0,0 +1,54 @@
{
lib,
stdenv,
installShellFiles,
buildGoModule,
fetchFromGitHub,
versionCheckHook,
}:
buildGoModule rec {
pname = "sidekick";
version = "0.6.6";
src = fetchFromGitHub {
owner = "MightyMoud";
repo = "sidekick";
rev = "v${version}";
hash = "sha256-Y/dQRix/cxV3NGqTGtRP6Bcprj0jzzOpudgm9a1UMLc=";
};
nativeBuildInputs = [ installShellFiles ];
doInstallCheck = true;
doCheck = true;
vendorHash = "sha256-35MThhVqCcIFH2oQNw6n73JqNVr2T6mXaIJMK9LiXq8=";
ldflags = [
"-s"
"-w"
"-X github.com/mightymoud/sidekick/cmd.version=${version}"
];
postInstall = lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) ''
installShellCompletion --cmd sidekick \
--bash <($out/bin/sidekick completion bash) \
--fish <($out/bin/sidekick completion fish) \
--zsh <($out/bin/sidekick completion zsh)
'';
nativeInstallCheckInputs = [
versionCheckHook
];
versionCheckProgramArg = "--version";
meta = {
description = "Command-line tool designed to simplify the process of deploying and managing applications on a VPS";
mainProgram = "sidekick";
homepage = "https://github.com/MightyMoud/sidekick";
license = lib.licenses.gpl3Only;
maintainers = with lib.maintainers; [ nipeharefa ];
};
}

View File

@@ -0,0 +1,148 @@
{
lib,
stdenv,
fetchurl,
buildFHSEnv,
copyDesktopItems,
makeDesktopItem,
makeWrapper,
alsa-lib,
at-spi2-atk,
cairo,
cups,
dbus,
expat,
gdk-pixbuf,
glib,
gtk3,
libgbm,
libGL,
nss,
nspr,
libdrm,
xorg,
libxkbcommon,
libxshmfence,
pango,
systemd,
icu,
openssl,
zlib,
bintools,
}:
let
pname = "sidequest";
version = "0.10.42";
sidequest = stdenv.mkDerivation {
inherit pname version;
src = fetchurl {
url = "https://github.com/SideQuestVR/SideQuest/releases/download/v${version}/SideQuest-${version}.tar.xz";
hash = "sha256-YZp7OAjUOXepVv5dPhh9Q2HicUKjSOGfhrWyMKy2gME=";
};
nativeBuildInputs = [
copyDesktopItems
makeWrapper
];
desktopItems = [
(makeDesktopItem {
name = "sidequest";
exec = "sidequest";
icon = "sidequest";
desktopName = "SideQuest";
genericName = "VR App Store";
categories = [
"Settings"
"PackageManager"
];
})
];
installPhase = ''
runHook preInstall
mkdir -p "$out/libexec" "$out/bin"
cp --recursive . "$out/libexec/sidequest"
ln -s "$out/libexec/sidequest/sidequest" "$out/bin/sidequest"
for size in 16 24 32 48 64 128 256 512 1024; do
install -D --mode=0644 resources/app.asar.unpacked/build/icons/''${size}x''${size}.png $out/share/icons/hicolor/''${size}x''${size}/apps/sidequest.png
done
runHook postInstall
'';
postFixup = ''
patchelf \
--set-interpreter "${bintools.dynamicLinker}" \
--set-rpath "${
lib.makeLibraryPath [
alsa-lib
at-spi2-atk
cairo
cups
dbus
expat
gdk-pixbuf
glib
gtk3
libgbm
libGL
nss
nspr
libdrm
xorg.libX11
xorg.libxcb
xorg.libXcomposite
xorg.libXdamage
xorg.libXext
xorg.libXfixes
xorg.libXrandr
xorg.libxshmfence
libxkbcommon
xorg.libxkbfile
pango
(lib.getLib stdenv.cc.cc)
systemd
]
}:$out/libexec/sidequest" \
--add-needed libGL.so.1 \
"$out/libexec/sidequest/sidequest"
'';
};
in
buildFHSEnv {
inherit pname version;
targetPkgs = pkgs: [
sidequest
# Needed in the environment on runtime, to make QuestSaberPatch work
icu
openssl
zlib
libxkbcommon
libxshmfence
];
extraInstallCommands = ''
ln -s ${sidequest}/share "$out/share"
'';
runScript = "sidequest";
meta = {
description = "Open app store and side-loading tool for Android-based VR devices such as the Oculus Go, Oculus Quest or Moverio BT 300";
homepage = "https://github.com/SideQuestVR/SideQuest";
downloadPage = "https://github.com/SideQuestVR/SideQuest/releases";
sourceProvenance = with lib.sourceTypes; [ binaryNativeCode ];
license = lib.licenses.mit;
maintainers = with lib.maintainers; [
joepie91
rvolosatovs
];
platforms = [ "x86_64-linux" ];
mainProgram = "SideQuest";
};
}

View File

@@ -0,0 +1,7 @@
{
"permission_handler": "sha256-b2igh231BkLe/vkCACVyWg8SxR5V6wjmhPljEs9Ue3o=",
"permission_handler_windows": "sha256-b2igh231BkLe/vkCACVyWg8SxR5V6wjmhPljEs9Ue3o=",
"sideswap_logger": "sha256-cTJfSODRmIJXctLQ++BfvJ6OKflau94AjQdXg7j95B0=",
"sideswap_websocket": "sha256-vsG5eUFu/WJvY3y6jaWD/5GfULwpqh3bO4EZmmBSkbs=",
"window_size": "sha256-+lqY46ZURT0qcqPvHFXUnd83Uvfq79Xr+rw1AHqrpak="
}

View File

@@ -0,0 +1,56 @@
{
lib,
rustPlatform,
fetchFromGitHub,
pkg-config,
systemd,
protobuf,
}:
rustPlatform.buildRustPackage (finalAttrs: {
pname = "libsideswap-client";
version = "0-unstable-2025-06-24";
# This version is pinned in https://github.com/sideswap-io/sideswapclient/blob/v1.8.0/deploy/build_linux.sh
src = fetchFromGitHub {
owner = "sideswap-io";
repo = "sideswap_rust";
rev = "91791efbceb3fac4774d1e42a519e70b14b876cf";
hash = "sha256-SUAmmKnL/thGLfPU22UxzO+LVXgrHh+lZVdXuAJ4q1E=";
};
cargoHash = "sha256-bbNFi0cmFFf66IDKi0V8HC/lSU3JLRpgZ+NHeMJog8c=";
# sideswap_client uses vergen to detect Git commit hash at build time. It
# tries to access .git directory which is not present in Nix build dir.
# Here we patch that place to use a hardcoded commit hash instead.
postPatch = ''
substituteInPlace sideswap_client/src/ffi.rs \
--replace-fail 'env!("VERGEN_GIT_SHA");' '"${finalAttrs.src.rev}";'
substituteInPlace sideswap_client/build.rs \
--replace-fail 'vergen::vergen(vergen::Config::default()).unwrap();' ' '
'';
# This is needed for pkg-config to find libudev. It is a part of systemd.
nativeBuildInputs = [
pkg-config
protobuf
];
buildInputs = [ systemd ];
cargoBuildFlags = [
"--package"
"sideswap_client"
];
# Test gdk_registry_cache::tests::basic hangs in Nix build invironment.
doCheck = false;
meta = {
description = "Rust library for Sideswap";
license = lib.licenses.mit;
platforms = lib.platforms.linux;
maintainers = with lib.maintainers; [ starius ];
};
})

View File

@@ -0,0 +1,115 @@
{
lib,
fetchFromGitHub,
flutter332,
callPackage,
makeDesktopItem,
copyDesktopItems,
# Needed for update script.
_experimental-update-script-combinators,
gitUpdater,
runCommand,
sideswap,
yq,
}:
let
# The Rust library is used by the main application.
libsideswap-client = callPackage ./libsideswap-client.nix { };
in
flutter332.buildFlutterApplication rec {
pname = "sideswap";
version = "1.8.2";
src = fetchFromGitHub {
owner = "sideswap-io";
repo = "sideswapclient";
tag = "v${version}";
hash = "sha256-+zaQJCMKQZOrZ7i6CzgGTa+rJqpglaufUvYWSWMWTEw=";
};
pubspecLock = lib.importJSON ./pubspec.lock.json;
gitHashes = lib.importJSON ./gitHashes.json;
# Provide OpenGL and libsideswap_client.so for the Flutter application.
extraWrapProgramArgs = ''
--prefix LD_LIBRARY_PATH : ${
lib.makeLibraryPath [
libsideswap-client
]
}
'';
# Install icons.
postInstall = ''
install -D -m644 assets/icon/icon_linux.svg $out/share/icons/hicolor/scalable/apps/sideswap.svg
install -D -m644 assets/icon/icon_linux.png $out/share/icons/hicolor/256x256/apps/sideswap.png
'';
# Install .desktop file.
desktopItems = [
(makeDesktopItem {
name = "sideswap";
exec = meta.mainProgram;
desktopName = "SideSwap";
genericName = "L-USDT Wallet";
icon = "sideswap";
comment = meta.description;
categories = [
"Finance"
"Network"
];
startupNotify = true;
startupWMClass = "Sideswap";
terminal = false;
})
];
nativeBuildInputs = [
copyDesktopItems
];
passthru = {
# Expose lib to access it via sideswap.lib from the update script.
lib = libsideswap-client;
pubspecSource =
runCommand "pubspec.lock.json"
{
nativeBuildInputs = [ yq ];
inherit (sideswap) src;
}
''
cat $src/pubspec.lock | yq > $out
'';
# Usage: nix-shell maintainers/scripts/update.nix --argstr package sideswap
updateScript = _experimental-update-script-combinators.sequence [
# Update sideswap to new release.
(gitUpdater { rev-prefix = "v"; })
# Update pubspec.lock.json file and related gitHashes attribute.
(_experimental-update-script-combinators.copyAttrOutputToFile "sideswap.pubspecSource" ./pubspec.lock.json)
{
command = [ ./update-gitHashes.py ];
supportedFeatures = [ "silent" ];
}
# Update libsideswap-client sub-package.
{
command = [ ./update-libsideswap-client.sh ];
supportedFeatures = [ "silent" ];
}
];
};
meta = {
description = "Crossplatform, noncustodial wallet and atomic swap marketplace for the Liquid Network";
homepage = "https://sideswap.io/";
license = lib.licenses.gpl3Only;
mainProgram = "sideswap";
platforms = lib.platforms.linux;
maintainers = with lib.maintainers; [ starius ];
};
}

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,51 @@
#! /usr/bin/env nix-shell
#! nix-shell -i python3 -p python3 nix-prefetch-git
import json
import subprocess
import sys
from pathlib import Path
THIS_FOLDER = Path(__file__).parent.resolve()
PUBSPEC_LOCK = THIS_FOLDER / "pubspec.lock.json"
GIT_HASHES = THIS_FOLDER / "gitHashes.json"
def fetch_git_hash(url: str, rev: str) -> str:
result = subprocess.run(
["nix-prefetch-git", "--url", url, "--rev", rev],
capture_output=True,
text=True,
check=True,
)
return json.loads(result.stdout)["hash"]
def main() -> None:
if not PUBSPEC_LOCK.exists():
sys.exit(1)
try:
data = json.loads(PUBSPEC_LOCK.read_text())
except json.JSONDecodeError:
sys.exit(1)
output: dict[str, str] = {}
for name, info in data.get("packages", {}).items():
if info.get("source") != "git":
continue
desc = info.get("description")
if not isinstance(desc, dict):
continue
url = desc.get("url")
rev = desc.get("resolved-ref")
if not (isinstance(url, str) and isinstance(rev, str)):
continue
try:
package_hash = fetch_git_hash(url, rev)
except subprocess.CalledProcessError:
continue
output[name] = package_hash
GIT_HASHES.write_text(json.dumps(output, indent=2) + "\n")
if __name__ == "__main__":
main()

View File

@@ -0,0 +1,26 @@
#!/usr/bin/env nix-shell
#!nix-shell -i bash -p nix-update gnugrep gnused curl
set -eu -o pipefail
mainfile="$(nix-instantiate --eval -E "with import ./. {}; (builtins.unsafeGetAttrPos \"version\" sideswap).file" | tr -d '"')"
libfile="$(dirname -- "$mainfile")/libsideswap-client.nix"
mainversion="$(nix-instantiate --eval -E "with import ./. {}; sideswap.version" | tr -d '"')"
# Update the comment in libsideswap-client.nix.
sed -i "s@sideswapclient/blob/v[^\/]+/deploy@sideswapclient/blob/v${mainversion}/deploy@" $libfile
# Find libsideswap_client commit used in sideswap/deploy/build_linux.sh.
libversion=$(curl --show-error --silent ${GITHUB_TOKEN:+-u ":${GITHUB_TOKEN}"} "https://raw.githubusercontent.com/sideswap-io/sideswapclient/refs/tags/v${mainversion}/deploy/build_linux.sh" | grep -A 1 'pushd sideswap_rust' | grep 'git checkout' | sed 's/git checkout //')
# Update revision of the lib.
sed -i "/rev =/s/[0-9a-f]\{40\}/${libversion}/" $libfile
# Find the date of the commit to use as 0-unstable-YYYY-MM-DD version of the lib.
libdate=$(curl --show-error --silent "https://github.com/sideswap-io/sideswap_rust/commit/${libversion}.patch" | grep '^Date: ' | head -1)
libunstableversion=$(date -d "${libdate#Date: }" +"%Y-%m-%d")
sed -i "/version =/s/0-unstable-....-..-../0-unstable-${libunstableversion}/" $libfile
# Update hash and cargoHash of the lib. Send output to /dev/null not to break "update.nix" which expects JSON here.
nix-update sideswap.lib --version=skip > /dev/null

View File

@@ -0,0 +1,72 @@
{
stdenv,
lib,
fetchFromGitHub,
gitUpdater,
alsaSupport ? stdenv.hostPlatform.isLinux,
alsa-lib,
autoreconfHook,
pulseSupport ? stdenv.hostPlatform.isLinux,
libpulseaudio,
libsidplayfp,
out123Support ? stdenv.hostPlatform.isDarwin,
mpg123,
perl,
pkg-config,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "sidplayfp";
version = "2.15.1";
src = fetchFromGitHub {
owner = "libsidplayfp";
repo = "sidplayfp";
rev = "v${finalAttrs.version}";
hash = "sha256-IUyXkHs8QfWhuTVYrPbmMU/mhfGwGminypLmGYimcLg=";
};
strictDeps = true;
nativeBuildInputs = [
autoreconfHook
perl
pkg-config
];
buildInputs = [
libsidplayfp
]
++ lib.optionals alsaSupport [
alsa-lib
]
++ lib.optionals pulseSupport [
libpulseaudio
]
++ lib.optionals out123Support [
mpg123
];
configureFlags = [
(lib.strings.withFeature out123Support "out123")
];
enableParallelBuilding = true;
passthru = {
updateScript = gitUpdater { rev-prefix = "v"; };
};
meta = {
description = "SID player using libsidplayfp";
homepage = "https://github.com/libsidplayfp/sidplayfp";
changelog = "https://github.com/libsidplayfp/sidplayfp/releases/tag/v${finalAttrs.version}";
license = with lib.licenses; [ gpl2Plus ];
mainProgram = "sidplayfp";
maintainers = with lib.maintainers; [
dezgeg
OPNA2608
];
platforms = lib.platforms.all;
};
})

View File

@@ -0,0 +1,44 @@
{
lib,
stdenv,
fetchurl,
openssl,
zlib,
}:
stdenv.mkDerivation rec {
pname = "siege";
version = "4.1.7";
src = fetchurl {
url = "http://download.joedog.org/siege/${pname}-${version}.tar.gz";
hash = "sha256-7BQM7dFZl5OD1g2+h6AVHCwSraeHkQlaj6hK5jW5MCY=";
};
NIX_LDFLAGS = lib.optionalString stdenv.hostPlatform.isLinux [
"-lgcc_s"
];
buildInputs = [
openssl
zlib
];
prePatch = ''
sed -i -e 's/u_int32_t/uint32_t/g' -e '1i#include <stdint.h>' src/hash.c
'';
configureFlags = [
"--with-ssl=${openssl.dev}"
"--with-zlib=${zlib.dev}"
];
meta = {
description = "HTTP load tester";
homepage = "https://www.joedog.org/siege-home/";
changelog = "https://github.com/JoeDog/siege/blob/v${version}/ChangeLog";
license = lib.licenses.gpl2Plus;
maintainers = with lib.maintainers; [ raskin ];
platforms = lib.platforms.unix;
};
}

View File

@@ -0,0 +1,64 @@
{
lib,
stdenv,
fetchurl,
love,
makeWrapper,
makeDesktopItem,
copyDesktopItems,
}:
stdenv.mkDerivation rec {
pname = "sienna";
version = "1.0d";
src = fetchurl {
url = "https://github.com/SimonLarsen/${pname}/releases/download/v${version}/${pname}-${version}.love";
sha256 = "sha256-1bFjhN7jL/PMYMJH1ete6uyHTYsTGgoP60sf/sJTLlU=";
};
icon = fetchurl {
url = "http://tangramgames.dk/img/thumb/sienna.png";
sha256 = "12q2rhk39dmb6ir50zafn8dylaad5gns8z3y21mfjabc5l5g02nn";
};
desktopItems = [
(makeDesktopItem {
name = "sienna";
exec = pname;
icon = icon;
comment = "Fast-paced one button platformer";
desktopName = "Sienna";
genericName = "sienna";
categories = [ "Game" ];
})
];
nativeBuildInputs = [
makeWrapper
copyDesktopItems
];
dontUnpack = true;
installPhase = ''
runHook preInstall
mkdir -p $out/bin
mkdir -p $out/share/games/lovegames
cp -v $src $out/share/games/lovegames/${pname}.love
makeWrapper ${love}/bin/love $out/bin/${pname} --add-flags $out/share/games/lovegames/${pname}.love
runHook postInstall
'';
meta = with lib; {
description = "Fast-paced one button platformer";
mainProgram = "sienna";
homepage = "https://tangramgames.dk/games/sienna";
maintainers = with maintainers; [ leenaars ];
platforms = platforms.linux;
license = licenses.free;
};
}

View File

@@ -0,0 +1,85 @@
{
lib,
stdenv,
fetchFromGitHub,
gdk-pixbuf,
gtk-engine-murrine,
jdupes,
librsvg,
libxml2,
buttonVariants ? [ ], # default to all
colorVariants ? [ ], # default to all
opacityVariants ? [ ], # default to all
sizeVariants ? [ ], # default to all
}:
let
pname = "sierra-gtk-theme";
in
lib.checkListOfEnum "${pname}: button variants" [ "standard" "alt" ] buttonVariants
lib.checkListOfEnum
"${pname}: color variants"
[ "light" "dark" ]
colorVariants
lib.checkListOfEnum
"${pname}: opacity variants"
[ "standard" "solid" ]
opacityVariants
lib.checkListOfEnum
"${pname}: size variants"
[ "standard" "compact" ]
sizeVariants
stdenv.mkDerivation
{
inherit pname;
version = "unstable-2021-05-24";
src = fetchFromGitHub {
owner = "vinceliuice";
repo = "sierra-gtk-theme";
rev = "05899001c4fc2fec87c4d222cb3997c414e0affd";
sha256 = "174l5mryc34ma1r42pk6572c6i9hmzr9vj1a6w06nqz5qcfm1hds";
};
nativeBuildInputs = [
jdupes
libxml2
];
buildInputs = [
gdk-pixbuf
librsvg
];
propagatedUserEnvPkgs = [
gtk-engine-murrine
];
installPhase = ''
runHook preInstall
patchShebangs install.sh
mkdir -p $out/share/themes
name= ./install.sh --dest $out/share/themes \
${lib.optionalString (buttonVariants != [ ]) "--alt " + toString buttonVariants} \
${lib.optionalString (colorVariants != [ ]) "--color " + toString colorVariants} \
${lib.optionalString (opacityVariants != [ ]) "--opacity " + toString opacityVariants} \
${lib.optionalString (sizeVariants != [ ]) "--flat " + toString sizeVariants}
# Replace duplicate files with hardlinks to the first file in each
# set of duplicates, reducing the installed size in about 79%
jdupes -L -r $out/share
runHook postInstall
'';
meta = with lib; {
description = "Mac OSX like theme for GTK based desktop environments";
homepage = "https://github.com/vinceliuice/Sierra-gtk-theme";
license = licenses.gpl3;
platforms = platforms.unix;
maintainers = [ maintainers.romildo ];
};
}

View File

@@ -0,0 +1,75 @@
{
lib,
stdenv,
fetchFromGitHub,
makeWrapper,
perlPackages,
installShellFiles,
}:
stdenv.mkDerivation rec {
pname = "sieve-connect";
version = "0.90";
src = fetchFromGitHub {
owner = "philpennock";
repo = "sieve-connect";
rev = "v${version}";
sha256 = "1ghvfa5ifa68b6imh85bkmy00r93c5f9hs6d039axb73gmma580p";
};
buildInputs = [ perlPackages.perl ];
nativeBuildInputs = [
makeWrapper
installShellFiles
];
preBuild = ''
# Fixes failing build when not building in git repo
mkdir .git
touch .git/HEAD
echo "${version}" > versionfile
echo "$(date +%Y-%m-%d)" > datefile
'';
buildFlags = [
"PERL5LIB=${perlPackages.makePerlPath [ perlPackages.FileSlurp ]}"
"bin"
"man"
];
installPhase = ''
mkdir -p $out/bin
install -m 755 sieve-connect $out/bin
installManPage sieve-connect.1
wrapProgram $out/bin/sieve-connect \
--prefix PERL5LIB : "${
with perlPackages;
makePerlPath [
AuthenSASL
Socket6
IOSocketINET6
IOSocketSSL
NetSSLeay
NetDNS
TermReadKey
TermReadLineGnu
]
}"
'';
meta = with lib; {
description = "Client for the MANAGESIEVE Protocol";
longDescription = ''
This is sieve-connect. A client for the ManageSieve protocol,
as specifed in RFC 5804. Historically, this was MANAGESIEVE as
implemented by timsieved in Cyrus IMAP.
'';
homepage = "https://github.com/philpennock/sieve-connect";
license = licenses.bsd3;
platforms = platforms.unix;
maintainers = with maintainers; [ das_j ];
mainProgram = "sieve-connect";
};
}

View File

@@ -0,0 +1,105 @@
{
lib,
stdenv,
buildNpmPackage,
fetchFromGitHub,
electron,
makeDesktopItem,
copyDesktopItems,
runCommand,
zip,
}:
let
electronArch = if stdenv.hostPlatform.isAarch64 then "arm64" else "x64";
electronZip =
runCommand "electronZip"
{
nativeBuildInputs = [ zip ];
}
''
mkdir $out
cp -r ${electron.dist} electron-dist
chmod -R u+w electron-dist
cd electron-dist
zip -0Xqr $out/electron-v${electron.version}-darwin-${electronArch}.zip .
'';
in
buildNpmPackage {
pname = "sieve-editor-gui";
version = "0.6.1-unstable-2025-03-12";
src = fetchFromGitHub {
owner = "thsmi";
repo = "sieve";
rev = "4bcefba15314177521a45a833e53969b50f4351e";
hash = "sha256-jR3+YaVQ+Yd2Xm40SzQNvwWMPe0mJ6bhT96hlUz3/qU=";
};
npmDepsHash = "sha256-w2i7XsTx3hlsh/JbvShaxvDyFGcBpL66lMy7KL2tnzM=";
nativeBuildInputs = lib.optionals stdenv.hostPlatform.isLinux [ copyDesktopItems ];
npmBuildScript = "gulp";
npmBuildFlags = [ "app:package" ];
installPhase = ''
runHook preInstall
''
+ lib.optionalString stdenv.hostPlatform.isLinux ''
mv build/ $out
install -D $out/electron/resources/libs/icons/linux.png $out/share/icons/hicolor/64x64/apps/sieve.png
makeWrapper ${lib.getExe electron} $out/bin/sieve-editor-gui \
--add-flags "\''${NIXOS_OZONE_WL:+\''${WAYLAND_DISPLAY:+--ozone-platform=wayland --enable-features=WaylandWindowDecorations --enable-wayland-ime=true}}" \
--add-flags $out/electron/resources/main_esm.js
''
+ lib.optionalString stdenv.hostPlatform.isDarwin ''
npx electron-packager ./build/electron/resources \
--electron-zip-dir ${electronZip} \
--electron-version ${electron.version} \
--icon src/common/icons/mac.icns
mkdir -p $out/Applications
cp -r sieve-darwin-*/sieve.app $out/Applications/
makeWrapper $out/Applications/sieve.app/Contents/MacOS/Sieve $out/bin/sieve-editor-gui
''
+ ''
runHook postInstall
'';
env = {
ELECTRON_SKIP_BINARY_DOWNLOAD = 1;
};
desktopItems = [
(makeDesktopItem {
name = "sieve-editor-gui";
exec = "sieve-editor-gui";
desktopName = "Sieve Editor";
icon = "sieve";
categories = [
"Utility"
"Email"
];
comment = "Tool to Manage Sieve Message Filters";
})
];
meta = {
description = "Activate, edit, delete and add Sieve scripts with a convenient interface";
homepage = "https://github.com/thsmi/sieve";
license = lib.licenses.agpl3Only;
maintainers = with lib.maintainers; [
Silver-Golden
fugi
];
mainProgram = "sieve-editor-gui";
inherit (electron.meta) platforms;
};
}

View File

@@ -0,0 +1,48 @@
{
lib,
buildGoModule,
fetchFromGitHub,
fetchpatch,
installShellFiles,
}:
buildGoModule rec {
pname = "sift";
version = "0.9.0";
src = fetchFromGitHub {
owner = "svent";
repo = "sift";
rev = "v${version}";
hash = "sha256-IZ4Hwg5NzdSXtrIDNxtkzquuiHQOmLV1HSx8gpwE/i0=";
};
vendorHash = "sha256-y883la4R4jhsS99/ohgBC9SHggybAq9hreda6quG3IY=";
patches = [
# Add Go Modules support
(fetchpatch {
url = "https://github.com/svent/sift/commit/b56fb3d0fd914c8a6c08b148e15dd8a07c7d8a5a.patch";
hash = "sha256-mFCEpkgQ8XDPRQ3yKDZ5qY9tKGSuHs+RnhMeAlx33Ng=";
})
];
nativeBuildInputs = [ installShellFiles ];
ldflags = [
"-s"
"-w"
];
postInstall = ''
installShellCompletion --cmd sift --bash sift-completion.bash
'';
meta = with lib; {
description = "Fast and powerful alternative to grep";
mainProgram = "sift";
homepage = "https://sift-tool.org";
maintainers = with maintainers; [ viraptor ];
license = licenses.gpl3;
};
}

View File

@@ -0,0 +1,27 @@
{
lib,
fetchFromGitHub,
rustPlatform,
}:
rustPlatform.buildRustPackage rec {
pname = "sig";
version = "0.2.1";
src = fetchFromGitHub {
owner = "ynqa";
repo = "sig";
rev = "v${version}";
hash = "sha256-KxLSZ4/idlDrhRKFUsC3Ko0DcpSzwLWjees1jObC5KQ=";
};
cargoHash = "sha256-nlW9pXgfn/8MjFFXs+HeIiBT9Ew8M1ETtuTZg5Qa4AE=";
meta = {
description = "Interactive grep (for streaming)";
homepage = "https://github.com/ynqa/sig";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ qaidvoid ];
mainProgram = "sig";
};
}

View File

@@ -0,0 +1,63 @@
{
stdenv,
lib,
python3,
fetchPypi,
ffmpeg,
}:
python3.pkgs.buildPythonApplication rec {
pname = "sigal";
version = "2.5";
pyproject = true;
src = fetchPypi {
inherit version pname;
hash = "sha256-IOAQ6lMudYH+Ukx27VKbPNKmQKBaX3j0p750nC5Y1Hg=";
};
nativeBuildInputs = with python3.pkgs; [
setuptools-scm
];
propagatedBuildInputs = with python3.pkgs; [
# install_requires
jinja2
markdown
pillow
pilkit
click
blinker
natsort
# extras_require
brotli
feedgenerator
zopfli
cryptography
];
nativeCheckInputs = [
ffmpeg
]
++ (with python3.pkgs; [
pytestCheckHook
]);
disabledTests = lib.optionals stdenv.hostPlatform.isDarwin [
"test_nonmedia_files"
];
makeWrapperArgs = [
"--prefix PATH : ${lib.makeBinPath [ ffmpeg ]}"
];
meta = with lib; {
description = "Yet another simple static gallery generator";
mainProgram = "sigal";
homepage = "http://sigal.saimon.org/";
license = licenses.mit;
maintainers = with maintainers; [
matthiasbeyer
];
};
}

View File

@@ -0,0 +1,38 @@
{
lib,
rustPlatform,
fetchCrate,
installShellFiles,
testers,
sigi,
}:
rustPlatform.buildRustPackage rec {
pname = "sigi";
version = "3.7.1";
src = fetchCrate {
inherit pname version;
hash = "sha256-Tsrfan7aejP2oy9x9VoTIq0ba0s0tnx1RTlAB0v6eis=";
};
cargoHash = "sha256-SFT0quq5e37tFa07sCFjb8u8scZLjhICBvKdQOR8s14=";
nativeBuildInputs = [ installShellFiles ];
# In case anything goes wrong.
checkFlags = [ "RUST_BACKTRACE=1" ];
postInstall = ''
installManPage sigi.1
'';
passthru.tests.version = testers.testVersion { package = sigi; };
meta = with lib; {
description = "Organizing CLI for people who don't love organizing";
homepage = "https://github.com/sigi-cli/sigi";
license = licenses.gpl2;
maintainers = with maintainers; [ booniepepper ];
mainProgram = "sigi";
};
}

View File

@@ -0,0 +1,90 @@
{
lib,
stdenv,
fetchFromGitHub,
cmake,
pkg-config,
boost,
xercesc,
python3Packages,
qt6,
}:
stdenv.mkDerivation rec {
pname = "sigil";
version = "2.6.2";
src = fetchFromGitHub {
repo = "Sigil";
owner = "Sigil-Ebook";
tag = version;
hash = "sha256-3+ODd0/kkXfAchsErLjy6FDHoyVP9VyxbINKMn3N/PM=";
};
pythonPath = with python3Packages; [ lxml ];
nativeBuildInputs = [
cmake
pkg-config
qt6.wrapQtAppsHook
];
buildInputs = [
boost
xercesc
qt6.qtbase
qt6.qttools
qt6.qtwebengine
qt6.qtsvg
python3Packages.lxml
];
prePatch = ''
sed -i '/^QTLIB_DIR=/ d' src/Resource_Files/bash/sigil-sh_install
'';
installPhase = lib.optionalString stdenv.hostPlatform.isDarwin ''
runHook preInstall
mkdir -p $out/Applications
mv bin/Sigil.app $out/Applications
# https://github.com/NixOS/nixpkgs/issues/186653
chmod -x $out/Applications/Sigil.app/Contents/lib/*.dylib \
$out/Applications/Sigil.app/Contents/polyfills/*.js \
$out/Applications/Sigil.app/Contents/python3lib/*.py \
$out/Applications/Sigil.app/Contents/hunspell_dictionaries/*.{aff,dic}
runHook postInstall
'';
dontWrapQtApps = true;
preFixup = ''
qtWrapperArgs+=(--prefix PYTHONPATH : "$PYTHONPATH")
'';
fixupPhase =
let
sigil =
if stdenv.hostPlatform.isDarwin then
"$out/Applications/Sigil.app/Contents/MacOS/Sigil"
else
"$out/bin/sigil";
in
''
runHook preFixup
wrapQtApp "${sigil}"
runHook postFixup
'';
meta = {
description = "Free, open source, multi-platform ebook (ePub) editor";
homepage = "https://github.com/Sigil-Ebook/Sigil/";
license = lib.licenses.gpl3Plus;
maintainers = with lib.maintainers; [ prince213 ];
platforms = with lib.platforms; linux ++ darwin;
mainProgram = "sigil";
};
}

View File

@@ -0,0 +1,72 @@
{
stdenv,
lib,
fetchFromGitHub,
glib,
meson,
ninja,
wrapGAppsHook3,
desktop-file-utils,
gobject-introspection,
gtk3,
python3,
}:
stdenv.mkDerivation rec {
pname = "siglo";
version = "0.9.9";
src = fetchFromGitHub {
owner = "theironrobin";
repo = "siglo";
rev = "v${version}";
hash = "sha256-4jKsRpzuyHH31LXndC3Ua4TYcI0G0v9qqe0cbvLuCDA=";
};
patches = [
./siglo-no-user-install.patch
];
postPatch = ''
chmod +x build-aux/meson/postinstall.py # patchShebangs requires an executable file
patchShebangs build-aux/meson/postinstall.py
'';
nativeBuildInputs = [
glib
meson
ninja
wrapGAppsHook3
python3.pkgs.wrapPython
python3
desktop-file-utils
gtk3
gobject-introspection
];
buildInputs = [
gtk3
python3.pkgs.gatt
];
pythonPath = with python3.pkgs; [
gatt
pybluez
requests
];
preFixup = ''
buildPythonPath "$out $pythonPath"
gappsWrapperArgs+=(--prefix PYTHONPATH : "$program_PYTHONPATH")
'';
meta = {
description = "GTK app to sync InfiniTime watch with PinePhone";
mainProgram = "siglo";
homepage = "https://github.com/theironrobin/siglo";
changelog = "https://github.com/theironrobin/siglo/tags/v${version}";
license = lib.licenses.mpl20;
maintainers = [ ];
platforms = lib.platforms.linux;
};
}

View File

@@ -0,0 +1,13 @@
diff --git a/data/meson.build b/data/meson.build
index 62a00fe..5319974 100644
--- a/data/meson.build
+++ b/data/meson.build
@@ -18,8 +18,6 @@ install_data(join_paths('icons', 'com.github.alexr4535.siglo.svg'),
install_dir: join_paths(get_option('datadir'), 'icons')
)
-install_data('siglo.service', install_dir: '/etc/systemd/user/')
-
appstream_file = i18n.merge_file(
input: 'com.github.alexr4535.siglo.appdata.xml.in',
output: 'com.github.alexr4535.siglo.appdata.xml',

View File

@@ -0,0 +1,76 @@
{
lib,
fetchFromGitHub,
python3,
}:
python3.pkgs.buildPythonApplication rec {
pname = "sigma-cli";
version = "1.0.6";
pyproject = true;
src = fetchFromGitHub {
owner = "SigmaHQ";
repo = "sigma-cli";
tag = "v${version}";
hash = "sha256-BINKEptzdfEJPJAfPoYWiDXdmVnG7NYVaQar7dz4Ptk=";
};
postPatch = ''
substituteInPlace pyproject.toml \
--replace '= "^' '= ">='
'';
build-system = with python3.pkgs; [ poetry-core ];
dependencies = with python3.pkgs; [
click
colorama
prettytable
pysigma
pysigma-backend-elasticsearch
pysigma-backend-insightidr
pysigma-backend-opensearch
pysigma-backend-qradar
pysigma-backend-splunk
pysigma-backend-loki
pysigma-pipeline-crowdstrike
pysigma-pipeline-sysmon
pysigma-pipeline-windows
];
nativeCheckInputs = with python3.pkgs; [
pytest-cov-stub
pytestCheckHook
];
disabledTests = [
"test_plugin_list"
"test_plugin_list_filtered"
"test_plugin_list_search"
"test_plugin_install_notexisting"
"test_plugin_install"
"test_plugin_uninstall"
"test_backend_option_unknown_by_backend"
# Tests require network access
"test_check_with_issues"
"test_plugin_show_identifier"
"test_plugin_show_nonexisting"
"test_plugin_show_uuid"
# Tests compare STDOUT results
"test_check_valid"
"test_check_stdin"
"test_check_exclude"
];
pythonImportsCheck = [ "sigma.cli" ];
meta = with lib; {
description = "Sigma command line interface";
homepage = "https://github.com/SigmaHQ/sigma-cli";
changelog = "https://github.com/SigmaHQ/sigma-cli/releases/tag/${src.tag}";
license = licenses.lgpl21Plus;
maintainers = with maintainers; [ fab ];
mainProgram = "sigma";
};
}

View File

@@ -0,0 +1,38 @@
{
lib,
stdenv,
fetchFromGitLab,
cmake,
cryptopp,
protobuf,
}:
stdenv.mkDerivation {
pname = "signal-backup-deduplicator";
version = "0-unstable-2024-05-24";
src = fetchFromGitLab {
owner = "gerum";
repo = "signal-backup-deduplicator";
rev = "6c09f14b16ff47c2ed0914c68102e45c93ebbfa6";
hash = "sha256-JR2Qu4EtTMObM/BvxQS5WwGFqWj9g0bqOpKt4y5UNaM=";
};
nativeBuildInputs = [ cmake ];
buildInputs = [
protobuf
cryptopp
];
meta = {
description = "Generate chunked backups for Signal messages";
homepage = "https://gitlab.com/gerum/signal-backup-deduplicator";
license = lib.licenses.agpl3Only;
maintainers = with lib.maintainers; [ GaetanLepage ];
mainProgram = "signal_backup_deduplicate";
platforms = lib.platforms.all;
# ld: symbol(s) not found for architecture ...
broken = stdenv.hostPlatform.isDarwin;
};
}

View File

@@ -0,0 +1,78 @@
{
stdenvNoCC,
lib,
fetchurl,
makeWrapper,
openjdk21_headless,
libmatthew_java,
dbus,
dbus_java,
versionCheckHook,
}:
stdenvNoCC.mkDerivation (finalAttrs: {
pname = "signal-cli";
version = "0.13.20";
# Building from source would be preferred, but is much more involved.
src = fetchurl {
url = "https://github.com/AsamK/signal-cli/releases/download/v${finalAttrs.version}/signal-cli-${finalAttrs.version}.tar.gz";
hash = "sha256-MFgR2c+XhzgxO6jv7e30rTf7bRVa5gxnzVOLnemXYY8=";
};
buildInputs = lib.optionals stdenvNoCC.hostPlatform.isLinux [
libmatthew_java
dbus
dbus_java
];
nativeBuildInputs = [ makeWrapper ];
installPhase = ''
runHook preInstall
mkdir -p $out
cp -r lib $out/
install -Dm755 bin/signal-cli -t $out/bin
''
+ (
if stdenvNoCC.hostPlatform.isLinux then
''
makeWrapper ${openjdk21_headless}/bin/java $out/bin/signal-cli \
--set JAVA_HOME "${openjdk21_headless}" \
--add-flags "-classpath '$out/lib/*:${libmatthew_java}/lib/jni'" \
--add-flags "-Djava.library.path=${libmatthew_java}/lib/jni:${dbus_java}/share/java/dbus:$out/lib" \
--add-flags "org.asamk.signal.Main"
''
else
''
wrapProgram $out/bin/signal-cli \
--prefix PATH : ${lib.makeBinPath [ openjdk21_headless ]} \
--set JAVA_HOME ${openjdk21_headless}
''
)
+ ''
runHook postInstall
'';
# Execution in the macOS (10.13) sandbox fails with
# dyld: Library not loaded: /System/Library/Frameworks/Cocoa.framework/Versions/A/Cocoa
# Referenced from: /nix/store/5ghc2l65p8jcjh0bsmhahd5m9k5p8kx0-zulu1.8.0_121-8.20.0.5/bin/java
# Reason: no suitable image found. Did find:
# /System/Library/Frameworks/Cocoa.framework/Versions/A/Cocoa: file system sandbox blocked stat()
# /System/Library/Frameworks/Cocoa.framework/Versions/A/Cocoa: file system sandbox blocked stat()
# /nix/store/in41dz8byyyz4c0w132l7mqi43liv4yr-stdenv-darwin/setup: line 1310: 2231 Abort trap: 6 signal-cli --version
doInstallCheck = stdenvNoCC.hostPlatform.isLinux;
nativeInstallCheckInputs = [ versionCheckHook ];
versionCheckProgramArg = "--version";
meta = {
homepage = "https://github.com/AsamK/signal-cli";
description = "Command-line and dbus interface for communicating with the Signal messaging service";
mainProgram = "signal-cli";
changelog = "https://github.com/AsamK/signal-cli/blob/v${finalAttrs.version}/CHANGELOG.md";
sourceProvenance = with lib.sourceTypes; [ binaryBytecode ];
license = lib.licenses.gpl3;
maintainers = with lib.maintainers; [ ivan ];
platforms = lib.platforms.all;
};
})

View File

@@ -0,0 +1,89 @@
"""Copy Noto Color Emoji PNGs into an extracted Signal ASAR archive.
Signal loads small Apple emoji PNGs directly from
`node_modules/emoji-datasource-apple/img/apple/64`, and downloads and
caches large Apple emoji WebP files in `.proto` bundles on the fly. The
latter are not a copyright concern for the Nixpkgs cache, but would
result in inconsistent presentation between small and large emoji.
We skip the complexity and buy some additional privacy by replacing the
`emoji://jumbo?emoji=` URL prefix with a `file://` path to the copied
PNGs inside the ASAR archive, and linking the `node_modules` PNG paths
directly to them.
"""
import json
import shutil
import sys
from pathlib import Path
def signal_name_to_emoji(signal_emoji_name: str) -> str:
r"""Return the emoji corresponding to a Signal emoji name.
Signal emoji names are concatenations of UTF16 code units,
represented in lowercase bigendian hex padded to four digits.
>>> signal_name_to_emoji("d83dde36200dd83cdf2bfe0f")
'😶‍🌫️'
>>> b"\xd8\x3d\xde\x36\x20\x0d\xd8\x3c\xdf\x2b\xfe\x0f".decode("utf-16-be")
'😶‍🌫️'
"""
hex_bytes = zip(signal_emoji_name[::2], signal_emoji_name[1::2])
emoji_utf_16_be = bytes(
int("".join(hex_pair), 16) for hex_pair in hex_bytes
)
return emoji_utf_16_be.decode("utf-16-be")
def emoji_to_noto_name(emoji: str) -> str:
r"""Return the Noto emoji name of an emoji.
Noto emoji names are underscoreseparated Unicode scalar values,
represented in lowercase bigendian hex padded to at least four
digits. Any U+FE0F variant selectors are omitted.
>>> emoji_to_noto_name("😶‍🌫️")
'1f636_200d_1f32b'
>>> emoji_to_noto_name("\U0001f636\u200d\U0001f32b\ufe0f")
'1f636_200d_1f32b'
"""
return "_".join(
f"{ord(scalar_value):04x}"
for scalar_value in emoji
if scalar_value != "\ufe0f"
)
def _main() -> None:
noto_png_path, asar_root = (Path(arg) for arg in sys.argv[1:])
asar_root = asar_root.absolute()
out_path = asar_root / "images" / "nixpkgs-emoji"
out_path.mkdir(parents=True)
jumbomoji_json_path = asar_root / "build" / "jumbomoji.json"
with jumbomoji_json_path.open() as jumbomoji_json_file:
jumbomoji_packs = json.load(jumbomoji_json_file)
for signal_emoji_names in jumbomoji_packs.values():
for signal_emoji_name in signal_emoji_names:
emoji = signal_name_to_emoji(signal_emoji_name)
try:
shutil.copy(
noto_png_path / f"emoji_u{emoji_to_noto_name(emoji)}.png",
out_path / emoji,
)
except FileNotFoundError:
print(
f"Missing Noto emoji: {emoji} {signal_emoji_name}",
file=sys.stderr,
)
continue
print(out_path.relative_to(asar_root))
if __name__ == "__main__":
_main()

View File

@@ -0,0 +1,316 @@
{
stdenv,
lib,
fetchurl,
autoPatchelfHook,
noto-fonts-color-emoji,
dpkg,
libarchive,
asar,
rsync,
python3,
buildPackages,
nixosTests,
gtk3,
atk,
at-spi2-atk,
cairo,
pango,
pipewire,
gdk-pixbuf,
glib,
freetype,
fontconfig,
dbus,
libX11,
xorg,
libXi,
libXcursor,
libXdamage,
libXrandr,
libXcomposite,
libXext,
libXfixes,
libXrender,
libXtst,
libXScrnSaver,
nss,
nspr,
alsa-lib,
cups,
expat,
libuuid,
at-spi2-core,
libappindicator-gtk3,
libgbm,
libwebp,
# Runtime dependencies:
systemdLibs,
libnotify,
libdbusmenu,
libpulseaudio,
xdg-utils,
wayland,
# command line arguments which are always set e.g "--password-store=kwallet6"
commandLineArgs,
}:
{
pname,
libdir,
bindir,
extractPkg,
version,
hash,
url,
}:
let
inherit (stdenv) targetPlatform;
ARCH = if targetPlatform.isAarch64 then "arm64" else "x64";
# Noto Color Emoji PNG files for emoji replacement; see below.
noto-fonts-color-emoji-png = noto-fonts-color-emoji.overrideAttrs (prevAttrs: {
pname = "noto-fonts-color-emoji-png";
# The build produces 136×128 PNGs by default for arcane font
# reasons, but we want square PNGs.
buildFlags = prevAttrs.buildFlags or [ ] ++ [ "BODY_DIMENSIONS=128x128" ];
makeTargets = [ "compressed" ];
installPhase = ''
runHook preInstall
mkdir -p $out/share
mv build/compressed_pngs $out/share/noto-fonts-color-emoji-png
python3 add_aliases.py --srcdir=$out/share/noto-fonts-color-emoji-png
runHook postInstall
'';
});
noto-emoji-sheet-32 = fetchurl {
url = "https://raw.githubusercontent.com/iamcal/emoji-data/refs/tags/v15.1.2/sheet_google_32.png";
hash = "sha256-S03NCTbvB5yeQl62WpLNjNGhjNErtgaOB6tAj/X8vPc=";
};
noto-emoji-sheet-64 = fetchurl {
url = "https://raw.githubusercontent.com/iamcal/emoji-data/refs/tags/v15.1.2/sheet_google_64.png";
hash = "sha256-kZYStR5xAuausSpOD6wJZRJZ1K6nPpweE3aYSgWntS4=";
};
in
stdenv.mkDerivation rec {
inherit pname version;
# Please backport all updates to the stable channel.
# All releases have a limited lifetime and "expire" 90 days after the release.
# When releases "expire" the application becomes unusable until an update is
# applied. The expiration date for the current release can be extracted with:
# $ grep -a "^{\"buildExpiration" "${signal-desktop}/lib/${dir}/resources/app.asar"
# (Alternatively we could try to patch the asar archive, but that requires a
# few additional steps and might not be the best idea.)
src = fetchurl {
inherit url hash;
recursiveHash = true;
downloadToTemp = true;
nativeBuildInputs = [
(if ARCH == "x64" then dpkg else libarchive)
asar
];
# Signal ships the Apple emoji set without a licence via an npm
# package and upstream does not seem terribly interested in fixing
# this; see:
#
# * <https://github.com/signalapp/Signal-Android/issues/5862>
# * <https://whispersystems.discoursehosting.net/t/signal-is-likely-violating-apple-license-terms-by-using-apple-emoji-in-the-sticker-creator-and-android-and-desktop-apps/52883>
#
# We work around this by replacing it with the Noto Color Emoji
# set, which is available under a FOSS licence and more likely to
# be used on a NixOS machine anyway. The Apple emoji are removed
# during `fetchurl` to ensure that the build doesnt cache the
# unlicensed emoji files, but the rest of the work is done in the
# main derivation.
postFetch = ''
${extractPkg}
asar extract "$out/${libdir}/resources/app.asar" $out/asar-contents
rm -r \
"$out/${libdir}/resources/app.asar"{,.unpacked} \
$out/asar-contents/images/emoji-sheet-32.webp \
$out/asar-contents/images/emoji-sheet-64.webp
'';
};
nativeBuildInputs = [
rsync
asar
python3
autoPatchelfHook
# override doesn't preserve splicing https://github.com/NixOS/nixpkgs/issues/132651
# Has to use `makeShellWrapper` from `buildPackages` even though `makeShellWrapper` from the inputs is spliced because `propagatedBuildInputs` would pick the wrong one because of a different offset.
(buildPackages.wrapGAppsHook3.override { makeWrapper = buildPackages.makeShellWrapper; })
libwebp
];
buildInputs = [
alsa-lib
at-spi2-atk
at-spi2-core
atk
cairo
cups
dbus
expat
fontconfig
freetype
gdk-pixbuf
glib
gtk3
libX11
libXScrnSaver
libXcomposite
libXcursor
libXdamage
libXext
libXfixes
libXi
libXrandr
libXrender
libXtst
libappindicator-gtk3
libpulseaudio
libnotify
libuuid
libgbm
nspr
nss
pango
systemdLibs
xorg.libxcb
xorg.libxshmfence
];
runtimeDependencies = [
systemdLibs
libappindicator-gtk3
libnotify
libdbusmenu
pipewire
xdg-utils
wayland
];
dontBuild = true;
dontConfigure = true;
unpackPhase = ''
rsync -a --chmod=+w $src/ .
'';
installPhase = ''
runHook preInstall
mkdir -p $out/lib
mv usr/share $out/share
mv "${libdir}" "$out/lib/signal-desktop"
# Symlink to bin
mkdir -p $out/bin
ln -s "$out/lib/signal-desktop/signal-desktop" $out/bin/${meta.mainProgram}
# Create required symlinks:
ln -s libGLESv2.so "$out/lib/signal-desktop/libGLESv2.so.2"
# Compress the emoji sheets to webp, as signal expects webp images. The flags used are the same as those used upstream.
cwebp -progress -mt -preset icon -alpha_filter best -alpha_q 20 -pass 10 -q 75 ${noto-emoji-sheet-32} -o asar-contents/images/emoji-sheet-32.webp
cwebp -progress -mt -preset icon -alpha_filter best -alpha_q 20 -pass 10 -q 75 ${noto-emoji-sheet-64} -o asar-contents/images/emoji-sheet-64.webp
# Copy the Noto Color Emoji PNGs into the ASAR contents. See `src`
# for the motivation, and the script for the technical details.
emojiPrefix=$(
python3 ${./copy-noto-emoji.py} \
${noto-fonts-color-emoji-png}/share/noto-fonts-color-emoji-png \
asar-contents
)
# Replace the URL used for fetching large versions of emoji with
# the local path to our copied PNGs.
substituteInPlace asar-contents/preload.bundle.js \
--replace-fail \
'emoji://jumbo?emoji=' \
"file://$out/lib/signal-desktop/resources/app.asar/$emojiPrefix/"
# `asar(1)` copies files from the corresponding `.unpacked`
# directory when extracting, and will put them back in the modified
# archive if you dont specify them again when repacking. Signal
# leaves their native `.node` libraries unpacked, so we match that.
asar pack \
--unpack '*.node' \
asar-contents \
"$out/lib/signal-desktop/resources/app.asar"
runHook postInstall
'';
preFixup = ''
gappsWrapperArgs+=(
--add-flags "\''${NIXOS_OZONE_WL:+\''${WAYLAND_DISPLAY:+--ozone-platform-hint=auto --enable-features=WaylandWindowDecorations --enable-wayland-ime=true}}"
--suffix PATH : ${lib.makeBinPath [ xdg-utils ]}
--add-flags ${lib.escapeShellArg commandLineArgs}
)
# Fix the desktop link
substituteInPlace $out/share/applications/signal-desktop.desktop \
--replace-fail "/${bindir}/signal-desktop" ${meta.mainProgram} \
--replace-fail "StartupWMClass=Signal" "StartupWMClass=signal"
mv $out/share/applications/signal{-desktop,}.desktop
# Note: The following path contains bundled libraries:
# $out/lib/signal-desktop/resources/app.asar.unpacked/node_modules/
patchelf --add-needed ${libpulseaudio}/lib/libpulse.so "$out/lib/signal-desktop/resources/app.asar.unpacked/node_modules/@signalapp/ringrtc/build/linux/libringrtc-${ARCH}.node"
'';
passthru = {
# Tests if the application launches and waits for "Link your phone to Signal Desktop":
tests.application-launch = nixosTests.signal-desktop;
updateScript.command = [ ./update.sh ];
};
meta = {
description = "Private, simple, and secure messenger";
longDescription = ''
Signal Desktop is an Electron application that links with your
"Signal Android" or "Signal iOS" app.
'';
homepage = "https://signal.org/";
changelog = "https://github.com/signalapp/Signal-Desktop/releases/tag/v${version}";
license = [
lib.licenses.agpl3Only
# Various npm packages
lib.licenses.free
lib.licenses.asl20 # noto-emoji
lib.licenses.mit # emoji-data
];
maintainers = with lib.maintainers; [
mic92
equirosa
urandom
bkchr
emily
Gliczy
];
mainProgram = "signal-desktop";
platforms = [
"x86_64-linux"
"aarch64-linux"
"x86_64-darwin"
"aarch64-darwin"
];
sourceProvenance = with lib.sourceTypes; [ binaryNativeCode ];
};
}

View File

@@ -0,0 +1,11 @@
{
stdenv,
callPackage,
commandLineArgs ? "",
}:
if stdenv.hostPlatform.system == "aarch64-linux" then
callPackage ./signal-desktop-aarch64.nix { inherit commandLineArgs; }
else if stdenv.hostPlatform.isDarwin then
callPackage ./signal-desktop-darwin.nix { }
else
callPackage ./signal-desktop.nix { inherit commandLineArgs; }

View File

@@ -0,0 +1,15 @@
[tool.mypy]
files = ["*.py"]
strict = true
[tool.ruff]
line-length = 80
[tool.ruff.lint]
select = ["ALL"]
ignore = ["COM812", "D203", "D213", "ISC001", "T201"]
allowed-confusables = [""]
[tool.ruff.format]
docstring-code-format = true
docstring-code-line-length = "dynamic"

View File

@@ -0,0 +1,15 @@
{ callPackage, commandLineArgs }:
callPackage ./generic.nix { inherit commandLineArgs; } {
pname = "signal-desktop-bin";
version = "7.71.0";
libdir = "usr/lib64/signal-desktop";
bindir = "usr/bin";
extractPkg = ''
mkdir -p $out
bsdtar -xf $downloadedFile -C "$out"
'';
url = "https://download.copr.fedorainfracloud.org/results/useidel/signal-desktop/fedora-42-aarch64/09571107-signal-desktop/signal-desktop-7.71.0-1.fc42.aarch64.rpm";
hash = "sha256-sNGIkO2HAXl0ykFyZNNV75iVUQ+oRGv6NZW8tVUxfJA=";
}

View File

@@ -0,0 +1,61 @@
{
stdenv,
lib,
fetchurl,
_7zz,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "signal-desktop-bin";
version = "7.71.0";
src = fetchurl {
url = "https://updates.signal.org/desktop/signal-desktop-mac-universal-${finalAttrs.version}.dmg";
hash = "sha256-G4wCIzKnWwBYSTuXhZ6681Z2+0Rn2bpvb3vhKMAXFc4=";
};
sourceRoot = ".";
nativeBuildInputs = [ _7zz ];
dontConfigure = true;
dontBuild = true;
installPhase = ''
runHook preInstall
mkdir -p $out/Applications
cp -r Signal.app $out/Applications
runHook postInstall
'';
passthru = {
updateScript.command = [ ./update.sh ];
};
meta = {
description = "Private, simple, and secure messenger";
longDescription = ''
Signal Desktop is an Electron application that links with your
"Signal Android" or "Signal iOS" app.
'';
homepage = "https://signal.org/";
downloadPage = "https://signal.org/download/macos/";
changelog = "https://github.com/signalapp/Signal-Desktop/releases/tag/v${finalAttrs.version}";
license = with lib.licenses; [
agpl3Only
# Various npm packages
free
# has non-redistributable Apple emoji packaged, see main derivation
unfree
];
maintainers = with lib.maintainers; [ nickhu ];
platforms = [
"x86_64-linux"
"aarch64-linux"
"x86_64-darwin"
"aarch64-darwin"
];
sourceProvenance = with lib.sourceTypes; [ binaryNativeCode ];
};
})

View File

@@ -0,0 +1,12 @@
{ callPackage, commandLineArgs }:
callPackage ./generic.nix { inherit commandLineArgs; } rec {
pname = "signal-desktop-bin";
version = "7.71.0";
libdir = "opt/Signal";
bindir = libdir;
extractPkg = "dpkg-deb -x $downloadedFile $out";
url = "https://updates.signal.org/desktop/apt/pool/s/signal-desktop/signal-desktop_${version}_amd64.deb";
hash = "sha256-y7ONN6VBVFH8zyXJNM3+cY4JegSolXfhH3T85WiM2Dk=";
}

View File

@@ -0,0 +1,35 @@
#!/usr/bin/env nix-shell
#!nix-shell -i bash -p bash common-updater-scripts curl coreutils jq
set -ex
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" &>/dev/null && pwd)"
latestTag=$(curl ${GITHUB_TOKEN:+" -u \":$GITHUB_TOKEN\""} \
"https://api.github.com/repos/signalapp/Signal-Desktop/releases/latest" \
| jq -r ".tag_name")
latestVersion="$(expr "$latestTag" : 'v\(.*\)')"
latestBuildInfoAarch64=$(curl \
"https://copr.fedorainfracloud.org/api_3/package/?ownername=useidel&projectname=signal-desktop&packagename=signal-desktop&with_latest_succeeded_build=true" \
| jq '.builds.latest_succeeded')
latestBuildAarch64=$(jq '.id' <<< $latestBuildInfoAarch64)
latestVersionAarch64=$(jq -r '.source_package.version' <<< $latestBuildInfoAarch64)
latestPrettyVersionAarch64="${latestVersionAarch64%-*}"
darwinHash="$(nix --extra-experimental-features nix-command hash convert --hash-algo sha256 --to sri "$(nix-prefetch-url "https://updates.signal.org/desktop/signal-desktop-mac-universal-${latestVersion}.dmg")")"
echo "Updating signal-desktop for x86_64-linux"
update-source-version signal-desktop-bin "$latestVersion" \
--system=x86_64-linux \
--file="$SCRIPT_DIR/signal-desktop.nix"
echo "Updating signal-desktop for aarch64-linux"
update-source-version signal-desktop-bin "$latestPrettyVersionAarch64" "" \
"https://download.copr.fedorainfracloud.org/results/useidel/signal-desktop/fedora-42-aarch64/$(printf "%08d" $latestBuildAarch64)-signal-desktop/signal-desktop-$latestVersionAarch64.fc42.aarch64.rpm" \
--system=aarch64-linux \
--file="$SCRIPT_DIR/signal-desktop-aarch64.nix"
echo "Updating signal-desktop for darwin"
sed -i "s|version = \".*\";|version = \"${latestVersion}\";|" "$SCRIPT_DIR/signal-desktop-darwin.nix"
sed -i "s|hash = \"sha256-[^\"]*\";|hash = \"${darwinHash}\";|" "$SCRIPT_DIR/signal-desktop-darwin.nix"

View File

@@ -0,0 +1,14 @@
diff --git a/node/build_node_bridge.py b/node/build_node_bridge.py
index c983fc3..2ab06dc 100755
--- a/node/build_node_bridge.py
+++ b/node/build_node_bridge.py
@@ -138,9 +138,6 @@ def main(args: Optional[List[str]] = None) -> int:
cargo_env['CARGO_PROFILE_RELEASE_LTO'] = 'thin'
# Enable ARMv8 cryptography acceleration when available
cargo_env['RUSTFLAGS'] += ' --cfg aes_armv8'
- # Strip absolute paths
- for path in build_helpers.rust_paths_to_remap():
- cargo_env['RUSTFLAGS'] += f' --remap-path-prefix {path}='
# If set (below), will post-process the build library using this instead of just `cp`-ing it.
objcopy = None

View File

@@ -0,0 +1,82 @@
{
stdenv,
rustPlatform,
fetchNpmDeps,
npmHooks,
protobuf,
clang,
gitMinimal,
cmake,
boringssl,
runCommand,
fetchFromGitHub,
python3,
nodejs,
}:
let
# boring-sys expects the static libraries in build/ instead of lib/
boringssl-wrapper = runCommand "boringssl-wrapper" { } ''
mkdir $out
cd $out
ln -s ${boringssl.out}/lib build
ln -s ${boringssl.dev}/include include
'';
in
rustPlatform.buildRustPackage (finalAttrs: {
pname = "libsignal-node";
version = "0.81.1";
src = fetchFromGitHub {
owner = "signalapp";
repo = "libsignal";
tag = "v${finalAttrs.version}";
hash = "sha256-uhxfVFsoB+c1R5MUOgpJFm8ZD3vgU8BIn35QSfbEp5w=";
};
cargoHash = "sha256-Q3GSeaW3YveLxLeJPpPXUVwlJ0QLRkAmRGSJetxKl4Y=";
npmRoot = "node";
npmDeps = fetchNpmDeps {
name = "${finalAttrs.pname}-npm-deps";
inherit (finalAttrs) version src;
sourceRoot = "${finalAttrs.src.name}/${finalAttrs.npmRoot}";
hash = "sha256-6Mr3SJn4pO0p6PISXvEOhN9uPk1TIEU03ssclNUg2No=";
};
nativeBuildInputs = [
python3
protobuf
nodejs
clang
gitMinimal
cmake
npmHooks.npmConfigHook
rustPlatform.bindgenHook
];
env.BORING_BSSL_PATH = "${boringssl-wrapper}";
env.NIX_LDFLAGS = if stdenv.hostPlatform.isDarwin then "-lc++" else "-lstdc++";
patches = [
# This is used to strip absolute paths of dependencies to avoid leaking info about build machine. Nix builders
# already solve this problem by chrooting os this is not needed.
./dont-strip-absolute-paths.patch
];
postPatch = ''
substituteInPlace node/build_node_bridge.py \
--replace-fail "'prebuilds'" "'$out/lib'" \
--replace-fail "objcopy = shutil.which('%s-linux-gnu-objcopy' % cargo_target.split('-')[0]) or 'objcopy'" \
"objcopy = os.getenv('OBJCOPY', 'objcopy')"
'';
buildPhase = ''
runHook preBuild
pushd node
npm run build -- --copy-to-prebuilds --node-arch ${stdenv.hostPlatform.node.arch}
popd
runHook postBuild
'';
dontCargoInstall = true;
})

View File

@@ -0,0 +1,293 @@
{
stdenv,
lib,
nodejs_22,
pnpm_10,
electron_38,
python3,
makeWrapper,
callPackage,
fetchFromGitHub,
jq,
makeDesktopItem,
copyDesktopItems,
replaceVars,
noto-fonts-color-emoji,
nixosTests,
# command line arguments which are always set e.g "--password-store=kwallet6"
commandLineArgs ? "",
withAppleEmojis ? false,
}:
let
nodejs = nodejs_22;
pnpm = pnpm_10.override { inherit nodejs; };
electron = electron_38;
libsignal-node = callPackage ./libsignal-node.nix { inherit nodejs; };
signal-sqlcipher = callPackage ./signal-sqlcipher.nix { inherit pnpm nodejs; };
webrtc = callPackage ./webrtc.nix { };
ringrtc = callPackage ./ringrtc.nix { inherit webrtc; };
# Noto Color Emoji PNG files for emoji replacement; see below.
noto-fonts-color-emoji-png = noto-fonts-color-emoji.overrideAttrs (prevAttrs: {
pname = "noto-fonts-color-emoji-png";
# The build produces 136×128 PNGs by default for arcane font
# reasons, but we want square PNGs.
buildFlags = prevAttrs.buildFlags or [ ] ++ [ "BODY_DIMENSIONS=128x128" ];
makeTargets = [ "compressed" ];
installPhase = ''
runHook preInstall
mkdir -p $out/share
mv build/compressed_pngs $out/share/noto-fonts-color-emoji-png
python3 add_aliases.py --srcdir=$out/share/noto-fonts-color-emoji-png
runHook postInstall
'';
});
version = "7.73.0";
src = fetchFromGitHub {
owner = "signalapp";
repo = "Signal-Desktop";
tag = "v${version}";
hash = "sha256-5cwGV0WPOS7O/xnQZ38t/hiQppqFFtVQmGuniGsD6H8=";
};
sticker-creator = stdenv.mkDerivation (finalAttrs: {
pname = "signal-desktop-sticker-creator";
inherit version;
src = src + "/sticker-creator";
pnpmDeps = pnpm.fetchDeps {
inherit (finalAttrs) pname src version;
fetcherVersion = 1;
hash = "sha256-cT7Ixl/V/mesPHvJUsG63Y/wXwKjbjkjdjP3S7uEOa0=";
};
strictDeps = true;
nativeBuildInputs = [
nodejs
pnpm.configHook
];
buildPhase = ''
runHook preBuild
pnpm run build
runHook postBuild
'';
installPhase = ''
runHook preInstall
cp -r dist $out
runHook postInstall
'';
});
in
stdenv.mkDerivation (finalAttrs: {
pname = "signal-desktop";
inherit src version;
strictDeps = true;
nativeBuildInputs = [
nodejs
pnpm.configHook
makeWrapper
copyDesktopItems
python3
jq
];
buildInputs = (lib.optional (!withAppleEmojis) noto-fonts-color-emoji-png);
patches = lib.optional (!withAppleEmojis) (
replaceVars ./replace-apple-emoji-with-noto-emoji.patch {
noto-emoji-pngs = "${noto-fonts-color-emoji-png}/share/noto-fonts-color-emoji-png";
}
);
postPatch = ''
# The spell checker dictionary URL interpolates the electron version,
# however, the official website only provides dictionaries for electron
# versions which they vendor into the binary releases. Since we unpin
# electron to use the one from nixpkgs the URL may point to nonexistent
# resource if the nixpkgs version is different. To fix this we hardcode
# the electron version to the declared one here instead of interpolating
# it at runtime.
substituteInPlace app/updateDefaultSession.ts \
--replace-fail "\''${process.versions.electron}" "`jq -r '.devDependencies.electron' < package.json`"
'';
pnpmDeps = pnpm.fetchDeps {
inherit (finalAttrs)
pname
version
src
patches
;
fetcherVersion = 1;
hash =
if withAppleEmojis then
"sha256-9YvNs925xBUYEpF429rHfMXIGPapVYd8j1jZa/yBuhA="
else
"sha256-lcr8EeL+wd6VihKcBgfXNRny8VskX8g7I7WTAkLuBss=";
};
env = {
ELECTRON_SKIP_BINARY_DOWNLOAD = "1";
SIGNAL_ENV = "production";
SOURCE_DATE_EPOCH = 1759413120;
};
preBuild = ''
if [ "`jq -r '.engines.node' < package.json | cut -d. -f1`" != "${lib.versions.major nodejs.version}" ]
then
die "nodejs version mismatch"
fi
if [ "`jq -r '.devDependencies.electron' < package.json | cut -d. -f1`" != "${lib.versions.major electron.version}" ]
then
die "electron version mismatch"
fi
if [ "`jq -r '.dependencies."@signalapp/libsignal-client"' < package.json`" != "${libsignal-node.version}" ]
then
die "libsignal-client version mismatch"
fi
if [ "`jq -r '.dependencies."@signalapp/sqlcipher"' < package.json`" != "${signal-sqlcipher.version}" ]
then
die "signal-sqlcipher version mismatch"
fi
if [ "`jq -r '.dependencies."@signalapp/ringrtc"' < package.json`" != "${ringrtc.version}" ]
then
die "ringrtc version mismatch"
fi
install -D ${ringrtc}/lib/libringrtc${stdenv.hostPlatform.extensions.library} \
node_modules/@signalapp/ringrtc/build/libringrtc.node
substituteInPlace package.json \
--replace-fail '"node_modules/@signalapp/ringrtc/build/''${platform}/*''${arch}*.node",' \
'"node_modules/@signalapp/ringrtc/build/libringrtc.node",'
substituteInPlace node_modules/@signalapp/ringrtc/dist/ringrtc/Native.js \
--replace-fail 'exports.default = require(`../../build/''${os.platform()}/libringrtc-''${process.arch}.node`);' \
'exports.default = require(`../../build/libringrtc.node`);'
rm -r node_modules/@signalapp/libsignal-client/prebuilds
cp -r ${libsignal-node}/lib node_modules/@signalapp/libsignal-client/prebuilds
rm -r node_modules/@signalapp/sqlcipher
cp -r ${signal-sqlcipher} node_modules/@signalapp/sqlcipher
'';
buildPhase = ''
runHook preBuild
export npm_config_nodedir=${electron.headers}
cp -r ${electron.dist} electron-dist
chmod -R u+w electron-dist
cp -r ${sticker-creator} sticker-creator/dist
pnpm run generate
pnpm exec electron-builder \
--linux "dir:${stdenv.hostPlatform.node.arch}" \
--config.extraMetadata.environment=$SIGNAL_ENV \
-c.electronDist=electron-dist \
-c.electronVersion=${electron.version}
runHook postBuild
'';
installPhase = ''
runHook preInstall
mkdir -p $out/share/
cp -r dist/*-unpacked/resources $out/share/signal-desktop
for icon in build/icons/png/*
do
install -Dm644 $icon $out/share/icons/hicolor/`basename ''${icon%.png}`/apps/signal-desktop.png
done
# TODO: Remove --ozone-platform=wayland after next electron update,
# see https://github.com/electron/electron/pull/48309
makeWrapper '${lib.getExe electron}' "$out/bin/signal-desktop" \
--add-flags "$out/share/signal-desktop/app.asar" \
--set-default ELECTRON_FORCE_IS_PACKAGED 1 \
--add-flags "\''${NIXOS_OZONE_WL:+\''${WAYLAND_DISPLAY:+--ozone-platform=wayland --enable-features=WaylandWindowDecorations --enable-wayland-ime=true}}" \
--add-flags ${lib.escapeShellArg commandLineArgs}
runHook postInstall
'';
desktopItems = [
(makeDesktopItem {
name = "signal";
desktopName = "Signal";
exec = "${finalAttrs.meta.mainProgram} %U";
type = "Application";
terminal = false;
icon = "signal-desktop";
comment = "Private messaging from your desktop";
startupWMClass = "signal";
mimeTypes = [
"x-scheme-handler/sgnl"
"x-scheme-handler/signalcaptcha"
];
categories = [
"Network"
"InstantMessaging"
"Chat"
];
})
];
passthru = {
inherit
libsignal-node
ringrtc
webrtc
sticker-creator
signal-sqlcipher
;
tests.application-launch = nixosTests.signal-desktop;
updateScript.command = [ ./update.sh ];
};
meta = {
description = "Private, simple, and secure messenger (nixpkgs build)";
longDescription = ''
Signal Desktop is an Electron application that links with your
"Signal Android" or "Signal iOS" app.
'';
homepage = "https://signal.org/";
changelog = "https://github.com/signalapp/Signal-Desktop/releases/tag/v${finalAttrs.version}";
license =
with lib.licenses;
[
agpl3Only
# Various npm packages
free
]
++ lib.optional withAppleEmojis unfree;
maintainers = with lib.maintainers; [
marcin-serwin
teutat3s
];
mainProgram = "signal-desktop";
platforms = [
"x86_64-linux"
"aarch64-linux"
];
};
})

View File

@@ -0,0 +1,146 @@
diff --git a/ACKNOWLEDGMENTS.md b/ACKNOWLEDGMENTS.md
index 2c963f1..96edd02 100644
--- a/ACKNOWLEDGMENTS.md
+++ b/ACKNOWLEDGMENTS.md
@@ -1636,30 +1636,6 @@ Signal Desktop makes use of the following open source projects.
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
-## emoji-datasource-apple
-
- The MIT License (MIT)
-
- Copyright (c) 2013 Cal Henderson
-
- Permission is hereby granted, free of charge, to any person obtaining a copy
- of this software and associated documentation files (the "Software"), to deal
- in the Software without restriction, including without limitation the rights
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
- copies of the Software, and to permit persons to whom the Software is
- furnished to do so, subject to the following conditions:
-
- The above copyright notice and this permission notice shall be included in all
- copies or substantial portions of the Software.
-
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
- SOFTWARE.
-
## emoji-regex
Copyright Mathias Bynens <https://mathiasbynens.be/>
diff --git a/app/protocol_filter.ts b/app/protocol_filter.ts
index 68dceea..4b35bb1 100644
--- a/app/protocol_filter.ts
+++ b/app/protocol_filter.ts
@@ -59,6 +59,7 @@ function _createFileHandler({
const allowedRoots = [
userDataPath,
installPath,
+ "@noto-emoji-pngs@",
getAvatarsPath(userDataPath),
getBadgesPath(userDataPath),
getDraftPath(userDataPath),
diff --git a/package.json b/package.json
index 5755fec..86125ba 100644
--- a/package.json
+++ b/package.json
@@ -137,7 +137,6 @@
"dashdash": "2.0.0",
"direction": "1.0.4",
"emoji-datasource": "15.1.2",
- "emoji-datasource-apple": "15.1.2",
"emoji-regex": "10.4.0",
"encoding": "0.1.13",
"fabric": "4.6.0",
@@ -649,4 +648,4 @@
"sticker-creator/dist/**"
]
}
-}
+}
\ No newline at end of file
diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml
index f04b2b1..070fa0f 100644
--- a/pnpm-lock.yaml
+++ b/pnpm-lock.yaml
@@ -184,9 +184,6 @@ importers:
emoji-datasource:
specifier: 15.1.2
version: 15.1.2
- emoji-datasource-apple:
- specifier: 15.1.2
- version: 15.1.2
emoji-regex:
specifier: 10.4.0
version: 10.4.0
@@ -4817,9 +4814,6 @@ packages:
resolution: {integrity: sha512-DeWwawk6r5yR9jFgnDKYt4sLS0LmHJJi3ZOnb5/JdbYwj3nW+FxQnHIjhBKz8YLC7oRNPVM9NQ47I3CVx34eqQ==}
engines: {node: '>=12'}
- emoji-datasource-apple@15.1.2:
- resolution: {integrity: sha512-32UZTK36x4DlvgD1smkmBlKmmJH7qUr5Qut4U/on2uQLGqNXGbZiheq6/LEA8xRQEUrmNrGEy25wpEI6wvYmTg==}
-
emoji-datasource@15.1.2:
resolution: {integrity: sha512-tXAqGsrDVhgCRpFePtaD9P4Z8Ro2SUQSL/4MIJBG0SxqQJaMslEbin8J53OaFwEBu6e7JxFaIF6s4mw9+8acAQ==}
@@ -14990,8 +14984,6 @@ snapshots:
emittery@0.13.1: {}
- emoji-datasource-apple@15.1.2: {}
-
emoji-datasource@15.1.2: {}
emoji-regex@10.4.0: {}
diff --git a/stylesheets/components/fun/FunEmoji.scss b/stylesheets/components/fun/FunEmoji.scss
index 78c7563..83d196c 100644
--- a/stylesheets/components/fun/FunEmoji.scss
+++ b/stylesheets/components/fun/FunEmoji.scss
@@ -5,19 +5,9 @@
$emoji-sprite-sheet-grid-item-count: 62;
@mixin emoji-sprite($sheet, $margin, $scale) {
- $size: calc($sheet * 1px * $scale);
- $margin-start: calc($margin * $scale);
- $margin-end: calc($margin * $scale);
- $size-outer: calc($size + $margin-start + $margin-end);
- $image: url('../images/emoji-sheet-#{$sheet}.webp');
- background-image: $image;
- background-size: calc($size-outer * $emoji-sprite-sheet-grid-item-count);
- background-position-x: calc(
- var(--fun-emoji-sheet-x) * ($size-outer * -1) + ($margin-start * -1)
- );
- background-position-y: calc(
- var(--fun-emoji-sheet-y) * ($size-outer * -1) + ($margin-start * -1)
- );
+ background-image: var(--fun-emoji-jumbo-image);
+ background-size: contain;
+ background-position: center;
background-repeat: no-repeat;
}
diff --git a/ts/components/fun/FunEmoji.tsx b/ts/components/fun/FunEmoji.tsx
index 08785e8..d25b868 100644
--- a/ts/components/fun/FunEmoji.tsx
+++ b/ts/components/fun/FunEmoji.tsx
@@ -10,7 +10,14 @@ export const FUN_STATIC_EMOJI_CLASS = 'FunStaticEmoji';
export const FUN_INLINE_EMOJI_CLASS = 'FunInlineEmoji';
function getEmojiJumboUrl(emoji: EmojiVariantData): string {
- return `emoji://jumbo?emoji=${encodeURIComponent(emoji.value)}`;
+ const emojiToNotoName = (emoji: string): string =>
+ `emoji_u${
+ [...emoji]
+ .filter(c => c != "\ufe0f")
+ .map(c => c.codePointAt(0)?.toString(16).padStart(4, "0"))
+ .join("_")
+ }.png`;
+ return `file://@noto-emoji-pngs@/${emojiToNotoName(emoji.value)}`;
}
export type FunStaticEmojiSize =

View File

@@ -0,0 +1,64 @@
{
rustPlatform,
lib,
fetchFromGitHub,
cmake,
protobuf,
webrtc,
pkg-config,
cubeb,
}:
let
cubeb' = cubeb.override {
alsaSupport = false;
pulseSupport = true;
jackSupport = false;
sndioSupport = false;
enableShared = false;
};
in
rustPlatform.buildRustPackage (finalAttrs: {
pname = "ringrtc";
version = "2.58.1";
src = fetchFromGitHub {
owner = "signalapp";
repo = "ringrtc";
tag = "v${finalAttrs.version}";
hash = "sha256-HI+HVDv+nuJp2BPIAVY+PI6Pof1pnB8L6CIAgBT+tJA=";
};
cargoHash = "sha256-n+1pe202U2lljisSRBWeVvuBLyp7jhXG+ovDDi5WV8Q=";
cargoBuildFlags = [
"-p"
"ringrtc"
"--features"
"electron"
];
doCheck = false;
env = {
LIBCUBEB_SYS_USE_PKG_CONFIG = 1;
LIBCUBEB_STATIC = 1;
};
nativeBuildInputs = [
protobuf
cmake
pkg-config
];
buildInputs = [
webrtc
cubeb'
]
# Workaround for https://github.com/NixOS/nixpkgs/pull/394607
++ cubeb'.buildInputs;
meta = {
homepage = "https://github.com/signalapp/ringrtc";
description = "RingRTC library used by Signal";
license = lib.licenses.agpl3Only;
platforms = lib.platforms.unix;
};
})

View File

@@ -0,0 +1,76 @@
{
stdenv,
lib,
fetchFromGitHub,
pnpm,
nodejs,
rustPlatform,
cargo,
dump_syms,
python3,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "node-sqlcipher";
version = "2.4.4";
src = fetchFromGitHub {
owner = "signalapp";
repo = "node-sqlcipher";
tag = "v${finalAttrs.version}";
hash = "sha256-70kObW6jYzaquMrj20VMTQg/rDWqIu8o2/m7S3mUZB8=";
};
pnpmDeps = pnpm.fetchDeps {
inherit (finalAttrs) pname version src;
fetcherVersion = 1;
hash = "sha256-regaYG+SDvIgdnHQVR1GG1A1FSBXpzFfLuyTEdMt1kQ=";
};
cargoRoot = "deps/extension";
cargoDeps = rustPlatform.fetchCargoVendor {
name = "sqlcipher-signal-exentsion";
inherit (finalAttrs) src cargoRoot;
hash = "sha256-NtJPwRvjU1WsOxgb2vpokes9eL4DkEcbDaEmML7zsqQ=";
};
strictDeps = true;
nativeBuildInputs = [
nodejs
pnpm.configHook
rustPlatform.cargoSetupHook
cargo
dump_syms
python3
];
buildPhase = ''
runHook preBuild
export npm_config_nodedir=${nodejs}
pnpm run prebuildify --strip false --arch "${stdenv.hostPlatform.node.arch}" --platform "${stdenv.hostPlatform.node.platform}"
pnpm run build
runHook postBuild
'';
installPhase = ''
runHook preInstall
cp -r dist $out
cp -r prebuilds $out
runHook postInstall
'';
meta = {
description = "Fast N-API-based Node.js addon wrapping sqlcipher and FTS5 segmenting APIs";
homepage = "https://github.com/signalapp/node-sqlcipher/tree/main";
license = with lib.licenses; [
agpl3Only
# deps/sqlcipher
bsd3
];
platforms = lib.platforms.linux;
};
})

View File

@@ -0,0 +1,64 @@
#!/usr/bin/env nix-shell
#!nix-shell -i bash -p bash nix-update common-updater-scripts curl coreutils jq gclient2nix
set -ex
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" &>/dev/null && pwd)"
curl_github() {
curl ${GITHUB_TOKEN:+" -u \":$GITHUB_TOKEN\""} "$@"
}
releaseInfo="`curl_github \
"https://api.github.com/repos/signalapp/Signal-Desktop/releases/latest"`"
releaseTag="`jq -r ".tag_name" <<< $releaseInfo`"
releaseDate="`jq -r ".created_at" <<< $releaseInfo`"
releaseEpoch=`date -d $releaseDate +%s`
packageJson="`curl_github "https://raw.githubusercontent.com/signalapp/Signal-Desktop/refs/tags/$releaseTag/package.json"`"
latestVersion="`jq -r '.version' <<< $packageJson`"
nodeVersion="`jq -r '.engines.node' <<< $packageJson | cut -d. -f1`"
electronVersion="`jq -r '.devDependencies.electron' <<< $packageJson | cut -d. -f1`"
libsignalClientVersion=`jq -r '.dependencies."@signalapp/libsignal-client"' <<< $packageJson`
signalSqlcipherVersion=`jq -r '.dependencies."@signalapp/sqlcipher"' <<< $packageJson`
ringrtcVersion=`jq -r '.dependencies."@signalapp/ringrtc"' <<< $packageJson`
ringrtcVersionProperties="`curl_github "https://raw.githubusercontent.com/signalapp/ringrtc/refs/tags/v$ringrtcVersion/config/version.properties"`"
webrtcVersion="`grep --only-matching "^webrtc.version=.*$" <<< $ringrtcVersionProperties | sed "s/webrtc.version=//g"`"
sed -E -i "s/(nodejs_)../\1$nodeVersion/" $SCRIPT_DIR/package.nix
sed -E -i "s/(electron_)../\1$electronVersion/" $SCRIPT_DIR/package.nix
sed -E -i "s/(SOURCE_DATE_EPOCH = )[0-9]+/\1$releaseEpoch/" $SCRIPT_DIR/package.nix
sed -E -i "s/(withAppleEmojis \? )false/\1true/" $SCRIPT_DIR/package.nix
nix-update signal-desktop --subpackage sticker-creator --version="$latestVersion"
sed -E -i "s/(withAppleEmojis \? )true/\1false/" $SCRIPT_DIR/package.nix
update-source-version signal-desktop \
--ignore-same-version \
--source-key=pnpmDeps
update-source-version signal-desktop.libsignal-node \
"$libsignalClientVersion"
update-source-version signal-desktop.libsignal-node \
--ignore-same-version \
--source-key=cargoDeps.vendorStaging
update-source-version signal-desktop.libsignal-node \
--ignore-same-version \
--source-key=npmDeps
update-source-version signal-desktop.signal-sqlcipher \
"$signalSqlcipherVersion"
update-source-version signal-desktop.signal-sqlcipher \
--ignore-same-version \
--source-key=cargoDeps.vendorStaging
update-source-version signal-desktop.signal-sqlcipher \
--ignore-same-version \
--source-key=pnpmDeps
update-source-version signal-desktop.ringrtc "$ringrtcVersion"
update-source-version signal-desktop.ringrtc \
--ignore-same-version \
--source-key=cargoDeps.vendorStaging
gclient2nix generate "https://github.com/signalapp/webrtc@$webrtcVersion" > $SCRIPT_DIR/webrtc-sources.json

View File

@@ -0,0 +1,39 @@
diff --git a/p2p/base/port_interface.h b/p2p/base/port_interface.h
index f774b3d..c7242d9 100644
--- a/p2p/base/port_interface.h
+++ b/p2p/base/port_interface.h
@@ -55,7 +55,7 @@ class PortInterface {
virtual ~PortInterface();
virtual IceCandidateType Type() const = 0;
- virtual const Network* Network() const = 0;
+ virtual const ::webrtc::Network* Network() const = 0;
// Methods to set/get ICE role and tiebreaker values.
virtual void SetIceRole(IceRole role) = 0;
diff --git a/pc/codec_vendor.h b/pc/codec_vendor.h
index 1472225..251afbd 100644
--- a/pc/codec_vendor.h
+++ b/pc/codec_vendor.h
@@ -119,7 +119,7 @@ class CodecVendor {
class CodecLookupHelper {
public:
virtual ~CodecLookupHelper() = default;
- virtual PayloadTypeSuggester* PayloadTypeSuggester() = 0;
+ virtual ::webrtc::PayloadTypeSuggester* PayloadTypeSuggester() = 0;
// Look up the codec vendor to use, depending on context.
// This call may get additional arguments in the future, to aid
// in selection of the correct context.
diff --git a/pc/jsep_transport.h b/pc/jsep_transport.h
index ab914f3..3ff6f6f 100644
--- a/pc/jsep_transport.h
+++ b/pc/jsep_transport.h
@@ -214,7 +214,7 @@ class JsepTransport {
return rtp_dtls_transport_;
}
- scoped_refptr<SctpTransport> SctpTransport() const { return sctp_transport_; }
+ scoped_refptr<::webrtc::SctpTransport> SctpTransport() const { return sctp_transport_; }
// TODO(bugs.webrtc.org/9719): Delete method, update callers to use
// SctpTransport() instead.

View File

@@ -0,0 +1,380 @@
{
"src": {
"args": {
"hash": "sha256-Qj0UFRWfZrBG9WUX4zkyiatIekNSYXsneP5aLvufNh4=",
"owner": "signalapp",
"repo": "webrtc",
"tag": "7204c"
},
"fetcher": "fetchFromGitHub"
},
"src/base": {
"args": {
"hash": "sha256-wKFvb28LeB7/YVGmWKhcvXCEeNB6HaxMgZJLpC5a1Zk=",
"rev": "4ba67f727a84a10e32a417dc7e194f4fc6a23390",
"url": "https://chromium.googlesource.com/chromium/src/base"
},
"fetcher": "fetchFromGitiles"
},
"src/build": {
"args": {
"hash": "sha256-Bfd3paXVGon4p85V2UO6vEHG/t1g8EAxvYQ+DdPcuI8=",
"rev": "7adbc7e3263f3ab427ba7c5ac7839a69082ff7fb",
"url": "https://chromium.googlesource.com/chromium/src/build"
},
"fetcher": "fetchFromGitiles"
},
"src/buildtools": {
"args": {
"hash": "sha256-adtGyo+wm8+keR0um1fOdChABdBYboGBawD0LfcY00w=",
"rev": "1fc7350e65e9d7848c083b83aaf67611e74a5654",
"url": "https://chromium.googlesource.com/chromium/src/buildtools"
},
"fetcher": "fetchFromGitiles"
},
"src/ringrtc/opus/src": {
"args": {
"hash": "sha256-63JClPZ+Me6thFp6iPf++jV2K1hF0KR1n6Bly+ocNq8=",
"owner": "xiph",
"repo": "opus",
"rev": "55513e81d8f606bd75d0ff773d2144e5f2a732f5"
},
"fetcher": "fetchFromGitHub"
},
"src/testing": {
"args": {
"hash": "sha256-CQg6fxDz0dk4fD+X53stTwJJ25feYoU9KdsgjTAzbp8=",
"rev": "44b0a8d794b28dbd74614e5f5e7da2b407030647",
"url": "https://chromium.googlesource.com/chromium/src/testing"
},
"fetcher": "fetchFromGitiles"
},
"src/third_party": {
"args": {
"hash": "sha256-KfIQS+FrzFDAS0B3yfzPj4PqD16H0dBE6z1JgFag/20=",
"rev": "8a150db896356cd9b47f8c1a6d916347393f90f2",
"url": "https://chromium.googlesource.com/chromium/src/third_party"
},
"fetcher": "fetchFromGitiles"
},
"src/third_party/boringssl/src": {
"args": {
"hash": "sha256-+Gs+efB1ZizjMYRSRTQrMDPZsDC+dgNJ9+yHXkzm/ZM=",
"rev": "9295969e1dad2c31d0d99481734c1c68dcbc6403",
"url": "https://boringssl.googlesource.com/boringssl.git"
},
"fetcher": "fetchFromGitiles"
},
"src/third_party/breakpad/breakpad": {
"args": {
"hash": "sha256-+Z7KphmQYCeN0aJkqyMrJ4tIi3BhqN16KoPNLb/bMGo=",
"rev": "2625edb085169e92cf036c236ac79ab594a7b1cc",
"url": "https://chromium.googlesource.com/breakpad/breakpad.git"
},
"fetcher": "fetchFromGitiles"
},
"src/third_party/catapult": {
"args": {
"hash": "sha256-xHe9WoAq1FElMSnu5mlEzrH+EzKiwWXeXMCH69KL5a0=",
"rev": "5477c6dfde1132b685c73edc16e1bc71449a691d",
"url": "https://chromium.googlesource.com/catapult.git"
},
"fetcher": "fetchFromGitiles"
},
"src/third_party/ced/src": {
"args": {
"hash": "sha256-ySG74Rj2i2c/PltEgHVEDq+N8yd9gZmxNktc56zIUiY=",
"rev": "ba412eaaacd3186085babcd901679a48863c7dd5",
"url": "https://chromium.googlesource.com/external/github.com/google/compact_enc_det.git"
},
"fetcher": "fetchFromGitiles"
},
"src/third_party/clang-format/script": {
"args": {
"hash": "sha256-d9uweklBffiuCWEb03ti1eFLnMac2qRtvggzXY1n/RU=",
"rev": "37f6e68a107df43b7d7e044fd36a13cbae3413f2",
"url": "https://chromium.googlesource.com/external/github.com/llvm/llvm-project/clang/tools/clang-format.git"
},
"fetcher": "fetchFromGitiles"
},
"src/third_party/colorama/src": {
"args": {
"hash": "sha256-6ZTdPYSHdQOLYMSnE+Tp7PgsVTs3U2awGu9Qb4Rg/tk=",
"rev": "3de9f013df4b470069d03d250224062e8cf15c49",
"url": "https://chromium.googlesource.com/external/colorama.git"
},
"fetcher": "fetchFromGitiles"
},
"src/third_party/compiler-rt/src": {
"args": {
"hash": "sha256-FVdcKGwRuno3AzS6FUvI8OTj3mBMRfFR2A8GzYcwIU4=",
"rev": "57196dd146582915c955f6d388e31aea93220c51",
"url": "https://chromium.googlesource.com/external/github.com/llvm/llvm-project/compiler-rt.git"
},
"fetcher": "fetchFromGitiles"
},
"src/third_party/crc32c/src": {
"args": {
"hash": "sha256-KBraGaO5LmmPP+p8RuDogGldbTWdNDK+WzF4Q09keuE=",
"rev": "d3d60ac6e0f16780bcfcc825385e1d338801a558",
"url": "https://chromium.googlesource.com/external/github.com/google/crc32c.git"
},
"fetcher": "fetchFromGitiles"
},
"src/third_party/dav1d/libdav1d": {
"args": {
"hash": "sha256-+DY4p41VuAlx7NvOfXjWzgEhvtpebjkjbFwSYOzSjv4=",
"rev": "8d956180934f16244bdb58b39175824775125e55",
"url": "https://chromium.googlesource.com/external/github.com/videolan/dav1d.git"
},
"fetcher": "fetchFromGitiles"
},
"src/third_party/depot_tools": {
"args": {
"hash": "sha256-1avxBlK0WLHTru5wUecbiGpSEYv8Epobsl4EfCaWX9A=",
"rev": "a8900cc0f023d6a662eb66b317e8ddceeb113490",
"url": "https://chromium.googlesource.com/chromium/tools/depot_tools.git"
},
"fetcher": "fetchFromGitiles"
},
"src/third_party/ffmpeg": {
"args": {
"hash": "sha256-noc3iZ1yCEgkwWyznx48rXC8JuKxla9QgC/CIjRL/y8=",
"rev": "dcdd0fa51b65a0b1688ff6b8f0cc81908f09ded2",
"url": "https://chromium.googlesource.com/chromium/third_party/ffmpeg.git"
},
"fetcher": "fetchFromGitiles"
},
"src/third_party/flatbuffers/src": {
"args": {
"hash": "sha256-tbc45o0MbMvK5XqRUJt5Eg8BU6+TJqlmwFgQhHq6wRM=",
"rev": "8db59321d9f02cdffa30126654059c7d02f70c32",
"url": "https://chromium.googlesource.com/external/github.com/google/flatbuffers.git"
},
"fetcher": "fetchFromGitiles"
},
"src/third_party/fontconfig/src": {
"args": {
"hash": "sha256-Kz7KY+evfOciKFHIBLG1JxIRgHRTzuBLgxXHv3m/Y1Y=",
"rev": "8cf0ce700a8abe0d97ace4bf7efc7f9534b729ba",
"url": "https://chromium.googlesource.com/external/fontconfig.git"
},
"fetcher": "fetchFromGitiles"
},
"src/third_party/freetype/src": {
"args": {
"hash": "sha256-Mt6uJGGHiGYNNLx2xrooYirynL9DW0s05G1GJiqzhi8=",
"rev": "e07e56c7f106b600262ab653d696b7b57f320127",
"url": "https://chromium.googlesource.com/chromium/src/third_party/freetype2.git"
},
"fetcher": "fetchFromGitiles"
},
"src/third_party/fuzztest/src": {
"args": {
"hash": "sha256-MHli8sadgC3OMesBGhkjPM/yW49KFOtdFuBII1bcFas=",
"rev": "f03aafb7516050ea73f617bf969f03eac641aefc",
"url": "https://chromium.googlesource.com/external/github.com/google/fuzztest.git"
},
"fetcher": "fetchFromGitiles"
},
"src/third_party/google_benchmark/src": {
"args": {
"hash": "sha256-cH8s1gP6kCcojAAfTt5iQCVqiAaSooNk4BdaILujM3w=",
"rev": "761305ec3b33abf30e08d50eb829e19a802581cc",
"url": "https://chromium.googlesource.com/external/github.com/google/benchmark.git"
},
"fetcher": "fetchFromGitiles"
},
"src/third_party/googletest/src": {
"args": {
"hash": "sha256-md/jPkFrs/0p0BYGyquh57Zxh+1dKaK26PDtUN1+Ce0=",
"rev": "09ffd0015395354774c059a17d9f5bee36177ff9",
"url": "https://chromium.googlesource.com/external/github.com/google/googletest.git"
},
"fetcher": "fetchFromGitiles"
},
"src/third_party/grpc/src": {
"args": {
"hash": "sha256-z96goSSgBUvTjNse/LO88zNIzg+SWEYgVDaoA/elkLU=",
"rev": "cadf3c8329377e93b1f5e2d6a43d91f7a4becc28",
"url": "https://chromium.googlesource.com/external/github.com/grpc/grpc.git"
},
"fetcher": "fetchFromGitiles"
},
"src/third_party/gtest-parallel": {
"args": {
"hash": "sha256-VUuk5tBTh+aU2dxVWUF1FePWlKUJaWSiGSXk/J5zgHw=",
"rev": "96f4f904922f9bf66689e749c40f314845baaac8",
"url": "https://chromium.googlesource.com/external/github.com/google/gtest-parallel"
},
"fetcher": "fetchFromGitiles"
},
"src/third_party/harfbuzz-ng/src": {
"args": {
"hash": "sha256-lNnCtgIegUy4DLhYaGZXcEaFw83KWAHoKpz69AEsWp4=",
"rev": "9f83bbbe64654b45ba5bb06927ff36c2e7588495",
"url": "https://chromium.googlesource.com/external/github.com/harfbuzz/harfbuzz.git"
},
"fetcher": "fetchFromGitiles"
},
"src/third_party/icu": {
"args": {
"hash": "sha256-/T7uyzwTCDaamLwSvutvbn6BJuoG1RqeR+xhXI5jmJw=",
"rev": "b929596baebf0ab4ac7ec07f38365db4c50a559d",
"url": "https://chromium.googlesource.com/chromium/deps/icu.git"
},
"fetcher": "fetchFromGitiles"
},
"src/third_party/instrumented_libs": {
"args": {
"hash": "sha256-8kokdsnn5jD9KgM/6g0NuITBbKkGXWEM4BMr1nCrfdU=",
"rev": "69015643b3f68dbd438c010439c59adc52cac808",
"url": "https://chromium.googlesource.com/chromium/third_party/instrumented_libraries.git"
},
"fetcher": "fetchFromGitiles"
},
"src/third_party/jsoncpp/source": {
"args": {
"hash": "sha256-bSLNcoYBz3QCt5VuTR056V9mU2PmBuYBa0W6hFg2m8Q=",
"rev": "42e892d96e47b1f6e29844cc705e148ec4856448",
"url": "https://chromium.googlesource.com/external/github.com/open-source-parsers/jsoncpp.git"
},
"fetcher": "fetchFromGitiles"
},
"src/third_party/libFuzzer/src": {
"args": {
"hash": "sha256-Lb+HczYax0T7qvC0/Nwhc5l2szQTUYDouWRMD/Qz7sA=",
"rev": "e31b99917861f891308269c36a32363b120126bb",
"url": "https://chromium.googlesource.com/external/github.com/llvm/llvm-project/compiler-rt/lib/fuzzer.git"
},
"fetcher": "fetchFromGitiles"
},
"src/third_party/libaom/source/libaom": {
"args": {
"hash": "sha256-pyLKjLG83Jlx6I+0M8Ah94ku4NIFcrHNYswfVHMvdrc=",
"rev": "2cca4aba034f99842c2e6cdc173f83801d289764",
"url": "https://aomedia.googlesource.com/aom.git"
},
"fetcher": "fetchFromGitiles"
},
"src/third_party/libc++/src": {
"args": {
"hash": "sha256-36ulJk/YTfP5k1sDeA/WQyIO8xaplRKK4cQhfTZdpko=",
"rev": "a01c02c9d4acbdae3b7e8a2f3ee58579a9c29f96",
"url": "https://chromium.googlesource.com/external/github.com/llvm/llvm-project/libcxx.git"
},
"fetcher": "fetchFromGitiles"
},
"src/third_party/libc++abi/src": {
"args": {
"hash": "sha256-DkCvfFjMztFTzKf081XyiefW6tMBSZ1AdzcPzXAVPnk=",
"rev": "9810fb23f6ba666f017c2b67c67de2bcac2b44bd",
"url": "https://chromium.googlesource.com/external/github.com/llvm/llvm-project/libcxxabi.git"
},
"fetcher": "fetchFromGitiles"
},
"src/third_party/libjpeg_turbo": {
"args": {
"hash": "sha256-Ig+tmprZDvlf/M72/DTar2pbxat9ZElgSqdXdoM0lPs=",
"rev": "e14cbfaa85529d47f9f55b0f104a579c1061f9ad",
"url": "https://chromium.googlesource.com/chromium/deps/libjpeg_turbo.git"
},
"fetcher": "fetchFromGitiles"
},
"src/third_party/libsrtp": {
"args": {
"hash": "sha256-bkG1+ss+1a2rCHGwZjhvf5UaNVbPPZJt9HZSIPBKGwM=",
"rev": "a52756acb1c5e133089c798736dd171567df11f5",
"url": "https://chromium.googlesource.com/chromium/deps/libsrtp.git"
},
"fetcher": "fetchFromGitiles"
},
"src/third_party/libunwind/src": {
"args": {
"hash": "sha256-O1S3ijnoVrTHmZDGmgQQe0MVGsSZL7usXAPflGFmMXY=",
"rev": "8575f4ae4fcf8892938bd9766cf1a5c90a0ed04e",
"url": "https://chromium.googlesource.com/external/github.com/llvm/llvm-project/libunwind.git"
},
"fetcher": "fetchFromGitiles"
},
"src/third_party/libvpx/source/libvpx": {
"args": {
"hash": "sha256-SFdYF8vnwNHQbZ1N/ZHr4kxfi9o+BAtuqbak80m9uP4=",
"rev": "b84ca9b63730e7d4563573a56a66317eb0087ebf",
"url": "https://chromium.googlesource.com/webm/libvpx.git"
},
"fetcher": "fetchFromGitiles"
},
"src/third_party/libyuv": {
"args": {
"hash": "sha256-J9Wi3aCc6OjtQCP8JnrY7PYrY587dKLaa1KGAMWmE0c=",
"rev": "61bdaee13a701d2b52c6dc943ccc5c888077a591",
"url": "https://chromium.googlesource.com/libyuv/libyuv.git"
},
"fetcher": "fetchFromGitiles"
},
"src/third_party/llvm-libc/src": {
"args": {
"hash": "sha256-BsoHIvdqgYzBUkd23++enEHIhq5GeVWrWdVdhXrHh9A=",
"rev": "9c3ae3120fe83b998d0498dcc9ad3a56c29fad0c",
"url": "https://chromium.googlesource.com/external/github.com/llvm/llvm-project/libc.git"
},
"fetcher": "fetchFromGitiles"
},
"src/third_party/lss": {
"args": {
"hash": "sha256-rhp4EcZYdgSfu9cqn+zxxGx6v2IW8uX8V+iA0UfZhFY=",
"rev": "ed31caa60f20a4f6569883b2d752ef7522de51e0",
"url": "https://chromium.googlesource.com/linux-syscall-support.git"
},
"fetcher": "fetchFromGitiles"
},
"src/third_party/nasm": {
"args": {
"hash": "sha256-neYrS4kQ76ihUh22Q3uPR67Ld8+yerA922YSZU1KxJs=",
"rev": "9f916e90e6fc34ec302573f6ce147e43e33d68ca",
"url": "https://chromium.googlesource.com/chromium/deps/nasm.git"
},
"fetcher": "fetchFromGitiles"
},
"src/third_party/openh264/src": {
"args": {
"hash": "sha256-tf0lnxATCkoq+xRti6gK6J47HwioAYWnpEsLGSA5Xdg=",
"rev": "652bdb7719f30b52b08e506645a7322ff1b2cc6f",
"url": "https://chromium.googlesource.com/external/github.com/cisco/openh264"
},
"fetcher": "fetchFromGitiles"
},
"src/third_party/perfetto": {
"args": {
"hash": "sha256-kzVsti2tygOMgT61TmCz26AByMd3gIXA6xz8RE0iCz4=",
"rev": "dd35b295cd359ba094404218414955f961a0d6ae",
"url": "https://chromium.googlesource.com/external/github.com/google/perfetto.git"
},
"fetcher": "fetchFromGitiles"
},
"src/third_party/protobuf-javascript/src": {
"args": {
"hash": "sha256-c/aC+LZQtedL5oouUXw2eTF6xD7LN3J3C0q3D0wl+W0=",
"rev": "28bf5df73ef2f345a936d9cc95d64ba8ed426a53",
"url": "https://chromium.googlesource.com/external/github.com/protocolbuffers/protobuf-javascript"
},
"fetcher": "fetchFromGitiles"
},
"src/third_party/re2/src": {
"args": {
"hash": "sha256-f/k2rloV2Nwb0KuJGUX4SijFxAx69EXcsXOG4vo+Kis=",
"rev": "c84a140c93352cdabbfb547c531be34515b12228",
"url": "https://chromium.googlesource.com/external/github.com/google/re2.git"
},
"fetcher": "fetchFromGitiles"
},
"src/tools": {
"args": {
"hash": "sha256-j95oiK5+hhKC+NNQ27EVZugZI/n2QZJNRyz2QE4pVXc=",
"rev": "901b847deda65d44f1bba16a9f47e2ea68a805be",
"url": "https://chromium.googlesource.com/chromium/src/tools"
},
"fetcher": "fetchFromGitiles"
}
}

View File

@@ -0,0 +1,136 @@
{
stdenv,
lib,
buildPackages,
ninja,
gn,
python3,
pkg-config,
glib,
alsa-lib,
pulseaudio,
writeShellScriptBin,
gclient2nix,
rustc,
}:
let
chromiumRosettaStone = {
cpu =
platform:
let
name = platform.parsed.cpu.name;
in
(
{
"x86_64" = "x64";
"i686" = "x86";
"arm" = "arm";
"aarch64" = "arm64";
}
.${name} or (throw "no chromium Rosetta Stone entry for cpu: ${name}")
);
};
in
stdenv.mkDerivation (finalAttrs: {
pname = "signal-webrtc";
version = finalAttrs.gclientDeps."src".path.rev;
gclientDeps = gclient2nix.importGclientDeps ./webrtc-sources.json;
sourceRoot = "src";
nativeBuildInputs = [
gn
ninja
(writeShellScriptBin "vpython3" ''
exec python3 "$@"
'')
python3
rustc
pkg-config
gclient2nix.gclientUnpackHook
];
buildInputs = [
glib
alsa-lib
pulseaudio
];
patches = [
./webrtc-fix-gcc-build.patch
];
postPatch = ''
substituteInPlace build/toolchain/linux/BUILD.gn \
--replace-fail 'toolprefix = "aarch64-linux-gnu-"' 'toolprefix = ""'
patchShebangs build/mac/should_use_hermetic_xcode.py
substituteInPlace modules/audio_device/linux/pulseaudiosymboltable_linux.cc \
--replace-fail "libpulse.so.0" "${pulseaudio}/lib/libpulse.so.0"
substituteInPlace modules/audio_device/linux/alsasymboltable_linux.cc \
--replace-fail "libasound.so.2" "${alsa-lib}/lib/libasound.so.2"
'';
preConfigure = ''
echo "$SOURCE_DATE_EPOCH" > build/util/LASTCHANGE.committime
echo "generate_location_tags = true" >> build/config/gclient_args.gni
'';
gnFlags = [
# webrtc uses chromium's `src/build/BUILDCONFIG.gn`. many of these flags
# are copied from pkgs/applications/networking/browsers/chromium/common.nix.
''target_os="linux"''
''target_cpu="${chromiumRosettaStone.cpu stdenv.hostPlatform}"''
''pkg_config="${stdenv.cc.targetPrefix}pkg-config"''
"use_sysroot=false"
"is_clang=false"
"treat_warnings_as_errors=false"
"use_llvm_libatomic=false"
# https://github.com/signalapp/ringrtc/blob/main/bin/build-desktop
"rtc_build_examples=false"
"rtc_build_tools=false"
"rtc_use_x11=false"
"rtc_enable_sctp=false"
"rtc_libvpx_build_vp9=true"
"rtc_disable_metrics=true"
"rtc_disable_trace_events=true"
"is_debug=false"
"symbol_level=1"
"rtc_include_tests=false"
"rtc_enable_protobuf=false"
''rust_sysroot_absolute="${buildPackages.rustc}"''
# Build using the system toolchain (for Linux distributions):
#
# What you would expect to be called "target_toolchain" is
# actually called either "default_toolchain" or "custom_toolchain",
# depending on which part of the codebase you are in; see:
# https://chromium.googlesource.com/chromium/src/build/+/3c4595444cc6d514600414e468db432e0f05b40f/config/BUILDCONFIG.gn#17
''custom_toolchain="//build/toolchain/linux/unbundle:default"''
''host_toolchain="//build/toolchain/linux/unbundle:default"''
]
++ lib.optionals (stdenv.buildPlatform != stdenv.hostPlatform) [
''host_toolchain="//build/toolchain/linux/unbundle:host"''
''v8_snapshot_toolchain="//build/toolchain/linux/unbundle:host"''
];
ninjaFlags = [ "webrtc" ];
installPhase = ''
runHook preInstall
install -D obj/libwebrtc${stdenv.hostPlatform.extensions.staticLibrary} $out/lib/libwebrtc${stdenv.hostPlatform.extensions.staticLibrary}
runHook postInstall
'';
meta = {
description = "WebRTC library used by Signal";
homepage = "https://github.com/SignalApp/webrtc";
license = lib.licenses.bsd3;
maintainers = [ ];
platforms = lib.platforms.linux;
};
})

View File

@@ -0,0 +1,45 @@
{
lib,
python3,
fetchPypi,
nix-update-script,
}:
python3.pkgs.buildPythonApplication rec {
pname = "signal-export";
version = "3.8.1";
pyproject = true;
src = fetchPypi {
inherit version;
pname = "signal_export";
hash = "sha256-o+Z4vSqu2avQyzf93o5s2hKmCK2I8aoF4JGlLzM/9xI=";
};
build-system = with python3.pkgs; [
pdm-backend
];
propagatedBuildInputs = with python3.pkgs; [
typer
beautifulsoup4
emoji
markdown
pycryptodome
sqlcipher3-wheels
];
passthru.updateScript = nix-update-script { };
meta = with lib; {
mainProgram = "sigexport";
homepage = "https://github.com/carderne/signal-export";
description = "Export your Signal chats to markdown files with attachments";
platforms = platforms.unix;
license = licenses.mit;
maintainers = with maintainers; [
phaer
picnoir
];
};
}

View File

@@ -0,0 +1,59 @@
{
lib,
stdenv,
fetchFromGitHub,
cmake,
pkg-config,
darwinMinVersionHook,
dbus,
openssl,
sqlite,
}:
stdenv.mkDerivation rec {
pname = "signalbackup-tools";
version = "20251006-1";
src = fetchFromGitHub {
owner = "bepaald";
repo = "signalbackup-tools";
tag = version;
hash = "sha256-DVJYwiE1AW79vzH+aBFSKyTuKAnoyQrHI3gfsNeIg88=";
};
nativeBuildInputs = [
cmake
]
++ lib.optionals stdenv.hostPlatform.isLinux [
pkg-config
];
buildInputs = [
openssl
sqlite
]
++ lib.optionals stdenv.hostPlatform.isDarwin [
(darwinMinVersionHook "13.3")
]
++ lib.optionals stdenv.hostPlatform.isLinux [
dbus
];
installPhase = ''
runHook preInstall
mkdir -p $out/bin
cp signalbackup-tools $out/bin/
runHook postInstall
'';
meta = with lib; {
description = "Tool to work with Signal Backup files";
mainProgram = "signalbackup-tools";
homepage = "https://github.com/bepaald/signalbackup-tools";
license = licenses.gpl3Only;
maintainers = [ maintainers.malo ];
platforms = platforms.all;
};
}

View File

@@ -0,0 +1,67 @@
{
lib,
stdenv,
fetchFromGitHub,
php,
makeWrapper,
imagemagick,
librsvg,
potrace,
pdftk,
ghostscript,
}:
stdenv.mkDerivation rec {
pname = "signaturepdf";
version = "1.9.0";
src = fetchFromGitHub {
owner = "24eme";
repo = "signaturepdf";
rev = "v${version}";
hash = "sha256-DLPLloSt9yMEWFqmplQ8WictanlwRc4oQbTEQLUxR+E=";
};
nativeBuildInputs = [ makeWrapper ];
dontConfigure = true;
dontBuild = true;
installPhase = ''
runHook preInstall
mkdir -p $out/share/signaturepdf $out/bin
cp --target-directory=$out/share/signaturepdf --recursive \
app.php config locale public templates vendor lib
makeWrapper ${lib.getExe php} $out/bin/signaturepdf \
--inherit-argv0 \
--chdir $out/share/signaturepdf \
--prefix PATH : ${
lib.makeBinPath [
imagemagick
librsvg
potrace
pdftk
ghostscript
]
} \
--run 'port=$1' \
--run '[ $# -ge 1 ] || ( echo "Usage $0 <port> -d upload_max_filesize=24M -d post_max_size=24M -d max_file_uploads=201" >&2 && exit 1 )' \
--run 'shift' \
--run 'echo "You may now open a web browser on http://localhost:$port"' \
--add-flags '-S "localhost:$port" -t public'
runHook postInstall
'';
meta = {
description = "Web software for signing PDFs and also organize pages, edit metadata and compress pdf";
mainProgram = "signaturepdf";
homepage = "https://pdf.24eme.fr/";
changelog = "https://github.com/24eme/signaturepdf/releases/tag/v${version}";
license = lib.licenses.agpl3Only;
platforms = lib.platforms.all;
maintainers = with lib.maintainers; [ DamienCassou ];
};
}

View File

@@ -0,0 +1,43 @@
{
lib,
stdenv,
fetchFromGitHub,
libbsd,
pkg-config,
}:
stdenv.mkDerivation rec {
pname = "signify";
version = "32";
src = fetchFromGitHub {
owner = "aperezdc";
repo = "signify";
rev = "v${version}";
sha256 = "sha256-y2A+Szt451CmaWOc2Y2vBSwSgziJsSnTjNClbdyxG2U=";
};
doCheck = true;
nativeBuildInputs = [ pkg-config ];
buildInputs = [ libbsd ];
postPatch = ''
substituteInPlace Makefile --replace "shell pkg-config" "shell $PKG_CONFIG"
'';
installFlags = [ "PREFIX=$(out)" ];
meta = with lib; {
description = "OpenBSD signing tool";
mainProgram = "signify";
longDescription = ''
OpenBSDs signing tool, which uses the Ed25519 public key signature system
for fast signing and verification of messages using small public keys.
'';
homepage = "https://www.tedunangst.com/flak/post/signify";
license = licenses.isc;
maintainers = [ maintainers.rlupton20 ];
platforms = platforms.linux;
};
}

View File

@@ -0,0 +1,16 @@
--- a/gpgwrap/Makefile 2015-06-03 16:24:48.723129144 +0200
+++ b/gpgwrap/Makefile 2015-06-03 16:24:11.639744346 +0200
@@ -1,9 +1,12 @@
MAKE=make
-.PHONY: all clean
+.PHONY: all clean install
all:
cd src && ${MAKE} all DIET="${DIET}"
+install:
+
+
clean:
cd src && ${MAKE} clean

View File

@@ -0,0 +1,313 @@
{
lib,
stdenv,
fetchFromGitLab,
autoconf,
automake,
makeWrapper,
python3,
perl,
perlPackages,
libmd,
gnupg,
which,
getopt,
libpaper,
net-tools,
qprint,
sendmailPath ? "/run/wrappers/bin/sendmail",
}:
let
# All runtime dependencies from the CPAN graph:
# https://widgets.stratopan.com/wheel?q=GnuPG-Interface-0.52&runtime=1&fs=1
GnuPGInterfaceRuntimeDependencies = with perlPackages; [
strictures
ClassMethodModifiers
DataPerl
DevelGlobalDestruction
ExporterTiny
GnuPGInterface
ListMoreUtils
ModuleRuntime
Moo
MooXHandlesVia
MooXlate
RoleTiny
SubExporterProgressive
SubQuote
TypeTiny
];
in
stdenv.mkDerivation rec {
pname = "signing-party";
version = "2.12";
src = fetchFromGitLab {
domain = "salsa.debian.org";
owner = "signing-party-team";
repo = "signing-party";
rev = "v${version}";
sha256 = "sha256-hUlMClx/TRmnC2Ah6MIsNGpZGI/KmgWt2z4XzbIAnag=";
};
# TODO: Get this patch upstream...
patches = [ ./gpgwrap_makefile.patch ];
postPatch = ''
substituteInPlace gpg-mailkeys/gpg-mailkeys --replace \
"/usr/sbin/sendmail" "${sendmailPath}"
'';
# One can use the following command to find all relevant Makefiles:
# grep -R '$(DESTDIR)/usr' | cut -d: -f1 | sort -u | grep -v 'debian/rules'
preBuild = ''
substituteInPlace gpgsigs/Makefile --replace '$(DESTDIR)/usr' "$out"
substituteInPlace keyanalyze/Makefile --replace '$(DESTDIR)/usr' "$out"
substituteInPlace keylookup/Makefile --replace '$(DESTDIR)/usr' "$out"
substituteInPlace sig2dot/Makefile --replace '$(DESTDIR)/usr' "$out"
substituteInPlace springgraph/Makefile --replace '$(DESTDIR)/usr' "$out"
'';
# Perl is required for it's pod2man.
# Python and Perl are required for patching the script interpreter paths.
nativeBuildInputs = [
autoconf
automake
makeWrapper
];
buildInputs = [
python3
perl
perlPackages.GnuPGInterface
libmd
gnupg
];
postInstall = ''
# Install all tools which aren't handled by 'make install'.
# TODO: Fix upstream...!
# caff: CA - Fire and Forget signs and mails a key
install -D -m555 caff/caff $out/bin/caff;
install -D -m444 caff/caff.1 $out/share/man/man1/caff.1;
# pgp-clean: removes all non-self signatures from key
install -D -m555 caff/pgp-clean $out/bin/pgp-clean;
install -D -m444 caff/pgp-clean.1 $out/share/man/man1/pgp-clean.1;
# pgp-fixkey: removes broken packets from keys
install -D -m555 caff/pgp-fixkey $out/bin/pgp-fixkey;
install -D -m444 caff/pgp-fixkey.1 $out/share/man/man1/pgp-fixkey.1;
# gpg-mailkeys: simply mail out a signed key to its owner
install -D -m555 gpg-mailkeys/gpg-mailkeys $out/bin/gpg-mailkeys;
install -D -m444 gpg-mailkeys/gpg-mailkeys.1 $out/share/man/man1/gpg-mailkeys.1;
# gpg-key2ps: generate PostScript file with fingerprint paper slips
install -D -m555 gpg-key2ps/gpg-key2ps $out/bin/gpg-key2ps;
install -D -m444 gpg-key2ps/gpg-key2ps.1 $out/share/man/man1/gpg-key2ps.1;
# gpgdir: recursive directory encryption tool
install -D -m555 gpgdir/gpgdir $out/bin/gpgdir;
install -D -m444 gpgdir/gpgdir.1 $out/share/man/man1/gpgdir.1;
# gpglist: show who signed which of your UIDs
install -D -m555 gpglist/gpglist $out/bin/gpglist;
install -D -m444 gpglist/gpglist.1 $out/share/man/man1/gpglist.1;
# gpgsigs: annotates list of GnuPG keys with already done signatures
# The manual page is not handled by 'make install'
install -D -m444 gpgsigs/gpgsigs.1 $out/share/man/man1/gpgsigs.1;
# gpgparticipants: create list of party participants for the organiser
install -D -m555 gpgparticipants/gpgparticipants $out/bin/gpgparticipants;
install -D -m444 gpgparticipants/gpgparticipants.1 $out/share/man/man1/gpgparticipants.1;
install -D -m555 gpgparticipants/gpgparticipants-prefill $out/bin/gpgparticipants-prefill;
install -D -m444 gpgparticipants/gpgparticipants-prefill.1 $out/share/man/man1/gpgparticipants-prefill.1;
install -D -m555 gpgparticipants/gpgparticipants-filter $out/bin/gpgparticipants-filter;
install -D -m444 gpgparticipants/gpgparticipants-filter.1 $out/share/man/man1/gpgparticipants-filter.1;
# gpgwrap: a passphrase wrapper
install -D -m555 gpgwrap/bin/gpgwrap $out/bin/gpgwrap;
install -D -m444 gpgwrap/doc/gpgwrap.1 $out/share/man/man1/gpgwrap.1;
# keyanalyze: minimum signing distance (MSD) analysis on keyrings
# Only the binaries are handled by 'make install'
install -D -m444 keyanalyze/keyanalyze.1 $out/share/man/man1/keyanalyze.1;
install -D -m444 keyanalyze/pgpring/pgpring.1 $out/share/man/man1/pgpring.1;
install -D -m444 keyanalyze/process_keys.1 $out/share/man/man1/process_keys.1;
# keylookup: ncurses wrapper around gpg --search
# Handled by 'make install'
# sig2dot: converts a list of GnuPG signatures to a .dot file
# Handled by 'make install'
# springgraph: creates a graph from a .dot file
# Handled by 'make install'
# keyart: creates a random ASCII art of a PGP key file
install -D -m555 keyart/keyart $out/bin/keyart;
install -D -m444 keyart/doc/keyart.1 $out/share/man/man1/keyart.1;
# gpg-key2latex: generate LaTeX file with fingerprint paper slips
install -D -m555 gpg-key2latex/gpg-key2latex $out/bin/gpg-key2latex;
install -D -m444 gpg-key2latex/gpg-key2latex.1 $out/share/man/man1/gpg-key2latex.1;
'';
postFixup = ''
# Add the runtime dependencies for all programs (but mainly for the Perl
# scripts)
wrapProgram $out/bin/caff --set PERL5LIB \
${
with perlPackages;
makePerlPath (
[
TextTemplate
MIMETools
MailTools
TimeDate
NetIDNEncode
SubHandlesVia
]
++ GnuPGInterfaceRuntimeDependencies
)
} \
--prefix PATH ":" \
"${
lib.makeBinPath [
net-tools
gnupg
]
}"
wrapProgram $out/bin/gpg-key2latex --set PERL5LIB \
${perlPackages.makePerlPath GnuPGInterfaceRuntimeDependencies} \
--prefix PATH ":" \
"${
lib.makeBinPath [
gnupg
libpaper
]
}"
wrapProgram $out/bin/gpg-key2ps --prefix PATH ":" \
"${
lib.makeBinPath [
which
gnupg
libpaper
]
}"
wrapProgram $out/bin/gpg-mailkeys --prefix PATH ":" \
"${
lib.makeBinPath [
gnupg
qprint
]
}"
wrapProgram $out/bin/gpgdir --set PERL5LIB \
${
with perlPackages;
makePerlPath (
[
TermReadKey
]
++ GnuPGInterfaceRuntimeDependencies
)
} \
--prefix PATH ":" \
"${lib.makeBinPath [ gnupg ]}"
wrapProgram $out/bin/gpglist --prefix PATH ":" \
"${lib.makeBinPath [ gnupg ]}"
wrapProgram $out/bin/gpgparticipants --prefix PATH ":" \
"${
lib.makeBinPath [
getopt
gnupg
]
}"
# wrapProgram $out/bin/gpgparticipants-prefill
wrapProgram $out/bin/gpgparticipants-filter --prefix PATH ":" \
"${lib.makeBinPath [ gnupg ]}"
wrapProgram $out/bin/gpgsigs --set PERL5LIB \
${perlPackages.makePerlPath GnuPGInterfaceRuntimeDependencies} \
--prefix PATH ":" \
"${lib.makeBinPath [ gnupg ]}"
wrapProgram $out/bin/gpgwrap --prefix PATH ":" \
"${lib.makeBinPath [ gnupg ]}"
# wrapProgram $out/bin/keyanalyze --set PERL5LIB \
wrapProgram $out/bin/keyart --prefix PATH ":" \
"${lib.makeBinPath [ gnupg ]}"
wrapProgram $out/bin/keylookup --prefix PATH ":" \
"${lib.makeBinPath [ gnupg ]}"
wrapProgram $out/bin/pgp-clean --set PERL5LIB \
${perlPackages.makePerlPath GnuPGInterfaceRuntimeDependencies} \
--prefix PATH ":" \
"${lib.makeBinPath [ gnupg ]}"
wrapProgram $out/bin/pgp-fixkey --set PERL5LIB \
${perlPackages.makePerlPath GnuPGInterfaceRuntimeDependencies} \
--prefix PATH ":" \
"${lib.makeBinPath [ gnupg ]}"
# wrapProgram $out/bin/pgpring
# wrapProgram $out/bin/process_keys
# Upstream-Bug: Seems like sig2dot doesn't work with 2.1 (modern) anymore,
# please use 2.0 (stable) instead.
# wrapProgram $out/bin/sig2dot
wrapProgram $out/bin/springgraph --set PERL5LIB \
${with perlPackages; makePerlPath [ GD ]}
'';
meta = with lib; {
homepage = "https://salsa.debian.org/signing-party-team/signing-party";
description = "Collection of several projects relating to OpenPGP";
longDescription = ''
This is a collection of several projects relating to OpenPGP.
* caff: CA - Fire and Forget signs and mails a key
* pgp-clean: removes all non-self signatures from key
* pgp-fixkey: removes broken packets from keys
* gpg-mailkeys: simply mail out a signed key to its owner
* gpg-key2ps: generate PostScript file with fingerprint paper slips
* gpgdir: recursive directory encryption tool
* gpglist: show who signed which of your UIDs
* gpgsigs: annotates list of GnuPG keys with already done signatures
* gpgparticipants: create list of party participants for the organiser
* gpgwrap: a passphrase wrapper
* keyanalyze: minimum signing distance (MSD) analysis on keyrings
* keylookup: ncurses wrapper around gpg --search
* sig2dot: converts a list of GnuPG signatures to a .dot file
* springgraph: creates a graph from a .dot file
* keyart: creates a random ASCII art of a PGP key file
* gpg-key2latex: generate LaTeX file with fingerprint paper slips
'';
license = with licenses; [
bsd2
bsd3
gpl2Only
gpl2Plus
gpl3Plus
];
maintainers = [ ];
platforms = platforms.linux;
};
}

View File

@@ -0,0 +1,37 @@
{
lib,
runCommand,
fetchurl,
}:
runCommand "signwriting-1.1.4"
{
src1 = fetchurl {
url = "https://github.com/Slevinski/signwriting_2010_fonts/raw/61c8e7123a1168657b5d34d85266a637f67b9d2b/fonts/SignWriting%202010.ttf";
name = "SignWriting_2010.ttf";
sha256 = "1abjzykbjx2hal8mrxp51rvblv3q84akyn9qhjfaj20rwphkf5zj";
};
src2 = fetchurl {
url = "https://github.com/Slevinski/signwriting_2010_fonts/raw/61c8e7123a1168657b5d34d85266a637f67b9d2b/fonts/SignWriting%202010%20Filling.ttf";
name = "SignWriting_2010_Filling.ttf";
sha256 = "0am5wbf7jdy9szxkbsc5f3959cxvbj7mr0hy1ziqmkz02c6xjw2m";
};
outputHashAlgo = "sha256";
outputHashMode = "recursive";
outputHash = "0cn37s3lc7gbr8036l7ia2869qmxglkmgllh3r9q5j54g3sfjc7q";
meta = with lib; {
homepage = "https://github.com/Slevinski/signwriting_2010_fonts";
description = "Typeface for written sign languages";
maintainers = with maintainers; [ mathnerd314 ];
license = licenses.ofl;
platforms = platforms.all;
};
}
''
mkdir -p $out/share/fonts/truetype
cp $src1 $out/share/fonts/truetype/SignWriting_2010.ttf
cp $src2 $out/share/fonts/truetype/SignWriting_2010_Filling.ttf
''

View File

@@ -0,0 +1,43 @@
{
lib,
stdenv,
fetchgit,
autoreconfHook,
pkg-config,
glib,
libsigrok,
libsigrokdecode,
}:
stdenv.mkDerivation {
pname = "sigrok-cli";
version = "0.7.2-unstable-2023-04-10";
src = fetchgit {
url = "git://sigrok.org/sigrok-cli";
rev = "9d9f7b82008e3b3665bda12a63a3339e9f7aabc3";
hash = "sha256-B2FJxRkfKELrtqxZDv5QTvntpu9zJnTK15CAUYbf+5M=";
};
nativeBuildInputs = [
autoreconfHook
pkg-config
];
buildInputs = [
glib
libsigrok
libsigrokdecode
];
meta = with lib; {
description = "Command-line frontend for the sigrok signal analysis software suite";
mainProgram = "sigrok-cli";
homepage = "https://sigrok.org/";
license = licenses.gpl3Plus;
platforms = platforms.linux ++ platforms.darwin;
maintainers = with maintainers; [
bjornfor
vifino
];
};
}

View File

@@ -0,0 +1,44 @@
{
lib,
stdenv,
fetchgit,
autoreconfHook,
sdcc,
}:
stdenv.mkDerivation {
pname = "sigrok-firmware-fx2lafw";
version = "0.1.7-unstable-2024-02-03";
src = fetchgit {
url = "git://sigrok.org/sigrok-firmware-fx2lafw";
rev = "0f2d3242ffb5582e5b9a018ed9ae9812d517a56e";
hash = "sha256-xveVcwAwtqKGD3/UvnBz5ASvTyg/6jAlTedZElhV2HE=";
};
enableParallelBuilding = true;
nativeBuildInputs = [
autoreconfHook
sdcc
];
meta = with lib; {
description = "Firmware for FX2 logic analyzers";
homepage = "https://sigrok.org/";
# licensing details explained in:
# https://sigrok.org/gitweb/?p=sigrok-firmware-fx2lafw.git;a=blob;f=README;hb=HEAD#l122
license = with licenses; [
gpl2Plus # overall
lgpl21Plus # fx2lib, Hantek 6022BE, Sainsmart DDS120 firmwares
];
sourceProvenance = with sourceTypes; [ fromSource ];
platforms = platforms.all;
maintainers = with maintainers; [
panicgh
vifino
];
};
}

View File

@@ -0,0 +1,30 @@
{
lib,
stdenv,
fetchFromGitHub,
cmake,
}:
stdenv.mkDerivation rec {
pname = "sigslot";
version = "1.2.3";
src = fetchFromGitHub {
owner = "palacaze";
repo = "sigslot";
rev = "v${version}";
hash = "sha256-8JBZ6Xid/uAOfiPKgJKetpj/oBb8lRLPgjkMnrfTKaM=";
};
nativeBuildInputs = [ cmake ];
dontBuild = true;
meta = with lib; {
description = "Header-only, thread safe implementation of signal-slots for C++";
license = licenses.mit;
homepage = "https://github.com/palacaze/sigslot";
maintainers = with maintainers; [ azahi ];
platforms = platforms.all;
};
}

View File

@@ -0,0 +1,36 @@
{
lib,
buildGoModule,
fetchFromGitHub,
pkg-config,
libsecret,
}:
buildGoModule rec {
name = "sigtop";
version = "0.22.0";
src = fetchFromGitHub {
owner = "tbvdm";
repo = "sigtop";
rev = "v${version}";
sha256 = "sha256-EvdO7fGnNdu1/f61c4k2dpeMUqKaq9xKGgevAQ+f3q0=";
};
vendorHash = "sha256-EAMnuDm3Lmw2i4sumgCTE58JCtMq9QeT6pjtmC/PKMA=";
nativeBuildInputs = [ pkg-config ];
buildInputs = [ libsecret ];
makeFlags = [
"PREFIX=\${out}"
];
meta = with lib; {
description = "Utility to export messages, attachments and other data from Signal Desktop";
mainProgram = "sigtop";
license = licenses.isc;
platforms = platforms.all;
maintainers = with maintainers; [ fricklerhandwerk ];
};
}

View File

@@ -0,0 +1,44 @@
{
lib,
stdenv,
fetchFromGitHub,
cmake,
pkg-config,
fftwSinglePrec,
libsndfile,
volk,
}:
stdenv.mkDerivation {
pname = "sigutils";
version = "unstable-2022-07-05";
src = fetchFromGitHub {
owner = "BatchDrake";
repo = "sigutils";
rev = "1d7559d427aadd253dd825eef26bf15e54860c5f";
sha256 = "sha256-wvd6sixwGmR9R4x+swLVqXre4Dqnj10jZIXUfaJcmBw=";
};
nativeBuildInputs = [
cmake
pkg-config
];
buildInputs = [
fftwSinglePrec
libsndfile
volk
];
meta = with lib; {
description = "Small signal processing utility library";
homepage = "https://github.com/BatchDrake/sigutils";
license = licenses.gpl3;
platforms = platforms.all;
maintainers = with maintainers; [
polygon
oxapentane
];
};
}

View File

@@ -0,0 +1,57 @@
{
lib,
stdenv,
fetchFromGitHub,
libfaketime,
xorg,
}:
stdenv.mkDerivation {
pname = "siji";
version = "2016-05-13";
src = fetchFromGitHub {
owner = "stark";
repo = "siji";
rev = "3cbb7fe938c33aaadbb657803ea5946e5157d6e2";
sha256 = "1408g4nxwdd682vjqpmgv0cp0bfnzzzwls62cjs9zrds16xa9dpf";
};
nativeBuildInputs = [
libfaketime
xorg.fonttosfnt
xorg.mkfontscale
];
buildPhase = ''
# compress pcf fonts
gzip -n -9 pcf/*
# convert bdf fonts to otb
for i in bdf/*; do
name=$(basename $i .bdf)
faketime -f "1970-01-01 00:00:01" \
fonttosfnt -v -o "$name.otb" "$i"
done
'';
postInstall = ''
install -m 644 -D *.otb pcf/* -t "$out/share/fonts/misc"
install -m 644 -D bdf/* -t "$bdf/share/fonts/misc"
mkfontdir "$out/share/fonts/misc"
mkfontdir "$bdf/share/fonts/misc"
'';
outputs = [
"out"
"bdf"
];
meta = with lib; {
homepage = "https://github.com/stark/siji";
description = "Iconic bitmap font based on Stlarch with additional glyphs";
license = licenses.gpl2;
platforms = platforms.all;
maintainers = [ maintainers.asymmetric ];
};
}

View File

@@ -0,0 +1,62 @@
{
lib,
rustPlatform,
buildPackages,
fetchFromGitHub,
installShellFiles,
pkg-config,
libgit2,
openssl,
stdenv,
zlib,
zstd,
}:
rustPlatform.buildRustPackage rec {
pname = "ghr";
version = "0.4.4";
src = fetchFromGitHub {
owner = "siketyan";
repo = "ghr";
rev = "v${version}";
hash = "sha256-L9+rcdt+MGZSCOJyCE4t/TT6Fjtxvfr9LBJYyRrx208=";
};
cargoHash = "sha256-xRa/brOYJ19J25wGdtNR2g+ouMyvz9YFXnzepeipWNQ=";
nativeBuildInputs = [
installShellFiles
pkg-config
];
buildInputs = [
libgit2
openssl
zlib
zstd
];
postInstall =
let
ghr = "${stdenv.hostPlatform.emulator buildPackages} $out/bin/ghr";
in
lib.optionalString (stdenv.hostPlatform.emulatorAvailable buildPackages) ''
installShellCompletion --cmd ghr \
--bash <(${ghr} shell --completion bash) \
--fish <(${ghr} shell --completion fish)
'';
env = {
OPENSSL_NO_VENDOR = true;
ZSTD_SYS_USE_PKG_CONFIG = true;
};
meta = with lib; {
description = "Yet another repository management with auto-attaching profiles";
homepage = "https://github.com/siketyan/ghr";
license = licenses.mit;
maintainers = with maintainers; [ sei40kr ];
mainProgram = "ghr";
};
}

View File

@@ -0,0 +1,33 @@
{
lib,
stdenvNoCC,
fetchzip,
}:
stdenvNoCC.mkDerivation rec {
pname = "sil-abyssinica";
version = "2.300";
src = fetchzip {
url = "https://software.sil.org/downloads/r/abyssinica/AbyssinicaSIL-${version}.zip";
hash = "sha256-3msQRxoIV1K8mjZr7xXKW54fELjNhteXZ5qg6t5+Vcg=";
};
installPhase = ''
runHook preInstall
mkdir -p $out/share/{fonts/truetype,doc/${pname}-${version}}
mv *.ttf $out/share/fonts/truetype/
mv *.txt documentation $out/share/doc/${pname}-${version}/
runHook postInstall
'';
meta = with lib; {
description = "Unicode font for Ethiopian and Erythrean scripts (Amharic et al.)";
homepage = "https://software.sil.org/abyssinica/";
license = licenses.ofl;
maintainers = with maintainers; [ serge ];
platforms = platforms.all;
};
}

View File

@@ -0,0 +1,34 @@
{
lib,
stdenvNoCC,
fetchzip,
}:
stdenvNoCC.mkDerivation rec {
pname = "sil-padauk";
version = "5.100";
src = fetchzip {
url = "https://software.sil.org/downloads/r/padauk/Padauk-${version}.zip";
hash = "sha256-Y4ZcxbPcgF349wDuT352xqaJji+FMfBH6P7WSWOw2iI=";
};
installPhase = ''
runHook preInstall
mkdir -p $out/share/fonts/truetype
mv *.ttf $out/share/fonts/truetype/
mkdir -p $out/share/doc/${pname}-${version}
mv *.txt documentation/ $out/share/doc/${pname}-${version}/
runHook postInstall
'';
meta = with lib; {
description = "Unicode-based font family with broad support for writing systems that use the Myanmar script";
homepage = "https://software.sil.org/padauk";
license = licenses.ofl;
maintainers = with maintainers; [ serge ];
platforms = platforms.all;
};
}

View File

@@ -0,0 +1,87 @@
{
pkgs,
lib,
stdenv,
fetchFromGitHub,
writeScript,
makeWrapper,
ncurses,
libX11,
}:
let
setup = writeScript "setup" ''
mkdir -p "$ANGBAND_PATH"
# copy all the data files into place
cp -ar $1/* "$ANGBAND_PATH"
# the copied files need to be writable
chmod +w -R "$ANGBAND_PATH"
'';
in
stdenv.mkDerivation rec {
pname = "sil-q";
version = "1.5.0";
src = fetchFromGitHub {
owner = "sil-quirk";
repo = "sil-q";
rev = "v${version}";
sha256 = "sha256-v/sWhPWF9cCKD8N0RHpwzChMM1t9G2yrMDmi1cZxdOs=";
};
nativeBuildInputs = [ makeWrapper ];
buildInputs = [
ncurses
libX11
];
# Makefile(s) and config are not top-level
sourceRoot = "${src.name}/src";
postPatch = ''
# allow usage of ANGBAND_PATH
substituteInPlace config.h --replace "#define FIXED_PATHS" ""
# change Makefile.std for ncurses according to its own comment
substituteInPlace Makefile.std --replace "-lcurses" "-lncurses"
'';
makefile = "Makefile.std";
installPhase = ''
runHook preInstall
mkdir -p $out/bin
cp sil $out/bin/sil-q
wrapProgram $out/bin/sil-q \
--run "export ANGBAND_PATH=\$HOME/.sil-q" \
--run "${setup} ${src}/lib"
runHook postInstall
'';
passthru.tests = {
saveDirCreation = pkgs.runCommand "save-dir-creation" { } ''
HOME=$(pwd) ${lib.getExe pkgs.sil-q} --help
test -d .sil-q && touch $out
'';
};
meta = {
description = "Roguelike game set in the First Age of Middle-earth";
mainProgram = "sil-q";
longDescription = ''
A game of adventure set in the First Age of Middle-earth, when the world still
rang with Elven song and gleamed with Dwarven mail.
Walk the dark halls of Angband. Slay creatures black and fell. Wrest a shining
Silmaril from Morgoths iron crown.
A fork of Sil that's still actively developed.
'';
homepage = "https://github.com/sil-quirk/sil-q";
license = lib.licenses.gpl2Only;
maintainers = [ lib.maintainers.kenran ];
platforms = lib.platforms.linux;
};
}

View File

@@ -0,0 +1,106 @@
{
pkgs,
lib,
stdenv,
fetchzip,
ncurses,
libX11,
libXaw,
libXt,
libXext,
libXmu,
makeWrapper,
writeScript,
}:
let
setup = writeScript "setup" ''
mkdir -p "$ANGBAND_PATH"
# Copy all the data files into place
cp -ar $1/* "$ANGBAND_PATH"
# The copied files are not writable, make them so
chmod +w -R "$ANGBAND_PATH"
'';
in
stdenv.mkDerivation rec {
pname = "Sil";
version = "1.3.0";
src = fetchzip {
url = "https://www.amirrorclear.net/flowers/game/sil/Sil-130-src.zip";
sha256 = "1amp2mr3fxascra0k76sdsvikjh8g76nqh46kka9379zd35lfq8w";
stripRoot = false;
};
nativeBuildInputs = [ makeWrapper ];
buildInputs = [
ncurses
libX11
libXaw
libXt
libXext
libXmu
];
sourceRoot = "${src.name}/Sil/src";
makefile = "Makefile.std";
postPatch = ''
# Allow usage of ANGBAND_PATH
substituteInPlace config.h --replace "#define FIXED_PATHS" ""
'';
preConfigure = ''
buildFlagsArray+=("LIBS=-lXaw -lXext -lSM -lICE -lXmu -lXt -lX11 -lncurses")
'';
# Workaround build failure on -fno-common toolchains like upstream
# gcc-10. Otherwise build fails as:
# ld: main.o:/build/source/Sil/src/externs.h:57: multiple definition of
# `mini_screenshot_char'; variable.o:/build/source/Sil/src/externs.h:57: first defined here
env.NIX_CFLAGS_COMPILE = "-fcommon";
installPhase = ''
runHook preInstall
# the makefile doesn't have a sensible install target, so we have to do it ourselves
mkdir -p $out/bin
cp sil $out/bin/sil
# Wrap the program to set a user-local ANGBAND_PATH, and run the setup script to copy files into place.
# We could just use the options for a user-local save and scores dir, but it tried to write to the
# lib directory anyway, so we might as well give everyone a copy
wrapProgram $out/bin/sil \
--run "export ANGBAND_PATH=\$HOME/.sil" \
--run "${setup} ${src}/Sil/lib"
runHook postInstall
'';
passthru.tests = {
saveDirCreation = pkgs.runCommand "save-dir-creation" { } ''
HOME=$(pwd) ${lib.getExe pkgs.sil} --help
test -d .sil && touch $out
'';
};
meta = {
description = "Rogue-like game set in the First Age of Middle-earth";
longDescription = ''
A game of adventure set in the First Age of Middle-earth, when the world still
rang with Elven song and gleamed with Dwarven mail.
Walk the dark halls of Angband. Slay creatures black and fell. Wrest a shining
Silmaril from Morgoths iron crown.
'';
homepage = "http://www.amirrorclear.net/flowers/game/sil/index.html";
license = lib.licenses.gpl2Only;
maintainers = with lib.maintainers; [
michaelpj
kenran
];
platforms = lib.platforms.linux;
mainProgram = "sil";
};
}

View File

@@ -0,0 +1,193 @@
{
lib,
stdenv,
fetchurl,
# nativeBuildInputs
zstd,
pkg-config,
jq,
cargo,
rustc,
rustPlatform,
luarocks,
# buildInputs
lua,
harfbuzz,
icu,
fontconfig,
libiconv,
# FONTCONFIG_FILE
makeFontsConf,
gentium-plus,
# passthru.tests
runCommand,
poppler-utils,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "sile";
version = "0.15.13";
src = fetchurl {
url = "https://github.com/sile-typesetter/sile/releases/download/v${finalAttrs.version}/sile-${finalAttrs.version}.tar.zst";
hash = "sha256-XpfBllGv9xBoe5MpLVNhy0EWUglLzIxiyBHBn3qBRks=";
};
cargoDeps = rustPlatform.fetchCargoVendor {
inherit (finalAttrs) pname version src;
dontConfigure = true;
nativeBuildInputs = [ zstd ];
hash = "sha256-phRnyaF8KTYlgrgBeVNPxBAokRBUoj9vs7P9y97wbG8=";
};
nativeBuildInputs = [
zstd
pkg-config
fontconfig # fc-match
jq
cargo
rustc
rustPlatform.cargoSetupHook
luarocks
];
# luarocks propagates cmake, but it shouldn't be used as a build system.
dontUseCmakeConfigure = true;
buildInputs = [
finalAttrs.finalPackage.passthru.luaEnv
harfbuzz
icu
fontconfig
libiconv
];
configureFlags = [
# Nix will supply all the Lua dependencies, so stop the build system from
# bundling vendored copies of them.
"--with-system-lua-sources"
"--with-system-luarocks"
# The automake check target uses pdfinfo to confirm the output of a test
# run, and uses autotools to discover it. This flake build eschews that
# test because it is run from the source directory but the binary is
# already built with system paths, so it can't be checked under Nix until
# after install. After install the Makefile isn't available of course, so
# we have our own copy of it with a hard coded path to `pdfinfo`. By
# specifying some binary here we skip the configure time test for
# `pdfinfo`, by using `false` we make sure that if it is expected during
# build time we would fail to build since we only provide it at test time.
"PDFINFO=false"
]
++ lib.optionals (!lua.pkgs.isLuaJIT) [
"--without-luajit"
];
outputs = [
"out"
"doc"
"man"
"dev"
];
# TODO: At some point, upstream should support installing the pre-built
# manual automatically
postInstall = ''
install -Dm0644 documentation/sile.pdf $out/share/doc/sile/manual.pdf
'';
FONTCONFIG_FILE = makeFontsConf {
fontDirectories = [
gentium-plus
];
};
strictDeps = true;
env.LUA = "${finalAttrs.finalPackage.passthru.luaEnv}/bin/lua";
enableParallelBuilding = true;
passthru = {
# Use this passthru variable to add packages to your lua environment. Use
# something like this in your development environment:
#
# myLuaEnv = lua.withPackages (
# ps: lib.attrVals (sile.passthru.luaPackages ++ [
# "lua-cjson"
# "lua-resty-http"
# ]) ps
# )
luaPackages = [
"cassowary"
"cldr"
"fluent"
"linenoise"
"loadkit"
"lpeg"
"lua-zlib"
"lua_cliargs"
"luaepnf"
"luaexpat"
"luafilesystem"
"luarepl"
"luasec"
"luasocket"
"luautf8"
"penlight"
"vstruct"
# lua packages needed for testing
"busted"
"luacheck"
# packages needed for building api docs
"ldoc"
# NOTE: Add lua packages here, to change the luaEnv also read by `flake.nix`
]
++ lib.optionals (lib.versionOlder lua.luaversion "5.2") [
"bit32"
]
++ lib.optionals (lib.versionOlder lua.luaversion "5.3") [
"compat53"
];
luaEnv = lua.withPackages (ps: lib.attrVals finalAttrs.finalPackage.passthru.luaPackages ps);
# Copied from Makefile.am
tests.test = lib.optionalAttrs (!(stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isAarch64)) (
runCommand "${finalAttrs.pname}-test"
{
nativeBuildInputs = [
poppler-utils
finalAttrs.finalPackage
];
inherit (finalAttrs) FONTCONFIG_FILE;
}
''
output=$(mktemp -t selfcheck-XXXXXX.pdf)
echo "<sile>foo</sile>" | sile -o $output -
pdfinfo $output | grep "SILE v${finalAttrs.version}" > $out
''
);
};
meta = {
description = "Typesetting system";
longDescription = ''
SILE is a typesetting system; its job is to produce beautiful
printed documents. Conceptually, SILE is similar to TeXfrom
which it borrows some concepts and even syntax and
algorithmsbut the similarities end there. Rather than being a
derivative of the TeX family SILE is a new typesetting and
layout engine written from the ground up using modern
technologies and borrowing some ideas from graphical systems
such as InDesign.
'';
homepage = "https://sile-typesetter.org";
changelog = "https://github.com/sile-typesetter/sile/raw/v${finalAttrs.version}/CHANGELOG.md";
platforms = lib.platforms.unix;
maintainers = with lib.maintainers; [
doronbehar
alerque
];
license = lib.licenses.mit;
mainProgram = "sile";
};
})

View File

@@ -0,0 +1,44 @@
{
lib,
fetchFromGitHub,
python3,
}:
python3.pkgs.buildPythonApplication {
pname = "silenthound";
version = "0-unstable-2022-12-14";
format = "other";
src = fetchFromGitHub {
owner = "layer8secure";
repo = "SilentHound";
rev = "f04746aaca29e377c8badcbd6d8f6584deb9e919";
hash = "sha256-alTgo8/aqwERt/JC4W3KodAdyfNZyG3XqCp3z4OpS68=";
};
propagatedBuildInputs = with python3.pkgs; [
colorama
python-ldap
];
dontBuild = true;
installPhase = ''
runHook preInstall
install -vD $pname.py $out/bin/$pname
runHook postInstall
'';
# Only script available
doCheck = false;
meta = with lib; {
description = "Tool to enumerate an Active Directory Domain";
homepage = "https://github.com/layer8secure/SilentHound";
license = licenses.mit;
maintainers = with maintainers; [ fab ];
mainProgram = "silenthound";
};
}

View File

@@ -0,0 +1,124 @@
{
stdenv,
fetchFromGitHub,
lib,
cmake,
pkg-config,
openjdk,
libuuid,
python3,
glfw,
yosys,
nextpnr,
verilator,
dfu-util,
icestorm,
trellis,
unstableGitUpdater,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "silice";
version = "0-unstable-2025-07-03";
src = fetchFromGitHub {
owner = "sylefeb";
repo = "silice";
rev = "656632ec300f8be3636cfd9bca5be954fc9c9120";
hash = "sha256-0awHQrGm4ggWE9+69ova1cXAaesaMNihbzpgAytRTks=";
fetchSubmodules = true;
};
nativeBuildInputs = [
cmake
pkg-config
openjdk
glfw
];
buildInputs = [
libuuid
];
propagatedBuildInputs = [
(python3.withPackages (p: [
p.edalize
p.termcolor
]))
];
postPatch = ''
patchShebangs antlr/antlr.sh
# use nixpkgs version
rm -r python/pybind11
'';
installPhase = ''
runHook preInstall
make install
mkdir -p $out
cp -ar ../{bin,frameworks,lib} $out/
runHook postInstall
'';
passthru.tests =
let
silice = finalAttrs.finalPackage;
testProject =
project:
stdenv.mkDerivation {
name = "${silice.name}-test-${project}";
nativeBuildInputs = [
silice
yosys
nextpnr
verilator
dfu-util
icestorm
trellis
];
src = "${silice.src}/projects";
sourceRoot = "projects/${project}";
buildPhase = ''
targets=()
for target in $(cat configs | tr -d '\r') ; do
[[ $target != Makefile* ]] || continue
make $target ARGS="--no_program"
targets+=($target)
done
if test "''${#targets[@]}" -eq 0; then
>&2 echo "ERROR: no target found!"
false
fi
'';
installPhase = ''
mkdir $out
for target in "''${targets[@]}" ; do
[[ $target != Makefile* ]] || continue
done
'';
};
in
{
# a selection of test projects that build with the FPGA tools in
# nixpkgs
audio_sdcard_streamer = testProject "audio_sdcard_streamer";
bram_interface = testProject "bram_interface";
blinky = testProject "blinky";
pipeline_sort = testProject "pipeline_sort";
};
passthru.updateScript = unstableGitUpdater { };
meta = {
description = "Open source language that simplifies prototyping and writing algorithms on FPGA architectures";
homepage = "https://github.com/sylefeb/Silice";
license = lib.licenses.bsd2;
mainProgram = "silice";
maintainers = with lib.maintainers; [
astro
pbsds
];
platforms = lib.platforms.all;
};
})

View File

@@ -0,0 +1,67 @@
{
lib,
stdenv,
rustPlatform,
fetchFromGitHub,
pkg-config,
cmake,
expat,
freetype,
libxcb,
python3,
libiconv,
fira-code,
fontconfig,
harfbuzz,
}:
rustPlatform.buildRustPackage rec {
pname = "silicon";
version = "0.5.3";
src = fetchFromGitHub {
owner = "Aloxaf";
repo = "silicon";
rev = "v${version}";
hash = "sha256-lwwbjSXW5uonJNZTAqTK14Ib4QDOD4puxY2CsiJk4/Q=";
};
cargoHash = "sha256-MpmGLhg00quz4mYkidLofpcZTVwxbgIThg5v2r4HIfs=";
buildInputs = [
expat
freetype
fira-code
fontconfig
harfbuzz
]
++ lib.optionals stdenv.hostPlatform.isLinux [ libxcb ]
++ lib.optionals stdenv.hostPlatform.isDarwin [
libiconv
];
nativeBuildInputs = [
cmake
pkg-config
rustPlatform.bindgenHook
]
++ lib.optionals stdenv.hostPlatform.isLinux [ python3 ];
preCheck = ''
export HOME=$TMPDIR
'';
meta = with lib; {
description = "Create beautiful image of your source code";
homepage = "https://github.com/Aloxaf/silicon";
license = with licenses; [
mit # or
asl20
];
maintainers = with maintainers; [
evanjs
_0x4A6F
];
mainProgram = "silicon";
};
}

View File

@@ -0,0 +1,41 @@
{
buildNpmPackage,
fetchFromGitHub,
lib,
}:
buildNpmPackage (finalAttrs: {
pname = "sillytavern";
version = "1.13.4";
src = fetchFromGitHub {
owner = "SillyTavern";
repo = "SillyTavern";
tag = finalAttrs.version;
hash = "sha256-C1VWyowuk4w1F5u88Xcp9m3UgNmcDKEn/NSojuLGAd8=";
};
npmDepsHash = "sha256-lVG00oUzrMxIVoKqTRtkMYUmS45YEOkcepXJl4vth2w=";
dontNpmBuild = true;
# These dirs are not installed automatically.
# And if they were not in place, the app would try to create them at runtime, which is of course impossible to achieve.
postInstall = ''
mkdir $out/lib/node_modules/sillytavern/{backups,public/scripts/extensions/third-party}
'';
meta = {
description = "LLM Frontend for Power Users";
longDescription = ''
SillyTavern is a user interface you can install on your computer (and Android phones) that allows you to interact with
text generation AIs and chat/roleplay with characters you or the community create.
This package makes a global installation, instead of a standalone installation according to the official tutorial.
See [the official documentation](https://docs.sillytavern.app/installation/#global--standalone-mode) for the context.
'';
downloadPage = "https://github.com/SillyTavern/SillyTavern/releases";
homepage = "https://docs.sillytavern.app/";
mainProgram = "sillytavern";
license = lib.licenses.agpl3Only;
maintainers = [ lib.maintainers.wrvsrx ];
};
})

View File

@@ -0,0 +1,5 @@
--- a/Makefile.am
+++ b/Makefile.am
@@ -9 +9 @@
-bashcompdir = $(pkgdatadir)/completions
+bashcompdir = $(datadir)/bash-completion/completions

View File

@@ -0,0 +1,51 @@
{
lib,
stdenv,
fetchFromGitHub,
autoreconfHook,
pkg-config,
pcre,
zlib,
xz,
}:
stdenv.mkDerivation rec {
pname = "silver-searcher";
version = "2.2.0";
src = fetchFromGitHub {
owner = "ggreer";
repo = "the_silver_searcher";
rev = version;
sha256 = "0cyazh7a66pgcabijd27xnk1alhsccywivv6yihw378dqxb22i1p";
};
patches = [ ./bash-completion.patch ];
# Workaround build failure on -fno-common toolchains like upstream
# gcc-10. Otherwise build fails as:
# ld: src/zfile.o:/build/source/src/log.h:12: multiple definition of
# `print_mtx'; src/ignore.o:/build/source/src/log.h:12: first defined here
# TODO: remove once next release has https://github.com/ggreer/the_silver_searcher/pull/1377
env.NIX_CFLAGS_COMPILE = "-fcommon";
NIX_LDFLAGS = lib.optionalString stdenv.hostPlatform.isLinux "-lgcc_s";
nativeBuildInputs = [
autoreconfHook
pkg-config
];
buildInputs = [
pcre
zlib
xz
];
meta = with lib; {
homepage = "https://github.com/ggreer/the_silver_searcher/";
description = "Code-searching tool similar to ack, but faster";
maintainers = with maintainers; [ madjar ];
mainProgram = "ag";
platforms = platforms.all;
license = licenses.asl20;
};
}

View File

@@ -0,0 +1,45 @@
{
lib,
stdenv,
fetchurl,
deno,
makeWrapper,
nixosTests,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "silverbullet";
version = "2.0.0";
src = fetchurl {
url = "https://github.com/silverbulletmd/silverbullet/releases/download/${finalAttrs.version}/silverbullet.js";
hash = "sha256-O0QuzbY/ZdhOZvsUcgpZ55E+CSxbAsRxJmBQird5vCk=";
};
dontUnpack = true;
nativeBuildInputs = [ makeWrapper ];
installPhase = ''
runHook preInstall
mkdir -p $out/{bin,lib}
cp $src $out/lib/silverbullet.js
makeWrapper ${lib.getExe deno} $out/bin/silverbullet \
--set DENO_NO_UPDATE_CHECK "1" \
--add-flags "run -A --unstable-kv --unstable-worker-options ${placeholder "out"}/lib/silverbullet.js"
runHook postInstall
'';
passthru.tests = {
inherit (nixosTests) silverbullet;
};
meta = {
changelog = "https://github.com/silverbulletmd/silverbullet/blob/${finalAttrs.version}/website/CHANGELOG.md";
description = "Open-source, self-hosted, offline-capable Personal Knowledge Management (PKM) web application";
homepage = "https://silverbullet.md";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ aorith ];
mainProgram = "silverbullet";
inherit (deno.meta) platforms;
};
})

View File

@@ -0,0 +1,42 @@
{
python3Packages,
fetchPypi,
lib,
}:
python3Packages.buildPythonApplication rec {
pname = "silx";
version = "2.2.2";
pyproject = true;
src = fetchPypi {
inherit pname version;
hash = "sha256-XZujZ7VxXMTLkBE4jz1xIA1763Z2yRCVL9E1CjQsVx8=";
};
build-system = with python3Packages; [
cython
setuptools
];
dependencies = with python3Packages; [
h5py
numpy
matplotlib
pyopengl
python-dateutil
pyside6
fabio
];
meta = {
changelog = "https://github.com/silx-kit/silx/blob/main/CHANGELOG.rst";
description = "Software to support data assessment, reduction and analysis at synchrotron radiation facilities";
homepage = "https://github.com/silx-kit/silx";
license = [ lib.licenses.mit ];
maintainers = [ lib.maintainers.pmiddend ];
mainProgram = "silx";
};
}

View File

@@ -0,0 +1,51 @@
{
lib,
stdenv,
fetchFromGitHub,
cmake,
llvmPackages,
z3,
python3,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "simbaplusplus";
version = "0-unstable-2024-11-05";
src = fetchFromGitHub {
owner = "pgarba";
repo = "SiMBA-";
rev = "a030a187df0b650718b2aab18ccebc1f810e18b4";
hash = "sha256-h2in203bwfb7ArhoBN0PoWM6DZtxI4jSGQuSTTaBJ7A=";
};
postPatch = ''
substituteInPlace CMakeLists.txt \
--replace-fail ' ''${LLVM_TOOLS_BINARY_DIR}/llvm-config' " ${lib.getDev llvmPackages.libllvm}/bin/llvm-config" \
--replace-fail 'set(Z3_INCLUDE_DIRS /usr/include)' ""
'';
nativeBuildInputs = [
cmake
];
buildInputs = [
llvmPackages.libllvm
z3
];
checkInputs = [
python3
];
doCheck = true;
meta = {
description = "SiMBA++ is a port of MBA Solver SiMBA to C/C++";
homepage = "https://github.com/pgarba/SiMBA-";
license = lib.licenses.gpl3Only;
mainProgram = "SiMBA++";
maintainers = with lib.maintainers; [ emilytrau ];
platforms = lib.platforms.unix;
};
})

View File

@@ -0,0 +1,43 @@
{
stdenv,
lib,
fetchFromGitHub,
meson,
ninja,
}:
stdenv.mkDerivation rec {
pname = "simde";
version = "0.8.2";
src = fetchFromGitHub {
owner = "simd-everywhere";
repo = "simde";
rev = "v${version}";
hash = "sha256-igjDHCpKXy6EbA9Mf6peL4OTVRPYTV0Y2jbgYQuWMT4=";
};
nativeBuildInputs = [
meson
ninja
];
meta = with lib; {
homepage = "https://simd-everywhere.github.io";
description = "Implementations of SIMD instruction sets for systems which don't natively support them";
license = with licenses; [ mit ];
maintainers = with maintainers; [ whiteley ];
platforms = flatten (
with platforms;
[
arm
armv7
aarch64
x86
power
mips
riscv
]
);
};
}

View File

@@ -0,0 +1,38 @@
{
lib,
stdenv,
fetchFromGitHub,
cmake,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "simdjson";
version = "4.0.7";
src = fetchFromGitHub {
owner = "simdjson";
repo = "simdjson";
tag = "v${finalAttrs.version}";
hash = "sha256-8pmFtMpML7tTXbH1E3aIpSTQkNF8TFcIPOm2nwnKxkA=";
};
nativeBuildInputs = [ cmake ];
cmakeFlags = [
(lib.cmakeBool "SIMDJSON_DEVELOPER_MODE" false)
(lib.cmakeBool "BUILD_SHARED_LIBS" (!stdenv.hostPlatform.isStatic))
]
++ lib.optionals (with stdenv.hostPlatform; isPower && isBigEndian) [
# Assume required CPU features are available, since otherwise we
# just get a failed build.
(lib.cmakeFeature "CMAKE_CXX_FLAGS" "-mpower8-vector")
];
meta = {
homepage = "https://simdjson.org/";
description = "Parsing gigabytes of JSON per second";
license = lib.licenses.asl20;
platforms = lib.platforms.all;
maintainers = with lib.maintainers; [ chessai ];
};
})

View File

@@ -0,0 +1,44 @@
{
lib,
stdenv,
fetchFromGitHub,
cmake,
libiconv,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "simdutf";
version = "7.4.0";
src = fetchFromGitHub {
owner = "simdutf";
repo = "simdutf";
rev = "v${finalAttrs.version}";
hash = "sha256-eVlPY3aDIHnWPzbv9TASujxIW0xlvLvihQCpLUWwLEs=";
};
# Fix build on darwin
postPatch = ''
substituteInPlace tools/CMakeLists.txt --replace "-Wl,--gc-sections" ""
'';
nativeBuildInputs = [
cmake
];
buildInputs = [
libiconv
];
meta = with lib; {
description = "Unicode routines validation and transcoding at billions of characters per second";
homepage = "https://github.com/simdutf/simdutf";
license = with licenses; [
asl20
mit
];
maintainers = with maintainers; [ wineee ];
mainProgram = "simdutf";
platforms = platforms.all;
};
})

View File

@@ -0,0 +1,47 @@
{
lib,
stdenv,
fetchFromGitHub,
zlib,
}:
stdenv.mkDerivation rec {
pname = "simg2img";
version = "1.1.5";
src = fetchFromGitHub {
owner = "anestisb";
repo = "android-simg2img";
rev = version;
hash = "sha256-sNHdSbms35YnENASFEG+VMLJGkV/JAlQUVMquDrePDc=";
};
# fix GCC 14 error
# https://github.com/anestisb/android-simg2img/pull/41
postPatch = ''
substituteInPlace backed_block.cpp \
--replace-fail 'calloc(sizeof(struct backed_block_list), 1));' 'calloc(1, sizeof(struct backed_block_list)));'
substituteInPlace sparse.cpp \
--replace-fail 'calloc(sizeof(struct sparse_file), 1));' 'calloc(1, sizeof(struct sparse_file)));'
substituteInPlace simg2simg.cpp \
--replace-fail 'calloc(sizeof(struct sparse_file*), files);' 'calloc(files, sizeof(struct sparse_file*));'
'';
buildInputs = [ zlib ];
makeFlags = [
"PREFIX=$(out)"
"DEP_CXX:=$(CXX)"
];
meta = with lib; {
description = "Tool to convert Android sparse images to raw images";
homepage = "https://github.com/anestisb/android-simg2img";
license = licenses.asl20;
platforms = platforms.unix;
maintainers = with maintainers; [
dezgeg
arkivm
];
};
}

View File

@@ -0,0 +1,76 @@
{
lib,
stdenv,
fetchFromGitLab,
plib,
libglut,
xorgproto,
libX11,
libXext,
libXi,
libICE,
libSM,
libXt,
libXmu,
libGLU,
libGL,
boost179,
zlib,
libjpeg,
freealut,
openscenegraph,
openal,
expat,
cmake,
apr,
xz,
curl,
}:
let
version = "2024.1.1";
in
stdenv.mkDerivation rec {
pname = "simgear";
inherit version;
src = fetchFromGitLab {
owner = "flightgear";
repo = "simgear";
tag = "v${version}";
hash = "sha256-hOA/q/cTsqRy82rTAXRxyHBDdw93TW9UL+K5Jq5b/08=";
};
nativeBuildInputs = [ cmake ];
buildInputs = [
plib
libglut
xorgproto
libX11
libXext
libXi
libICE
libSM
libXt
libXmu
libGLU
libGL
boost179
zlib
libjpeg
freealut
openscenegraph
openal
expat
apr
curl
xz
];
meta = with lib; {
description = "Simulation construction toolkit";
homepage = "https://wiki.flightgear.org/SimGear";
maintainers = with maintainers; [ raskin ];
platforms = platforms.linux;
license = licenses.lgpl2;
};
}

View File

@@ -0,0 +1,153 @@
{
stdenv,
lib,
fetchFromGitLab,
cmake,
perl,
python3,
boost,
fortranSupport ? false,
gfortran,
buildDocumentation ? false,
fig2dev,
ghostscript,
doxygen,
buildJavaBindings ? false,
openjdk,
buildPythonBindings ? true,
python3Packages,
modelCheckingSupport ? false,
libunwind,
libevent,
elfutils, # Inside elfutils: libelf and libdw
bmfSupport ? true,
eigen,
minimalBindings ? false,
debug ? false,
optimize ? (!debug),
moreTests ? false,
withoutBin ? false,
}:
stdenv.mkDerivation rec {
pname = "simgrid";
version = "4.0";
src = fetchFromGitLab {
domain = "framagit.org";
owner = "simgrid";
repo = "simgrid";
rev = "v${version}";
sha256 = "sha256-wRyUeXx8mvrwBLoj8nHNdjJuUjYfWoXuZS1+E7lmCLc=";
};
propagatedBuildInputs = [ boost ];
nativeBuildInputs = [
cmake
perl
python3
]
++ lib.optionals fortranSupport [ gfortran ]
++ lib.optionals buildJavaBindings [ openjdk ]
++ lib.optionals buildPythonBindings [ python3Packages.pybind11 ]
++ lib.optionals buildDocumentation [
fig2dev
ghostscript
doxygen
]
++ lib.optionals bmfSupport [ eigen ]
++ lib.optionals modelCheckingSupport [
libunwind
libevent
elfutils
];
outputs = [ "out" ] ++ lib.optionals buildPythonBindings [ "python" ];
# "Release" does not work. non-debug mode is Debug compiled with optimization
cmakeBuildType = "Debug";
cmakeFlags = [
(lib.cmakeBool "enable_documentation" buildDocumentation)
(lib.cmakeBool "enable_java" buildJavaBindings)
(lib.cmakeBool "enable_python" buildPythonBindings)
(lib.cmakeFeature "SIMGRID_PYTHON_LIBDIR" "./") # prevents CMake to install in ${python3} dir
(lib.cmakeBool "enable_msg" buildJavaBindings)
(lib.cmakeBool "enable_fortran" fortranSupport)
(lib.cmakeBool "enable_model-checking" modelCheckingSupport)
(lib.cmakeBool "enable_ns3" false)
(lib.cmakeBool "enable_lua" false)
(lib.cmakeBool "enable_lib_in_jar" false)
(lib.cmakeBool "enable_maintainer_mode" false)
(lib.cmakeBool "enable_mallocators" true)
(lib.cmakeBool "enable_debug" true)
(lib.cmakeBool "enable_smpi" true)
(lib.cmakeBool "minimal-bindings" minimalBindings)
(lib.cmakeBool "enable_smpi_ISP_testsuite" moreTests)
(lib.cmakeBool "enable_smpi_MPICH3_testsuite" moreTests)
(lib.cmakeBool "enable_compile_warnings" false)
(lib.cmakeBool "enable_compile_optimizations" optimize)
(lib.cmakeBool "enable_lto" optimize)
# RPATH of binary /nix/store/.../bin/... contains a forbidden reference to /build/
(lib.cmakeBool "CMAKE_SKIP_BUILD_RPATH" optimize)
];
makeFlags = lib.optional debug "VERBOSE=1";
# needed to run tests and to ensure correct shabangs in output scripts
preBuild = ''
patchShebangs ..
'';
# needed by tests (so libsimgrid.so is found)
preConfigure = ''
export LD_LIBRARY_PATH="$PWD/build/lib"
'';
doCheck = true;
preCheck = ''
# prevent the execution of tests known to fail
cat <<EOW >CTestCustom.cmake
SET(CTEST_CUSTOM_TESTS_IGNORE smpi-replay-multiple)
EOW
# make sure tests are built in parallel (this can be long otherwise)
make tests -j $NIX_BUILD_CORES
'';
postInstall =
lib.optionalString withoutBin ''
# remove bin from output if requested.
# having a specific bin output would be cleaner but it does not work currently (circular references)
rm -rf $out/bin
''
+ lib.optionalString buildPythonBindings ''
# manually install the python binding if requested.
mkdir -p $python/lib/python${lib.versions.majorMinor python3.version}/site-packages/
cp ./lib/simgrid.cpython*.so $python/lib/python${lib.versions.majorMinor python3.version}/site-packages/
'';
# improve debuggability if requested
hardeningDisable = lib.optionals debug [ "fortify" ];
dontStrip = debug;
meta = with lib; {
description = "Framework for the simulation of distributed applications";
longDescription = ''
SimGrid is a toolkit that provides core functionalities for the
simulation of distributed applications in heterogeneous distributed
environments. The specific goal of the project is to facilitate
research in the area of distributed and parallel application
scheduling on distributed computing platforms ranging from simple
network of workstations to Computational Grids.
'';
homepage = "https://simgrid.org/";
license = licenses.lgpl2Plus;
maintainers = with maintainers; [
mickours
mpoquet
];
platforms = platforms.all;
broken = stdenv.hostPlatform.isDarwin;
};
}

View File

@@ -0,0 +1,79 @@
{
lib,
stdenv,
fetchFromGitHub,
SDL2,
SDL2_ttf,
libpcap,
vde2,
pcre,
}:
stdenv.mkDerivation rec {
pname = "simh";
version = "3.11-1";
src = fetchFromGitHub {
owner = "simh";
repo = "simh";
rev = "v${version}";
sha256 = "sha256-65+YfOWpVXPeT64TZcSaWJY+ODQ0q/pwF9jb8xGdpIs=";
};
buildInputs = [
SDL2
SDL2_ttf
libpcap
vde2
pcre
];
dontConfigure = true;
# Workaround to build against upstream gcc-10 and clang-11.
# Can be removed when next release contains
# https://github.com/simh/simh/issues/794
env.NIX_CFLAGS_COMPILE = toString [ "-fcommon" ];
makeFlags = [
"GCC=${stdenv.cc.targetPrefix}cc"
"CC_STD=-std=c99"
"LDFLAGS=-lm"
];
preInstall = ''
install -d ${placeholder "out"}/bin
install -d ${placeholder "out"}/share/simh
'';
installPhase = ''
runHook preInstall
for i in BIN/*; do
install -D $i ${placeholder "out"}/bin
done
for i in VAX/*bin; do
install -D $i ${placeholder "out"}/share/simh
done
runHook postInstall
'';
postInstall = ''
(cd $out/bin; for i in *; do ln -s $i simh-$i; done)
'';
meta = with lib; {
homepage = "http://simh.trailing-edge.com/";
description = "Collection of simulators of historic hardware";
longDescription = ''
SimH (History Simulator) is a collection of simulators for historically
significant or just plain interesting computer hardware and software from
the past. The goal of the project is to create highly portable system
simulators and to publish them as freeware on the Internet, with freely
available copies of significant or representative software.
'';
license = with licenses; mit;
maintainers = [ ];
platforms = with platforms; unix;
};
}
# TODO: install documentation

View File

@@ -0,0 +1,36 @@
{
lib,
rustPlatform,
fetchFromGitHub,
versionCheckHook,
nix-update-script,
}:
rustPlatform.buildRustPackage (finalAttrs: {
pname = "similarity";
version = "0.3.1";
src = fetchFromGitHub {
owner = "mizchi";
repo = "similarity";
tag = "v${finalAttrs.version}";
hash = "sha256-eZQ0FTmysFYwqg3sjasZW3S0lps2XbFWUbWuZzkFWkA=";
};
cargoHash = "sha256-7qLC1RvjBXd9JFrJdDTIngZhMvyQV1ko3MXRr/2y7hA=";
nativeInstallCheckInputs = [ versionCheckHook ];
versionCheckProgram = "${placeholder "out"}/bin/${finalAttrs.pname}-ts";
versionCheckProgramArg = "--version";
doInstallCheck = true;
passthru.updateScript = nix-update-script { };
meta = {
description = "Code similarity detection tool";
homepage = "https://github.com/mizchi/similarity";
changelog = "https://github.com/mizchi/similarity/blob/v${finalAttrs.version}/CHANGELOG.md";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ airrnot ];
};
})

View File

@@ -0,0 +1,50 @@
{
lib,
stdenvNoCC,
fetchFromGitLab,
python3,
librsvg,
xcursorgen,
}:
stdenvNoCC.mkDerivation rec {
pname = "simp1e-cursors";
version = "20250223";
src = fetchFromGitLab {
owner = "cursors";
repo = "simp1e";
tag = version;
hash = "sha256-mNuGjpNZCaOlGLkHez4pFMPdCCbSoYQx1HTs7BI0DJA=";
fetchSubmodules = true;
};
nativeBuildInputs = [
(python3.withPackages (ps: [ ps.pillow ]))
librsvg
xcursorgen
];
buildPhase = ''
runHook preBuild
patchShebangs ./build.sh ./cursor-generator
HOME=$TMP ./build.sh
runHook postBuild
'';
installPhase = ''
runHook preInstall
install -dm 755 $out/share/icons
cp -r built_themes/* $out/share/icons/
runHook postInstall
'';
meta = {
description = "Aesthetic cursor theme for Linux desktops";
homepage = "https://gitlab.com/cursors/simp1e";
changelog = "https://gitlab.com/cursors/simp1e/-/tags/${version}";
license = lib.licenses.gpl3;
platforms = lib.platforms.linux;
maintainers = [ lib.maintainers.natto1784 ];
};
}

View File

@@ -0,0 +1,87 @@
{
lib,
python3,
fetchFromGitHub,
fetchPypi,
bash,
}:
let
python = python3.override {
self = python;
packageOverrides = self: super: {
certbot = super.certbot.overridePythonAttrs rec {
version = "3.1.0";
src = fetchFromGitHub {
owner = "certbot";
repo = "certbot";
tag = "v${version}";
hash = "sha256-lYGJgUNDzX+bE64GJ+djdKR+DXmhpcNbFJrAEnP86yQ=";
};
};
josepy = super.josepy.overridePythonAttrs (old: rec {
version = "1.15.0";
src = fetchFromGitHub {
owner = "certbot";
repo = "josepy";
tag = "v${version}";
hash = "sha256-fK4JHDP9eKZf2WO+CqRdEjGwJg/WNLvoxiVrb5xQxRc=";
};
dependencies = with self; [
pyopenssl
cryptography
];
});
};
};
in
python.pkgs.buildPythonApplication rec {
pname = "simp_le-client";
version = "0.20.0";
pyproject = true;
src = fetchPypi {
inherit pname version;
hash = "sha256-p6+OF8MuAzcdTV4/CvZpjGaOrg7xcNuEddk7yC2sXIE=";
};
postPatch = ''
# drop upper bound of idna requirement
sed -ri "s/'(idna)<[^']+'/'\1'/" setup.py
substituteInPlace simp_le.py \
--replace "/bin/sh" "${bash}/bin/sh"
'';
pythonRelaxDeps = [
"acme"
];
# both setuptools-scm and mock are runtime dependencies
dependencies = with python.pkgs; [
acme
cryptography
setuptools-scm
josepy
idna
mock
pyopenssl
pytz
six
];
checkPhase = ''
runHook preCheck
$out/bin/simp_le --test
runHook postCheck
'';
meta = with lib; {
homepage = "https://github.com/zenhack/simp_le";
description = "Simple Let's Encrypt client";
license = licenses.gpl3;
maintainers = with maintainers; [
makefu
];
platforms = platforms.linux;
};
}

View File

@@ -0,0 +1,31 @@
{
lib,
fetchFromGitHub,
rustPlatform,
withCitation ? true,
}:
rustPlatform.buildRustPackage {
pname = "simple-completion-language-server";
version = "0-unstable-2025-07-29";
src = fetchFromGitHub {
owner = "estin";
repo = "simple-completion-language-server";
rev = "cc57b08ebc68805266beacb512a453e16f86bf17";
hash = "sha256-TiVzgwsP1KZxTxW71eQyp1bkDnyTaMJdBYmkdvl1RX0=";
};
cargoHash = "sha256-M+kjdT9X69kdZcBHC2ChR7WGgxtcUaU8woE2bqhu8IM=";
buildFeatures = lib.optional withCitation [ "citation" ];
meta = {
description = "Language server to enable word completion and snippets for Helix editor";
homepage = "https://github.com/estin/simple-completion-language-server";
license = [ lib.licenses.mit ];
maintainers = [ lib.maintainers.kpbaks ];
mainProgram = "simple-completion-language-server";
platforms = lib.platforms.all;
};
}

View File

@@ -0,0 +1,69 @@
{
# Derivation stuff
fetchFromGitHub,
lib,
makeWrapper,
stdenv,
# Dependencies
# Add these to the wrapper
curl,
gawk,
gnugrep,
gnused,
socat,
wget,
}:
stdenv.mkDerivation {
pname = "simple-dlna-browser";
version = "0-unstable-2023-01-09";
src = fetchFromGitHub {
owner = "javier-lopez";
repo = "learn";
sparseCheckout = [
"sh/tools/simple-dlna-browser"
];
rev = "666e2c402723251ba19ce9d7c11b83b06c15a2c5";
hash = "sha256-jwPAEgti5DrjNnNVW/61GGTP+QedGAjz9kPwYhMAdTk=";
};
nativeBuildInputs = [ makeWrapper ];
installPhase = ''
outputWrapper="$out/bin/simple-dlna-browser"
outputWrapped="$out/bin/wrapped-simple-dlna-browser"
mkdir -p $out/bin
cp sh/tools/simple-dlna-browser $outputWrapped
makeWrapper $outputWrapped $outputWrapper \
--prefix PATH : ${
lib.makeBinPath [
curl
gawk
gnugrep
gnused
socat
wget
]
}
# Set the program name to a fixed value
# Normally it is guessed by the filename, but we don't want it to be the name of the wrapper
sed -i -e 's/PROGNAME=".*"/PROGNAME="simple-dlna-browser"/' $outputWrapped
'';
meta = {
description = "Query dlna media servers";
longDescription = ''
A bash script that allows simple interactions with [DLNA] media servers.
It is a light-weight, CLI alternative to [VLC], [Kodi], and other players.
[DLNA]: https://en.wikipedia.org/wiki/Digital_Living_Network_Alliance
[Kodi]: https://kodi.tv/
[VLC]: https://www.videolan.org/vlc/
'';
homepage = "https://github.com/javier-lopez/learn/blob/master/sh/tools/simple-dlna-browser";
license = lib.licenses.fair;
maintainers = [ ];
};
}

View File

@@ -0,0 +1,40 @@
{
lib,
rustPlatform,
fetchFromGitHub,
pkg-config,
openssl,
}:
rustPlatform.buildRustPackage rec {
pname = "simple-http-server";
version = "0.6.13";
src = fetchFromGitHub {
owner = "TheWaWaR";
repo = "simple-http-server";
rev = "v${version}";
sha256 = "sha256-uTzzQg1UJ+PG2poIKd+LO0T0y7z48ZK0f196zIgeZhs=";
};
cargoHash = "sha256-y+pNDg73fAHs9m0uZr6z0HTA/vB3fFM5qukJycuIxnY=";
nativeBuildInputs = [ pkg-config ];
buildInputs = [ openssl ];
# Currently no tests are implemented, so we avoid building the package twice
doCheck = false;
meta = {
description = "Simple HTTP server in Rust";
homepage = "https://github.com/TheWaWaR/simple-http-server";
changelog = "https://github.com/TheWaWaR/simple-http-server/releases/tag/v${version}";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [
figsoda
mephistophiles
];
mainProgram = "simple-http-server";
};
}

View File

@@ -0,0 +1,64 @@
{
lib,
flutter332,
fetchFromGitHub,
autoPatchelfHook,
mpv,
makeDesktopItem,
copyDesktopItems,
}:
flutter332.buildFlutterApplication rec {
pname = "simple-live-app";
version = "1.8.6";
src = fetchFromGitHub {
owner = "xiaoyaocz";
repo = "dart_simple_live";
tag = "v${version}";
hash = "sha256-6kEty4QZZQW3Xzz4213ThC4FF+quMNE4oAuZ1limxFg=";
};
sourceRoot = "${src.name}/simple_live_app";
pubspecLock = lib.importJSON ./pubspec.lock.json;
gitHashes.ns_danmaku = "sha256-Hzp5QsdgBStaPVSHdHul7ZqOhZHQS9dbO+RpC4wMYqo=";
nativeBuildInputs = [
autoPatchelfHook
copyDesktopItems
];
buildInputs = [ mpv ];
desktopItems = [
(makeDesktopItem {
name = "simple-live-app";
exec = "simple_live_app";
icon = "simple-live-app";
genericName = "Simple-Live";
desktopName = "Simple-Live";
keywords = [ "Simple Live" ];
})
];
postInstall = ''
install -Dm644 assets/logo.png $out/share/pixmaps/simple-live-app.png
'';
extraWrapProgramArgs = ''
--prefix LD_LIBRARY_PATH : $out/app/simple-live-app/lib
'';
passthru.updateScript = ./update.sh;
meta = {
description = "Simply Watch Live";
homepage = "https://github.com/xiaoyaocz/dart_simple_live";
mainProgram = "simple_live_app";
license = with lib.licenses; [ gpl3Plus ];
maintainers = [ ];
platforms = lib.platforms.linux;
};
}

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,34 @@
#!/usr/bin/env nix-shell
#!nix-shell -i bash -p yq nix bash coreutils nix-update common-updater-scripts ripgrep flutter
set -eou pipefail
PACKAGE_DIR="$(realpath "$(dirname "$0")")"
cd "$PACKAGE_DIR"/..
while ! test -f flake.nix; do cd ..; done
NIXPKGS_DIR="$PWD"
latestVersion=$(
list-git-tags --url=https://github.com/xiaoyaocz/dart_simple_live |
rg '^v(.*)' -r '$1' |
sort --version-sort |
tail -n1
)
currentVersion=$(nix-instantiate --eval -E "with import ./. {}; simple-live-app.version or (lib.getVersion simple-live-app)" | tr -d '"')
if [[ "$currentVersion" == "$latestVersion" ]]; then
echo "package is up-to-date: $currentVersion"
exit 0
fi
nix-update --version=$latestVersion simple-live-app
export HOME="$(mktemp -d)"
src="$(nix-build --no-link "$NIXPKGS_DIR" -A simple-live-app.src)"
TMPDIR="$(mktemp -d)"
cp --recursive --no-preserve=mode "$src"/* $TMPDIR
cd "$TMPDIR"/simple_live_app
flutter pub get
yq . pubspec.lock >"$PACKAGE_DIR"/pubspec.lock.json
rm -rf $TMPDIR

View File

@@ -0,0 +1,40 @@
{
stdenv,
lib,
fetchFromGitHub,
autoreconfHook,
autoconf-archive,
pkg-config,
fuse,
libmtp,
}:
stdenv.mkDerivation rec {
pname = "simple-mtpfs";
version = "0.4.0";
src = fetchFromGitHub {
owner = "phatina";
repo = "simple-mtpfs";
rev = "v${version}";
hash = "sha256-vAqi2owa4LJK7y7S7TwkPAqDxzyHrZZBTu0MBwMT0gI=";
};
nativeBuildInputs = [
autoreconfHook
autoconf-archive
pkg-config
];
buildInputs = [
fuse
libmtp
];
meta = with lib; {
description = "Simple MTP fuse filesystem driver";
homepage = "https://github.com/phatina/simple-mtpfs";
license = licenses.gpl2Plus;
platforms = platforms.linux;
maintainers = with maintainers; [ laalsaas ];
mainProgram = "simple-mtpfs";
};
}

View File

@@ -0,0 +1,90 @@
{
lib,
stdenv,
fetchFromGitLab,
meson,
ninja,
pkg-config,
gettext,
itstool,
wrapGAppsHook4,
cairo,
gdk-pixbuf,
colord,
glib,
libadwaita,
gtk4,
gusb,
packagekit,
libwebp,
libxml2,
sane-backends,
vala,
gitUpdater,
gobject-introspection,
}:
stdenv.mkDerivation rec {
pname = "simple-scan";
version = "48.1";
src = fetchFromGitLab {
domain = "gitlab.gnome.org";
owner = "GNOME";
repo = "simple-scan";
tag = version;
hash = "sha256-Y+uVAW0jpXJgadP6CjG8zeLgikFY2Pm0z4TZoyYK4+g=";
};
nativeBuildInputs = [
meson
ninja
gettext
itstool
pkg-config
wrapGAppsHook4
libxml2
gobject-introspection # For setup hook
vala
];
buildInputs = [
cairo
gdk-pixbuf
colord
glib
gusb
libadwaita
gtk4
libwebp
packagekit
sane-backends
];
doCheck = true;
passthru = {
updateScript = gitUpdater {
# Ignore tags like 48.1-2, which actually does not introduce any changes.
ignoredVersions = "-";
};
};
meta = {
description = "Simple scanning utility";
mainProgram = "simple-scan";
longDescription = ''
A really easy way to scan both documents and photos. You can crop out the
bad parts of a photo and rotate it if it is the wrong way round. You can
print your scans, export them to pdf, or save them in a range of image
formats. Basically a frontend for SANE - which is the same backend as
XSANE uses. This means that all existing scanners will work and the
interface is well tested.
'';
homepage = "https://gitlab.gnome.org/GNOME/simple-scan";
changelog = "https://gitlab.gnome.org/GNOME/simple-scan/-/blob/${version}/NEWS?ref_type=tags";
license = lib.licenses.gpl3Plus;
teams = [ lib.teams.gnome ];
platforms = lib.platforms.linux;
};
}

View File

@@ -0,0 +1,27 @@
{
lib,
buildGoModule,
fetchFromGitHub,
}:
buildGoModule rec {
pname = "simple64-netplay-server";
version = "2025.03.1";
src = fetchFromGitHub {
owner = "simple64";
repo = "simple64-netplay-server";
tag = "v${version}";
hash = "sha256-n+au4x6d50rZI5sH7B5jdlD6vXK65UM4TRAtzpPW6ws=";
};
vendorHash = "sha256-E7vuGoCxCvJ/2bGDTz2NShlDjZbrPdTwLDydxop7Nio=";
meta = {
description = "Dedicated server for simple64 netplay";
homepage = "https://github.com/simple64/simple64-netplay-server";
license = lib.licenses.gpl3Only;
mainProgram = "simple64-netplay-server";
maintainers = with lib.maintainers; [ tomasajt ];
};
}

View File

@@ -0,0 +1,15 @@
diff --git a/simple64-gui/netplay/joinroom.cpp b/simple64-gui/netplay/joinroom.cpp
index 3b5c34e..68b46f2 100644
--- a/simple64-gui/netplay/joinroom.cpp
+++ b/simple64-gui/netplay/joinroom.cpp
@@ -308,7 +308,9 @@ void JoinRoom::processTextMessage(QString message)
}
else
{
- msgBox.setText(json.value("message").toString());
+ QString msg = json.value("message").toString();
+ if(msg == "Bad authentication code") msg += "<br>Note: using the official netplay servers is not allowed on unofficial builds.<br>You can host your own server with `simple64-netplay-server`";
+ msgBox.setText(msg);
msgBox.exec();
}
}

View File

@@ -0,0 +1,37 @@
diff --git a/build.sh b/build.sh
index 254a90d..e2d26cf 100644
--- a/build.sh
+++ b/build.sh
@@ -77,7 +77,7 @@ cmake -G Ninja -DCMAKE_BUILD_TYPE="${RELEASE_TYPE}" ..
cmake --build .
cp simple64-video-parallel.* "${install_dir}"
-if [[ ! -d "${base_dir}/discord" ]]; then
+if false; then
echo "Downloading Discord SDK"
mkdir -p "${base_dir}/discord"
cd "${base_dir}/discord"
@@ -86,7 +86,7 @@ if [[ ! -d "${base_dir}/discord" ]]; then
rm discord_game_sdk.zip
fi
-if [[ ! -d "${base_dir}/vosk" ]]; then
+if false; then
mkdir -p "${base_dir}/vosk"
cd "${base_dir}/vosk"
if [[ ${UNAME} == *"MINGW64"* ]]; then
@@ -156,14 +156,6 @@ if [[ ${UNAME} == *"MINGW64"* ]]; then
cp -v "${base_dir}/7z/x64/7za.exe" "${install_dir}"
cp -v "${base_dir}/discord/lib/x86_64/discord_game_sdk.dll" "${install_dir}"
cp -v "${base_dir}/vosk/libvosk.dll" "${install_dir}/vosk.dll"
-else
- cp "${base_dir}/vosk/libvosk.so" "${install_dir}"
- if [[ "${PLATFORM}" == "aarch64" ]]; then
- my_os=linux_aarch64
- else
- my_os=linux_x86_64
- cp "${base_dir}/discord/lib/x86_64/discord_game_sdk.so" "${install_dir}/libdiscord_game_sdk.so"
- fi
fi
if [[ "$1" == "zip" ]]; then

View File

@@ -0,0 +1,122 @@
{
lib,
stdenv,
fetchFromGitHub,
fetchurl,
writeShellScriptBin,
cmake,
ninja,
pkg-config,
makeWrapper,
zlib,
libpng,
SDL2,
SDL2_net,
hidapi,
qt6,
vulkan-loader,
makeDesktopItem,
copyDesktopItems,
}:
let
cheats-json = fetchurl {
url = "https://raw.githubusercontent.com/simple64/cheat-parser/87963b7aca06e0d4632b66bc5ffe7d6b34060f4f/cheats.json";
hash = "sha256-rS/4Mdi+18C2ywtM5nW2XaJkC1YnKZPc4YdQ3mCfESU=";
};
in
stdenv.mkDerivation (finalAttrs: {
pname = "simple64";
version = "2024.12.1";
src = fetchFromGitHub {
owner = "simple64";
repo = "simple64";
tag = "v${finalAttrs.version}";
hash = "sha256-rvoUyvhpbibXbAreu6twTeeVRTCbhJiJuyKaJz0uT5k=";
};
patches = [
./dont-use-vosk-and-discord.patch
./add-official-server-error-message.patch
];
postPatch = ''
cp ${cheats-json} cheats.json
'';
stictDeps = true;
nativeBuildInputs = [
qt6.wrapQtAppsHook
cmake
ninja
pkg-config
makeWrapper
copyDesktopItems
# fake git command for version info generator
(writeShellScriptBin "git" "echo ${finalAttrs.src.rev}")
];
buildInputs = [
zlib
libpng
SDL2
SDL2_net
hidapi
qt6.qtbase
qt6.qtwebsockets
qt6.qtwayland
];
dontUseCmakeConfigure = true;
buildPhase = ''
runHook preBuild
sh build.sh
runHook postBuild
'';
installPhase = ''
runHook preInstall
mkdir -p $out/share/simple64 $out/bin
cp -r simple64/* $out/share/simple64
install -Dm644 ./simple64-gui/icons/simple64.svg -t $out/share/icons/hicolor/scalable/apps/
patchelf $out/share/simple64/simple64-gui \
--add-needed libvulkan.so.1 --add-rpath ${lib.makeLibraryPath [ vulkan-loader ]}
ln -s $out/share/simple64/simple64-gui $out/bin/simple64-gui
runHook postInstall
'';
desktopItems = [
(makeDesktopItem {
name = "simple64";
desktopName = "simple64";
genericName = "Nintendo 64 Emulator";
exec = "simple64-gui";
mimeTypes = [ "application/x-n64-rom" ];
icon = "simple64";
terminal = false;
categories = [
"Game"
"Emulator"
];
})
];
meta = {
description = "Easy to use N64 emulator";
homepage = "https://simple64.github.io";
license = lib.licenses.gpl3Only;
mainProgram = "simple64-gui";
maintainers = with lib.maintainers; [ tomasajt ];
platforms = lib.platforms.linux;
};
})

View File

@@ -0,0 +1,47 @@
{
stdenv,
fetchFromGitHub,
cmake,
pkg-config,
dbus,
fmt_9,
lib,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "simpleBluez";
version = "0.7.3";
src = fetchFromGitHub {
owner = "OpenBluetoothToolbox";
repo = "SimpleBLE";
rev = "v${finalAttrs.version}";
hash = "sha256-CPBdPnBeQ0c3VjSX0Op6nCHF3w0MdXGULbk1aavr+LM=";
};
outputs = [
"out"
"dev"
];
sourceRoot = "${finalAttrs.src.name}/simplebluez";
cmakeFlags = [ "-DLIBFMT_LOCAL_PATH=${fmt_9.src}" ];
nativeBuildInputs = [
cmake
pkg-config
];
buildInputs = [
dbus
];
meta = with lib; {
description = "C++ abstraction layer for BlueZ over DBus";
homepage = "https://github.com/OpenBluetoothToolbox/SimpleBLE";
license = licenses.gpl3Only;
platforms = platforms.linux;
maintainers = with maintainers; [ aciceri ];
};
})

View File

@@ -0,0 +1,47 @@
{
stdenv,
fetchFromGitHub,
cmake,
pkg-config,
dbus,
fmt_9,
lib,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "simpleDBus";
version = "0.10.3";
src = fetchFromGitHub {
owner = "OpenBluetoothToolbox";
repo = "SimpleBLE";
rev = "v${finalAttrs.version}";
hash = "sha256-eEbptFy5tlIHuBu+HbPxsgdb9CVNXq8r2KKP0E8SIuE=";
};
outputs = [
"out"
"dev"
];
sourceRoot = "${finalAttrs.src.name}/simpledbus";
cmakeFlags = [ "-DLIBFMT_LOCAL_PATH=${fmt_9.src}" ];
nativeBuildInputs = [
cmake
pkg-config
];
buildInputs = [
dbus
];
meta = with lib; {
description = "C++ wrapper for libdbus-1";
homepage = "https://github.com/OpenBluetoothToolbox/SimpleBLE";
license = licenses.gpl3Only;
platforms = platforms.linux;
maintainers = with maintainers; [ aciceri ];
};
})

View File

@@ -0,0 +1,45 @@
{
lib,
stdenv,
fetchFromGitHub,
trousers,
openssl,
opencryptoki,
autoreconfHook,
libtool,
}:
stdenv.mkDerivation rec {
pname = "simple-tpm-pk11";
version = "0.07";
src = fetchFromGitHub {
owner = "ThomasHabets";
repo = "simple-tpm-pk11";
rev = version;
sha256 = "sha256-wJ0U4ZNg60+XJTSAMs9gaMTWVePE5dfv5cZWDqwnSlY=";
};
nativeBuildInputs = [
autoreconfHook
libtool
];
buildInputs = [
trousers
openssl
opencryptoki
];
enableParallelBuilding = true;
meta = with lib; {
description = "Simple PKCS11 provider for TPM chips";
longDescription = ''
A simple library for using the TPM chip to secure SSH keys.
'';
homepage = "https://github.com/ThomasHabets/simple-tpm-pk11";
license = licenses.asl20;
maintainers = [ ];
platforms = platforms.unix;
};
}

View File

@@ -0,0 +1,37 @@
{
lib,
buildGoModule,
fetchFromGitHub,
fetchpatch,
}:
buildGoModule rec {
pname = "simplehttp2server";
version = "3.1.3";
src = fetchFromGitHub {
owner = "GoogleChromeLabs";
repo = "simplehttp2server";
rev = version;
sha256 = "113mcfvy1m91wask5039mhr0187nlw325ac32785yl4bb4igi8aw";
};
patches = [
# Migrate to Go modules
(fetchpatch {
url = "https://github.com/GoogleChromeLabs/simplehttp2server/commit/7090b4af33846c48b336335f6a19514b7c1d4392.patch";
hash = "sha256-xGBPNdAmOAUkr7j2VDfTi3Bm13y/b3nuqDLf1jiGct4=";
})
];
vendorHash = "sha256-PcDy+46Pz6xOxxwkSjojsbKZyR1yHdbWAJT+HFAEKkA=";
proxyVendor = true;
meta = with lib; {
homepage = "https://github.com/GoogleChromeLabs/simplehttp2server";
description = "HTTP/2 server for development purposes";
license = licenses.asl20;
maintainers = with maintainers; [ yrashk ];
mainProgram = "simplehttp2server";
};
}

Some files were not shown because too many files have changed in this diff Show More