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,57 @@
diff --git a/src/elan-dist/src/component/package.rs b/src/elan-dist/src/component/package.rs
index c51e76d..ae8159e 100644
--- a/src/elan-dist/src/component/package.rs
+++ b/src/elan-dist/src/component/package.rs
@@ -56,6 +56,52 @@ fn unpack_without_first_dir<R: Read>(archive: &mut tar::Archive<R>, path: &Path)
entry
.unpack(&full_path)
.chain_err(|| ErrorKind::ExtractingPackage)?;
+ nix_patch_if_needed(&full_path)?;
+ }
+
+ Ok(())
+}
+
+fn nix_patch_if_needed(dest_path: &Path) -> Result<()> {
+ let is_bin = matches!(dest_path.parent(), Some(p) if p.ends_with("bin"));
+ if !is_bin { return Ok(()) }
+ let _ = ::std::process::Command::new("@patchelf@/bin/patchelf")
+ .arg("--set-interpreter")
+ .arg("@dynamicLinker@")
+ .arg(dest_path)
+ .output();
+
+ if dest_path.file_name() == Some(::std::ffi::OsStr::new("leanc")) {
+ use std::os::unix::fs::PermissionsExt;
+ let new_path = dest_path.with_extension("orig");
+ ::std::fs::rename(dest_path, &new_path)?;
+ ::std::fs::write(dest_path, r#"#! @shell@
+dir="$(dirname "${BASH_SOURCE[0]}")"
+# use bundled libraries, but not bundled compiler that doesn't know about NIX_LDFLAGS
+LEAN_CC="${LEAN_CC:-@cc@}" exec -a "$0" "$dir/leanc.orig" "$@" -L"$dir/../lib"
+"#)?;
+ ::std::fs::set_permissions(dest_path, ::std::fs::Permissions::from_mode(0o755))?;
+ } else if dest_path.file_name() == Some(::std::ffi::OsStr::new("lake")) {
+ // since Lean 4.16.0, `lake` calls `LEAN_CC` directly instead of through `leanc`
+ use std::os::unix::fs::PermissionsExt;
+ ::std::fs::write(dest_path.with_file_name("cc"), r#"#! @shell@
+dir="$(dirname "${BASH_SOURCE[0]}")"
+# use bundled libraries, but not bundled compiler that doesn't know about NIX_LDFLAGS
+exec "@cc@" "$@" -L"$dir/../lib"
+"#)?;
+ ::std::fs::set_permissions(dest_path.with_file_name("cc"), ::std::fs::Permissions::from_mode(0o755))?;
+
+ let new_path = dest_path.with_extension("orig");
+ ::std::fs::rename(dest_path, &new_path)?;
+ ::std::fs::write(dest_path, r#"#! @shell@
+dir="$(dirname "${BASH_SOURCE[0]}")"
+# use custom `cc`
+LEAN_CC="${LEAN_CC:-"$dir/cc"}" exec -a "$0" "$dir/lake.orig" "$@"
+"#)?;
+ ::std::fs::set_permissions(dest_path, ::std::fs::Permissions::from_mode(0o755))?;
+ } else if dest_path.file_name() == Some(::std::ffi::OsStr::new("llvm-ar")) {
+ ::std::fs::remove_file(dest_path)?;
+ ::std::os::unix::fs::symlink("@ar@", dest_path)?;
}
Ok(())

View File

@@ -0,0 +1,95 @@
{
stdenv,
lib,
runCommand,
patchelf,
makeWrapper,
pkg-config,
curl,
runtimeShell,
openssl,
zlib,
fetchFromGitHub,
rustPlatform,
libiconv,
}:
rustPlatform.buildRustPackage rec {
pname = "elan";
version = "4.1.2";
src = fetchFromGitHub {
owner = "leanprover";
repo = "elan";
rev = "v${version}";
hash = "sha256-1pEa3uFO1lncCjOHEDM84A0p6xoOfZnU+OCS2j8cCK8=";
};
cargoHash = "sha256-CLeFXpCfaTTgbr6jmUmewArKfkOquNhjlIlwtoaJfZw=";
nativeBuildInputs = [
pkg-config
makeWrapper
];
OPENSSL_NO_VENDOR = 1;
buildInputs = [
curl
zlib
openssl
]
++ lib.optional stdenv.hostPlatform.isDarwin libiconv;
buildFeatures = [ "no-self-update" ];
patches = lib.optionals stdenv.hostPlatform.isLinux [
# Run patchelf on the downloaded binaries.
# This is necessary because Lean 4 is now dynamically linked.
(runCommand "0001-dynamically-patchelf-binaries.patch"
{
CC = stdenv.cc;
cc = "${stdenv.cc}/bin/cc";
ar = "${stdenv.cc}/bin/ar";
patchelf = patchelf;
shell = runtimeShell;
}
''
export dynamicLinker=$(cat $CC/nix-support/dynamic-linker)
substitute ${./0001-dynamically-patchelf-binaries.patch} $out \
--subst-var patchelf \
--subst-var dynamicLinker \
--subst-var cc \
--subst-var ar \
--subst-var shell
''
)
];
postInstall = ''
pushd $out/bin
mv elan-init elan
for link in lean leanpkg leanchecker leanc leanmake lake; do
ln -s elan $link
done
popd
# tries to create .elan
export HOME=$(mktemp -d)
mkdir -p "$out/share/"{bash-completion/completions,fish/vendor_completions.d,zsh/site-functions}
$out/bin/elan completions bash > "$out/share/bash-completion/completions/elan"
$out/bin/elan completions fish > "$out/share/fish/vendor_completions.d/elan.fish"
$out/bin/elan completions zsh > "$out/share/zsh/site-functions/_elan"
'';
meta = {
description = "Small tool to manage your installations of the Lean theorem prover";
homepage = "https://github.com/leanprover/elan";
changelog = "https://github.com/leanprover/elan/blob/v${version}/CHANGELOG.md";
license = with lib.licenses; [
asl20 # or
mit
];
maintainers = [ ];
mainProgram = "elan";
};
}

View File

@@ -0,0 +1,63 @@
{
lib,
stdenv,
fetchFromGitLab,
meson,
ninja,
pkg-config,
vala,
gtk4,
libgee,
libadwaita,
gtksourceview5,
blueprint-compiler,
wrapGAppsHook4,
desktop-file-utils,
template-glib,
nix-update-script,
}:
stdenv.mkDerivation rec {
pname = "elastic";
version = "0.1.9";
src = fetchFromGitLab {
domain = "gitlab.gnome.org";
owner = "World";
repo = "elastic";
rev = version;
hash = "sha256-jK9RcZ5U1Dwkpu1mlfq/l4347eRCd3Y/KDYYIIkGytk=";
};
nativeBuildInputs = [
meson
ninja
vala
pkg-config
wrapGAppsHook4
desktop-file-utils
blueprint-compiler
];
buildInputs = [
gtk4
libadwaita
libgee
gtksourceview5
template-glib
];
passthru = {
updateScript = nix-update-script { };
};
meta = with lib; {
description = "Design spring animations";
homepage = "https://gitlab.gnome.org/World/elastic/";
mainProgram = "app.drey.Elastic";
license = licenses.gpl3Plus;
platforms = platforms.unix;
maintainers = with maintainers; [ _0xMRTT ];
teams = [ teams.gnome-circle ];
};
}

View File

@@ -0,0 +1,60 @@
{
elasticmq-server,
python3Packages,
runCommand,
writeText,
}:
runCommand "${elasticmq-server.name}-tests"
(
let
commonPy = ''
import boto3
client = boto3.resource(
"sqs",
endpoint_url="http://localhost:9324",
region_name="elasticmq",
aws_secret_access_key="x",
aws_access_key_id="x",
use_ssl=False,
)
queue = client.get_queue_by_name(QueueName="foobar")
'';
in
{
buildInputs = with python3Packages; [
python
boto3
];
emqConfig = writeText "emq-test.conf" ''
generate-node-address = true
queues {
foobar {}
}
'';
putMessagePy = writeText "put_message.py" ''
${commonPy}
queue.send_message(MessageBody="bazqux")
'';
checkMessagePy = writeText "check_message.py" ''
${commonPy}
messages = queue.receive_messages()
print(f"Received {messages!r}")
assert len(messages) == 1
assert messages[0].body == "bazqux"
'';
}
)
''
JAVA_TOOL_OPTIONS="-Dconfig.file=$emqConfig" ${elasticmq-server}/bin/elasticmq-server &
SERVER_PID=$!
sleep 10
python $putMessagePy
python $checkMessagePy
touch $out
# needed on darwin
kill $SERVER_PID
''

View File

@@ -0,0 +1,55 @@
{
lib,
stdenv,
fetchurl,
jdk8,
jre8,
makeBinaryWrapper,
runCommand,
python3Packages,
writeText,
}:
let
jre = jre8; # TODO: remove override https://github.com/NixOS/nixpkgs/pull/89731
jdk = jdk8; # TODO: remove override https://github.com/NixOS/nixpkgs/pull/89731
in
stdenv.mkDerivation (finalAttrs: {
pname = "elasticmq-server";
version = "1.6.14";
src = fetchurl {
url = "https://s3-eu-west-1.amazonaws.com/softwaremill-public/elasticmq-server-${finalAttrs.version}.jar";
sha256 = "sha256-HVllLHz6zutonaLFwgyQKYSZxfp5QMslxf/PlzGWyG4=";
};
# don't do anything?
unpackPhase = "${jdk}/bin/jar xf $src favicon.png";
nativeBuildInputs = [ makeBinaryWrapper ];
installPhase = ''
mkdir -p $out/bin $out/share/elasticmq-server
cp $src $out/share/elasticmq-server/elasticmq-server.jar
# TODO: how to add extraArgs? current workaround is to use JAVA_TOOL_OPTIONS environment to specify properties
makeWrapper ${jre}/bin/java $out/bin/elasticmq-server \
--add-flags "-jar $out/share/elasticmq-server/elasticmq-server.jar"
'';
passthru.tests.elasticmqTest = import ./elasticmq-test.nix {
inherit runCommand python3Packages writeText;
elasticmq-server = finalAttrs.finalPackage;
};
meta = with lib; {
description = "Message queueing system with Java, Scala and Amazon SQS-compatible interfaces";
homepage = "https://github.com/softwaremill/elasticmq";
changelog = "https://github.com/softwaremill/elasticmq/releases/tag/v${finalAttrs.version}";
sourceProvenance = with sourceTypes; [ binaryBytecode ];
license = licenses.asl20;
platforms = platforms.unix;
maintainers = with maintainers; [ peterromfeldhk ];
mainProgram = "elasticmq-server";
};
})

View File

@@ -0,0 +1,101 @@
{
lib,
elasticsearch-curator,
fetchFromGitHub,
nix-update-script,
python3,
testers,
}:
python3.pkgs.buildPythonApplication rec {
pname = "elasticsearch-curator";
version = "8.0.21";
pyproject = true;
src = fetchFromGitHub {
owner = "elastic";
repo = "curator";
tag = "v${version}";
hash = "sha256-yVOZBz4AJNjmpxRp3t03KwDzp/3W8uJiHwuSRJbfLvk=";
};
pythonRelaxDeps = [ "es-client" ];
build-system = with python3.pkgs; [ hatchling ];
dependencies = with python3.pkgs; [
certifi
click
ecs-logging
elasticsearch8
es-client
pyyaml
six
voluptuous
];
nativeCheckInputs = with python3.pkgs; [
requests
pytestCheckHook
];
disabledTestPaths = [
# Test requires running elasticsearch
"tests/integration/test_alias.py"
"tests/integration/test_allocation.py"
"tests/integration/test_cli.py"
"tests/integration/test_close.py"
"tests/integration/test_clusterrouting.py"
"tests/integration/test_count_pattern.py"
"tests/integration/test_create_index.py"
"tests/integration/test_datemath.py"
"tests/integration/test_delete_indices.py"
"tests/integration/test_delete_snapshots.py"
"tests/integration/test_delete_snapshots.py"
"tests/integration/test_es_repo_mgr.py"
"tests/integration/test_forcemerge.py"
"tests/integration/test_integrations.py"
"tests/integration/test_open.py"
"tests/integration/test_reindex.py"
"tests/integration/test_replicas.py"
"tests/integration/test_restore.py"
"tests/integration/test_rollover.py"
"tests/integration/test_shrink.py"
"tests/integration/test_snapshot.py"
];
disabledTests = [
# Test require access network
"test_api_key_not_set"
"test_api_key_set"
];
passthru = {
tests.version = testers.testVersion {
package = elasticsearch-curator;
command = "${lib.getExe elasticsearch-curator} --version";
};
updateScript = nix-update-script { };
};
meta = {
description = "Curate, or manage, your Elasticsearch indices and snapshots";
homepage = "https://github.com/elastic/curator";
changelog = "https://github.com/elastic/curator/releases/tag/v${version}";
license = lib.licenses.asl20;
longDescription = ''
Elasticsearch Curator helps you curate, or manage, your Elasticsearch
indices and snapshots by:
* Obtaining the full list of indices (or snapshots) from the cluster, as the
actionable list
* Iterate through a list of user-defined filters to progressively remove
indices (or snapshots) from this actionable list as needed.
* Perform various actions on the items which remain in the actionable list.
'';
mainProgram = "curator";
maintainers = with lib.maintainers; [ basvandijk ];
};
}

View File

@@ -0,0 +1,34 @@
{
lib,
stdenv,
fetchFromGitHub,
cmake,
itk,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "elastix";
version = "5.2.0";
src = fetchFromGitHub {
owner = "SuperElastix";
repo = "elastix";
tag = finalAttrs.version;
hash = "sha256-edUMj8sjku8EVYaktteIDS+ouaN3kg+CXQCeSWKlLDI=";
};
nativeBuildInputs = [ cmake ];
buildInputs = [ itk ];
doCheck = !stdenv.hostPlatform.isDarwin; # usual dynamic linker issues
meta = with lib; {
homepage = "https://elastix.dev";
description = "Image registration toolkit based on ITK";
changelog = "https://github.com/SuperElastix/elastix/releases/tag/${finalAttrs.version}";
maintainers = with maintainers; [ bcdarwin ];
mainProgram = "elastix";
platforms = platforms.x86_64; # libitkpng linker issues with ITK 5.1
license = licenses.asl20;
};
})

View File

@@ -0,0 +1,96 @@
From a8a7f4460b8f46ca752389f3e1fa43b5c95f2bac Mon Sep 17 00:00:00 2001
From: Emily <hello@emily.moe>
Date: Thu, 28 Nov 2024 05:56:34 +0000
Subject: [PATCH] Remove use of deprecated `<boost/filesystem/convenience.hpp>`
This header was dropped in Boost 1.85.
---
client_generic/Client/Player.cpp | 3 ---
client_generic/Client/lua_playlist.h | 3 ---
client_generic/ContentDecoder/graph_playlist.h | 4 +---
client_generic/TupleStorage/luastorage.cpp | 3 ---
4 files changed, 1 insertion(+), 12 deletions(-)
diff --git a/client_generic/Client/Player.cpp b/client_generic/Client/Player.cpp
index 1f65d761..9726b014 100644
--- a/client_generic/Client/Player.cpp
+++ b/client_generic/Client/Player.cpp
@@ -60,7 +60,6 @@
#include "boost/filesystem/path.hpp"
#include "boost/filesystem/operations.hpp"
-#include "boost/filesystem/convenience.hpp"
#if defined(MAC) || defined(WIN32)
#define HONOR_VBL_SYNC
@@ -68,8 +67,6 @@
using boost::filesystem::path;
using boost::filesystem::exists;
-using boost::filesystem::directory_iterator;
-using boost::filesystem::extension;
using namespace DisplayOutput;
diff --git a/client_generic/Client/lua_playlist.h b/client_generic/Client/lua_playlist.h
index fbe5a333..511c86ee 100644
--- a/client_generic/Client/lua_playlist.h
+++ b/client_generic/Client/lua_playlist.h
@@ -17,13 +17,10 @@
#include "boost/filesystem/path.hpp"
#include "boost/filesystem/operations.hpp"
-#include "boost/filesystem/convenience.hpp"
#include <boost/thread.hpp>
using boost::filesystem::path;
using boost::filesystem::exists;
-using boost::filesystem::directory_iterator;
-using boost::filesystem::extension;
// Lua.
diff --git a/client_generic/ContentDecoder/graph_playlist.h b/client_generic/ContentDecoder/graph_playlist.h
index 1f0a6cd0..cc2672e2 100644
--- a/client_generic/ContentDecoder/graph_playlist.h
+++ b/client_generic/ContentDecoder/graph_playlist.h
@@ -13,13 +13,11 @@
#include "boost/filesystem/path.hpp"
#include "boost/filesystem/operations.hpp"
-#include "boost/filesystem/convenience.hpp"
using boost::filesystem::path;
using boost::filesystem::exists;
using boost::filesystem::no_check;
using boost::filesystem::directory_iterator;
-using boost::filesystem::extension;
namespace ContentDecoder
{
@@ -116,7 +114,7 @@ class CGraphPlaylist : public CPlaylist
for( directory_iterator i( _dir ), end; i != end; ++i )
{
#warning TODO (Keffo#1#): Remove hardcoded extension...
- if( extension(*i) != ".avi" )
+ if( i->extension().string() != ".avi" )
continue;
std::string file = i->string();
diff --git a/client_generic/TupleStorage/luastorage.cpp b/client_generic/TupleStorage/luastorage.cpp
index efbe8867..9b2ffa93 100644
--- a/client_generic/TupleStorage/luastorage.cpp
+++ b/client_generic/TupleStorage/luastorage.cpp
@@ -9,12 +9,9 @@
#include "boost/filesystem/path.hpp"
#include "boost/filesystem/operations.hpp"
-#include "boost/filesystem/convenience.hpp"
using boost::filesystem::path;
using boost::filesystem::exists;
-using boost::filesystem::directory_iterator;
-using boost::filesystem::extension;
using namespace std;

View File

@@ -0,0 +1,85 @@
{
lib,
stdenv,
fetchFromGitHub,
autoreconfHook,
wxGTK32,
ffmpeg,
lua5_1,
curl,
libpng,
xorg,
pkg-config,
flam3,
libgtop,
boost,
tinyxml,
libglut,
libGLU,
libGL,
glee,
}:
stdenv.mkDerivation {
pname = "electricsheep";
version = "3.0.2-unstable-2024-02-13";
src = fetchFromGitHub {
owner = "scottdraves";
repo = "electricsheep";
rev = "5fbbb684752be06ccbea41639968aa7f1cc678dd";
hash = "sha256-X3EZ1/VcLEU1GkZbskWSsqQWYTnsH3pbFDvDLpdLmcU=";
};
patches = [
# <https://github.com/scottdraves/electricsheep/pull/126>
./boost-1.85.patch
];
nativeBuildInputs = [
autoreconfHook
pkg-config
];
buildInputs = [
wxGTK32
ffmpeg
lua5_1
curl
libpng
xorg.libXrender
flam3
libgtop
boost
tinyxml
libglut
libGLU
libGL
glee
];
preAutoreconf = ''
cd client_generic
sed -i '/ACX_PTHREAD/d' configure.ac
'';
configureFlags = [
"CPPFLAGS=-I${glee}/include/GL"
];
makeFlags = [
''CXXFLAGS+="-DGL_GLEXT_PROTOTYPES"''
];
preBuild = ''
sed -i "s|/usr|$out|" Makefile
'';
meta = with lib; {
description = "Electric Sheep, a distributed screen saver for evolving artificial organisms";
homepage = "https://electricsheep.org/";
maintainers = [ ];
platforms = platforms.linux;
license = licenses.gpl2Only;
};
}

View File

@@ -0,0 +1,119 @@
{
lib,
stdenv,
fetchFromGitHub,
python3Packages,
qt5,
secp256k1,
}:
python3Packages.buildPythonApplication rec {
pname = "electron-cash";
version = "4.4.2";
pyproject = true;
src = fetchFromGitHub {
owner = "Electron-Cash";
repo = "Electron-Cash";
tag = version;
sha256 = "sha256-hqaPxetS6JONvlRMjNonXUGFpdmnuadD00gcPzY07x0=";
};
build-system = with python3Packages; [
cython
setuptools
];
dependencies = with python3Packages; [
# requirements
pyaes
ecdsa
requests
qrcode
protobuf
jsonrpclib-pelix
pysocks
qdarkstyle
python-dateutil
stem
certifi
pathvalidate
dnspython
bitcoinrpc
# requirements-binaries
pyqt5
psutil
pycryptodomex
cryptography
zxing-cpp
# requirements-hw
trezor
keepkey
btchip-python
hidapi
pyopenssl
pyscard
pysatochip
];
nativeBuildInputs = [ qt5.wrapQtAppsHook ];
buildInputs = [ ] ++ lib.optional stdenv.hostPlatform.isLinux qt5.qtwayland;
# 1. If secp256k1 wasn't added to the library path, the following warning is given:
#
# Electron Cash was unable to find the secp256k1 library on this system.
# Elliptic curve cryptography operations will be performed in slow
# Python-only mode.
#
# Upstream hardcoded `libsecp256k1.so.0` where we provides
# `libsecp256k1.so.5`. The only breaking change is the removal of two
# functions which seem not used by electron-cash.
# See: <https://github.com/Electron-Cash/Electron-Cash/issues/3009>
#
# 2. The code should be compatible with python-dateutil 2.10 which is the
# version we have in nixpkgs. Changelog:
# <https://dateutil.readthedocs.io/en/latest/changelog.html#version-2-9-0-post0-2024-03-01>
postPatch = ''
substituteInPlace setup.py \
--replace-fail "(share_dir" '("share"'
substituteInPlace electroncash/secp256k1.py \
--replace-fail "libsecp256k1.so.0" "${secp256k1}/lib/libsecp256k1.so.5"
substituteInPlace contrib/requirements/requirements.txt \
--replace-fail "python-dateutil<2.9" "python-dateutil<2.10"
'';
preFixup = ''
makeWrapperArgs+=("''${qtWrapperArgs[@]}")
'';
doInstallCheck = true;
installCheckPhase = ''
output="$($out/bin/electron-cash help 2>&1)"
if [[ "$output" == *"failed to load"* ]]; then
echo "$output"
echo "Forbidden text detected: failed to load"
exit 1
fi
'';
meta = {
description = "Bitcoin Cash SPV Wallet";
mainProgram = "electron-cash";
longDescription = ''
An easy-to-use Bitcoin Cash client featuring wallets generated from
mnemonic seeds (in addition to other, more advanced, wallet options)
and the ability to perform transactions without downloading a copy
of the blockchain.
'';
homepage = "https://www.electroncash.org/";
platforms = lib.platforms.unix;
maintainers = with lib.maintainers; [
nyanloutre
oxalica
];
license = lib.licenses.mit;
};
}

View File

@@ -0,0 +1,32 @@
diff --git a/src/main/versions.ts b/src/main/versions.ts
index 501ba1a..0c11ff7 100644
--- a/src/main/versions.ts
+++ b/src/main/versions.ts
@@ -5,7 +5,6 @@ import { IpcMainInvokeEvent, app } from 'electron';
import fs from 'fs-extra';
import { ipcMainManager } from './ipc';
-import releases from '../../static/releases.json';
import { InstallState, Version } from '../interfaces';
import { IpcEvents } from '../ipc-events';
@@ -72,7 +71,6 @@ export async function fetchVersions(): Promise<Version[]> {
export async function setupVersions() {
knownVersions = await ElectronVersions.create({
- initialVersions: releases,
paths: {
versionsCache: path.join(app.getPath('userData'), 'releases.json'),
},
diff --git a/tools/fetch-releases.ts b/tools/fetch-releases.ts
index 744b814..94fd971 100644
--- a/tools/fetch-releases.ts
+++ b/tools/fetch-releases.ts
@@ -6,6 +6,7 @@ import { ElectronVersions } from '@electron/fiddle-core';
const file = path.join(__dirname, '..', 'static', 'releases.json');
export async function populateReleases() {
+ return;
const elves = await ElectronVersions.create({ ignoreCache: true });
const releases = elves.versions.map(({ version }) =>
elves.getReleaseInfo(version),

View File

@@ -0,0 +1,179 @@
{
buildFHSEnv,
electron_36,
fetchFromGitHub,
fetchYarnDeps,
git,
lib,
makeDesktopItem,
nodejs,
stdenvNoCC,
util-linux,
yarnBuildHook,
yarnConfigHook,
zip,
}:
let
pname = "electron-fiddle";
version = "0.37.2";
src = fetchFromGitHub {
owner = "electron";
repo = "fiddle";
tag = "v${version}";
hash = "sha256-e9PLgkqWBNLBw7uuNpPluOQ6+aGLYQLyTzcLa+LMOzs=";
};
electron = electron_36;
unwrapped = stdenvNoCC.mkDerivation {
pname = "${pname}-unwrapped";
inherit version src;
patches = [ ./dont-use-initial-releases-json.patch ];
offlineCache = fetchYarnDeps {
inherit src;
hash = "sha256-mB8WG6tX204u6AJ8qLbWrA+pSN3oDihHqj0t3bWcuAI=";
};
nativeBuildInputs = [
git
nodejs
util-linux
yarnBuildHook
yarnConfigHook
zip
];
preBuild = ''
# electron files need to be writable on Darwin
cp -r ${electron.dist} electron-dist
chmod -R u+w electron-dist
pushd electron-dist
zip -0Xqr ../electron.zip .
popd
rm -r electron-dist
# force @electron/packager to use our electron instead of downloading it, even if it is a different version
substituteInPlace node_modules/@electron/packager/dist/packager.js \
--replace-fail 'await this.getElectronZipPath(downloadOpts)' '"electron.zip"'
'';
yarnBuildScript = "package";
installPhase = ''
runHook preInstall
mkdir -p "$out/lib/electron-fiddle/resources"
cp "out/Electron Fiddle-"*/resources/app.asar "$out/lib/electron-fiddle/resources/"
mkdir -p "$out/share/icons/hicolor/scalable/apps"
cp assets/icons/fiddle.svg "$out/share/icons/hicolor/scalable/apps/electron-fiddle.svg"
runHook postInstall
'';
};
desktopItem = makeDesktopItem {
name = "electron-fiddle";
desktopName = "Electron Fiddle";
comment = "The easiest way to get started with Electron";
genericName = "Electron Fiddle";
exec = "electron-fiddle %U";
icon = "electron-fiddle";
startupNotify = true;
categories = [
"GNOME"
"GTK"
"Utility"
];
mimeTypes = [ "x-scheme-handler/electron-fiddle" ];
};
in
buildFHSEnv {
inherit pname version;
runScript = "${lib.getExe electron} ${unwrapped}/lib/electron-fiddle/resources/app.asar";
extraInstallCommands = ''
mkdir -p "$out/share/icons/hicolor/scalable/apps"
ln -s "${unwrapped}/share/icons/hicolor/scalable/apps/electron-fiddle.svg" "$out/share/icons/hicolor/scalable/apps/"
mkdir -p "$out/share/applications"
cp "${desktopItem}/share/applications"/*.desktop "$out/share/applications/"
'';
targetPkgs =
pkgs:
with pkgs;
map lib.getLib [
# for electron-fiddle itself
udev
# for running Electron 22.0.0 inside
alsa-lib
atk
cairo
cups
dbus
expat
glib
gtk3
libdrm
libglvnd
libnotify
libxkbcommon
libgbm
nspr
nss
pango
xorg.libX11
xorg.libXcomposite
xorg.libXdamage
xorg.libXext
xorg.libXfixes
xorg.libXrandr
xorg.libxcb
# for running Electron before 18.3.5/19.0.5/20.0.0 inside
gdk-pixbuf
# for running Electron before 16.0.0 inside
xorg.libxshmfence
# for running Electron before 11.0.0 inside
xorg.libXcursor
xorg.libXi
xorg.libXrender
xorg.libXtst
# for running Electron before 10.0.0 inside
xorg.libXScrnSaver
# for running Electron before 8.0.0 inside
libuuid
# for running Electron before 4.0.0 inside
fontconfig
# for running Electron before 3.0.0 inside
gnome2.GConf
# Electron 2.0.8 is the earliest working version, due to
# https://github.com/electron/electron/issues/13972
];
meta = with lib; {
description = "Easiest way to get started with Electron";
homepage = "https://www.electronjs.org/fiddle";
license = licenses.mit;
mainProgram = "electron-fiddle";
maintainers = with maintainers; [
andersk
tomasajt
];
platforms = electron.meta.platforms;
};
}

View File

@@ -0,0 +1,45 @@
{
appimageTools,
lib,
fetchurl,
nix-update-script,
}:
let
pname = "electron-mail";
version = "5.3.3";
src = fetchurl {
url = "https://github.com/vladimiry/ElectronMail/releases/download/v${version}/electron-mail-${version}-linux-x86_64.AppImage";
hash = "sha256-i1oJ/DNGspE7ELuN7MI0e8/69SZwirqahBa7Jf5kP7s=";
};
appimageContents = appimageTools.extract { inherit pname version src; };
in
appimageTools.wrapType2 {
inherit pname version src;
extraInstallCommands = ''
install -m 444 -D ${appimageContents}/${pname}.desktop -t $out/share/applications
substituteInPlace $out/share/applications/${pname}.desktop \
--replace-fail 'Exec=AppRun' 'Exec=${pname}'
cp -r ${appimageContents}/usr/share/icons $out/share
'';
extraPkgs = pkgs: [
pkgs.libsecret
pkgs.libappindicator-gtk3
];
passthru.updateScript = nix-update-script { };
meta = {
description = "Unofficial Election-based ProtonMail desktop client";
mainProgram = "electron-mail";
homepage = "https://github.com/vladimiry/ElectronMail";
license = lib.licenses.gpl3;
maintainers = [ lib.maintainers.princemachiavelli ];
platforms = [ "x86_64-linux" ];
changelog = "https://github.com/vladimiry/ElectronMail/releases/tag/v${version}";
};
}

View File

@@ -0,0 +1,43 @@
{
lib,
rustPlatform,
fetchFromGitHub,
rocksdb_7_10,
}:
let
rocksdb = rocksdb_7_10;
in
rustPlatform.buildRustPackage (finalAttrs: {
pname = "electrs";
version = "0.10.10";
src = fetchFromGitHub {
owner = "romanz";
repo = "electrs";
rev = "v${finalAttrs.version}";
hash = "sha256-FSsTo2m88U7t6wMXaSuYhF5bCMRq11EBQsq6uiMdF7c=";
};
cargoDeps = rustPlatform.fetchCargoVendor {
inherit (finalAttrs) pname version src;
hash = "sha256-hVPtnMqaFH+1QJ52ZG9vZ3clsMTsEpvF5JjTKWoKSPE=";
};
# needed for librocksdb-sys
nativeBuildInputs = [ rustPlatform.bindgenHook ];
# link rocksdb dynamically
ROCKSDB_INCLUDE_DIR = "${rocksdb}/include";
ROCKSDB_LIB_DIR = "${rocksdb}/lib";
passthru.updateScript = ./update.sh;
meta = with lib; {
description = "Efficient re-implementation of Electrum Server in Rust";
homepage = "https://github.com/romanz/electrs";
license = licenses.mit;
maintainers = with maintainers; [ prusnak ];
mainProgram = "electrs";
};
})

View File

@@ -0,0 +1,41 @@
#!/usr/bin/env nix-shell
#!nix-shell -i bash -p coreutils curl jq git gnupg common-updater-scripts
set -euo pipefail
trap 'echo "Error at ${BASH_SOURCE[0]}:$LINENO"' ERR
# Fetch latest release, GPG-verify the tag, update derivation
scriptDir=$(cd "${BASH_SOURCE[0]%/*}" && pwd)
nixpkgs=$(realpath "$scriptDir"/../../../..)
oldVersion=$(nix-instantiate --eval -E "(import \"$nixpkgs\" { config = {}; overlays = []; }).electrs.version" | tr -d '"')
version=$(curl -s --show-error "https://api.github.com/repos/romanz/electrs/releases/latest" | jq -r '.tag_name' | tail -c +2)
if [[ $version == $oldVersion ]]; then
echo "Already at latest version $version"
exit 0
fi
echo "New version: $version"
tmpdir=$(mktemp -d /tmp/electrs-verify-gpg.XXX)
repo=$tmpdir/repo
trap "rm -rf $tmpdir" EXIT
git clone --depth 1 --branch v${version} -c advice.detachedHead=false https://github.com/romanz/electrs $repo
git -C $repo checkout tags/v${version}
export GNUPGHOME=$tmpdir
echo
echo "Fetching romanz's key"
gpg --keyserver hkps://keys.openpgp.org --recv-keys 15c8c3574ae4f1e25f3f35c587cae5fa46917cbb 2> /dev/null
echo
echo "Verifying commit"
git -C $repo verify-tag v${version}
rm -rf $repo/.git
hash=$(nix --extra-experimental-features nix-command hash path $repo)
(cd "$nixpkgs" && update-source-version electrs "$version" "$hash" && update-source-version electrs --ignore-same-version --source-key=cargoDeps.vendorStaging)
echo
echo "electrs: $oldVersion -> $version"

View File

@@ -0,0 +1,54 @@
{
alsa-lib,
autoreconfHook,
fetchFromGitHub,
gtk3,
json-glib,
lib,
libpulseaudio,
libsamplerate,
libsndfile,
libzip,
pkg-config,
stdenv,
zlib,
}:
let
version = "3.2.3";
in
stdenv.mkDerivation {
inherit version;
pname = "elektroid";
src = fetchFromGitHub {
owner = "dagargo";
repo = "elektroid";
rev = version;
hash = "sha256-gK6WQA0KenyksLLFHejCXDTpBm2uhJwn6/E4TXUdeJ8=";
};
nativeBuildInputs = [
autoreconfHook
pkg-config
];
buildInputs = [
alsa-lib
gtk3
json-glib
libpulseaudio
libsamplerate
libsndfile
libzip
zlib
];
meta = with lib; {
description = "Sample and MIDI device manager";
homepage = "https://github.com/dagargo/elektroid";
license = licenses.gpl3Only;
maintainers = with maintainers; [ camelpunch ];
};
}

View File

@@ -0,0 +1,67 @@
{
"@esbuild/aix-ppc64@npm:0.25.1": "6de3a364b7f79f21f66d606d4d29c72ef81c741d71ab4bb941c4eabe7b6a809b1340f4dd5c943827005e421912880741320b9617d17fce762d204cfb94175223",
"@esbuild/android-arm64@npm:0.25.1": "716c98ad3220c71cbaedcfa34aa7c877a3fae911938c3776a66600d7f65980e384799a6832a1b9aea96c6d5a8880610f54744bd0813e743c511d44056ef528d6",
"@esbuild/android-arm@npm:0.25.1": "d2c9e95dd2027f6e14250a90a11136d9ce73a2157a8d104df4a9dd199d3c50cd91f25813536b4776630acb78596bd5a025976962c6d624df7594c32f2d9c1395",
"@esbuild/android-x64@npm:0.25.1": "92f1bec801b414ecdc4b73adfbb4482f4f2cfba423d33296914fa59ffdafb81facc445a7f65d1eea813c078220a0606f4be02252843bb9039ceb2755f643387c",
"@esbuild/darwin-arm64@npm:0.25.1": "9c4cd09c0bd8479e27e04e2397edccebae928184c463684490137d2b7ea3171051b66596db229af2ad3e6a911c1c8a9d10b8aed30d11d0aa155ac0d309fd5dd6",
"@esbuild/darwin-x64@npm:0.25.1": "31b64c02be9438e175e8b343c52e0bbc7964f08a1b44e0adbfa2a1b229ccd0ad0184cdb8313272b4590298833ea0b197d82a909466caffe90105f8acb30402d0",
"@esbuild/freebsd-arm64@npm:0.25.1": "e04018ffd760dd101a5931e0248751bdfca98e3f29be9b41051d55278907f52a3e5ab80c32168e208c2ff287510d6d5b765d3adc841bfd621af7930c10a547e6",
"@esbuild/freebsd-x64@npm:0.25.1": "438215bea2dc716d2c9ffe9b921bbde06e77d96ec0c837fd79f46bc6e195aa50e5f55490228f7433df7aa47810eec5c602a9d9cf956c1794778018632b196f34",
"@esbuild/linux-arm64@npm:0.25.1": "c839788b6db471f144bc2627a117083c9a50402c76cde2f0e5411faaeb3a5cde4972bb7336b87de67cd0a65d4d5b00759668407a03b5d4ed3130d4984837429a",
"@esbuild/linux-arm@npm:0.25.1": "ecf9fd9028d2166619b9a45161a987eebb6ef3dcb0159a2607ab164c58c26a15cf274e0b1088834c07ef9166349276d595fdad5c42bce8d03a55cb213d947efa",
"@esbuild/linux-ia32@npm:0.25.1": "36f208e10a4b778a28a9002338872e52d24dfc18e25d3b41dc53892279c3ee842d76c7b608a30620f128d85344acac0dc86f203f5de7082a21fa2e908c96b68c",
"@esbuild/linux-loong64@npm:0.25.1": "75d95e6ee995c9f2abb202ca430685e5d58fbe9b0b5b01a69b498c9b360d309026d15bae7831de9c0c4f02e45028a92ffb169117c3b56dd1ac7ea8c6ef50628d",
"@esbuild/linux-mips64el@npm:0.25.1": "7fc22eb8a7dc9ee743113cb327eef3591bced4753f416f8dd722794a198a053ab6e120b3b13c1bb6cc89cbd02ea502187b1a3c9ebe8187407665c78995153740",
"@esbuild/linux-ppc64@npm:0.25.1": "84f914a776774bf209c5f96a3708e52477e1966b689a880c0256530063bc581125b5cc04b9700f4aa892e7770ba47c5a950a4be9f1bb3ccbe60a500383602156",
"@esbuild/linux-riscv64@npm:0.25.1": "97f47cd5695686254b58f950ca973df1fcecfebf3bd585629121a65323ffaa7f95cf821392011ee069da492b46fdff771be332c699a438cf123351610e12d621",
"@esbuild/linux-s390x@npm:0.25.1": "10760a999d432d092a8ebe5f09752ee7e8ea77a1afa5f1adfe7f9ccb5bbf77d6e0da6dce5d1a4a7cd731d89b6075723c2bc0328f446ed129c4b63c6441ba22ae",
"@esbuild/linux-x64@npm:0.25.1": "4cdb1625726580eb42432878912d5480a0321559ef2c6425c1db55f89f3fe1c35fb03b3adec92c3f52a4db751d7535f23086b80ed7b219d1edbb254ffbe96e68",
"@esbuild/netbsd-arm64@npm:0.25.1": "f2427b094e072d2db7944b1d2a988dd9f17627976a395b941f225aec2d0565da2ea110a845eafae960af08e3eea74eb327e5eb9dbe06dc1e14f4439596c3b47c",
"@esbuild/netbsd-x64@npm:0.25.1": "c8347ecc18b175923a3cbdaef61b64815ffe0cf2cc285f4034337c2df83e78a118ebfdf2ac3a46a8d8a19ce6a0e0605d27d11570d1758ab90074c99047b82fc0",
"@esbuild/openbsd-arm64@npm:0.25.1": "719812786b4f3ab4471a306c930ab1bf31e9d92f933ea2a34566f07d6269df5058e7d48408127daa197e6fdb21e30697303127d259b76b18936d534619a3eb15",
"@esbuild/openbsd-x64@npm:0.25.1": "21590cbeda028e9b9f8131c54c36bab65a5d5bd5dd4e6bd9f80438045a655e9ac634bb3535a8650b694db267fe23bd2318a59cdec2fae1ba389ed1a00cc0bbe7",
"@esbuild/sunos-x64@npm:0.25.1": "e20ce3891d8717fe2cb885d92d16e9409802316eaa91071be5c7d75164d23dbc5a502be3691039051843d94192e8cf43ade61014a8bce298cfc13a8d3ddd85b0",
"@esbuild/win32-arm64@npm:0.25.1": "749a211eae6a47e5ceb71898df668d083bdec2ed762116fea7772824281f793aceb0487946e20ff604d7e102d1fc8538a73f15b476ca36e07f7ddfb601f6dfa1",
"@esbuild/win32-ia32@npm:0.25.1": "bb45fd889d858678ec68114bfc398965ed8d44e46a9517fcd9f7b397101c2cf94d78938a2640f6f2a1fe65de4ae8830fd426cd21a28302bb92333913b3c16c85",
"@esbuild/win32-x64@npm:0.25.1": "e33291b9834095e6460bd20bb15c49361758bf66d28ccffe0c06a1565211c91f668d9cfc0cbd5bd7a5def693fe7272dbe290b08d4eadba29e750c8a9c739f564",
"@parcel/watcher-android-arm64@npm:2.5.1": "f99d569e4f6cf78a1b0097fb9d4682cb201a74370ae440c531da4e1d5021e46141bfcdf8ef708b51a5b9cb1c30f78eea933ce75216d5eeb7b969a2ad27c68e4a",
"@parcel/watcher-darwin-arm64@npm:2.5.1": "973c7ef3c94608da9cd1b20b18b9a7de2fb46fe44553731fe372b640de524491976150d0845f3d5953b74ed8ea469cb8d18a48651d0e5fb82f549a6b46b54f79",
"@parcel/watcher-darwin-x64@npm:2.5.1": "848c5516aed9c36e14751200dbbf57e83c0bd46cdab0932df33db120e66b9596de18eeb98980e319efde84014f67d9e7924d7555383d8ffcefe35c501166b84b",
"@parcel/watcher-freebsd-x64@npm:2.5.1": "cbd2b7884bc92422edabc0c74c3fbc06512bb7300fc137aaff2e96f46f61e5272265a0b5d230acc82a0e777b0c11661f0b8b7f89a9342c0920b752436dd2c750",
"@parcel/watcher-linux-arm-glibc@npm:2.5.1": "f2e1ec14dbb0f85a84a75f55fd7721598694976ba3ad439832b57e558b0d9240cc80ff83053fb8cf7caffb0592d51bb39d325112763ec1734924b49d4ba9c144",
"@parcel/watcher-linux-arm-musl@npm:2.5.1": "83344c7ecda2e79db59d711bcee0c3fa26922989139c031bd762cf3d5bfb191797e22e9ed6072690b822dfd62629623ba4e7eedb3c41930a987fc3d4106000e1",
"@parcel/watcher-linux-arm64-glibc@npm:2.5.1": "562231feb159a294752378bebecc69a2d33366a9d877835844578799f8536398006e0e570849f9e2db04085a3ea82131459cd10fd6b42dea10cd73bd0c9ca13e",
"@parcel/watcher-linux-arm64-musl@npm:2.5.1": "f62db52a90ebbaa29ca9900e6b9bd3fc6e5c650741bbde9a2742cbc332c678b753fc6a596d67659394fd9262aa826463ea667d18cc554bcaaac9e8da1a2a29d0",
"@parcel/watcher-linux-x64-glibc@npm:2.5.1": "425e557991fde5092d6a9e20be71810600415e5fa157dca0b39bd8db86653d3ee7b037305261c8782d1a065f2a64d235e17b57876b26f5bb0dd7a9bdbe364690",
"@parcel/watcher-linux-x64-musl@npm:2.5.1": "4dbb066ba9478c8b8de39e3c1083cbb74f86f03eaf4445603e69909d6c072134644316faa20a2445419b9fe1a8063ade7b5331a5766d807ee0b15b8a70c59a2d",
"@parcel/watcher-win32-arm64@npm:2.5.1": "e015314d6b9b727cbe25eedf963ca8b23bf6d4e78d3c28008bd0d2657940ad54a271330486df3a93a5f1a30f2b8d052d14415b85cc7e7b747c6c73b5dc055628",
"@parcel/watcher-win32-ia32@npm:2.5.1": "920b6ad6a2095aeb9c2d329c5118472a3c14669fa93eaa99aa8050c76c5c2d3d76d92677167ed748c2ac5487c568d5df16d5d94f4bc7c354094fccd8e0d6350c",
"@parcel/watcher-win32-x64@npm:2.5.1": "8f1c8e41ec9f86e4dcd0d4db0a077742d5dcc853f15ea888387183e34e2efcff09fd1cc9ec46fc1121b9ad4ddc0e221283f2ffb23cfd7dbcbb8b03060b461963",
"@rollup/rollup-android-arm-eabi@npm:4.37.0": "137cc44b5452772bc857f3a9b113dc89a95b0d529963e91a49ac1b336302f37931da052a5d07c294da6060d07251c0251c7d363fd2be1775b59afd84a4c2ec67",
"@rollup/rollup-android-arm64@npm:4.37.0": "a6856efb422e0e9ab62f407e0e73908fe78d42fbb2730aeeba3d8b3f034449ef248a0fb596b5af3e87f7054e00328aa4322525a375508f492dbc7c2478aa0e49",
"@rollup/rollup-darwin-arm64@npm:4.37.0": "ac29a2a8eb0e40c54a1685c868436658682293cacde10b7cbf587845902e4e95ec4b84e4eefbf7ac6a4b6330b47fe4094dbeeb90f22c0ee130ff984b8d3a1cb9",
"@rollup/rollup-darwin-x64@npm:4.37.0": "037115d7f3b9ceab60df8ea12a48762a6c4051da7008a6b5d47174d9980759c392d7c6e4e79e2989744f0a16d1fb78ae97a9abd309fb1c41b07b65fab1700338",
"@rollup/rollup-freebsd-arm64@npm:4.37.0": "8ac2a91f628962633cf33aa462e567b1fc09b4ea09bf7a882ebb7ebf7adf4530d5f9d1b2dfa50ef64ddfa4b820e1eea324041f4c847298ddbe48d7491a944016",
"@rollup/rollup-freebsd-x64@npm:4.37.0": "855b528e935ad21de0297112b2b73ea4ca7db94278606811f2d61011cf8f8042e4b7127f7993859320876fba585a00c5e7e11c7b50ce23af4ccca3679a69754f",
"@rollup/rollup-linux-arm-gnueabihf@npm:4.37.0": "dc126fb662d1a645ab41680033a987908ed0565b4ea9d414a9a46a61c06e9b136c010d1f28b1c34ffb101375a5279f18ee70d0d9b4ff1f2db80a54a05af3071d",
"@rollup/rollup-linux-arm-musleabihf@npm:4.37.0": "206cf3b319948b5d2d5ada18c698f16350c4cb64b53ad754fad91c1fe403c5fc110b3d3d2436433c5fd9ed1e1cec3535ed184902a6986f8bc0ae9770360e3c0b",
"@rollup/rollup-linux-arm64-gnu@npm:4.37.0": "f96da93f09aad5145f6fcfd69eccb6a2d407754e13f168d161dd2280991b7e4a3a514009b8a796767e5bd85ca0e4f81e2aea19781bb027d3ec59cf01768e2e1c",
"@rollup/rollup-linux-arm64-musl@npm:4.37.0": "c31f0c0aeefd18b59212f845aacac5a5a614ce0101db27dcc53884ae4d4e766d399d816104a10f4ee8c4c28e2045abb2d6a778c00bd30a430b3f34be4445cb1c",
"@rollup/rollup-linux-loongarch64-gnu@npm:4.37.0": "d69b456caaa8c12c2936a6836dc2dd3b9169ebfc2d888c904d3407fb2c53ba99a3323bfd36d447c17ff0b9e31b4709defaf72cafb32c23c773fbffdee50bc7fc",
"@rollup/rollup-linux-powerpc64le-gnu@npm:4.37.0": "abc5b4e7960965f01948dbf7e956695643cf6ab78ef1d14f2bc34b93cbb85a9ccb9c005dfbf948a80145cd808078a34d216c9d4e801570e2ca638a563ecd0ae2",
"@rollup/rollup-linux-riscv64-gnu@npm:4.37.0": "a9a5fe6a24955dae476c9ab5fb22d5f807e0ff916ff1ec289c8050e6688695e9c434dfdb130282712dd3657bf883af4544ed1ebc77b68530ccb8e33af484a41e",
"@rollup/rollup-linux-riscv64-musl@npm:4.37.0": "e6cd70f709a59037f496d1086f34148ef2ba92bbf1813e07ccd52b3643822486fa95671a6ed4a3397b9ef23e3a4dea20926f9e1a26b00a06173202627cf2f0ce",
"@rollup/rollup-linux-s390x-gnu@npm:4.37.0": "a6704bd605db0a99a60947a6a69ad6d1dbf712f57d4bcaba24a122cc062b2513319726e8211410d5d9d2bc1face3b153c45c4c9209ead6a25f87cf6e79828864",
"@rollup/rollup-linux-x64-gnu@npm:4.37.0": "fb0ee05c300d73fb05e5584418c41cd616aca8ccb4c4397b56ada769b4e3655223cdea2ce136c3ff3ed3efb9f74800acbd4801135afc3fbd49b29fff092ebd8c",
"@rollup/rollup-linux-x64-musl@npm:4.37.0": "c502057b9ef77bb43df6337eb02c5bbb8f7aabb2780f3de8256048ade427d319e4d5cca4e4238c3076ddddfd9749d9854e8fbc7f6e50cec84e778da6dafe90b7",
"@rollup/rollup-win32-arm64-msvc@npm:4.37.0": "4a6a5c2fb0c520edd3f67deb773ff600698a665ac5a4ba4ac8147836aa054be0f3fab54c841f3eef2b638224dd432a62b5f48b3704f5d3dd37ec7fcfc6a70591",
"@rollup/rollup-win32-ia32-msvc@npm:4.37.0": "439f4339c26c104333b3f55a34ef1a2280b22eec165362eee1816548a0b93f0440a6e3982af9263d1a4158d665a6ecba68c64bf12a786eae69db232399598321",
"@rollup/rollup-win32-x64-msvc@npm:4.37.0": "0c85f06fddfc73dd4457a6c6ec841e52d0fb81179fe63754bd3c02c4795ec338685bd14ff49672ddfb3767aecf4f01f4a5da5730b0cf62be318753390027de37",
"@sentry/cli-darwin@npm:2.42.2": "3df1b8774a2dffba2a413420b573d0ddb94a51ab530cfcf719736cac37fb9b6ff835516b4b783771f003659436a00d3ee5ea201fb2510c1ea517d7256c619b50",
"@sentry/cli-linux-arm64@npm:2.42.2": "17ab90626910c137925aa307bfb4b2f5790a756eaec9bbfa1066b1c2265ec1981ae3d7c8b2014071da9dd3a604cf150ba9a8d93a16e0da155831c7c8a524f956",
"@sentry/cli-linux-arm@npm:2.42.2": "2d31e7d2603f124e2a36626e91dd8c50a0eba27386b94a7076115022e50193140d7f613850adf64740ee46102cec99845750df05430dd16ea50f01607ead6d2d",
"@sentry/cli-linux-i686@npm:2.42.2": "e5c52d65f507393c786373aaff873d6522f9ab26ef3cea498268ef63d053dc9f4e806c3295c22b48c5dd1f7ecf0c47bfaa0f7545424ef81a3cd51914de2af2bc",
"@sentry/cli-linux-x64@npm:2.42.2": "62ed35b355b7673c8cc1d1542c21d1fb908022c2cc951eda47ee4a55c3e53499c1eca08b93408b547adf9ffe7bcb6d43efa50f185f6fa66155a13373ea79d5f3",
"@sentry/cli-win32-i686@npm:2.42.2": "3876d8d3f6139d984714ed5fed8ef124d32af8f5d7cd6968adc8e910727e12eb39d85dcc6304a5e249dce7d8e93e11f8bcfde83545835d959f260bf4b1914d00",
"@sentry/cli-win32-x64@npm:2.42.2": "16e6deb7f0faaed1a88c121463b3ef727726351ec04afe3308ff3775d26e1d7b990a3fd65b216d7fc2ac4f6967c625f14e6dbc2dab99fcc9d7a625ec80422ab8"
}

View File

@@ -0,0 +1,76 @@
{
lib,
stdenv,
fetchFromGitHub,
fetchYarnDeps,
git,
yarn-berry,
yarnConfigHook,
nodejs,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "element-call";
version = "0.11.1";
src = fetchFromGitHub {
owner = "element-hq";
repo = "element-call";
tag = "v${finalAttrs.version}";
hash = "sha256-SNwNo3v2HydNXtb3H3Xh2mYBIagMkWjitlKWTfraeVU=";
};
matrixJsSdkRevision = "19b1b901f575755d29d1fe03ca48cbf7c1cae05c";
matrixJsSdkOfflineCache = fetchYarnDeps {
yarnLock = "${finalAttrs.offlineCache}/checkouts/${finalAttrs.matrixJsSdkRevision}/yarn.lock";
hash = "sha256-pi2MW+58DCkHJDOxMWeXzF+v+5JhJFGQcUgsRsYjNvw=";
};
dontYarnInstallDeps = true;
preConfigure = ''
cp -r $offlineCache writable
chmod u+w -R writable
pushd writable/checkouts/${finalAttrs.matrixJsSdkRevision}/
mkdir -p .git/{refs,objects}
echo ${finalAttrs.matrixJsSdkRevision} > .git/HEAD
SKIP_YARN_COREPACK_CHECK=1 offlineCache=$matrixJsSdkOfflineCache yarnConfigHook
popd
offlineCache=writable
'';
missingHashes = ./missing-hashes.json;
offlineCache = yarn-berry.fetchYarnBerryDeps {
inherit (finalAttrs) src missingHashes;
hash = "sha256-Z8gTt4W78w2DdkRhnaPLG2RIwfT64RFs5+UobARDG4c=";
};
nativeBuildInputs = [
git
yarn-berry.yarnBerryConfigHook
yarnConfigHook
nodejs
];
buildPhase = ''
runHook preBuild
${lib.getExe yarn-berry} build
runHook postBuild
'';
installPhase = ''
runHook preInstall
mkdir $out
cp -r dist/* $out
runHook postInstall
'';
meta = with lib; {
changelog = "https://github.com/element-hq/element-call/releases/tag/${finalAttrs.src.tag}";
homepage = "https://github.com/element-hq/element-call";
description = "Group calls powered by Matrix";
license = licenses.asl20;
maintainers = with maintainers; [ kilimnik ];
};
})

View File

@@ -0,0 +1,7 @@
{
"version" = "1.12.0";
"hashes" = {
"desktopSrcHash" = "sha256-Epkjv6tT0I65JTu4O5nHFRn0q18kE1+7joyTF1S3y+4=";
"desktopYarnHash" = "sha256-2zy2xNzamjTyGE+Vm/gacMnby5Z0KfIWbgkl5EI5zi4=";
};
}

View File

@@ -0,0 +1,71 @@
{
lib,
stdenv,
fetchFromGitHub,
nodejs,
python3,
removeReferencesTo,
pkg-config,
libsecret,
xcbuild,
fetchNpmDeps,
npmHooks,
electron,
}:
let
pinData = lib.importJSON ./pin.json;
in
stdenv.mkDerivation rec {
pname = "keytar-forked";
inherit (pinData) version;
src = fetchFromGitHub {
owner = "shiftkey";
repo = "node-keytar";
rev = "v${version}";
hash = pinData.srcHash;
};
nativeBuildInputs = [
nodejs
python3
pkg-config
npmHooks.npmConfigHook
]
++ lib.optional stdenv.hostPlatform.isDarwin xcbuild;
buildInputs = lib.optionals (!stdenv.hostPlatform.isDarwin) [ libsecret ];
npmDeps = fetchNpmDeps {
inherit src;
hash = pinData.npmHash;
};
doCheck = false;
postPatch = lib.optionalString (stdenv.hostPlatform != stdenv.buildPlatform) ''
pkg-config() { "''${PKG_CONFIG}" "$@"; }
export -f pkg-config
'';
npmFlags = [
# Make sure the native modules are built against electron's ABI
"--nodedir=${electron.headers}"
# https://nodejs.org/api/os.html#osarch
"--arch=${stdenv.hostPlatform.node.arch}"
];
installPhase = ''
runHook preInstall
shopt -s extglob
rm -rf node_modules
mkdir -p $out
cp -r ./!(build) $out
install -D -t $out/build/Release build/Release/keytar.node
${removeReferencesTo}/bin/remove-references-to -t ${stdenv.cc.cc} $out/build/Release/keytar.node
runHook postInstall
'';
disallowedReferences = [ stdenv.cc.cc ];
}

View File

@@ -0,0 +1,5 @@
{
"version": "7.10.0",
"srcHash": "sha256-G0IYBVB37ANnI/XEyzahs9DbTQLgUKmkDoGryRkra08=",
"npmHash": "sha256-bd4YK3AuD0N5Q9ijx1jqBRBL0WADhw1ZlaxspEctse4="
}

View File

@@ -0,0 +1,36 @@
#!/usr/bin/env nix-shell
#!nix-shell -I nixpkgs=../../../../../../ -i bash -p wget prefetch-npm-deps nix-prefetch-github
if [ "$#" -gt 1 ] || [[ "$1" == -* ]]; then
echo "Regenerates packaging data for the keytar package."
echo "Usage: $0 [git release tag]"
exit 1
fi
version="$1"
set -euo pipefail
if [ -z "$version" ]; then
version="$(wget -O- "https://api.github.com/repos/atom/node-keytar/releases?per_page=1" | jq -r '.[0].tag_name')"
fi
# strip leading "v"
version="${version#v}"
SRC="https://raw.githubusercontent.com/atom/node-keytar/v$version"
wget "$SRC/package-lock.json"
wget "$SRC/package.json"
npm_hash=$(prefetch-npm-deps package-lock.json)
rm -rf node_modules package.json package-lock.json
src_hash=$(nix-prefetch-github atom node-keytar --rev v${version} | jq -r .hash)
cat > pin.json << EOF
{
"version": "$version",
"srcHash": "$src_hash",
"npmHash": "$npm_hash"
}
EOF

View File

@@ -0,0 +1,184 @@
{
lib,
stdenv,
fetchFromGitHub,
makeWrapper,
makeDesktopItem,
yarn,
nodejs,
jq,
electron_38,
element-web,
sqlcipher,
callPackage,
desktopToDarwinBundle,
typescript,
useKeytar ? true,
# command line arguments which are always set
commandLineArgs ? "",
}:
let
pinData = import ./element-desktop-pin.nix;
inherit (pinData.hashes) desktopSrcHash desktopYarnHash;
executableName = "element-desktop";
electron = electron_38;
keytar = callPackage ./keytar {
inherit electron;
};
seshat = callPackage ./seshat { };
in
stdenv.mkDerivation (
finalAttrs:
removeAttrs pinData [ "hashes" ]
// {
pname = "element-desktop";
name = "${finalAttrs.pname}-${finalAttrs.version}";
src = fetchFromGitHub {
owner = "element-hq";
repo = "element-desktop";
rev = "v${finalAttrs.version}";
hash = desktopSrcHash;
};
# TODO: fetchYarnDeps currently does not deal properly with a dependency
# declared as a pin to a commit in a specific git repository.
# While it does download everything correctly, `yarn install --offline`
# always wants to `git ls-remote` to the repository, ignoring the local
# cached tarball.
offlineCache = callPackage ./yarn.nix {
inherit (finalAttrs) version src;
hash = desktopYarnHash;
};
nativeBuildInputs = [
nodejs
makeWrapper
jq
yarn
typescript
]
++ lib.optionals stdenv.hostPlatform.isDarwin [ desktopToDarwinBundle ];
inherit seshat;
# Only affects unused scripts in $out/share/element/electron/scripts. Also
# breaks because there are some `node`-scripts with a `npx`-shebang and
# this shouldn't be in the closure just for unused scripts.
dontPatchShebangs = true;
configurePhase = ''
runHook preConfigure
mkdir -p node_modules/
cp -r $offlineCache/node_modules/* node_modules/
substituteInPlace package.json --replace-fail "tsx " "node node_modules/tsx/dist/cli.mjs "
runHook postConfigure
'';
# Workaround for darwin sandbox build failure: "Error: listen EPERM: operation not permitted ..tsx..."
preBuild = lib.optionalString stdenv.hostPlatform.isDarwin ''
export TMPDIR="$(mktemp -d)"
'';
buildPhase = ''
runHook preBuild
yarn --offline run build:ts
node node_modules/matrix-web-i18n/scripts/gen-i18n.js
yarn --offline run i18n:sort
yarn --offline run build:res
chmod -R a+w node_modules/keytar-forked
rm -rf node_modules/matrix-seshat node_modules/keytar-forked
${lib.optionalString useKeytar "ln -s ${keytar} node_modules/keytar-forked"}
ln -s $seshat node_modules/matrix-seshat
runHook postBuild
'';
installPhase = ''
runHook preInstall
# resources
mkdir -p "$out/share/element"
ln -s '${element-web}' "$out/share/element/webapp"
cp -r '.' "$out/share/element/electron"
chmod -R "a+w" "$out/share/element/electron/node_modules"
rm -rf "$out/share/element/electron/node_modules"
cp -r './node_modules' "$out/share/element/electron"
cp $out/share/element/electron/lib/i18n/strings/en_EN.json $out/share/element/electron/lib/i18n/strings/en-us.json
ln -s $out/share/element/electron/lib/i18n/strings/en{-us,}.json
# icon
mkdir -p "$out/share/icons/hicolor/512x512/apps"
ln -s "$out/share/element/electron/build/icon.png" "$out/share/icons/hicolor/512x512/apps/element.png"
# desktop item
mkdir -p "$out/share"
ln -s "${finalAttrs.desktopItem}/share/applications" "$out/share/applications"
# executable wrapper
# LD_PRELOAD workaround for sqlcipher not found: https://github.com/matrix-org/seshat/issues/102
makeWrapper '${electron}/bin/electron' "$out/bin/${executableName}" \
--set LD_PRELOAD ${sqlcipher}/lib/libsqlcipher.so \
--add-flags "$out/share/element/electron" \
--add-flags "\''${NIXOS_OZONE_WL:+\''${WAYLAND_DISPLAY:+--ozone-platform-hint=auto --enable-features=WaylandWindowDecorations --enable-wayland-ime=true}}" \
--add-flags ${lib.escapeShellArg commandLineArgs}
runHook postInstall
'';
# The desktop item properties should be kept in sync with data from upstream:
# https://github.com/element-hq/element-desktop/blob/develop/package.json
desktopItem = makeDesktopItem {
name = "element-desktop";
exec = "${executableName} %u";
icon = "element";
desktopName = "Element";
genericName = "Matrix Client";
comment = finalAttrs.meta.description;
categories = [
"Network"
"InstantMessaging"
"Chat"
];
startupWMClass = "Element";
mimeTypes = [
"x-scheme-handler/element"
"x-scheme-handler/io.element.desktop"
];
};
postFixup = lib.optionalString stdenv.hostPlatform.isDarwin ''
cp build/icon.icns $out/Applications/Element.app/Contents/Resources/element.icns
'';
passthru = {
# run with: nix-shell ./maintainers/scripts/update.nix --argstr package element-desktop
updateScript = ./update.sh;
# TL;DR: keytar is optional while seshat isn't.
#
# This prevents building keytar when `useKeytar` is set to `false`, because
# if libsecret is unavailable (e.g. set to `null` or fails to build), then
# this package wouldn't even considered for building because
# "one of the dependencies failed to build",
# although the dependency wouldn't even be used.
#
# It needs to be `passthru` anyways because other packages do depend on it.
inherit keytar;
};
meta = with lib; {
description = "Feature-rich client for Matrix.org";
homepage = "https://element.io/";
changelog = "https://github.com/element-hq/element-desktop/blob/v${finalAttrs.version}/CHANGELOG.md";
license = licenses.asl20;
teams = [ teams.matrix ];
platforms = electron.meta.platforms ++ lib.platforms.darwin;
mainProgram = "element-desktop";
};
}
)

View File

@@ -0,0 +1,74 @@
{
lib,
stdenv,
rustPlatform,
fetchFromGitHub,
sqlcipher,
nodejs,
python3,
yarn,
fixup-yarn-lock,
fetchYarnDeps,
removeReferencesTo,
}:
let
pinData = lib.importJSON ./pin.json;
in
rustPlatform.buildRustPackage rec {
pname = "seshat-node";
inherit (pinData) version cargoHash;
src = fetchFromGitHub {
owner = "matrix-org";
repo = "seshat";
rev = version;
hash = pinData.srcHash;
};
sourceRoot = "${src.name}/seshat-node/native";
nativeBuildInputs = [
nodejs
python3
yarn
fixup-yarn-lock
];
buildInputs = [ sqlcipher ];
npm_config_nodedir = nodejs;
yarnOfflineCache = fetchYarnDeps {
yarnLock = src + "/seshat-node/yarn.lock";
sha256 = pinData.yarnHash;
};
buildPhase = ''
runHook preBuild
cd ..
chmod u+w . ./yarn.lock
export HOME=$PWD/tmp
mkdir -p $HOME
yarn config --offline set yarn-offline-mirror $yarnOfflineCache
fixup-yarn-lock yarn.lock
yarn install --offline --frozen-lockfile --ignore-platform --ignore-scripts --no-progress --non-interactive
patchShebangs node_modules/
node_modules/.bin/neon build --release -- --target ${stdenv.hostPlatform.rust.rustcTarget} -Z unstable-options --out-dir target/release
runHook postBuild
'';
doCheck = false;
installPhase = ''
runHook preInstall
shopt -s extglob
rm -rf native/!(index.node)
rm -rf node_modules $HOME
cp -r . $out
${removeReferencesTo}/bin/remove-references-to -t ${stdenv.cc.cc} $out/native/index.node
runHook postInstall
'';
disallowedReferences = [ stdenv.cc.cc ];
}

View File

@@ -0,0 +1,6 @@
{
"version": "2.3.3",
"srcHash": "sha256-HmKHWFoO8TQ9S/RcJnJ3h85/2uSkqGrgLnX82hkux4Q=",
"yarnHash": "1cbkv8ap7f8vxl5brzqb86d2dyxg555sz67cldrp0vgnk8sq6ibp",
"cargoHash": "sha256-klrFk0gpqQu/9MzLEYMNqEBETZMXtZJX67Sm5ZqyHfE=="
}

View File

@@ -0,0 +1,49 @@
#!/usr/bin/env nix-shell
#!nix-shell -I nixpkgs=../../../../../../ -i bash -p wget prefetch-yarn-deps yarn nix-prefetch nix-prefetch-github
if [ "$#" -gt 1 ] || [[ "$1" == -* ]]; then
echo "Regenerates packaging data for the seshat package."
echo "Usage: $0 [git release tag]"
exit 1
fi
version="$1"
set -euo pipefail
if [ -z "$version" ]; then
version="$(wget -O- "https://api.github.com/repos/matrix-org/seshat/tags" | jq -r '.[] | .name' | sort --version-sort | tail -1)"
fi
SRC="https://raw.githubusercontent.com/matrix-org/seshat/$version"
tmpdir=$(mktemp -d)
trap 'rm -rf "$tmpdir"' EXIT
pushd $tmpdir
wget "$SRC/seshat-node/yarn.lock"
yarn_hash=$(prefetch-yarn-deps yarn.lock)
popd
src_hash=$(nix-prefetch-github matrix-org seshat --rev ${version} | jq -r .hash)
cat > pin.json << EOF
{
"version": "$version",
"srcHash": "$src_hash",
"yarnHash": "$yarn_hash",
"cargoHash": "0000000000000000000000000000000000000000000000000000"
}
EOF
cargo_hash=$(nix-prefetch "{ sha256 }: (import ../../../../../.. {}).element-desktop.seshat.cargoDeps")
cat > pin.json << EOF
{
"version": "$version",
"srcHash": "$src_hash",
"yarnHash": "$yarn_hash",
"cargoHash": "$cargo_hash"
}
EOF

View File

@@ -0,0 +1,60 @@
#!/usr/bin/env nix-shell
#!nix-shell -i bash -p nix coreutils prefetch-yarn-deps jq curl
if [ "$#" -gt 1 ] || [[ "$1" == -* ]]; then
echo "Regenerates packaging data for the element packages."
echo "Usage: $0 [git release tag]"
exit 1
fi
version="$1"
set -euo pipefail
if [ -z "$version" ]; then
version="$(curl -fsSL "https://api.github.com/repos/element-hq/element-desktop/releases/latest" | jq -r '.tag_name')"
fi
# strip leading "v"
version="${version#v}"
cd "$(dirname "${BASH_SOURCE[0]}")" || exit 1
nixflags=(
--extra-experimental-features
"nix-command flakes"
)
# HACK: prefetch-yarn-deps hashes may output extra clutter on stdout (!) so
# we'll need to get the last line, last word
fixupHash() {
local sorta_yarn_hash="$(tail -n1 <<< "$1")"
local almost_yarn_hash="${sorta_yarn_hash##* }"
local yarn_hash="$(nix "${nixflags[@]}" hash convert --hash-algo sha256 "$almost_yarn_hash")"
printf "%s" "$yarn_hash"
}
getHashes() {
variant="$1"
output="$2"
local url="github:element-hq/element-$variant/v$version"
local src="$(nix "${nixflags[@]}" flake prefetch --json "$url")"
local src_hash="$(jq -r ".hash" <<< "$src")"
local src_path="$(jq -r ".storePath" <<< "$src")"
local yarn_hash="$(fixupHash "$(prefetch-yarn-deps "$src_path/yarn.lock")")"
cat > "$output" << EOF
{
"version" = "$version";
"hashes" = {
"${variant}SrcHash" = "$src_hash";
"${variant}YarnHash" = "$yarn_hash";
};
}
EOF
}
getHashes web ../element-web-unwrapped/element-web-pin.nix
getHashes desktop element-desktop-pin.nix

View File

@@ -0,0 +1,38 @@
{
stdenvNoCC,
yarn,
cacert,
git,
version,
src,
hash,
}:
stdenvNoCC.mkDerivation {
pname = "element-desktop-yarn-deps";
inherit version src;
nativeBuildInputs = [
cacert
yarn
git
];
dontInstall = true;
NODE_EXTRA_CA_CERTS = "${cacert}/etc/ssl/certs/ca-bundle.crt";
buildPhase = ''
export HOME=$(mktemp -d)
export YARN_ENABLE_TELEMETRY=0
yarn install --frozen-lockfile --ignore-platform --skip-integrity-check --ignore-scripts --no-progress --non-interactive
mkdir -p $out/node_modules
cp -r node_modules/* $out/node_modules/
'';
dontPatchShebangs = true;
outputHash = hash;
outputHashMode = "recursive";
}

View File

@@ -0,0 +1,7 @@
{
"version" = "1.12.0";
"hashes" = {
"webSrcHash" = "sha256-4e76IFOY7YiBX/cGobJNj1epH/Bnak+BgVPSjWC/8+s=";
"webYarnHash" = "sha256-qZPHWPmcGFtwfOSCpft0hFLuS7smmq9w1JxJ+oqJZPA=";
};
}

View File

@@ -0,0 +1,74 @@
{
lib,
stdenv,
fetchFromGitHub,
fetchYarnDeps,
jq,
yarnConfigHook,
nodejs,
jitsi-meet,
}:
let
pinData = import ./element-web-pin.nix;
inherit (pinData.hashes) webSrcHash webYarnHash;
noPhoningHome = {
disable_guests = true; # disable automatic guest account registration at matrix.org
};
in
stdenv.mkDerivation (
finalAttrs:
removeAttrs pinData [ "hashes" ]
// {
pname = "element-web";
src = fetchFromGitHub {
owner = "element-hq";
repo = "element-web";
rev = "v${finalAttrs.version}";
hash = webSrcHash;
};
offlineCache = fetchYarnDeps {
yarnLock = finalAttrs.src + "/yarn.lock";
sha256 = webYarnHash;
};
nativeBuildInputs = [
yarnConfigHook
jq
nodejs
];
buildPhase = ''
runHook preBuild
export VERSION=${finalAttrs.version}
yarn --offline build:res
yarn --offline build:module_system
yarn --offline build:bundle
runHook postBuild
'';
installPhase = ''
runHook preInstall
cp -R webapp $out
tar --extract --to-stdout --file ${jitsi-meet.src} jitsi-meet/libs/external_api.min.js > $out/jitsi_external_api.min.js
echo "${finalAttrs.version}" > "$out/version"
jq -s '.[0] * $conf' "config.sample.json" --argjson "conf" '${builtins.toJSON noPhoningHome}' > "$out/config.json"
runHook postInstall
'';
meta = {
description = "Glossy Matrix collaboration client for the web";
homepage = "https://element.io/";
changelog = "https://github.com/element-hq/element-web/blob/v${finalAttrs.version}/CHANGELOG.md";
teams = [ lib.teams.matrix ];
license = lib.licenses.asl20;
platforms = lib.platforms.all;
};
}
)

View File

@@ -0,0 +1,34 @@
{
lib,
stdenv,
jq,
element-web-unwrapped,
conf ? { },
}:
if (conf == { }) then
element-web-unwrapped
else
stdenv.mkDerivation {
pname = "${element-web-unwrapped.pname}-wrapped";
inherit (element-web-unwrapped) version meta;
dontUnpack = true;
nativeBuildInputs = [ jq ];
installPhase = ''
runHook preInstall
mkdir -p $out
ln -s ${element-web-unwrapped}/* $out
rm $out/config.json
jq -s '.[0] * $conf' "${element-web-unwrapped}/config.json" --argjson "conf" ${lib.escapeShellArg (builtins.toJSON conf)} > "$out/config.json"
runHook postInstall
'';
passthru = {
inherit conf;
};
}

View File

@@ -0,0 +1,29 @@
{
lib,
stdenv,
buildGoModule,
fetchFromGitHub,
}:
buildGoModule rec {
pname = "element";
version = "1.0.1";
src = fetchFromGitHub {
owner = "gennaro-tedesco";
repo = "element";
rev = "v${version}";
sha256 = "sha256-06RDZnie0Lv7i95AwnBGl6PPucuj8pIT6DHW3e3mu1o=";
};
vendorHash = "sha256-A4g2rQTaYrA4/0rqldUv7iuibzNINEvx9StUnaN2/Yg=";
meta = with lib; {
description = "Periodic table on the command line";
mainProgram = "element";
homepage = "https://github.com/gennaro-tedesco/element";
license = licenses.asl20;
maintainers = [ maintainers.j0hax ];
broken = stdenv.hostPlatform.isDarwin;
};
}

View File

@@ -0,0 +1,60 @@
{
lib,
stdenv,
fetchFromGitHub,
pkg-config,
gdk-pixbuf,
optipng,
librsvg,
gtk3,
pantheon,
adwaita-icon-theme,
gnome-icon-theme,
hicolor-icon-theme,
}:
stdenv.mkDerivation rec {
pname = "elementary-xfce-icon-theme";
version = "0.21";
src = fetchFromGitHub {
owner = "shimmerproject";
repo = "elementary-xfce";
rev = "v${version}";
hash = "sha256-ncPL76HCC9n4wTciGeqb+YAUcCE9EeOpWGM5DRYUCYg=";
};
nativeBuildInputs = [
pkg-config
gdk-pixbuf
librsvg
optipng
gtk3
];
propagatedBuildInputs = [
pantheon.elementary-icon-theme
adwaita-icon-theme
gnome-icon-theme
hicolor-icon-theme
];
dontDropIconThemeCache = true;
postPatch = ''
substituteInPlace svgtopng/Makefile --replace "-O0" "-O"
'';
postInstall = ''
make icon-caches
'';
meta = with lib; {
description = "Elementary icons for Xfce and other GTK desktops like GNOME";
homepage = "https://github.com/shimmerproject/elementary-xfce";
license = licenses.gpl3Plus;
# darwin cannot deal with file names differing only in case
platforms = platforms.linux;
teams = [ teams.xfce ];
};
}

View File

@@ -0,0 +1,47 @@
{
stdenvNoCC,
lib,
glibc,
musl,
}:
let
libc = if stdenvNoCC.targetPlatform.isMusl then musl else glibc;
headerPath =
if stdenvNoCC.targetPlatform.isMusl then
"musl-${libc.version}/include/elf.h"
else
"glibc-${libc.version}/elf/elf.h";
in
stdenvNoCC.mkDerivation {
pname = "elf-header";
inherit (libc) version;
src = null;
dontUnpack = true;
dontBuild = true;
installPhase = ''
mkdir -p "$out/include";
tar -xf \
${lib.escapeShellArg libc.src} \
${lib.escapeShellArg headerPath} \
--to-stdout \
| sed -e '/features\.h/d' \
> "$out/include/elf.h"
'';
meta = libc.meta // {
outputsToInstall = [ "out" ];
description = "Datastructures of ELF according to the target platform's libc";
longDescription = ''
The Executable and Linkable Format (ELF, formerly named Extensible Linking
Format), is usually defined in a header like this.
'';
platforms = lib.platforms.all;
maintainers = [ lib.maintainers.ericson2314 ];
};
}

View File

@@ -0,0 +1,30 @@
{
lib,
rustPlatform,
fetchFromGitHub,
nix-update-script,
}:
rustPlatform.buildRustPackage (finalAttrs: {
pname = "elf-info";
version = "0.3.0";
src = fetchFromGitHub {
owner = "kevin-lesenechal";
repo = "elf-info";
rev = "v${finalAttrs.version}";
hash = "sha256-wbFVuoarOoxV9FqmuHJ9eZlG4rRqy1rsnuqbGorC2Rk=";
};
cargoHash = "sha256-JSCdMGScpeA5q6++veuQ8li3qVTuB0XdJ1yacsqgBDg=";
passthru.updateScript = nix-update-script { };
meta = {
description = "Inspect and dissect an ELF file with pretty formatting";
homepage = "https://github.com/kevin-lesenechal/elf-info";
license = lib.licenses.gpl3Only;
maintainers = with lib.maintainers; [ viperML ];
mainProgram = "elf";
};
})

View File

@@ -0,0 +1,41 @@
{
installShellFiles,
fetchFromGitHub,
lib,
micronucleus,
rustPlatform,
stdenv,
}:
rustPlatform.buildRustPackage rec {
pname = "elf2nucleus";
version = "0.1.0";
src = fetchFromGitHub {
owner = "kpcyrd";
repo = "elf2nucleus";
rev = "v${version}";
hash = "sha256-FAIOtGfGow+0DrPPEBEfvaiinNZLQlGWKJ4DkMj63OA=";
};
cargoHash = "sha256-Xw+heCEwQePyU2gElpG8PTIUZA7y+Onx+2AX2NZzDGs=";
nativeBuildInputs = [ installShellFiles ];
buildInputs = [ micronucleus ];
postInstall = lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) ''
installShellCompletion --cmd elf2nucleus \
--bash <($out/bin/elf2nucleus --completions bash) \
--fish <($out/bin/elf2nucleus --completions fish) \
--zsh <($out/bin/elf2nucleus --completions zsh)
'';
meta = with lib; {
description = "Integrate micronucleus into the cargo buildsystem, flash an AVR firmware from an elf file";
mainProgram = "elf2nucleus";
homepage = "https://github.com/kpcyrd/elf2nucleus";
license = licenses.gpl3Plus;
maintainers = [ maintainers.marble ];
};
}

View File

@@ -0,0 +1,38 @@
{
lib,
stdenv,
rustPlatform,
fetchCrate,
pkg-config,
udev,
}:
rustPlatform.buildRustPackage rec {
pname = "elf2uf2-rs";
version = "2.2.0";
src = fetchCrate {
inherit pname version;
hash = "sha256-e0i8ecjfNZxQgX5kDU1T8yAGUl4J7mbgG+ueBFsyTNA=";
};
cargoHash = "sha256-+oByDYfC5yA4xzJdTAoji1S0LDc4w+pGhFPFHBgeL8A=";
nativeBuildInputs = [
pkg-config
];
buildInputs = lib.optional stdenv.hostPlatform.isLinux udev;
meta = with lib; {
description = "Convert ELF files to UF2 for USB Flashing Bootloaders";
mainProgram = "elf2uf2-rs";
homepage = "https://github.com/JoNil/elf2uf2-rs";
license = with licenses; [ bsd0 ];
platforms = platforms.linux ++ platforms.darwin;
maintainers = with maintainers; [
polygon
moni
];
};
}

View File

@@ -0,0 +1,27 @@
{
lib,
rustPlatform,
fetchFromGitHub,
}:
rustPlatform.buildRustPackage rec {
pname = "elfcat";
version = "0.1.10";
src = fetchFromGitHub {
owner = "ruslashev";
repo = "elfcat";
rev = version;
sha256 = "sha256-8jyOYV455APlf8F6HmgyvgfNGddMzrcGhj7yFQT6qvg=";
};
cargoHash = "sha256-oVl+40QunvKZIbhsOgqNTsvWduCXP/QJ0amT8ECSsMU=";
meta = with lib; {
description = "ELF visualizer, generates HTML files from ELF binaries";
homepage = "https://github.com/ruslashev/elfcat";
license = licenses.zlib;
maintainers = with maintainers; [ moni ];
mainProgram = "elfcat";
};
}

View File

@@ -0,0 +1,54 @@
{
lib,
stdenv,
fetchFromGitHub,
python3Packages,
}:
python3Packages.buildPythonApplication rec {
pname = "elfdeps";
version = "0.2.0";
pyproject = true;
src = fetchFromGitHub {
owner = "python-wheel-build";
repo = "elfdeps";
tag = "v${version}";
hash = "sha256-5CrxVmtZcBYBMXw7o58CpFopYFgXD4W/S42aow1z1Xw=";
};
build-system = with python3Packages; [
setuptools
setuptools-scm
];
dependencies = [ python3Packages.pyelftools ];
nativeCheckInputs = [ python3Packages.pytestCheckHook ];
pythonImportsCheck = [
"elfdeps"
];
preCheck = ''
export PATH=$PATH:$out/bin
'';
# tests assume that sys.executable is an ELF object
doCheck = stdenv.hostPlatform.isElf;
disabledTests = [
# Attempts to zip sys.executable and fails with:
# ValueError: ZIP does not support timestamps before 1980
"test_main_zipfile"
"test_zipmember_python"
];
meta = {
description = "Python implementation of RPM elfdeps";
homepage = "https://pypi.org/project/elfdeps/";
license = lib.licenses.asl20;
maintainers = with lib.maintainers; [ booxter ];
mainProgram = "elfdeps";
};
}

View File

@@ -0,0 +1,28 @@
{
lib,
buildGoModule,
fetchFromGitHub,
}:
buildGoModule rec {
pname = "elfinfo";
version = "1.2.2";
src = fetchFromGitHub {
owner = "xyproto";
repo = "elfinfo";
rev = version;
sha256 = "sha256-HnjHOjanStqmDXnc6Z9w0beCMJFf/ndWbYxoDEaOws4=";
};
vendorHash = null;
meta = {
description = "Small utility for showing information about ELF files";
mainProgram = "elfinfo";
homepage = "https://elfinfo.roboticoverlords.org/";
changelog = "https://github.com/xyproto/elfinfo/releases/tag/${version}";
license = lib.licenses.bsd3;
maintainers = [ ];
};
}

View File

@@ -0,0 +1,35 @@
{
lib,
stdenv,
fetchFromGitHub,
cmake,
boost,
}:
stdenv.mkDerivation rec {
pname = "elfio";
version = "3.10";
src = fetchFromGitHub {
owner = "serge1";
repo = "elfio";
rev = "Release_${version}";
sha256 = "sha256-DuZhkiHXdCplRiOy1Gsu7voVPdCbFt+4qFqlOeOeWQw=";
};
nativeBuildInputs = [ cmake ];
nativeCheckInputs = [ boost ];
cmakeFlags = [ "-DELFIO_BUILD_TESTS=ON" ];
doCheck = true;
meta = with lib; {
description = "Header-only C++ library for reading and generating files in the ELF binary format";
homepage = "https://github.com/serge1/ELFIO";
license = licenses.mit;
platforms = platforms.unix;
maintainers = with maintainers; [ prusnak ];
};
}

View File

@@ -0,0 +1,30 @@
{
lib,
stdenv,
fetchurl,
}:
stdenv.mkDerivation rec {
pname = "elfkickers";
version = "3.2";
src = fetchurl {
url = "https://www.muppetlabs.com/~breadbox/pub/software/ELFkickers-${version}.tar.gz";
sha256 = "sha256-m4HmxT4MlPwZjZiC63NxVvNtVlFS3DIRiJfHewaiaHw=";
};
makeFlags = [
"CC=${stdenv.cc.targetPrefix}cc"
"prefix:=${placeholder "out"}"
];
enableParallelBuilding = true;
meta = with lib; {
homepage = "https://www.muppetlabs.com/~breadbox/software/elfkickers.html";
description = "Collection of programs that access and manipulate ELF files";
platforms = platforms.linux;
license = licenses.gpl2Plus;
maintainers = [ ];
};
}

View File

@@ -0,0 +1,27 @@
Look up .build-id files relative to the directories in the
colon-separated environment variable NIX_DEBUG_INFO_DIRS, unless
overriden by --debuginfo-path.
diff -ru elfutils-0.169-orig/libdwfl/argp-std.c elfutils-0.169/libdwfl/argp-std.c
--- elfutils-0.169-orig/libdwfl/argp-std.c 2017-05-02 23:05:52.000000000 +0200
+++ elfutils-0.169/libdwfl/argp-std.c 2017-07-28 16:08:06.739558106 +0200
@@ -376,5 +376,7 @@
const struct argp *
dwfl_standard_argp (void)
{
+ debuginfo_path = getenv("NIX_DEBUG_INFO_DIRS");
+
return &libdwfl_argp;
}
diff -ru elfutils-0.169-orig/src/stack.c elfutils-0.169/src/stack.c
--- elfutils-0.169-orig/src/stack.c 2017-02-24 11:55:28.000000000 +0100
+++ elfutils-0.169/src/stack.c 2017-07-28 15:50:06.743196696 +0200
@@ -631,6 +631,8 @@
/* Set locale. */
(void) setlocale (LC_ALL, "");
+ debuginfo_path = getenv("NIX_DEBUG_INFO_DIRS");
+
const struct argp_option options[] =
{
{ NULL, 0, NULL, 0, N_("Input selection options:"), 0 },

View File

@@ -0,0 +1,66 @@
diff -crb --new-file a/lib/error.h b/lib/error.h
*** a/lib/error.h 1969-12-31 19:00:00.000000000 -0500
--- b/lib/error.h 2021-01-21 04:38:25.000000000 -0500
***************
*** 0 ****
--- 1,27 ----
+ #ifndef _ERROR_H_
+ #define _ERROR_H_
+
+ #include <stdarg.h>
+ #include <stdio.h>
+ #include <stdlib.h>
+ #include <string.h>
+ #include <errno.h>
+
+ static unsigned int error_message_count = 0;
+
+ static inline void error(int status, int errnum, const char* format, ...)
+ {
+ va_list ap;
+ fprintf(stderr, "%s: ", program_invocation_name);
+ va_start(ap, format);
+ vfprintf(stderr, format, ap);
+ va_end(ap);
+ if (errnum)
+ fprintf(stderr, ": %s", strerror(errnum));
+ fprintf(stderr, "\n");
+ error_message_count++;
+ if (status)
+ exit(status);
+ }
+
+ #endif /* _ERROR_H_ */
diff -crb --new-file a/src/error.h b/src/error.h
*** a/src/error.h 1969-12-31 19:00:00.000000000 -0500
--- b/src/error.h 2021-01-21 04:38:29.000000000 -0500
***************
*** 0 ****
--- 1,27 ----
+ #ifndef _ERROR_H_
+ #define _ERROR_H_
+
+ #include <stdarg.h>
+ #include <stdio.h>
+ #include <stdlib.h>
+ #include <string.h>
+ #include <errno.h>
+
+ static unsigned int error_message_count = 0;
+
+ static inline void error(int status, int errnum, const char* format, ...)
+ {
+ va_list ap;
+ fprintf(stderr, "%s: ", program_invocation_name);
+ va_start(ap, format);
+ vfprintf(stderr, format, ap);
+ va_end(ap);
+ if (errnum)
+ fprintf(stderr, ": %s", strerror(errnum));
+ fprintf(stderr, "\n");
+ error_message_count++;
+ if (status)
+ exit(status);
+ }
+
+ #endif /* _ERROR_H_ */

View File

@@ -0,0 +1,177 @@
{
lib,
stdenv,
fetchurl,
fetchpatch,
pkg-config,
musl-fts,
musl-obstack,
m4,
zlib,
zstd,
bzip2,
bison,
flex,
gettext,
xz,
setupDebugInfoDirs,
argp-standalone,
enableDebuginfod ? lib.meta.availableOn stdenv.hostPlatform libarchive,
sqlite,
curl,
json_c,
libmicrohttpd,
libarchive,
gitUpdater,
}:
# TODO: Look at the hardcoded paths to kernel, modules etc.
stdenv.mkDerivation rec {
pname = "elfutils";
version = "0.193";
src = fetchurl {
url = "https://sourceware.org/elfutils/ftp/${version}/${pname}-${version}.tar.bz2";
hash = "sha256-eFf0S2JPTY1CHfhRqq57FALP5rzdLYBJ8V/AfT3edjU=";
};
patches = [
./debug-info-from-env.patch
(fetchpatch {
name = "fix-aarch64_fregs.patch";
url = "https://git.alpinelinux.org/aports/plain/main/elfutils/fix-aarch64_fregs.patch?id=2e3d4976eeffb4704cf83e2cc3306293b7c7b2e9";
sha256 = "zvncoRkQx3AwPx52ehjA2vcFroF+yDC2MQR5uS6DATs=";
})
(fetchpatch {
name = "musl-asm-ptrace-h.patch";
url = "https://git.alpinelinux.org/aports/plain/main/elfutils/musl-asm-ptrace-h.patch?id=2e3d4976eeffb4704cf83e2cc3306293b7c7b2e9";
sha256 = "8D1wPcdgAkE/TNBOgsHaeTZYhd9l+9TrZg8d5C7kG6k=";
})
(fetchpatch {
name = "musl-macros.patch";
url = "https://git.alpinelinux.org/aports/plain/main/elfutils/musl-macros.patch?id=2e3d4976eeffb4704cf83e2cc3306293b7c7b2e9";
sha256 = "tp6O1TRsTAMsFe8vw3LMENT/vAu6OmyA8+pzgThHeA8=";
})
(fetchpatch {
name = "musl-strndupa.patch";
url = "https://git.alpinelinux.org/aports/plain/main/elfutils/musl-strndupa.patch?id=2e3d4976eeffb4704cf83e2cc3306293b7c7b2e9";
sha256 = "sha256-7daehJj1t0wPtQzTv+/Rpuqqs5Ng/EYnZzrcf2o/Lb0=";
})
]
++ lib.optionals stdenv.hostPlatform.isMusl [ ./musl-error_h.patch ];
postPatch = ''
patchShebangs tests/*.sh
''
+ lib.optionalString stdenv.hostPlatform.isRiscV ''
# disable failing test:
#
# > dwfl_thread_getframes: No DWARF information found
sed -i s/run-backtrace-dwarf.sh//g tests/Makefile.in
'';
outputs = [
"bin"
"dev"
"out"
"man"
];
# We need bzip2 in NativeInputs because otherwise we can't unpack the src,
# as the host-bzip2 will be in the path.
nativeBuildInputs = [
m4
bison
flex
gettext
bzip2
]
++ lib.optional enableDebuginfod pkg-config;
buildInputs = [
zlib
zstd
bzip2
xz
]
++ lib.optionals stdenv.hostPlatform.isMusl [
argp-standalone
musl-fts
musl-obstack
]
++ lib.optionals enableDebuginfod [
sqlite
curl
json_c
libmicrohttpd
libarchive
];
propagatedNativeBuildInputs = [ setupDebugInfoDirs ];
hardeningDisable = [ "strictflexarrays3" ];
# build elfutils out-of-source-tree to avoid ./stack inclusion
# as a c++ header on libc++: https://sourceware.org/PR33103
preConfigure =
if (stdenv.targetPlatform.useLLVM or false) then
''
mkdir build-tree
cd build-tree
''
else
null;
configureScript = if (stdenv.targetPlatform.useLLVM or false) then "../configure" else null;
configureFlags = [
"--program-prefix=eu-" # prevent collisions with binutils
"--enable-deterministic-archives"
(lib.enableFeature enableDebuginfod "libdebuginfod")
(lib.enableFeature enableDebuginfod "debuginfod")
# https://gcc.gnu.org/bugzilla/show_bug.cgi?id=101766
# Versioned symbols are nice to have, but we can do without.
(lib.enableFeature (!stdenv.hostPlatform.isMicroBlaze) "symbol-versioning")
]
++ lib.optional (stdenv.targetPlatform.useLLVM or false) "--disable-demangler";
enableParallelBuilding = true;
doCheck =
# Backtrace unwinding tests rely on glibc-internal symbol names.
# Musl provides slightly different forms and fails.
# Let's disable tests there until musl support is fully upstreamed.
!stdenv.hostPlatform.isMusl
# Test suite tries using `uname` to determine whether certain tests
# can be executed, so we need to match build and host platform exactly.
&& (stdenv.hostPlatform == stdenv.buildPlatform);
doInstallCheck = !stdenv.hostPlatform.isMusl && (stdenv.hostPlatform == stdenv.buildPlatform);
preCheck = ''
# Workaround lack of rpath linking:
# ./dwarf_srclang_check: error while loading shared libraries:
# libelf.so.1: cannot open shared object file: No such file or directory
# Remove once https://sourceware.org/PR32929 is fixed.
export LD_LIBRARY_PATH="$PWD/libelf:$LD_LIBRARY_PATH"
'';
passthru.updateScript = gitUpdater {
url = "https://sourceware.org/git/elfutils.git";
rev-prefix = "elfutils-";
};
meta = with lib; {
homepage = "https://sourceware.org/elfutils/";
description = "Set of utilities to handle ELF objects";
platforms = platforms.linux;
# https://lists.fedorahosted.org/pipermail/elfutils-devel/2014-November/004223.html
badPlatforms = [ lib.systems.inspect.platformPatterns.isStatic ];
# licenses are GPL2 or LGPL3+ for libraries, GPL3+ for bins,
# but since this package isn't split that way, all three are listed.
license = with licenses; [
gpl2Only
lgpl3Plus
gpl3Plus
];
maintainers = with maintainers; [ r-burns ];
};
}

View File

@@ -0,0 +1,32 @@
{
lib,
rustPlatform,
fetchFromGitHub,
}:
rustPlatform.buildRustPackage (finalAttrs: {
pname = "elfx86exts";
version = "0.6.2";
src = fetchFromGitHub {
owner = "pkgw";
repo = "elfx86exts";
tag = "elfx86exts@${finalAttrs.version}";
hash = "sha256-lqaOnZxuiip1HPDpQraXlpUBYeJuBCRTaNARZVEV5UY=";
};
cargoHash = "sha256-7FVcLvbZQK5M90ofoBpK2V/1+vWlBI/Z2x3ydbCwVbM=";
meta = with lib; {
description = "Decode x86 binaries and print out which instruction set extensions they use";
longDescription = ''
Disassemble a binary containing x86 instructions and print out which extensions it uses.
Despite the utterly misleading name, this tool supports ELF and MachO binaries, and
perhaps PE-format ones as well. (It used to be more limited.)
'';
homepage = "https://github.com/pkgw/elfx86exts";
maintainers = with maintainers; [ rmcgibbo ];
license = with licenses; [ mit ];
mainProgram = "elfx86exts";
};
})

View File

@@ -0,0 +1,97 @@
{
lib,
stdenv,
fetchurl,
symlinkJoin,
makeWrapper,
tcl,
fontconfig,
tk,
ncurses,
xorg,
file,
}:
let
# eli derives the location of the include folder from the location of the lib folder
tk_combined = symlinkJoin {
name = "tk_combined";
paths = [
tk
tk.dev
];
};
curses_combined = symlinkJoin {
name = "curses_combined";
paths = [
ncurses
ncurses.dev
];
};
in
stdenv.mkDerivation rec {
pname = "eli";
version = "4.8.1";
src = fetchurl {
url = "mirror://sourceforge/project/eli-project/Eli/Eli%20${version}/${pname}-${version}.tar.bz2";
sha256 = "1vran8583hbwrr5dciji4zkhz3f88w4mn8n9sdpr6zw0plpf1whj";
};
buildInputs = [
ncurses
fontconfig
]
++ (with xorg; [
libX11.dev
libXt.dev
libXaw.dev
libXext.dev
]);
nativeBuildInputs = [
file
makeWrapper
];
# skip interactive browser check
buildFlags = [ "nobrowsers" ];
# Workaround build failure on -fno-common toolchains:
# ld: cexp.o:(.bss+0x40): multiple definition of `obstck'; cccp.o:(.bss+0x0): first defined here
env.NIX_CFLAGS_COMPILE = "-fcommon";
preConfigure = ''
configureFlagsArray=(
--with-tcltk="${tcl} ${tk_combined}"
--with-curses="${curses_combined}"
)
export ODIN_LOCALIPC=1
'';
postInstall = ''
wrapProgram "$out/bin/eli" \
--set ODIN_LOCALIPC 1
'';
# Test if eli starts
doInstallCheck = true;
installCheckPhase = ''
export HOME="$TMP/home"
mkdir -p "$HOME"
$out/bin/eli "!ls"
'';
meta = {
description = "Translator Construction Made Easy";
longDescription = ''
Eli is a programming environment that supports all phases of translator
construction with extensive libraries implementing common tasks, yet handling
arbitrary special cases. Output is the C subset of C++.
'';
homepage = "https://eli-project.sourceforge.net/";
license = lib.licenses.gpl2;
maintainers = with lib.maintainers; [ timokau ];
platforms = lib.platforms.linux;
};
}

View File

@@ -0,0 +1,99 @@
{
lib,
stdenv,
fetchFromGitHub,
ncurses,
libX11,
bzip2,
zlib,
brotli,
zstd,
xz,
openssl,
autoreconfHook,
gettext,
pkg-config,
libev,
gpm,
libidn,
tre,
expat,
# Incompatible licenses, LGPLv3 - GPLv2
enableGuile ? false,
guile ? null,
enablePython ? false,
python ? null,
enablePerl ? (!stdenv.hostPlatform.isDarwin) && (stdenv.hostPlatform == stdenv.buildPlatform),
perl ? null,
# re-add javascript support when upstream supports modern spidermonkey
}:
assert enableGuile -> guile != null;
assert enablePython -> python != null;
stdenv.mkDerivation rec {
pname = "elinks";
version = "0.18.0";
src = fetchFromGitHub {
owner = "rkd77";
repo = "elinks";
rev = "v${version}";
hash = "sha256-TTb/v24gIWKiCQCESHo0Pz6rvRtw5anoXK0b35dzfLM=";
};
buildInputs = [
ncurses
libX11
bzip2
zlib
brotli
zstd
xz
openssl
libidn
tre
expat
libev
]
++ lib.optional stdenv.hostPlatform.isLinux gpm
++ lib.optional enableGuile guile
++ lib.optional enablePython python
++ lib.optional enablePerl perl;
nativeBuildInputs = [
autoreconfHook
gettext
pkg-config
];
configureFlags = [
"--enable-finger"
"--enable-html-highlight"
"--enable-gopher"
"--enable-gemini"
"--enable-cgi"
"--enable-bittorrent"
"--enable-nntp"
"--enable-256-colors"
"--enable-true-color"
"--with-brotli"
"--with-lzma"
"--with-libev"
"--with-terminfo"
]
++ lib.optional enableGuile "--with-guile"
++ lib.optional enablePython "--with-python"
++ lib.optional enablePerl "--with-perl";
meta = with lib; {
description = "Full-featured text-mode web browser";
mainProgram = "elinks";
homepage = "https://github.com/rkd77/elinks";
license = licenses.gpl2;
platforms = with platforms; linux ++ darwin;
maintainers = with maintainers; [
iblech
];
};
}

View File

@@ -0,0 +1,51 @@
{
lib,
python3Packages,
fetchPypi,
addBinToPathHook,
}:
python3Packages.buildPythonApplication rec {
pname = "eliot-tree";
version = "21.0.0";
pyproject = true;
src = fetchPypi {
inherit pname version;
hash = "sha256-hTl+r+QJPPQ7ss73lty3Wm7DLy2SKGmmgIuJx38ilO8=";
};
# Patch Python 3.12 incompatibilities in versioneer.py.
postPatch = ''
substituteInPlace versioneer.py \
--replace-fail SafeConfigParser ConfigParser \
--replace-fail readfp read_file
'';
build-system = with python3Packages; [ setuptools ];
dependencies = with python3Packages; [
colored
eliot
iso8601
jmespath
toolz
];
nativeCheckInputs = with python3Packages; [
addBinToPathHook
pytestCheckHook
testtools
];
pythonImportsCheck = [ "eliottree" ];
meta = {
homepage = "https://github.com/jonathanj/eliottree";
changelog = "https://github.com/jonathanj/eliottree/blob/${version}/NEWS.rst";
description = "Render Eliot logs as an ASCII tree";
mainProgram = "eliot-tree";
license = lib.licenses.mit;
maintainers = [ lib.maintainers.dpausp ];
};
}

View File

@@ -0,0 +1,63 @@
{
lib,
stdenv,
fetchFromGitHub,
nix-update-script,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "eliza";
version = "0-unstable-2025-05-13";
src = fetchFromGitHub {
owner = "anthay";
repo = "ELIZA";
rev = "00a277838ac0adb2165625129769c78d518a7215";
hash = "sha256-CSQyVnjyoSNwQlVXhpqjTGJ8psV9z0m2+ZOWUh6Dhm0=";
};
doCheck = true;
# Unit tests are executed automatically on execution
checkPhase = ''
runHook preCheck
echo Corki is mana | ./eliza
runHook postCheck
'';
buildPhase = ''
runHook preBuild
$CXX -std=c++20 -pedantic -o eliza ./src/eliza.cpp
runHook postBuild
'';
installPhase = ''
runHook preInstall
install -Dm544 ./eliza $out/bin/eliza
runHook postInstall
'';
passthru.updateScript = nix-update-script {
extraArgs = [
"--version=branch=master"
];
};
meta = {
description = "C++ simulation of Joseph Weizenbaums 1966 ELIZA";
longDescription = ''
This is an implementation in C++ of ELIZA that attempts to be as close
to the original as possible.
It was made to closely follow Joseph Weizenbaums description of his program
given in his January 1966 Communications of the ACM paper, and later changed
to follow the ELIZA source code found on 2021 and the SLIP programming
function HASH(D,N) found on 2022.
It is controlled by a script identical to the one given in the appendix of
the 1966 paper.
'';
license = lib.licenses.cc0;
mainProgram = "eliza";
homepage = "https://github.com/anthay/ELIZA";
maintainers = with lib.maintainers; [ EmanuelM153 ];
platforms = lib.platforms.all;
};
})

View File

@@ -0,0 +1,58 @@
{
stdenv,
lib,
fetchFromGitHub,
bison,
cmake,
flex,
perl,
}:
stdenv.mkDerivation rec {
pname = "elkhound";
version = "0-unstable-2020-04-13";
src = fetchFromGitHub {
owner = "WeiDUorg";
repo = "elkhound";
rev = "a7eb4bb2151c00cc080613a770d37560f62a285c";
hash = "sha256-Y96OFpBNrD3vrKoEZ4KdJuI1Q4RmYANsu7H3ZzfaA6g=";
};
postPatch = ''
patchShebangs scripts
'';
sourceRoot = "${src.name}/src";
nativeBuildInputs = [
bison
cmake
flex
perl
];
cmakeFlags = [ "-Wno-dev" ]; # it vomits warnings that only upstream cares about
installPhase = ''
runHook preInstall
install -Dm555 -t $out/bin ast/astgen elkhound/elkhound
for d in ast elkhound smbase; do
install -Dm444 -t $out/lib $d/*.a
install -Dm444 -t $out/include/$d $src/src/$d/*.h
done
install -Dm444 -t $out/share/doc/elkhound $src/src/elkhound/*.txt
runHook postInstall
'';
meta = with lib; {
description = "Parser generator which emits GLR parsers, either in OCaml or C++";
homepage = "https://scottmcpeak.com/elkhound/";
license = licenses.bsd3;
maintainers = with maintainers; [ peterhoeg ];
platforms = platforms.unix;
mainProgram = "elkhound";
};
}

View File

@@ -0,0 +1,72 @@
{
lib,
stdenv,
fetchgit,
autoreconfHook,
pkg-config,
dbus,
sysctl,
gitUpdater,
}:
stdenv.mkDerivation rec {
pname = "ell";
version = "0.79";
outputs = [
"out"
"dev"
];
separateDebugInfo = true;
src = fetchgit {
url = "https://git.kernel.org/pub/scm/libs/ell/ell.git";
rev = version;
hash = "sha256-5NqzuUDimairQJjHsSy0sbpqiDfNDvrt3BEV9e1bF1E=";
};
nativeBuildInputs = [
pkg-config
autoreconfHook
];
nativeCheckInputs = [
dbus
# required as the sysctl test works on some machines
sysctl
];
enableParallelBuilding = true;
# Runs multiple dbus instances on the same port failing the bind.
enableParallelChecking = false;
# 'unit/test-hwdb' fails in the sandbox as it relies on
# '/etc/udev/hwdb.bin' file presence in the sandbox. `nixpkgs` does
# not provide it today in any form. Let's skip the test.
env.XFAIL_TESTS = "unit/test-hwdb";
# tests sporadically fail on musl
doCheck = !stdenv.hostPlatform.isMusl;
passthru = {
updateScript = gitUpdater {
url = "https://git.kernel.org/pub/scm/libs/ell/ell.git";
};
};
meta = {
homepage = "https://git.kernel.org/pub/scm/libs/ell/ell.git";
description = "Embedded Linux Library";
longDescription = ''
The Embedded Linux* Library (ELL) provides core, low-level functionality for system daemons. It typically has no dependencies other than the Linux kernel, C standard library, and libdl (for dynamic linking). While ELL is designed to be efficient and compact enough for use on embedded Linux platforms, it is not limited to resource-constrained systems.
'';
changelog = "https://git.kernel.org/pub/scm/libs/ell/ell.git/tree/ChangeLog?h=${version}";
license = lib.licenses.lgpl21Plus;
platforms = lib.platforms.linux;
maintainers = with lib.maintainers; [
mic92
dtzWill
];
};
}

View File

@@ -0,0 +1,51 @@
{
lib,
stdenv,
fetchurl,
python3,
}:
stdenv.mkDerivation rec {
pname = "elliptic_curves";
version = "0.8.1";
src = fetchurl {
url = "mirror://sageupstream/${pname}/${pname}-${version}.tar.bz2";
sha256 = "0l7xh4abw5sb4d37r0ylr3vwb88fpx2zrvfm5ql0c7yrv5q59fjz";
};
# Script that creates the sqlite database from the allcurves textfile
spkg-install = fetchurl {
url = "https://raw.githubusercontent.com/sagemath/sage/07d6c37d18811e2b377a9689790a7c5e24da16ba/build/pkgs/${pname}/spkg-install.py";
sha256 = "116g684i6mvs11fvb6fzfsr4fn903axn31vigdyb8bgpf8l4hvc5";
};
installPhase = ''
# directory layout as spkg-install.py expects
dir="$PWD"
cd ..
ln -s "$dir" "src"
# environment spkg-install.py expects
mkdir -p "$out/share"
export SAGE_SHARE="$out/share"
export PYTHONPATH=$PWD
${python3.interpreter} ${spkg-install}
'';
meta = with lib; {
description = "Databases of elliptic curves";
longDescription = ''
Includes two databases:
* A small subset of the data in John Cremona's database of elliptic curves up
to conductor 10000. See http://www.warwick.ac.uk/~masgaj/ftp/data/ or
http://sage.math.washington.edu/cremona/INDEX.html
* William Stein's database of interesting curves
'';
license = licenses.gpl2;
platforms = platforms.all;
teams = [ teams.sage ];
};
}

View File

@@ -0,0 +1,67 @@
{
"elm/browser" = {
sha256 = "0nagb9ajacxbbg985r4k9h0jadqpp0gp84nm94kcgbr5sf8i9x13";
version = "1.0.2";
};
"elm/core" = {
sha256 = "19w0iisdd66ywjayyga4kv2p1v9rxzqjaxhckp8ni6n8i0fb2dvf";
version = "1.0.5";
};
"elm/html" = {
sha256 = "1n3gpzmpqqdsldys4ipgyl1zacn0kbpc3g4v3hdpiyfjlgh8bf3k";
version = "1.0.0";
};
"elm/json" = {
sha256 = "0kjwrz195z84kwywaxhhlnpl3p251qlbm5iz6byd6jky2crmyqyh";
version = "1.1.3";
};
"stil4m/elm-syntax" = {
sha256 = "1dlk7gslh9la6y7y3d56a37lsymmz32rlspbywcfmq40mq9hiify";
version = "7.2.9";
};
"elm-community/list-extra" = {
sha256 = "043iwpdwyrfb1jndxh7kf7xlkgq1v6pjczv1r1b19p2wky6nmy8z";
version = "8.5.2";
};
"elm/parser" = {
sha256 = "0a3cxrvbm7mwg9ykynhp7vjid58zsw03r63qxipxp3z09qks7512";
version = "1.1.0";
};
"elm/time" = {
sha256 = "0vch7i86vn0x8b850w1p69vplll1bnbkp8s383z7pinyg94cm2z1";
version = "1.0.0";
};
"elm/url" = {
sha256 = "0av8x5syid40sgpl5vd7pry2rq0q4pga28b4yykn9gd9v12rs3l4";
version = "1.0.0";
};
"elm/virtual-dom" = {
sha256 = "1yvb8px2z62xd578ag2q0r5hd1vkz9y7dfkx05355iiy1d7jwq4v";
version = "1.0.3";
};
"miniBill/elm-unicode" = {
sha256 = "18w246bvra93amvqq3r2kqdv5ad8iavnhvcsbfdxw6747pi6pg2f";
version = "1.0.2";
};
"rtfeldman/elm-hex" = {
sha256 = "1y0aa16asvwdqmgbskh5iba6psp43lkcjjw9mgzj3gsrg33lp00d";
version = "1.0.0";
};
"stil4m/structured-writer" = {
sha256 = "02k32yaw275bivab90wy8qkbys3gg4fw53f798dzf1j9wharhg12";
version = "1.0.3";
};
}

View File

@@ -0,0 +1,70 @@
{
lib,
buildNpmPackage,
fetchFromGitHub,
elmPackages,
versionCheckHook,
writeShellScript,
nix-update,
elm2nix,
nixfmt,
}:
buildNpmPackage rec {
pname = "elm-land";
version = "0.20.1";
src = fetchFromGitHub {
owner = "elm-land";
repo = "elm-land";
rev = "v${version}";
hash = "sha256-PFyiVTH2Cek377YZwaCmvDToQCaxWQvJrQkRhyNI2Wg=";
};
sourceRoot = "${src.name}/projects/cli";
npmDepsHash = "sha256-Bg16s0tqEaUT+BbFMKuEtx32rmbZLIILp8Ra/dQGmUg=";
npmRebuildFlags = [ "--ignore-scripts" ];
postConfigure =
(elmPackages.fetchElmDeps {
elmPackages = import ./elm-srcs.nix;
elmVersion = elmPackages.elm.version;
registryDat = ./registry.dat;
})
+ ''
ln -sf ${lib.getExe elmPackages.elm} node_modules/.bin/elm
'';
nativeInstallCheckInputs = [
versionCheckHook
];
versionCheckProgramArg = "--version";
doInstallCheck = true;
passthru.updateScript = writeShellScript "update-elm-land" ''
set -eu -o pipefail
# Update version, src and npm deps
${lib.getExe nix-update} "$UPDATE_NIX_ATTR_PATH"
# Update elm deps
cp "$(nix-build -A "$UPDATE_NIX_ATTR_PATH".src)/projects/cli/src/codegen/elm.json" elm.json
trap 'rm -rf elm.json registry.dat &> /dev/null' EXIT
${lib.getExe elm2nix} convert > pkgs/by-name/el/elm-land/elm-srcs.nix
${lib.getExe nixfmt} pkgs/by-name/el/elm-land/elm-srcs.nix
${lib.getExe elm2nix} snapshot
cp registry.dat pkgs/by-name/el/elm-land/registry.dat
'';
meta = {
description = "Production-ready framework for building Elm applications";
homepage = "https://github.com/elm-land/elm-land";
license = lib.licenses.bsd3;
maintainers = with lib.maintainers; [
zupo
];
mainProgram = "elm-land";
};
}

Binary file not shown.

View File

@@ -0,0 +1,87 @@
{
lib,
stdenv,
fetchFromGitHub,
cmake,
gfortran,
mpi,
blas,
liblapack,
pkg-config,
libGL,
libGLU,
opencascade-occt,
qt6Packages,
onetbb,
vtkWithQt6,
llvmPackages,
}:
stdenv.mkDerivation {
pname = "elmerfem";
version = "9.0-unstable-2025-05-25";
src = fetchFromGitHub {
owner = "elmercsc";
repo = "elmerfem";
rev = "2f7360ddf491c34f19fea9a723f340cca0fbe1d4";
hash = "sha256-2vzIFGh8+YrMxb5px6+aQyTerOAJmHOh2I7eterY6zI=";
};
hardeningDisable = [ "format" ];
nativeBuildInputs = [
cmake
gfortran
pkg-config
qt6Packages.wrapQtAppsHook
];
buildInputs = [
mpi
blas
liblapack
qt6Packages.qtbase
qt6Packages.qwt
libGL
libGLU
opencascade-occt
onetbb
vtkWithQt6
]
++ lib.optional stdenv.cc.isClang llvmPackages.openmp;
preConfigure = ''
patchShebangs ./
'';
NIX_CFLAGS_COMPILE = "-Wno-error=implicit-function-declaration";
cmakeFlags = [
(lib.cmakeFeature "ELMER_INSTALL_LIB_DIR" "${placeholder "out"}/lib")
(lib.cmakeBool "WITH_OpenMP" true)
(lib.cmakeBool "WITH_MPI" true)
(lib.cmakeBool "WITH_QT6" true)
(lib.cmakeBool "WITH_OCC" true)
(lib.cmakeBool "WITH_VTK" true)
(lib.cmakeBool "WITH_ELMERGUI" true)
(lib.cmakeFeature "CMAKE_INSTALL_LIBDIR" "lib")
(lib.cmakeFeature "CMAKE_INSTALL_INCLUDEDIR" "include")
(lib.cmakeFeature "CMAKE_OpenGL_GL_PREFERENCE" "GLVND")
]
++ lib.optionals stdenv.hostPlatform.isDarwin [
(lib.cmakeBool "USE_MACOS_PACKAGE_MANAGER" false)
(lib.cmakeFeature "QWT_INCLUDE_DIR" "${qt6Packages.qwt}/lib/qwt.framework/Headers")
];
meta = with lib; {
homepage = "https://elmerfem.org";
description = "Finite element software for multiphysical problems";
platforms = platforms.unix;
maintainers = with maintainers; [
wulfsta
broke
];
license = licenses.lgpl21;
};
}

View File

@@ -0,0 +1,121 @@
From ae7ecfc9487756659077e126bfd296146125a59d Mon Sep 17 00:00:00 2001
From: Alyssa Ross <hi@alyssa.is>
Date: Sun, 13 Oct 2024 18:03:47 +0200
Subject: [PATCH] Add missing musl_missing.h includes for basename
Link: https://github.com/elogind/elogind/pull/292
---
src/basic/cgroup-util.c | 1 +
src/libelogind/sd-bus/test-bus-watch-bind.c | 2 ++
src/login/logind-inhibit.c | 2 ++
src/login/logind-seat.c | 2 ++
src/login/logind-session.c | 1 +
src/test/test-fileio.c | 2 ++
src/test/test-mountpoint-util.c | 1 +
src/test/test-path-util.c | 2 ++
8 files changed, 13 insertions(+)
diff --git a/src/basic/cgroup-util.c b/src/basic/cgroup-util.c
index 90cfeb570..c57fe54d0 100644
--- a/src/basic/cgroup-util.c
+++ b/src/basic/cgroup-util.c
@@ -40,6 +40,7 @@
//#include "xattr-util.h"
/// Additional includes needed by elogind
#include "env-file.h"
+#include "musl_missing.h"
static int cg_enumerate_items(const char *controller, const char *path, FILE **ret, const char *item) {
_cleanup_free_ char *fs = NULL;
diff --git a/src/libelogind/sd-bus/test-bus-watch-bind.c b/src/libelogind/sd-bus/test-bus-watch-bind.c
index d6938a7f0..3227c17d7 100644
--- a/src/libelogind/sd-bus/test-bus-watch-bind.c
+++ b/src/libelogind/sd-bus/test-bus-watch-bind.c
@@ -17,6 +17,8 @@
#include "string-util.h"
#include "tmpfile-util.h"
#include "tests.h"
+/// Additional includes needed by elogind
+#include "musl_missing.h"
static int method_foobar(sd_bus_message *m, void *userdata, sd_bus_error *ret_error) {
log_info("Got Foobar() call.");
diff --git a/src/login/logind-inhibit.c b/src/login/logind-inhibit.c
index 86d1f84b3..4140f1aae 100644
--- a/src/login/logind-inhibit.c
+++ b/src/login/logind-inhibit.c
@@ -26,6 +26,8 @@
#include "string-util.h"
#include "tmpfile-util.h"
#include "user-util.h"
+/// Additional includes needed by elogind
+#include "musl_missing.h"
static void inhibitor_remove_fifo(Inhibitor *i);
diff --git a/src/login/logind-seat.c b/src/login/logind-seat.c
index bef542d94..f520562ad 100644
--- a/src/login/logind-seat.c
+++ b/src/login/logind-seat.c
@@ -24,6 +24,8 @@
#include "string-util.h"
#include "terminal-util.h"
#include "tmpfile-util.h"
+/// Additional includes needed by elogind
+#include "musl_missing.h"
int seat_new(Seat** ret, Manager *m, const char *id) {
_cleanup_(seat_freep) Seat *s = NULL;
diff --git a/src/login/logind-session.c b/src/login/logind-session.c
index ea69c2e6c..90ddec899 100644
--- a/src/login/logind-session.c
+++ b/src/login/logind-session.c
@@ -42,6 +42,7 @@
/// Additional includes needed by elogind
#include "cgroup-setup.h"
#include "extract-word.h"
+#include "musl_missing.h"
#define RELEASE_USEC (20*USEC_PER_SEC)
diff --git a/src/test/test-fileio.c b/src/test/test-fileio.c
index b9b82e7ff..db981bd41 100644
--- a/src/test/test-fileio.c
+++ b/src/test/test-fileio.c
@@ -25,6 +25,8 @@
#include "strv.h"
#include "tests.h"
#include "tmpfile-util.h"
+/// Additional includes needed by elogind
+#include "musl_missing.h"
#if 0 /// elogind does not need load_/write_/merge_env_file()
TEST(parse_env_file) {
diff --git a/src/test/test-mountpoint-util.c b/src/test/test-mountpoint-util.c
index de526100f..9d37ce77d 100644
--- a/src/test/test-mountpoint-util.c
+++ b/src/test/test-mountpoint-util.c
@@ -16,6 +16,7 @@
#include "string-util.h"
#include "tests.h"
/// Addition includes needed by elogind
+#include "musl_missing.h"
#include "virt.h"
#include "tmpfile-util.h"
diff --git a/src/test/test-path-util.c b/src/test/test-path-util.c
index 76fda746a..1df305d30 100644
--- a/src/test/test-path-util.c
+++ b/src/test/test-path-util.c
@@ -16,6 +16,8 @@
#include "strv.h"
#include "tests.h"
#include "tmpfile-util.h"
+/// Additional includes needed by elogind
+#include "musl_missing.h"
TEST(print_paths) {
log_info("DEFAULT_PATH=%s", DEFAULT_PATH);
--
2.46.0

View File

@@ -0,0 +1,35 @@
From 3a0181ab0fb6c40f613894e65009e148c6e652c9 Mon Sep 17 00:00:00 2001
From: Alyssa Ross <hi@alyssa.is>
Date: Mon, 16 Sep 2024 10:24:08 +0200
Subject: [PATCH] Remove outdated musl hack in rlimit_nofile_safe
This was incorrect, because RLIM_FMT is not the format specifier for uintmax_t.
Since 53e84063a ("Change RLIM_FMT to '%llu' for non-glibc builds (#269)"),
RLIM_FMT is correct for musl, so there's no longer any need for this casting
version.
Link: https://github.com/elogind/elogind/pull/288
---
src/basic/rlimit-util.c | 4 ----
1 file changed, 4 deletions(-)
diff --git a/src/basic/rlimit-util.c b/src/basic/rlimit-util.c
index 091c111df..59bdc35a0 100644
--- a/src/basic/rlimit-util.c
+++ b/src/basic/rlimit-util.c
@@ -428,11 +428,7 @@ int rlimit_nofile_safe(void) {
rl.rlim_max = MIN(rl.rlim_max, (rlim_t) read_nr_open());
rl.rlim_cur = MIN((rlim_t) FD_SETSIZE, rl.rlim_max);
if (setrlimit(RLIMIT_NOFILE, &rl) < 0)
-#ifdef __GLIBC__ /// To be compatible with musl-libc, elogind uses an (uintmax_t) cast.
return log_debug_errno(errno, "Failed to lower RLIMIT_NOFILE's soft limit to " RLIM_FMT ": %m", rl.rlim_cur);
-#else // __GLIBC__
- return log_debug_errno(errno, "Failed to lower RLIMIT_NOFILE's soft limit to " RLIM_FMT ": %m", (uintmax_t)rl.rlim_cur);
-#endif // __GLIBC__
return 1;
}
--
2.45.2

View File

@@ -0,0 +1,162 @@
{
stdenv,
lib,
fetchFromGitHub,
fetchurl,
fetchpatch,
meson,
ninja,
m4,
gperf,
getent,
acl,
audit,
dbus,
libcap,
libselinux,
pam,
gettext,
pkg-config,
udev,
eudev,
util-linux,
libxslt,
python3Packages,
docbook5,
docbook_xsl,
docbook_xsl_ns,
docbook_xml_dtd_42,
docbook_xml_dtd_45,
udevCheckHook,
# Defaulting to false because usually the rationale for using elogind is to
# use it in situation where a systemd dependency does not work (especially
# when building with musl, which elogind explicitly supports).
enableSystemd ? false,
}:
stdenv.mkDerivation rec {
pname = "elogind";
version = "255.5";
src = fetchFromGitHub {
owner = "elogind";
repo = "elogind";
rev = "v${version}";
hash = "sha256-4KZr/NiiGVwzdDROhiX3GEQTUyIGva6ezb+xC2U3bkg=";
};
nativeBuildInputs = [
meson
ninja
m4
pkg-config
gperf
getent
libcap
gettext
libxslt.bin # xsltproc
docbook5
docbook_xsl
docbook_xsl_ns
docbook_xml_dtd_42
docbook_xml_dtd_45 # needed for docbook without Internet
python3Packages.python
python3Packages.jinja2
]
++ lib.optionals enableSystemd [
# udevCheckHook introduces a dependency on systemdMinimal
udevCheckHook
];
buildInputs = [
acl
audit
dbus
libcap
libselinux
pam
util-linux
]
++ (if enableSystemd then [ udev ] else [ eudev ]);
postPatch = ''
substituteInPlace meson.build --replace-fail "install_emptydir(elogindstatedir)" ""
'';
patches = [
(fetchurl {
url = "https://github.com/chimera-linux/cports/raw/49d65fe38be815b9918a15ac2d2ff2b123fc559a/main/elogind/patches/strerror_r.patch";
hash = "sha256-amqXP12mLtrkWuAURb3/aoQeeTSRYlYqL2q2zrKbhxk=";
})
(fetchurl {
url = "https://github.com/chimera-linux/cports/raw/49d65fe38be815b9918a15ac2d2ff2b123fc559a/main/elogind/patches/strerror_r_1.patch";
hash = "sha256-tVUlmPValUPApqRX+Cqkzn7bkIILYSuCouvgRsdl9XE=";
})
(fetchpatch {
url = "https://github.com/chimera-linux/cports/raw/49d65fe38be815b9918a15ac2d2ff2b123fc559a/main/elogind/patches/xxx-musl-fixes.patch";
includes = [
"src/basic/missing_prctl.h"
"src/libelogind/sd-journal/journal-file.h"
];
hash = "sha256-JYPB9AKbQpVgid5BhwBTvcebE5rxDFRMYhKRNS8KPTc=";
})
(fetchurl {
url = "https://github.com/chimera-linux/cports/raw/49d65fe38be815b9918a15ac2d2ff2b123fc559a/main/elogind/patches/gshadow.patch";
hash = "sha256-YBy1OeWD1EluLTeUvqUvZKyrZyoUbGg1mxwqG5+VNO0=";
})
(fetchurl {
name = "FTW.patch";
url = "https://git.openembedded.org/openembedded-core/plain/meta/recipes-core/systemd/systemd/0005-add-missing-FTW_-macros-for-musl.patch?id=6bc5e3f3cd882c81c972dbd27aacc1ce00e5e59a";
hash = "sha256-SGvP0GT43vfyHxrmvl4AbsWQz8CPmNGyH001s3lTxng=";
})
(fetchurl {
name = "malloc_info.patch";
url = "https://git.openembedded.org/openembedded-core/plain/meta/recipes-core/systemd/systemd/0016-pass-correct-parameters-to-getdents64.patch?id=6bc5e3f3cd882c81c972dbd27aacc1ce00e5e59a";
hash = "sha256-8aOw+BTtl5Qta8aqLmliKSHEirTjp1xLM195EmBdEDI=";
})
(fetchpatch {
name = "malloc_trim.patch";
url = "https://git.openembedded.org/openembedded-core/plain/meta/recipes-core/systemd/systemd/0020-sd-event-Make-malloc_trim-conditional-on-glibc.patch?id=6bc5e3f3cd882c81c972dbd27aacc1ce00e5e59a";
stripLen = 3;
extraPrefix = [ "src/libelogind/" ];
hash = "sha256-rtSnCEK+frhnlwl/UW3YHxB8MUCAq48jEzQRURpxdXk=";
})
(fetchurl {
name = "malloc_info.patch";
url = "https://git.openembedded.org/openembedded-core/plain/meta/recipes-core/systemd/systemd/0021-shared-Do-not-use-malloc_info-on-musl.patch?id=6bc5e3f3cd882c81c972dbd27aacc1ce00e5e59a";
hash = "sha256-ZyOCmM5LcwJ7mHiZr0lQjV4G+XMxjhsUm7g7L3OzDDM=";
})
./Add-missing-musl_missing.h-includes-for-basename.patch
./Remove-outdated-musl-hack-in-rlimit_nofile_safe.patch
];
# Inspired by the systemd `preConfigure`.
# Conceptually we should patch all files required during the build, but not scripts
# supposed to run at run-time of the software (important for cross-compilation).
# This package seems to have mostly scripts that run at build time.
preConfigure = ''
for dir in tools src/test; do
patchShebangs $dir
done
patchShebangs src/basic/generate-*.{sh,py}
'';
mesonFlags = [
(lib.mesonOption "dbuspolicydir" "${placeholder "out"}/share/dbus-1/system.d")
(lib.mesonOption "dbussystemservicedir" "${placeholder "out"}/share/dbus-1/system-services")
(lib.mesonOption "sysconfdir" "${placeholder "out"}/etc")
(lib.mesonBool "utmp" (!stdenv.hostPlatform.isMusl))
(lib.mesonEnable "xenctrl" false)
];
meta = with lib; {
homepage = "https://github.com/elogind/elogind";
description = "systemd project's 'logind', extracted to a standalone package";
platforms = platforms.linux; # probably more
license = licenses.lgpl21Plus;
maintainers = with maintainers; [ nh2 ];
};
}

View File

@@ -0,0 +1,100 @@
{
lib,
stdenv,
fetchFromGitHub,
meson,
glib,
gjs,
ninja,
gtk4,
gsettings-desktop-schemas,
wrapGAppsHook4,
desktop-file-utils,
gobject-introspection,
glib-networking,
pkg-config,
libadwaita,
appstream,
blueprint-compiler,
gettext,
libportal-gtk4,
languagetool,
libsoup_3,
openjdk,
xdg-desktop-portal,
dbus,
nix-update-script,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "eloquent";
version = "1.2";
src = fetchFromGitHub {
owner = "sonnyp";
repo = "Eloquent";
tag = "v${finalAttrs.version}";
fetchSubmodules = true;
hash = "sha256-I4AQZl1zoZPhOwDR1uYNJTMRq5vQHPvyimC8OUAe+vY=";
};
nativeBuildInputs = [
appstream
blueprint-compiler
desktop-file-utils
gjs
gobject-introspection
libportal-gtk4
meson
ninja
pkg-config
wrapGAppsHook4
];
buildInputs = [
dbus
gettext
gjs
glib
glib-networking
gsettings-desktop-schemas
gtk4
libadwaita
libportal-gtk4
libsoup_3
xdg-desktop-portal
];
postPatch = ''
substituteInPlace troll/gjspack/bin/gjspack \
--replace-fail "/usr/bin/env -S gjs" "${gjs}/bin/gjs"
substituteInPlace src/languagetool.js \
--replace-fail "/app/LanguageTool/languagetool-server.jar" "${languagetool}/share/languagetool-server.jar" \
--replace-fail "--config" "" \
--replace-fail "/app/share/server.properties" ""
sed -i "1 a imports.package._findEffectiveEntryPointName = () => 're.sonny.Eloquent';" src/bin.js
patchShebangs .
'';
strictDeps = true;
preFixup = ''
gappsWrapperArgs+=(
--set JAVA_HOME ${openjdk}
--prefix PATH : ${openjdk}/bin
)
'';
passthru.updateScript = nix-update-script { };
meta = {
description = "Proofreading software for English, Spanish, French, German, and more than 20 other languages";
homepage = "https://github.com/sonnyp/eloquent";
license = lib.licenses.gpl3Only;
maintainers = with lib.maintainers; [ thtrf ];
mainProgram = "re.sonny.Eloquent";
platforms = lib.platforms.linux;
};
})

View File

@@ -0,0 +1,133 @@
{
lib,
stdenv,
fetchurl,
autoreconfHook,
mpiCheckPhaseHook,
perl,
mpi,
blas,
lapack,
scalapack,
# CPU optimizations
avxSupport ? stdenv.hostPlatform.avxSupport,
avx2Support ? stdenv.hostPlatform.avx2Support,
avx512Support ? stdenv.hostPlatform.avx512Support,
config,
# Enable NIVIA GPU support
# Note, that this needs to be built on a system with a GPU
# present for the tests to succeed.
enableCuda ? config.cudaSupport,
# type of GPU architecture
nvidiaArch ? "sm_60",
cudaPackages,
}:
assert blas.isILP64 == lapack.isILP64;
assert blas.isILP64 == scalapack.isILP64;
stdenv.mkDerivation rec {
pname = "elpa";
version = "2025.06.001";
passthru = { inherit (blas) isILP64; };
src = fetchurl {
url = "https://elpa.mpcdf.mpg.de/software/tarball-archive/Releases/${version}/elpa-${version}.tar.gz";
sha256 = "sha256-/usf6hq0qGcLjTJAdl7wragoBi737JtzXuy6KEhRXJQ=";
};
patches = [
# Use a plain name for the pkg-config file
./pkg-config.patch
];
postPatch = ''
patchShebangs ./fdep/fortran_dependencies.pl
patchShebangs ./test-driver
# Fix the test script generator
substituteInPlace Makefile.am --replace '#!/bin/bash' '#!${stdenv.shell}'
'';
outputs = [
"out"
"doc"
"man"
"dev"
];
nativeBuildInputs = [
autoreconfHook
perl
]
++ lib.optionals enableCuda [ cudaPackages.cuda_nvcc ];
buildInputs = [
mpi
blas
lapack
scalapack
]
++ lib.optionals enableCuda [
cudaPackages.cuda_cudart
cudaPackages.libcublas
];
preConfigure = ''
export FC="mpifort"
export CC="mpicc"
export CXX="mpicxx"
export CPP="cpp"
# These need to be set for configure to succeed
export FCFLAGS="${
lib.optionalString stdenv.hostPlatform.isx86_64 "-msse3 "
+ lib.optionalString avxSupport "-mavx "
+ lib.optionalString avx2Support "-mavx2 -mfma "
+ lib.optionalString avx512Support "-mavx512"
}"
export CFLAGS=$FCFLAGS
'';
configureFlags = [
"--with-mpi"
"--enable-openmp"
"--without-threading-support-check-during-build"
]
++ lib.optional blas.isILP64 "--enable-64bit-integer-math-support"
++ lib.optional (!avxSupport) "--disable-avx"
++ lib.optional (!avx2Support) "--disable-avx2"
++ lib.optional (!avx512Support) "--disable-avx512"
++ lib.optional (!stdenv.hostPlatform.isx86_64) "--disable-sse"
++ lib.optional (!stdenv.hostPlatform.isx86_64) "--disable-sse-assembly"
++ lib.optional stdenv.hostPlatform.isx86_64 "--enable-sse-assembly"
++ lib.optionals enableCuda [
"--enable-nvidia-gpu"
"--with-NVIDIA-GPU-compute-capability=${nvidiaArch}"
];
enableParallelBuilding = true;
doCheck = !enableCuda;
nativeCheckInputs = [ mpiCheckPhaseHook ];
preCheck = ''
#patchShebangs ./
# Run dual threaded
export OMP_NUM_THREADS=2
# Reduce test problem sizes
export TEST_FLAGS="1500 50 16"
'';
meta = with lib; {
description = "Eigenvalue Solvers for Petaflop-Applications";
homepage = "https://elpa.mpcdf.mpg.de/";
license = licenses.lgpl3Only;
platforms = platforms.linux;
maintainers = [ maintainers.markuskowa ];
};
}

View File

@@ -0,0 +1,13 @@
diff --git a/configure.ac b/configure.ac
index 0aa533a..da5d1f7 100644
--- a/configure.ac
+++ b/configure.ac
@@ -2336,7 +2336,7 @@ if test x"$have_loop_blocking" = x"yes"; then
fi
AC_SUBST([SUFFIX])
-AC_SUBST([PKG_CONFIG_FILE],[elpa${SUFFIX}.pc])
+AC_SUBST([PKG_CONFIG_FILE],[elpa.pc])
AC_CONFIG_FILES([
Makefile

View File

@@ -0,0 +1,49 @@
{
lib,
fetchgit,
automake,
autoconf,
libtool,
libedit,
tcl,
tk,
}:
tcl.mkTclDerivation rec {
pname = "eltclsh";
version = "1.20";
src = fetchgit {
url = "https://git.openrobots.org/robots/eltclsh.git";
rev = "eltclsh-${version}";
hash = "sha256-kNUT190DkY+NNUmBwHfSxgBLbSyc0MutVDLsRh7kFDE=";
};
nativeBuildInputs = [
automake
autoconf
libtool
];
buildInputs = [
libedit
tk
];
preConfigure = "NOCONFIGURE=1 ./autogen.sh";
configureFlags = [
"--enable-tclshrl"
"--enable-wishrl"
"--with-tk=${tk}/lib"
"--with-includes=${libedit.dev}/include/readline"
"--with-libtool=${libtool}"
];
meta = with lib; {
description = "Interactive shell for the TCL programming language based on editline";
homepage = "https://homepages.laas.fr/mallet/soft/shell/eltclsh";
license = licenses.bsd3;
maintainers = with maintainers; [ iwanb ];
platforms = platforms.all;
};
}

View File

@@ -0,0 +1,34 @@
{
lib,
fetchFromGitHub,
rustPlatform,
openssl,
pkg-config,
}:
rustPlatform.buildRustPackage rec {
pname = "eludris";
version = "0.3.3";
src = fetchFromGitHub {
owner = "eludris";
repo = "eludris";
rev = "v${version}";
hash = "sha256-TVYgimkGUSITB3IaMlMd10PWomqyJRvONvJwiW85U4M=";
};
cargoHash = "sha256-JpXjnkZHz12YxgTSqTcWdQTkrMugP7ZGw48145BeBZk=";
cargoBuildFlags = [ "-p eludris" ];
cargoTestFlags = [ "-p eludris" ];
buildInputs = [ openssl ];
nativeBuildInputs = [ pkg-config ];
meta = with lib; {
description = "Simple CLI to help you with setting up and managing your Eludris instance";
mainProgram = "eludris";
homepage = "https://github.com/eludris/eludris/tree/main/cli";
license = licenses.mit;
maintainers = with maintainers; [ ooliver1 ];
};
}

View File

@@ -0,0 +1,84 @@
{
lib,
fetchurl,
fetchpatch,
installShellFiles,
ncurses,
stdenv,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "elvis";
version = "2.2_0";
src = fetchurl {
urls = [
"http://www.the-little-red-haired-girl.org/pub/elvis/elvis-${finalAttrs.version}.tar.gz"
"http://www.the-little-red-haired-girl.org/pub/elvis/old/elvis-${finalAttrs.version}.tar.gz"
];
hash = "sha256-moRmsik3mEQQVrwnlzavOmFrqrovEZQDlsxg/3GSTqA=";
};
patches = [
(fetchpatch {
name = "0000-resolve-stdio-getline-naming-conflict.patch";
url = "https://github.com/mbert/elvis/commit/076cf4ad5cc993be0c6195ec0d5d57e5ad8ac1eb.patch";
hash = "sha256-DCo2caiyE8zV5ss3O1AXy7oNlJ5AzFxdTeBx2Wtg83s=";
})
];
outputs = [
"out"
"man"
];
nativeBuildInputs = [ installShellFiles ];
buildInputs = [ ncurses ];
configureFlags = [
"--ioctl=termios"
"--libs=-lncurses"
];
strictDeps = false;
postPatch = ''
substituteInPlace configure \
--replace-fail '-lcurses' '-lncurses' \
--replace-fail 'if [ -f /usr/include/sys/wait.h ]' 'if true'
'';
postConfigure = ''
echo >>config.h '#undef NEED_MEMMOVE'
echo >>config.h '#define NEED_IOCTL_H'
'';
installPhase = ''
runHook preInstall
installBin elvis ref elvtags elvfmt
pushd doc
for page in *.man; do
installManPage $page
rm $page
done
popd
mkdir -p $out/share/doc/elvis-${finalAttrs.version}/ $out/share/elvis/
cp -R data/* $out/share/elvis/
cp doc/* $out/share/doc/elvis-${finalAttrs.version}/
runHook postInstall
'';
meta = {
homepage = "https://elvis.the-little-red-haired-girl.org/";
description = "Vi clone for Unix and other operating systems";
license = lib.licenses.free;
mainProgram = "elvis";
maintainers = [ ];
platforms = lib.platforms.unix;
};
})

View File

@@ -0,0 +1,55 @@
{
lib,
buildGoModule,
fetchFromGitHub,
callPackage,
}:
let
pname = "elvish";
version = "0.21.0";
in
buildGoModule {
inherit pname version;
src = fetchFromGitHub {
owner = "elves";
repo = "elvish";
rev = "v${version}";
hash = "sha256-+qkr0ziHWs3MVhBoqAxrwwbsQVvmGHRKrlqiujqBKvs=";
};
vendorHash = "sha256-UjX1P8v97Mi5cLWv3n7pmxgnw+wCr4aRTHDHHd/9+Lo=";
subPackages = [ "cmd/elvish" ];
ldflags = [
"-s"
"-w"
"-X src.elv.sh/pkg/buildinfo.Version==${version}"
];
strictDeps = true;
doCheck = false;
passthru = {
shellPath = "/bin/elvish";
tests = {
expectVersion = callPackage ./tests/expect-version.nix { };
};
};
meta = {
homepage = "https://elv.sh/";
description = "Friendly and expressive command shell";
mainProgram = "elvish";
longDescription = ''
Elvish is a friendly interactive shell and an expressive programming
language. It runs on Linux, BSDs, macOS and Windows. Despite its pre-1.0
status, it is already suitable for most daily interactive use.
'';
license = lib.licenses.bsd2;
maintainers = [ ];
};
}

View File

@@ -0,0 +1,8 @@
fn expect {|key expected|
var actual = $buildinfo[$key]
if (not-eq $actual $expected) {
fail '$buildinfo['$key']: expected '(to-string $expected)', got '(to-string $actual)
}
}
expect version @version@

View File

@@ -0,0 +1,26 @@
{
stdenv,
elvish,
replaceVars,
}:
stdenv.mkDerivation {
pname = "elvish-simple-test";
inherit (elvish) version;
nativeBuildInputs = [ elvish ];
dontInstall = true;
buildCommand = ''
elvish ${
replaceVars ./expect-version.elv {
inherit (elvish) version;
}
}
touch $out
'';
meta.timeout = 10;
}