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,59 @@
{
lib,
stdenv,
fetchurl,
unzip,
ruby,
openssl,
makeWrapper,
}:
stdenv.mkDerivation rec {
pname = "ec2-ami-tools";
version = "1.5.19";
nativeBuildInputs = [
makeWrapper
unzip
];
src = fetchurl {
url = "https://s3.amazonaws.com/ec2-downloads/${pname}-${version}.zip";
sha256 = "sha256-vdpElL6n1V3/+ZVFndRwWpU/M2W7xp8DQwx5a1zB3X8=";
};
# Amazon EC2 requires that disk images are writable. If they're
# not, the VM immediately terminates with a mysterious
# "Server.InternalError" message. Since disk images generated in
# the Nix store are read-only, they must be made writable in the
# tarball uploaded to Amazon S3. So add a `--mode=0755' flag to the
# tar invocation.
patches = [ ./writable.patch ];
installPhase = ''
mkdir -p $out
mv * $out
rm $out/*.txt
for i in $out/bin/*; do
wrapProgram $i \
--set EC2_HOME $out \
--prefix PATH : ${
lib.makeBinPath [
ruby
openssl
]
}
done
sed -i 's|/bin/bash|${stdenv.shell}|' $out/lib/ec2/platform/base/pipeline.rb
''; # */
meta = {
homepage = "https://aws.amazon.com/developertools/Amazon-EC2/368";
description = "Command-line tools to create and manage Amazon EC2 virtual machine images";
license = lib.licenses.amazonsl;
};
}

View File

@@ -0,0 +1,23 @@
diff -ru ec2-ami-tools-1.4.0.5-orig/lib/ec2/amitools/bundle.rb ec2-ami-tools-1.4.0.5/lib/ec2/amitools/bundle.rb
--- ec2-ami-tools-1.4.0.5-orig/lib/ec2/amitools/bundle.rb 2011-12-06 14:57:28.000000000 +0100
+++ ec2-ami-tools-1.4.0.5/lib/ec2/amitools/bundle.rb 2012-02-25 21:24:57.682427268 +0100
@@ -80,7 +80,7 @@
# piped via several processes. The tee is used to allow a
# digest of the file to be calculated without having to re-read
# it from disk.
- tar = EC2::Platform::Current::Tar::Command.new.create.dereference.sparse
+ tar = EC2::Platform::Current::Tar::Command.new.create.dereference.sparse.writable
tar.owner(0).group(0)
tar.add(File::basename( image_file ), File::dirname( image_file ))
openssl = EC2::Platform::Current::Constants::Utility::OPENSSL
diff -ru ec2-ami-tools-1.4.0.5-orig/lib/ec2/platform/linux/tar.rb ec2-ami-tools-1.4.0.5/lib/ec2/platform/linux/tar.rb
--- ec2-ami-tools-1.4.0.5-orig/lib/ec2/platform/linux/tar.rb 2011-12-06 14:57:28.000000000 +0100
+++ ec2-ami-tools-1.4.0.5/lib/ec2/platform/linux/tar.rb 2012-02-25 21:23:36.342716403 +0100
@@ -31,6 +31,7 @@
def update; @options << '-u'; self; end
def sparse; @options << '-S'; self; end
def dereference; @options << '-h'; self; end
+ def writable; @options << '--mode=0755'; self; end
def archive(filename)
filename = '-' if filename.nil?

View File

@@ -0,0 +1,43 @@
{
lib,
stdenv,
fetchurl,
unzip,
makeWrapper,
jre,
}:
stdenv.mkDerivation rec {
pname = "ec2-api-tools";
version = "1.7.5.1";
src = fetchurl {
url = "http://s3.amazonaws.com/ec2-downloads/${pname}-${version}.zip";
sha256 = "sha256-hRq+MEA+4chqPr3d9bS//X70tYcRBTD+rfAJVNmuLzo=";
};
nativeBuildInputs = [
makeWrapper
unzip
];
installPhase = ''
d=$out/libexec/ec2-api-tools
mkdir -p $d
mv * $d
rm $d/bin/*.cmd # Windows stuff
for i in $d/bin/*; do
b=$(basename $i)
if [ $b = "ec2-cmd" ]; then continue; fi
makeWrapper $i $out/bin/$(basename $i) \
--set EC2_HOME $d \
--set JAVA_HOME ${jre}
done
'';
meta = {
homepage = "http://developer.amazonwebservices.com/connect/entry.jspa?externalID=351";
description = "Command-line tools to create and manage Amazon EC2 virtual machines";
license = lib.licenses.amazonsl;
};
}

View File

@@ -0,0 +1,49 @@
{
lib,
buildGoModule,
fetchFromGitHub,
versionCheckHook,
nix-update-script,
}:
buildGoModule (finalAttrs: {
pname = "ec2-instance-selector";
version = "3.1.2";
src = fetchFromGitHub {
owner = "aws";
repo = "amazon-ec2-instance-selector";
tag = "v${finalAttrs.version}";
hash = "sha256-8tSZkh2ngOgfwup2nCiNXHFX2GhIVVW9PtLuGNP5yoo=";
};
vendorHash = "sha256-qrxYLnj8DEGNtIq6sC7xvNBLgguG/lj9YLqgLFumQtE=";
ldflags = [
"-s"
"-w"
"-X=main.versionID=${finalAttrs.version}"
"-X=github.com/aws/amazon-ec2-instance-selector/v3/pkg/selector.versionID=${finalAttrs.version}"
];
postInstall = ''
rm $out/bin/readme-test
mv $out/bin/cmd $out/bin/ec2-instance-selector
'';
nativeInstallCheckInputs = [ versionCheckHook ];
versionCheckProgramArg = "--version";
versionCheckKeepEnvironment = [ "HOME" ];
doInstallCheck = true;
passthru.updateScript = nix-update-script { };
meta = {
description = "Recommends instance types based on resource criteria like vcpus and memory";
homepage = "https://github.com/aws/amazon-ec2-instance-selector";
changelog = "https://github.com/aws/amazon-ec2-instance-selector/tags/v${finalAttrs.version}";
license = lib.licenses.asl20;
maintainers = with lib.maintainers; [ wcarlsen ];
mainProgram = "ec2-instance-selector";
};
})

View File

@@ -0,0 +1,31 @@
{
lib,
buildGoModule,
fetchFromGitHub,
}:
buildGoModule rec {
pname = "ec2-metadata-mock";
version = "1.12.0";
src = fetchFromGitHub {
owner = "aws";
repo = "amazon-ec2-metadata-mock";
rev = "v${version}";
sha256 = "sha256-8X6LBGo496fG0Chhvg3jAaUF6mp8psCzHd+Es75z27Y=";
};
vendorHash = "sha256-jRJX4hvfRuhR5TlZe7LsXaOlUCwmQGem2QKlX3vuk8c=";
postInstall = ''
mv $out/bin/{cmd,ec2-metadata-mock}
'';
meta = with lib; {
description = "Amazon EC2 Metadata Mock";
mainProgram = "ec2-metadata-mock";
homepage = "https://github.com/aws/amazon-ec2-metadata-mock";
license = licenses.asl20;
maintainers = with maintainers; [ ymatsiuk ];
};
}

View File

@@ -0,0 +1,48 @@
{
lib,
python3,
fetchFromGitHub,
}:
python3.pkgs.buildPythonApplication rec {
pname = "ec2stepshell";
version = "0-unstable-2023-04-07";
format = "pyproject";
src = fetchFromGitHub {
owner = "saw-your-packet";
repo = "EC2StepShell";
rev = "ab1298fa7f2650de711e86e870a693dcce0e1935";
hash = "sha256-zy33CgGwa2pBYouqaJ1LM6uRIh3Q1uxi2zNXpDNPsuQ=";
};
postPatch = ''
# https://github.com/saw-your-packet/EC2StepShell/pull/1
substituteInPlace pyproject.toml \
--replace "realpython" "ec2stepshell"
'';
nativeBuildInputs = with python3.pkgs; [
setuptools
];
propagatedBuildInputs = with python3.pkgs; [
boto3
colorama
pyfiglet
termcolor
];
pythonImportsCheck = [
"ec2stepshell"
];
meta = {
description = "AWS post-exploitation tool";
mainProgram = "ec2stepshell";
homepage = "https://github.com/saw-your-packet/EC2StepShell";
changelog = "https://github.com/saw-your-packet/EC2StepShell/blob/${version}/CHANGELOG.txt";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ fab ];
};
}

View File

@@ -0,0 +1,141 @@
{
buildGoModule,
fetchFromGitHub,
bpftools,
lib,
nspr,
libpcap,
clang,
fd,
go-bindata,
glibc,
gnutls,
bashInteractive,
postgresql,
mariadb,
openssl,
bash,
zsh,
nix-update-script,
llvmPackages,
withNonBTF ? false,
kernel ? null,
}:
buildGoModule rec {
pname = "ecapture";
version = "1.4.2";
src = fetchFromGitHub {
owner = "gojue";
repo = "ecapture";
tag = "v${version}";
hash = "sha256-1FyZMUII+bPQDmNK1eJkfeoTjdhe/jj2qiooWuNFsNg=";
fetchSubmodules = true;
};
nativeBuildInputs = [
llvmPackages.libllvm
clang
fd
bpftools
go-bindata
];
newlibpcap = libpcap.overrideAttrs (previousAttrs: {
configureFlags = previousAttrs.configureFlags ++ [ "--without-libnl" ];
});
buildInputs = [
newlibpcap
glibc.static
glibc
];
CGO_LDFLAGS = "-lpcap -lpthread -static";
ldflags = [
"-extldflags '-static'"
"-linkmode=external"
];
hardeningDisable = [
"zerocallusedregs"
];
postPatch = ''
substituteInPlace user/config/config_gnutls_linux.go \
--replace-fail 'return errors.New("cant found Gnutls so load path")' 'gc.Gnutls = "${lib.getLib gnutls}/lib/libgnutls.so.30"' \
--replace-fail '"errors"' ' '
substituteInPlace user/module/probe_bash.go \
--replace-fail '/bin/bash' '${lib.getExe bashInteractive}'
substituteInPlace user/config/config_bash.go \
--replace-fail '/bin/bash' '${lib.getExe bashInteractive}'
substituteInPlace user/config/config_nspr_linux.go \
--replace-fail '/usr/lib/firefox/libnspr4.so' '${lib.getLib nspr}/lib/libnspr4.so'
substituteInPlace user/config/config_zsh.go \
--replace-fail '/bin/zsh' '${lib.getExe zsh}'
substituteInPlace user/module/probe_zsh.go \
--replace-fail '/bin/zsh' '${lib.getExe zsh}'
substituteInPlace cli/cmd/postgres.go \
--replace-fail '/usr/bin/postgres' '${postgresql}/bin/postgres'
substituteInPlace cli/cmd/mysqld.go \
--replace-fail '/usr/sbin/mariadbd' '${mariadb}/bin/mariadbd'
substituteInPlace user/module/probe_mysqld.go \
--replace-fail '/usr/sbin/mariadbd' '${mariadb}/bin/mariadbd'
substituteInPlace user/config/config_openssl_linux.go \
--replace-fail 'return errors.New("cant found openssl so load path")' 'oc.Openssl = "${lib.getLib openssl}/lib/libssl.so.3"' \
--replace-fail '"errors"' ' '
'';
postConfigure = ''
sed -i '/git/d' Makefile
sed -i '/git/d' variables.mk
substituteInPlace Makefile \
--replace-fail '/bin/bash' '${lib.getExe bash}'
''
+ lib.optionalString withNonBTF ''
substituteInPlace variables.mk \
--replace-fail "-emit-llvm" "-emit-llvm -I${kernel.dev}/lib/modules/${kernel.modDirVersion}/build/include -Wno-error=implicit-function-declaration"
KERN_BUILD_PATH=${kernel.dev}/lib/modules/${kernel.modDirVersion}/build KERN_SRC_PATH=${kernel.dev}/lib/modules/${kernel.modDirVersion}/source make ebpf_noncore
''
+ ''
make ebpf
go-bindata -pkg assets -o "assets/ebpf_probe.go" $(find user/bytecode -name "*.o" -printf "./%p ")
'';
checkFlags =
let
skippedTests = [
"TestCheckLatest"
];
in
[ "-skip=^${builtins.concatStringsSep "$|^" skippedTests}$" ];
vendorHash = "sha256-cN6pCfc9LEItASCoZ4+BU1AOtwMmFaUEzOM/BZ13jcI=";
passthru.updateScript = nix-update-script { };
meta = {
description = "Capture SSL/TLS text content without CA certificate Using eBPF";
changelog = "https://github.com/gojue/ecapture/releases/tag/v${version}";
homepage = "https://ecapture.cc";
platforms = [
"x86_64-linux"
"aarch64-linux"
];
license = lib.licenses.asl20;
maintainers = with lib.maintainers; [ bot-wxt1221 ];
mainProgram = "ecapture";
};
}

View File

@@ -0,0 +1,85 @@
{
lib,
stdenv,
fetchurl,
fetchpatch,
pkg-config,
alsa-lib,
audiofile,
libjack2,
liblo,
liboil,
libsamplerate,
libsndfile,
lilv,
lv2,
ncurses,
readline,
}:
# TODO: fix python. See configure log.
# fix -Dnullptr=0 cludge below.
# The error is
# /nix/store/*-lilv-0.24.10/include/lilv-0/lilv/lilvmm.hpp:272:53: error: 'nullptr' was not declared in this scope
stdenv.mkDerivation rec {
pname = "ecasound";
version = "2.9.3";
src = fetchurl {
url = "https://ecasound.seul.org/download/ecasound-${version}.tar.gz";
sha256 = "1m7njfjdb7sqf0lhgc4swihgdr4snkg8v02wcly08wb5ar2fr2s6";
};
patches = [
# Pull patch pending upstream inclusion for ncurses-6.3:
# https://sourceforge.net/p/ecasound/bugs/54/
(fetchpatch {
name = "ncursdes-6.3.patch";
url = "https://sourceforge.net/p/ecasound/bugs/54/attachment/0001-ecasignalview.cpp-always-use-s-style-format-for-prin.patch";
sha256 = "1x1gsjzd43lh19mhpmwrbq269h56s8bxgyv0yfi5yf0sqjf9vaq0";
})
];
nativeBuildInputs = [
pkg-config
];
buildInputs = [
alsa-lib
audiofile
libjack2
liblo
liboil
libsamplerate
libsndfile
lilv
lv2
ncurses
readline
];
strictDeps = true;
CXXFLAGS = "-std=c++11";
configureFlags = [
"--enable-liblilv"
"--with-extra-cppflags=-Dnullptr=0"
];
postPatch = ''
sed -i -e '
s@^#include <readline.h>@#include <readline/readline.h>@
s@^#include <history.h>@#include <readline/history.h>@
' ecasound/eca-curses.cpp
'';
meta = {
description = "Software package designed for multitrack audio processing";
license = with lib.licenses; [
gpl2
lgpl21
];
homepage = "http://nosignal.fi/ecasound/";
};
}

View File

@@ -0,0 +1,134 @@
{
lib,
makeWrapper,
fetchFromGitHub,
rustPackages,
pkg-config,
elfutils,
zlib,
}:
let
inherit (rustPackages.rustc) llvmPackages;
inherit (rustPackages) rustPlatform;
bpftool = llvmPackages.stdenv.mkDerivation {
pname = "bpftool";
version = "0-unstable-2023-03-11";
# this fork specialized for some functions
# and has eventually been embedded into the ecc binary
src = fetchFromGitHub {
owner = "eunomia-bpf";
repo = "bpftool";
rev = "05940344f5db18d0cb1bc1c42e628f132bc93123";
hash = "sha256-g2gjixfuGwVnFlqCMGLWVPbtKOSpQI+vZwIZciXFPTc=";
fetchSubmodules = true;
};
buildInputs = [
llvmPackages.libllvm
elfutils
zlib
];
buildPhase = ''
make -C src
'';
installPhase = ''
# We don't use the default `make install` because we are looking to create a
# directory structure compatible with `build.rs` of `ecc`.
mkdir -p $out/src/libbpf
# some headers are required
cp -r src/libbpf/include $out/src/libbpf
cp src/bpftool $out/src
'';
};
vmlinux-headers = fetchFromGitHub {
owner = "eunomia-bpf";
repo = "vmlinux";
rev = "933f83becb45f5586ed5fd089e60d382aeefb409";
hash = "sha256-CVEmKkzdFNLKCbcbeSIoM5QjYVLQglpz6gy7+ZFPgCY=";
};
in
rustPlatform.buildRustPackage rec {
pname = "ecc";
version = "1.0.27";
src = fetchFromGitHub {
owner = "eunomia-bpf";
repo = "eunomia-bpf";
rev = "v${version}";
hash = "sha256-KfYCC+TJbmjHrV46LoshD+uXcaBVMKk6+cN7TZKKYp4=";
};
sourceRoot = "${src.name}/compiler/cmd";
cargoHash = "sha256-iYceYwRqnYA6KxCQxOieR8JZ6TQlIL+OSzAjyr4Cu/g=";
nativeBuildInputs = [
pkg-config
makeWrapper
rustPlatform.bindgenHook
];
buildInputs = [
elfutils
zlib
];
CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_LINKER = "gcc";
preBuild = ''
# `SANDBOX` defined by upstream to disable build-time network access
export SANDBOX=1
# specify dependencies' location
export VMLINUX_DIR=${vmlinux-headers}
export BPFTOOL_DIR=${bpftool}
'';
preCheck = ''
export HOME=$NIX_BUILD_TOP
'';
checkFlags = [
# requires network access
"--skip=bpf_compiler::tests::test_generate_custom_btf"
# FIXME: requires dynamic link `libclang` or clang binary which are not found in check env
"--skip=bpf_compiler::tests::test_compile_bpf"
"--skip=bpf_compiler::tests::test_export_multi_and_pack"
"--skip=document_parser::test::test_parse_empty"
"--skip=document_parser::test::test_parse_maps"
"--skip=document_parser::test::test_parse_progss"
"--skip=document_parser::test::test_parse_variables"
];
passthru = {
inherit bpftool;
};
postFixup = ''
wrapProgram $out/bin/ecc-rs \
--prefix LIBCLANG_PATH : ${lib.getLib llvmPackages.libclang}/lib \
--prefix PATH : ${
lib.makeBinPath (
with llvmPackages;
[
clang
bintools-unwrapped
]
)
}
'';
meta = with lib; {
homepage = "https://eunomia.dev";
description = "EBPF compile toolchain for eunomia-bpf";
mainProgram = "ecc-rs";
maintainers = with maintainers; [ oluceps ];
platforms = platforms.linux;
license = licenses.mit;
};
}

View File

@@ -0,0 +1,12 @@
diff --git a/libecdsaauth/base64.c b/libecdsaauth/base64.c
index 0f9b7a3..84df22a 100644
--- a/libecdsaauth/base64.c
+++ b/libecdsaauth/base64.c
@@ -45,6 +45,7 @@
#include <string.h>
#include <unistd.h>
#include <assert.h>
+#include <ctype.h>
static const char Base64[] =
"ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";

View File

@@ -0,0 +1,33 @@
diff --git a/libecdsaauth/keypair.c b/libecdsaauth/keypair.c
index 5e098c5..b5dd21e 100644
--- a/libecdsaauth/keypair.c
+++ b/libecdsaauth/keypair.c
@@ -22,6 +22,7 @@
#include <string.h>
#include <stdlib.h>
+#include <openssl/pem.h>
static inline libecdsaauth_key_t *libecdsaauth_key_alloc(void)
{
diff --git a/tool/main.c b/tool/main.c
index 23d19a3..f88016c 100644
--- a/tool/main.c
+++ b/tool/main.c
@@ -21,6 +21,7 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
+#include <openssl/pem.h>
#include "libecdsaauth/keypair.h"
#include "libecdsaauth/op.h"
@@ -41,7 +42,7 @@ static int tool_keygen(int argc, const char *argv[])
key = libecdsaauth_key_new();
pubout = fopen(argv[1], "w");
- PEM_write_ECPrivateKey(pubout, key->eckey, NULL, NULL, 0, NULL);
+ PEM_write_ECPrivateKey(pubout, key->eckey, NULL, NULL, 0, NULL, NULL);
fclose(pubout);
pubkey = libecdsaauth_key_public_key_base64(key);

View File

@@ -0,0 +1,46 @@
{
lib,
stdenv,
pkgs,
}:
stdenv.mkDerivation {
version = "0.0.1";
pname = "ecdsatool";
src = pkgs.fetchFromGitHub {
owner = "kaniini";
repo = "ecdsatool";
rev = "7c0b2c51e2e64d1986ab1dc2c57c2d895cc00ed1";
sha256 = "08z9309znkhrjpwqd4ygvm7cd1ha1qbrnlzw64fr8704jrmx762k";
};
configurePhase = ''
runHook preConfigure
./autogen.sh
./configure --prefix=$out
runHook postConfigure
'';
patches = [
./ctype-header-c99-implicit-function-declaration.patch
./openssl-header-c99-implicit-function-declaration.patch
];
nativeBuildInputs = with pkgs; [
openssl
autoconf
automake
];
buildInputs = with pkgs; [ libuecc ];
meta = with lib; {
description = "Create and manipulate ECC NISTP256 keypairs";
mainProgram = "ecdsatool";
homepage = "https://github.com/kaniini/ecdsatool/";
license = with licenses; [ free ];
platforms = platforms.unix;
};
}

View File

@@ -0,0 +1,50 @@
{
lib,
stdenv,
fetchFromGitHub,
fetchpatch,
cmake,
pkg-config,
doxygen,
libuecc,
}:
let
pname = "ecdsautils";
version = "0.4.2";
in
stdenv.mkDerivation {
inherit pname version;
src = fetchFromGitHub {
owner = "freifunk-gluon";
repo = "ecdsautils";
rev = "v${version}";
sha256 = "sha256-vGHLAX/XOtePvdT/rljCOdlILHVO20mCt6p+MUi13dg=";
};
patches = [
(fetchpatch {
url = "https://github.com/freifunk-gluon/ecdsautils/commit/19f096f9c10264f4efe4b926fe83126e85642cba.patch";
hash = "sha256-oJv47NckFHFONPcG3WfHwgaHRqrz2eWXzbr5SQr+kX4=";
})
];
nativeBuildInputs = [
cmake
pkg-config
doxygen
];
buildInputs = [ libuecc ];
meta = with lib; {
description = "Tiny collection of programs used for ECDSA (keygen, sign, verify)";
homepage = "https://github.com/freifunk-gluon/ecdsautils/";
license = with licenses; [
mit
bsd2
];
maintainers = [ ];
platforms = platforms.unix;
};
}

View File

@@ -0,0 +1,130 @@
{
lib,
stdenv,
makeWrapper,
haskellPackages,
fetchpatch,
fetchFromGitHub,
# dependencies
slither-analyzer,
}:
haskellPackages.mkDerivation rec {
pname = "echidna";
version = "2.2.7";
src = fetchFromGitHub {
owner = "crytic";
repo = "echidna";
tag = "v${version}";
sha256 = "sha256-rDtxyUpWfdMvS5BY1y8nydkQk/eCdmtjCqGJ+I4vy0I=";
};
isExecutable = true;
patches = [
# Fix build with GHC 9.10
# https://github.com/crytic/echidna/pull/1446
(fetchpatch {
url = "https://github.com/crytic/echidna/commit/1b498bdb8c86d8297aa34de8f48b6dce2f4dd84d.patch";
hash = "sha256-JeKPv2Q2gIt1XpI81XPFu80/x8QcOI4k1QN/mTf+bqk=";
})
];
buildTools = with haskellPackages; [
hpack
];
executableHaskellDepends = with haskellPackages; [
# base dependencies
aeson
base
containers
directory
hevm
MonadRandom
mtl
text
# library dependencies
ansi-terminal
async
base16-bytestring
binary
brick
bytestring
data-bword
data-dword
deepseq
exceptions
extra
filepath
hashable
html-conduit
html-entities
http-conduit
ListLike
optics
optics-core
process
random
rosezipper
semver
signal
split
strip-ansi-escape
time
unliftio
utf8-string
vector
vty
vty-crossplatform
wai-extra
warp
word-wrap
xml-conduit
yaml
# executable dependencies
code-page
filepath
hashable
optparse-applicative
time
with-utf8
];
executableToolDepends = [
makeWrapper
];
preConfigure = ''
hpack
'';
postInstall =
with haskellPackages;
# https://github.com/NixOS/nixpkgs/pull/304352
lib.optionalString (stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isAarch64) ''
remove-references-to -t ${warp.out} "$out/bin/echidna"
remove-references-to -t ${wreq.out} "$out/bin/echidna"
''
# make slither-analyzer a runtime dependency
+ ''
wrapProgram $out/bin/echidna \
--prefix PATH : ${lib.makeBinPath [ slither-analyzer ]}
'';
doHaddock = false;
# tests depend on a specific version of solc
doCheck = false;
homepage = "https://github.com/crytic/echidna";
description = "Ethereum smart contract fuzzer";
license = lib.licenses.agpl3Plus;
maintainers = with lib.maintainers; [
arturcygan
hellwolf
];
platforms = lib.platforms.unix;
mainProgram = "echidna";
}

View File

@@ -0,0 +1,47 @@
{
lib,
buildGoModule,
fetchFromGitHub,
makeWrapper,
nixosTests,
nix-update-script,
}:
buildGoModule {
pname = "echoip";
version = "0-unstable-2023-05-21";
src = fetchFromGitHub {
owner = "mpolden";
repo = "echoip";
rev = "d84665c26cf7df612061e9c35abe325ba9d86b8d";
hash = "sha256-7qc1NZu0hC1np/EKf5fU5Cnd7ikC1+tIrYOXhxK/++Y=";
};
vendorHash = "sha256-lXYpkeGpBK+WGHqyLxJz7kS3t7a55q55QQLTqtxzroc=";
nativeBuildInputs = [ makeWrapper ];
postInstall = ''
install -D html/* -t $out/share/echoip/html
wrapProgram $out/bin/echoip \
--add-flags "-t $out/share/echoip/html"
'';
passthru = {
tests = { inherit (nixosTests) echoip; };
updateScript = nix-update-script { extraArgs = [ "--version=branch" ]; };
};
meta = {
description = "IP address lookup service";
homepage = "https://github.com/mpolden/echoip";
license = lib.licenses.bsd3;
maintainers = with lib.maintainers; [
rvolosatovs
SuperSandro2000
defelo
];
mainProgram = "echoip";
};
}

View File

@@ -0,0 +1,42 @@
{
lib,
stdenv,
fetchzip,
jq,
openjdk11,
}:
stdenv.mkDerivation rec {
pname = "eclair";
version = "0.8.0";
revision = "0077471";
src = fetchzip {
url = "https://github.com/ACINQ/eclair/releases/download/v${version}/eclair-node-${version}-${revision}-bin.zip";
hash = "sha256-jkXdt1aQRVgItfFPuyh45uXjUFgJtKng/17Po5i7ang=";
};
propagatedBuildInputs = [
jq
openjdk11
];
installPhase = ''
runHook preInstall
mkdir $out
cp -a * $out
mv $out/bin/eclair-node.sh $out/bin/eclair-node
rm $out/bin/eclair-node.bat
runHook postInstall
'';
meta = with lib; {
description = "Scala implementation of the Lightning Network";
homepage = "https://github.com/ACINQ/eclair";
license = licenses.asl20;
maintainers = with maintainers; [ prusnak ];
platforms = platforms.unix;
};
}

View File

@@ -0,0 +1,56 @@
{
lib,
stdenv,
fetchurl,
autoreconfHook,
pari,
ntl,
gmp,
# "FLINT is optional and only used for one part of sparse matrix reduction,
# which is used in the modular symbol code but not mwrank or other elliptic
# curve programs." -- https://github.com/JohnCremona/eclib/blob/master/README
withFlint ? false,
flint ? null,
}:
assert withFlint -> flint != null;
stdenv.mkDerivation rec {
pname = "eclib";
version = "20250627"; # upgrade might break the sage interface
# sage tests to run:
# src/sage/interfaces/mwrank.py
# src/sage/libs/eclib
# ping @timokau for more info
src = fetchurl {
# all releases for this project appear on its GitHub releases page
# by definition! other distros sometimes update whenever they see
# a version bump in configure.ac or a new tag (and this might show
# up on repology). however, a version bump or a new tag may not
# represent a new release, and a new release might not be tagged.
#
# see https://github.com/JohnCremona/eclib/issues/64#issuecomment-789788561
# for upstream's explanation of the above
url = "https://github.com/JohnCremona/eclib/releases/download/${version}/eclib-${version}.tar.bz2";
hash = "sha256-uI1LUmEuSRxUFZRtnjXyBiyhAV7n+74LYfFY+nTLS8k=";
};
buildInputs = [
pari
ntl
gmp
]
++ lib.optionals withFlint [
flint
];
nativeBuildInputs = [
autoreconfHook
];
doCheck = true;
meta = with lib; {
description = "Elliptic curve tools";
homepage = "https://github.com/JohnCremona/eclib";
license = licenses.gpl2Plus;
teams = [ teams.sage ];
platforms = platforms.all;
};
}

View File

@@ -0,0 +1,29 @@
{
lib,
buildGoModule,
fetchFromGitLab,
}:
buildGoModule rec {
pname = "eclint";
version = "0.5.1";
src = fetchFromGitLab {
owner = "greut";
repo = "eclint";
rev = "v${version}";
hash = "sha256-XY+D0bRIgWTm2VH+uDVodYeyGeu+8Xyyq4xDvTDLii4=";
};
vendorHash = "sha256-4bka3GRl75aUYpZrWuCIvKNwPY8ykp25e+kn+G6JQ/I=";
ldflags = [ "-X main.version=${version}" ];
meta = with lib; {
homepage = "https://gitlab.com/greut/eclint";
description = "EditorConfig linter written in Go";
mainProgram = "eclint";
license = licenses.mit;
maintainers = with maintainers; [ lucperkins ];
};
}

View File

@@ -0,0 +1,135 @@
{
fetchurl,
fontconfig,
freetype,
glib,
gsettings-desktop-schemas,
gtk3,
jdk17,
lib,
libX11,
libXrender,
libXtst,
makeDesktopItem,
makeWrapper,
shared-mime-info,
stdenv,
unzip,
webkitgtk_4_1,
zlib,
}:
let
pVersion = "1.15.0.20231206";
pVersionTriple = lib.splitVersion pVersion;
majorVersion = lib.elemAt pVersionTriple 0;
minorVersion = lib.elemAt pVersionTriple 1;
patchVersion = lib.elemAt pVersionTriple 2;
baseVersion = "${majorVersion}.${minorVersion}.${patchVersion}";
jdk = jdk17;
in
stdenv.mkDerivation rec {
pname = "eclipse-mat";
version = pVersion;
src = fetchurl {
url = "http://ftp.halifax.rwth-aachen.de/eclipse//mat/${baseVersion}/rcp/MemoryAnalyzer-${version}-linux.gtk.x86_64.zip";
sha256 = "sha256-icmo5zdK0XaH32kXwZUVaQ0VPSGEgvlLr7v7PtdbmCg=";
};
desktopItem = makeDesktopItem {
name = "eclipse-mat";
exec = "eclipse-mat";
icon = "eclipse";
comment = "Eclipse Memory Analyzer";
desktopName = "Eclipse MAT";
genericName = "Java Memory Analyzer";
categories = [ "Development" ];
};
unpackPhase = ''
unzip $src
'';
buildCommand = ''
mkdir -p $out
unzip $src
mv mat $out
# Patch binaries.
interpreter=$(echo ${stdenv.cc.libc}/lib/ld-linux*.so.2)
libCairo=$out/eclipse/libcairo-swt.so
patchelf --set-interpreter $interpreter $out/mat/MemoryAnalyzer
[ -f $libCairo ] && patchelf --set-rpath ${
lib.makeLibraryPath [
freetype
fontconfig
libX11
libXrender
zlib
]
} $libCairo
# Create wrapper script. Pass -configuration to store settings in ~/.eclipse-mat/<version>
makeWrapper $out/mat/MemoryAnalyzer $out/bin/eclipse-mat \
--prefix PATH : ${jdk}/bin \
--prefix LD_LIBRARY_PATH : ${
lib.makeLibraryPath [
glib
gtk3
libXtst
webkitgtk_4_1
]
} \
--prefix XDG_DATA_DIRS : "$GSETTINGS_SCHEMAS_PATH" \
--add-flags "-configuration \$HOME/.eclipse-mat/''${version}/configuration"
# Create desktop item.
mkdir -p $out/share/applications
cp ${desktopItem}/share/applications/* $out/share/applications
mkdir -p $out/share/pixmaps
find $out/mat/plugins -name 'eclipse*.png' -type f -exec cp {} $out/share/pixmaps \;
mv $out/share/pixmaps/eclipse64.png $out/share/pixmaps/eclipse.png
'';
nativeBuildInputs = [
unzip
makeWrapper
];
buildInputs = [
fontconfig
freetype
glib
gsettings-desktop-schemas
gtk3
jdk
libX11
libXrender
libXtst
zlib
shared-mime-info
webkitgtk_4_1
];
dontBuild = true;
dontConfigure = true;
meta = with lib; {
description = "Fast and feature-rich Java heap analyzer";
mainProgram = "eclipse-mat";
longDescription = ''
The Eclipse Memory Analyzer is a tool that helps you find memory
leaks and reduce memory consumption. Use the Memory Analyzer to
analyze productive heap dumps with hundreds of millions of
objects, quickly calculate the retained sizes of objects, see
who is preventing the Garbage Collector from collecting objects,
run a report to automatically extract leak suspects.
'';
homepage = "https://www.eclipse.org/mat";
sourceProvenance = with sourceTypes; [ binaryNativeCode ];
license = licenses.epl20;
maintainers = [ maintainers.ktor ];
platforms = [ "x86_64-linux" ];
};
}

View File

@@ -0,0 +1,52 @@
{
lib,
stdenv,
fetchurl,
gmp,
m4,
}:
let
pname = "ecm";
version = "7.0.6";
name = "${pname}-${version}";
in
stdenv.mkDerivation {
inherit name;
src = fetchurl {
url = "https://gitlab.inria.fr/zimmerma/ecm/uploads/ad3e5019fef98819ceae58b78f4cce93/ecm-${version}.tar.gz";
hash = "sha256-fSDs5hq2ogrYXywYBkyr133Eapb/iUtSINuxbkZm6KU=";
};
postPatch = ''
patchShebangs test.ecmfactor
patchShebangs test.ecm
substituteInPlace test.ecm --replace /bin/rm rm
'';
configureFlags = [
# Otherwise, undesired flags from gmp (such as -std=c99) are leaking
"-enable-gmp-cflags=false"
]
++
# See https://trac.sagemath.org/ticket/19233
lib.optional stdenv.hostPlatform.isDarwin "--disable-asm-redc";
buildInputs = [
m4
gmp
];
doCheck = true;
meta = {
description = "Elliptic Curve Method for Integer Factorization";
mainProgram = "ecm";
license = lib.licenses.gpl3Only;
homepage = "https://gitlab.inria.fr/zimmerma/ecm";
maintainers = [ lib.maintainers.roconnor ];
platforms = with lib.platforms; linux ++ darwin;
};
}

View File

@@ -0,0 +1,40 @@
{
lib,
stdenv,
fetchFromGitHub,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "ecm-tools";
version = "1.0.3";
src = fetchFromGitHub {
owner = "alucryd";
repo = "ecm-tools";
rev = "v${finalAttrs.version}";
hash = "sha256-DCxrSTUO+e350zI10D8vpIswxqdfAyQfnY4iz17pfuc=";
};
dontConfigure = true;
installPhase = ''
runHook preInstall
install --directory --mode=755 $out/bin
install --mode=755 bin2ecm $out/bin
pushd $out/bin
ln -s bin2ecm ecm2bin
popd
runHook postInstall
'';
meta = {
description = "Utility to uncompress ECM files to BIN CD format";
homepage = "https://github.com/alucryd/ecm-tools";
license = lib.licenses.gpl3Plus;
mainProgram = "bin2ecm";
maintainers = [ ];
platforms = lib.platforms.all;
};
})

View File

@@ -0,0 +1,12 @@
diff --git a/src/ecogrep.c b/src/ecogrep.c
index 8d45312..d9fe676 100644
--- a/src/ecogrep.c
+++ b/src/ecogrep.c
@@ -5,6 +5,7 @@
#include <getopt.h>
#include <stdlib.h>
#include <sys/stat.h>
+#include <unistd.h>
#define VERSION "0.1"

View File

@@ -0,0 +1,55 @@
{
lib,
stdenv,
fetchurl,
gcc,
zlib,
python3,
}:
stdenv.mkDerivation rec {
pname = "ecopcr";
version = "1.0.1";
src = fetchurl {
url = "https://git.metabarcoding.org/obitools/ecopcr/-/archive/ecopcr_v${version}/ecopcr-ecopcr_v${version}.tar.gz";
hash = "sha256-ssvWpi7HuuRRAkpqqrX3ijLuBqM3QsrmrG+t7/m6fZA=";
};
patches = [
./gcc14.patch
];
buildInputs = [
gcc
python3
zlib
];
preConfigure = ''
cd src
'';
installPhase = ''
mkdir -p $out/bin
cp -v ecoPCR $out/bin
cp -v ecogrep $out/bin
cp -v ecofind $out/bin
cp -v ../tools/ecoPCRFormat.py $out/bin/ecoPCRFormat
chmod a+x $out/bin/ecoPCRFormat
'';
meta = with lib; {
description = "Electronic PCR software tool";
longDescription = ''
ecoPCR is an electronic PCR software developed by the LECA. It
helps you estimate Barcode primers quality. In conjunction with
OBITools, you can postprocess ecoPCR output to compute barcode
coverage and barcode specificity. New barcode primers can be
developed using the ecoPrimers software.
'';
homepage = "https://git.metabarcoding.org/obitools/ecopcr/wikis/home";
license = licenses.cecill20;
maintainers = [ ];
};
}

View File

@@ -0,0 +1,55 @@
{
lib,
stdenv,
fetchFromGitHub,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "ecos";
version = "2.0.10";
src = fetchFromGitHub {
owner = "embotech";
repo = "ecos";
tag = "v${finalAttrs.version}";
hash = "sha256-WMgqDc+XAY3g2wwlefjJ0ATxR5r/jL971FZKtxsunnU=";
};
buildPhase = ''
runHook preBuild
make all shared
runHook postBuild
'';
doCheck = true;
checkPhase = ''
runHook preCheck
make test
./runecos
runHook postCheck
'';
installPhase = ''
runHook preInstall
mkdir -p $out/lib
cp lib*.a lib*.so $out/lib
cp -r include $out/
runHook postInstall
'';
meta = {
description = "Lightweight conic solver for second-order cone programming";
homepage = "https://www.embotech.com/ECOS";
downloadPage = "https://github.com/embotech/ecos/releases";
license = lib.licenses.gpl3;
platforms = lib.platforms.all;
maintainers = with lib.maintainers; [ bhipple ];
};
})

View File

@@ -0,0 +1,44 @@
{
lib,
fetchFromGitHub,
rustPlatform,
pkg-config,
libusb1,
}:
rustPlatform.buildRustPackage rec {
pname = "ecpdap";
version = "0.2.0";
src = fetchFromGitHub {
owner = "adamgreig";
repo = "ecpdap";
rev = "v${version}";
sha256 = "sha256-pgQqDRdewBSCm1/9/r8E9DBzwSKAaons3e6OLNv5gHM=";
};
cargoHash = "sha256-o+qm4MFZt+BzqhQsaI5EU9lZz4LI9D75eL+VKIKbIyI=";
nativeBuildInputs = [ pkg-config ];
buildInputs = [ libusb1 ];
doInstallCheck = true;
postInstall = ''
mkdir -p $out/etc/udev/rules.d
cp drivers/*.rules $out/etc/udev/rules.d
'';
meta = with lib; {
description = "Tool to program ECP5 FPGAs";
mainProgram = "ecpdap";
longDescription = ''
ECPDAP allows you to program ECP5 FPGAs and attached SPI flash
using CMSIS-DAP probes in JTAG mode.
'';
homepage = "https://github.com/adamgreig/ecpdap";
license = licenses.asl20;
maintainers = [ ];
};
}

View File

@@ -0,0 +1,107 @@
{
lib,
stdenv,
fetchurl,
pkg-config,
perl,
util-linux,
keyutils,
nss,
nspr,
python2,
pam,
enablePython ? false,
intltool,
makeWrapper,
coreutils,
bash,
gettext,
cryptsetup,
lvm2,
rsync,
which,
lsof,
nixosTests,
}:
stdenv.mkDerivation rec {
pname = "ecryptfs";
version = "111";
src = fetchurl {
url = "https://launchpad.net/ecryptfs/trunk/${version}/+download/ecryptfs-utils_${version}.orig.tar.gz";
sha256 = "0zwq19siiwf09h7lwa7n7mgmrr8cxifp45lmwgcfr8c1gviv6b0i";
};
# TODO: replace wrapperDir below with from <nixos> config.security.wrapperDir;
wrapperDir = "/run/wrappers/bin";
postPatch = ''
FILES="$(grep -r '/bin/sh' src/utils -l; find src -name \*.c)"
for file in $FILES; do
substituteInPlace "$file" \
--replace /bin/mount ${util-linux}/bin/mount \
--replace /bin/umount ${util-linux}/bin/umount \
--replace /sbin/mount.ecryptfs_private ${wrapperDir}/mount.ecryptfs_private \
--replace /sbin/umount.ecryptfs_private ${wrapperDir}/umount.ecryptfs_private \
--replace /sbin/mount.ecryptfs $out/sbin/mount.ecryptfs \
--replace /sbin/umount.ecryptfs $out/sbin/umount.ecryptfs \
--replace /usr/bin/ecryptfs-rewrite-file $out/bin/ecryptfs-rewrite-file \
--replace /usr/bin/ecryptfs-mount-private $out/bin/ecryptfs-mount-private \
--replace /usr/bin/ecryptfs-setup-private $out/bin/ecryptfs-setup-private \
--replace /sbin/cryptsetup ${cryptsetup}/sbin/cryptsetup \
--replace /sbin/dmsetup ${lvm2}/sbin/dmsetup \
--replace /sbin/unix_chkpwd ${wrapperDir}/unix_chkpwd \
--replace /bin/bash ${bash}/bin/bash
done
'';
configureFlags = [ " --disable-openssl" ] ++ lib.optionals (!enablePython) [ "--disable-pywrap" ];
nativeBuildInputs = [
pkg-config
makeWrapper
intltool
]
# if python2 support is requested, it is needed at builtime as well as runtime.
++ lib.optionals enablePython [ python2 ];
buildInputs = [
perl
nss
nspr
pam
]
++ lib.optionals enablePython [ python2 ];
propagatedBuildInputs = [
coreutils
gettext
cryptsetup
lvm2
rsync
keyutils
which
];
postInstall = ''
FILES="$(grep -r '/bin/sh' $out/bin -l)"
for file in $FILES; do
wrapProgram $file \
--prefix PATH ":" "${coreutils}/bin" \
--prefix PATH ":" "${gettext}/bin" \
--prefix PATH ":" "${rsync}/bin" \
--prefix PATH ":" "${keyutils}/bin" \
--prefix PATH ":" "${which}/bin" \
--prefix PATH ":" "${lsof}/bin" \
--prefix PATH ":" "$out/bin"
done
'';
passthru.tests = { inherit (nixosTests) ecryptfs; };
meta = with lib; {
description = "Enterprise-class stacked cryptographic filesystem";
license = licenses.gpl2Plus;
maintainers = with maintainers; [ obadz ];
platforms = platforms.linux;
};
}

View File

@@ -0,0 +1,38 @@
{
lib,
fetchFromGitHub,
buildGoModule,
}:
buildGoModule rec {
pname = "amazon-ecs-agent";
version = "1.99.1";
src = fetchFromGitHub {
rev = "v${version}";
owner = "aws";
repo = "amazon-ecs-agent";
hash = "sha256-aGmXu+ho5H6vPTBWR5OvqDcmFQN87BOl99HGIek24CE=";
};
vendorHash = null;
modRoot = "./agent";
excludedPackages = [ "./version/gen" ];
ldflags = [
"-s"
"-w"
];
meta = {
description = "Agent that runs on AWS EC2 container instances and starts containers on behalf of Amazon ECS";
homepage = "https://github.com/aws/amazon-ecs-agent";
changelog = "https://github.com/aws/amazon-ecs-agent/raw/v${version}/CHANGELOG.md";
license = lib.licenses.asl20;
platforms = lib.platforms.linux;
maintainers = [ ];
mainProgram = "agent";
};
}

View File

@@ -0,0 +1,30 @@
{
lib,
fetchFromGitHub,
buildGoModule,
}:
buildGoModule rec {
pname = "ecsk";
version = "0.9.3";
src = fetchFromGitHub {
owner = "yukiarrr";
repo = "ecsk";
tag = "v${version}";
hash = "sha256-1nrV7NslOIXQDHsc7c5YfaWhoJ8kfkEQseoVVeENrHM=";
fetchSubmodules = true;
};
vendorHash = "sha256-Eyqpc7GyG/7u/I4tStADQikxcbIatjeAJN9wUDgzdFY=";
subPackages = [ "cmd/ecsk" ];
meta = {
description = "Interactively call Amazon ECS APIs, copy files between ECS and local, and view logs";
license = lib.licenses.mit;
mainProgram = "ecsk";
homepage = "https://github.com/yukiarrr/ecsk";
maintainers = with lib.maintainers; [ whtsht ];
};
}

View File

@@ -0,0 +1,49 @@
{
lib,
buildGoModule,
fetchFromGitHub,
versionCheckHook,
}:
buildGoModule rec {
pname = "ecspresso";
version = "2.6.1";
src = fetchFromGitHub {
owner = "kayac";
repo = "ecspresso";
tag = "v${version}";
hash = "sha256-kZKfhGOxtuZM6oytt/36AW8R2XVoKuLZdaj7NvoRWGA=";
};
subPackages = [
"cmd/ecspresso"
];
vendorHash = "sha256-tL/AjGU/Pi5ypcv9jqUukg6sGJqpPlHhwxzve7/KgDo=";
ldflags = [
"-s"
"-w"
"-X main.buildDate=none"
"-X main.Version=${version}"
];
doInstallCheck = true;
nativeInstallCheckInputs = [
versionCheckHook
];
versionCheckProgramArg = "version";
meta = {
description = "Deployment tool for ECS";
mainProgram = "ecspresso";
license = lib.licenses.mit;
homepage = "https://github.com/kayac/ecspresso/";
maintainers = with lib.maintainers; [
FKouhai
];
};
}

View File

@@ -0,0 +1,119 @@
{
stdenv,
lib,
fetchFromBitbucket,
cmake,
pkg-config,
makeWrapper,
zlib,
bzip2,
libjpeg,
SDL2,
SDL2_net,
SDL2_mixer,
gtk3,
writers,
python3Packages,
nix-update,
fetchpatch,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "ecwolf";
version = "1.4.1";
src = fetchFromBitbucket {
owner = "ecwolf";
repo = "ecwolf";
rev = "refs/tags/${finalAttrs.version}";
hash = "sha256-V2pSP8i20zB50WtUMujzij+ISSupdQQ/oCYYrOaTU1g=";
};
patches = [
# Fixes build with gcc >= 14. Shouldn't be needed for ecwolf versions > 1.4.1.
(fetchpatch {
name = "tmemory.h-const-correctness.patch";
url = "https://bitbucket.org/ecwolf/ecwolf/commits/400aaf96a36a14ab8eab18a670ba6439046f3bb0/raw";
hash = "sha256-2YwHEctBPyprs0DVsazimGEgmiCba24zh2dFfw9tOnU=";
})
];
nativeBuildInputs = [
cmake
pkg-config
]
++ lib.optionals stdenv.hostPlatform.isDarwin [ makeWrapper ];
buildInputs = [
zlib
bzip2
libjpeg
SDL2
SDL2_net
SDL2_mixer
gtk3
];
NIX_LDFLAGS = lib.optionalString stdenv.hostPlatform.isDarwin "-framework AppKit";
# ECWolf installs its binary to the games/ directory, but Nix only adds bin/
# directories to the PATH.
postInstall =
lib.optionalString stdenv.hostPlatform.isLinux ''
mv "$out/games" "$out/bin"
''
+ lib.optionalString stdenv.hostPlatform.isDarwin ''
mkdir -p $out/{Applications,bin}
cp -R ecwolf.app $out/Applications
makeWrapper $out/{Applications/ecwolf.app/Contents/MacOS,bin}/ecwolf
'';
passthru.updateScript =
let
updateScriptPkg =
writers.writePython3 "ecwolf_update_script"
{
libraries = with python3Packages; [
debian-inspector
requests
];
}
''
from os import execl
from sys import argv
from debian_inspector.debcon import get_paragraphs_data
from requests import get
# The debian.drdteam.org repo is a primary source of information. Its
# run by Blzut3, the creator and primary developer of ECWolf. Its also
# listed on ECWolfs download page:
# <https://maniacsvault.net/ecwolf/download.php>.
url = 'https://debian.drdteam.org/dists/stable/multiverse/binary-amd64/Packages' # noqa: E501
response = get(url)
packages = get_paragraphs_data(response.text)
for package in packages:
if package['package'] == 'ecwolf':
latest_version = package['version']
break
nix_update_path = argv[1]
execl(nix_update_path, nix_update_path, '--version', latest_version)
'';
in
[
updateScriptPkg
(lib.getExe nix-update)
];
meta = with lib; {
description = "Enhanched SDL-based port of Wolfenstein 3D for various platforms";
mainProgram = "ecwolf";
homepage = "https://maniacsvault.net/ecwolf/";
license = licenses.gpl2Plus;
maintainers = with maintainers; [
jayman2000
sander
];
platforms = platforms.all;
};
})