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,52 @@
{
lib,
stdenv,
tclPackages,
fetchurl,
}:
stdenv.mkDerivation {
pname = "ma";
version = "13";
src = fetchurl {
url = "https://web.archive.org/web/20250829110226/http://call-with-current-continuation.org/ma/ma.tar.gz";
hash = "sha256-QNt4ctcu4/xJY2eud+kp5paPUnLsRhK7D2nJ0LBIvIo=";
};
postPatch = ''
substituteInPlace ./build --replace-fail cc ${lib.getExe stdenv.cc}
'';
buildInputs = [
tclPackages.tk
];
buildPhase = ''
runHook preBuild
./build
for f in B ma ma-eval; do
substituteInPlace $f --replace-fail \
'set exec_prefix ""' "set exec_prefix \"$out/bin/\""
done
runHook postBuild
'';
installPhase = ''
runHook preInstall
install -Dt $out/bin \
B awd ma ma-eval plumb pty win
runHook postInstall
'';
meta = {
description = "Minimalistic variant of the Acme editor";
homepage = "http://call-with-current-continuation.org/ma/ma.html";
mainProgram = "ma";
maintainers = [ lib.maintainers.sternenseemann ];
# Per the README:
# > All of MA's source code is hereby placed in the public domain
license = lib.licenses.publicDomain;
inherit (tclPackages.tk.meta) platforms;
};
}

View File

@@ -0,0 +1,78 @@
{
stdenv,
config,
lib,
fetchFromGitHub,
cmake,
eigen,
onnxruntime,
opencv,
cudaSupport ? config.cudaSupport,
cudaPackages ? { },
}@inputs:
let
effectiveStdenv = if cudaSupport then cudaPackages.backendStdenv else inputs.stdenv;
in
effectiveStdenv.mkDerivation (finalAttrs: {
pname = "fastdeploy-ppocr";
version = "0-unstable-2023-10-09";
src = fetchFromGitHub {
owner = "MaaAssistantArknights";
repo = "FastDeploy";
# follows but not fully follows https://github.com/MaaAssistantArknights/MaaDeps/blob/master/vcpkg-overlay/ports/maa-fastdeploy/portfile.cmake#L4
rev = "0db6000aaac250824266ac37451f43ce272d80a3";
hash = "sha256-5TItnPDc5WShpZAgBYeqgI9KKkk3qw/M8HPMlq/H4BM=";
};
outputs = [
"out"
"cmake"
];
nativeBuildInputs = [
cmake
eigen
]
++ lib.optionals cudaSupport [ cudaPackages.cuda_nvcc ];
buildInputs = [
onnxruntime
opencv
]
++ lib.optionals cudaSupport (
with cudaPackages;
[
cuda_cccl # cub/cub.cuh
libcublas # cublas_v2.h
libcurand # curand.h
libcusparse # cusparse.h
libcufft # cufft.h
cudnn # cudnn.h
cuda_cudart
]
);
cmakeBuildType = "None";
cmakeFlags = [
(lib.cmakeBool "BUILD_SHARED_LIBS" true)
]
++ lib.optionals cudaSupport [
(lib.cmakeFeature "CMAKE_CUDA_ARCHITECTURES" cudaPackages.flags.cmakeCudaArchitecturesString)
];
postInstall = ''
mkdir $cmake
install -Dm644 ${finalAttrs.src}/cmake/Findonnxruntime.cmake $cmake/
'';
meta = with lib; {
description = "MaaAssistantArknights stripped-down version of FastDeploy";
homepage = "https://github.com/MaaAssistantArknights/FastDeploy";
platforms = platforms.linux ++ platforms.darwin;
license = licenses.asl20;
broken = cudaSupport && stdenv.hostPlatform.system != "x86_64-linux";
};
})

View File

@@ -0,0 +1,87 @@
{
lib,
config,
callPackage,
stdenv,
fetchFromGitHub,
asio,
cmake,
libcpr,
onnxruntime,
opencv,
isBeta ? false,
cudaSupport ? config.cudaSupport,
cudaPackages ? { },
}:
let
fastdeploy = callPackage ./fastdeploy-ppocr.nix { };
sources = lib.importJSON ./pin.json;
in
stdenv.mkDerivation (finalAttr: {
pname = "maa-assistant-arknights" + lib.optionalString isBeta "-beta";
version = if isBeta then sources.beta.version else sources.stable.version;
src = fetchFromGitHub {
owner = "MaaAssistantArknights";
repo = "MaaAssistantArknights";
rev = "v${finalAttr.version}";
hash = if isBeta then sources.beta.hash else sources.stable.hash;
};
nativeBuildInputs = [
asio
cmake
fastdeploy.cmake
]
++ lib.optionals cudaSupport [ cudaPackages.cuda_nvcc ];
buildInputs = [
fastdeploy
libcpr
onnxruntime
opencv
]
++ lib.optionals cudaSupport (
with cudaPackages;
[
cuda_cccl # cub/cub.cuh
libcublas # cublas_v2.h
libcurand # curand.h
libcusparse # cusparse.h
libcufft # cufft.h
cudnn # cudnn.h
cuda_cudart
]
);
cmakeBuildType = "None";
cmakeFlags = [
(lib.cmakeBool "BUILD_SHARED_LIBS" true)
(lib.cmakeBool "INSTALL_FLATTEN" false)
(lib.cmakeBool "INSTALL_PYTHON" true)
(lib.cmakeBool "INSTALL_RESOURCE" true)
(lib.cmakeBool "USE_MAADEPS" false)
(lib.cmakeFeature "MAA_VERSION" "v${finalAttr.version}")
];
passthru.updateScript = ./update.sh;
postPatch = ''
cp -v ${fastdeploy.cmake}/Findonnxruntime.cmake cmake/
'';
postInstall = ''
mkdir -p $out/share/${finalAttr.pname}
mv $out/{Python,resource} $out/share/${finalAttr.pname}
'';
meta = with lib; {
description = "Arknights assistant";
homepage = "https://github.com/MaaAssistantArknights/MaaAssistantArknights";
license = licenses.agpl3Only;
maintainers = with maintainers; [ Cryolitia ];
platforms = platforms.linux ++ platforms.darwin;
};
})

View File

@@ -0,0 +1,10 @@
{
"stable": {
"version": "5.24.2",
"hash": "sha256-wZRC/GnAodyzVh7+hKwwF3oobYmkWQb3sD1TL80YGgY="
},
"beta": {
"version": "5.24.2",
"hash": "sha256-wZRC/GnAodyzVh7+hKwwF3oobYmkWQb3sD1TL80YGgY="
}
}

View File

@@ -0,0 +1,28 @@
#!/usr/bin/env -S nix shell nixpkgs#nix nixpkgs#curl nixpkgs#jq nixpkgs#nix-prefetch-github --command bash
set -euo pipefail
directory="$(dirname $0 | xargs realpath)"
version_stable="$(curl "https://api.github.com/repos/MaaAssistantArknights/MaaAssistantArknights/releases/latest" | jq -r '.tag_name')"
hash_stable=$(nix-prefetch-github MaaAssistantArknights MaaAssistantArknights --rev ${version_stable} -v | jq -r .hash)
version_beta="$(curl "https://api.github.com/repos/MaaAssistantArknights/MaaAssistantArknights/releases?per_page=1" | jq -r '.[0].tag_name')"
hash_beta=$(nix-prefetch-github MaaAssistantArknights MaaAssistantArknights --rev ${version_beta} -v | jq -r .hash)
cat > $directory/pin.json << EOF
{
"stable": {
"version": "${version_stable#*v}",
"hash": "$hash_stable"
},
"beta": {
"version": "${version_beta#*v}",
"hash": "$hash_beta"
}
}
EOF
cat $directory/pin.json

View File

@@ -0,0 +1,76 @@
{
lib,
stdenv,
rustPlatform,
fetchFromGitHub,
installShellFiles,
makeWrapper,
pkg-config,
openssl,
maa-assistant-arknights,
android-tools,
git,
}:
rustPlatform.buildRustPackage rec {
pname = "maa-cli";
version = "0.5.9";
src = fetchFromGitHub {
owner = "MaaAssistantArknights";
repo = "maa-cli";
rev = "v${version}";
hash = "sha256-TLm8B1cQ00l9aRADYU3Qv7nA04kDaxsXX86qvsTRWwk=";
};
nativeBuildInputs = [
installShellFiles
makeWrapper
pkg-config
];
buildInputs = [ openssl ];
# https://github.com/MaaAssistantArknights/maa-cli/pull/126
buildNoDefaultFeatures = true;
buildFeatures = [ "git2" ];
cargoHash = "sha256-pJlTcxF6nzV4HfMTs/gAzSUubDy2UlhzEIVeSWs6uX0=";
# maa-cli would only search libMaaCore.so and resources in itself's path
# https://github.com/MaaAssistantArknights/maa-cli/issues/67
postInstall = ''
mkdir -p $out/share/maa-assistant-arknights/
ln -s ${maa-assistant-arknights}/share/maa-assistant-arknights/* $out/share/maa-assistant-arknights/
ln -s ${maa-assistant-arknights}/lib/* $out/share/maa-assistant-arknights/
mv $out/bin/maa $out/share/maa-assistant-arknights/
makeWrapper $out/share/maa-assistant-arknights/maa $out/bin/maa \
--prefix PATH : "${
lib.makeBinPath [
android-tools
git
]
}"
''
+ lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) ''
installShellCompletion --cmd maa \
--bash <($out/bin/maa complete bash) \
--fish <($out/bin/maa complete fish) \
--zsh <($out/bin/maa complete zsh)
mkdir -p manpage
$out/bin/maa mangen --path manpage
installManPage manpage/*
'';
meta = with lib; {
description = "Simple CLI for MAA by Rust";
homepage = "https://github.com/MaaAssistantArknights/maa-cli";
license = licenses.agpl3Only;
platforms = platforms.linux ++ platforms.darwin;
maintainers = with maintainers; [ Cryolitia ];
mainProgram = "maa";
};
}

View File

@@ -0,0 +1,113 @@
{
stdenv,
lib,
fetchzip,
fetchpatch,
installShellFiles,
}:
stdenv.mkDerivation {
pname = "mac-fdisk";
version = "0.1.16";
src = fetchzip {
url = "https://deb.debian.org/debian/pool/main/m/mac-fdisk/mac-fdisk_0.1.orig.tar.gz";
sha256 = "sha256-pYNyhPvRKdIje0Rpay0OzmrkGcl+/JOhMv7r+2LZk/Q=";
};
patches = [
# Debian's changeset, extracted into a patch
(fetchpatch {
url = "https://git.adelielinux.org/adelie/packages/-/raw/1b708c8a90e3548c4954c6367a9376f76f3746bd/user/mac-fdisk/mac-fdisk-0.1-debian.patch";
sha256 = "sha256-a9pGF+UsFeZiXgracmT4anqgpmcGcS/W3jGtFzHZtt4=";
})
# Include a lot more headers and remove a bunch of braindead __linux__ checks
(fetchpatch {
url = "https://git.adelielinux.org/adelie/packages/-/raw/1fa4c88ee21866eeb0feae8f6b0bf609a04711cc/user/mac-fdisk/mac-fdisk-0.1-headers.patch";
sha256 = "sha256-FIk9K+lP+3e1pgmNfymTdpdSoTpBDv29kmwYgqYwWQw=";
})
# Add support for more architectures
(fetchpatch {
url = "https://git.adelielinux.org/adelie/packages/-/raw/1b708c8a90e3548c4954c6367a9376f76f3746bd/user/mac-fdisk/mac-fdisk-0.1-more-arches.patch";
sha256 = "sha256-HNRmzETUmKfZQFrjg6Y/HPwUnLk0vO5DokfU4umdOm0=";
})
# From p16 (source?), adjusts some types & fixes PPC64 support
(fetchpatch {
url = "https://git.adelielinux.org/adelie/packages/-/raw/1fa4c88ee21866eeb0feae8f6b0bf609a04711cc/user/mac-fdisk/mac-fdisk-0.1_p16-ppc64.patch";
sha256 = "sha256-GK0nfga59nOXotkbKI+2ejA9TtyZUwDIxuXWFGGbeFg=";
})
# From p16 (source?), makes some inlines static
(fetchpatch {
url = "https://git.adelielinux.org/adelie/packages/-/raw/1fa4c88ee21866eeb0feae8f6b0bf609a04711cc/user/mac-fdisk/mac-fdisk-0.1_p16-proper-inline.patch";
sha256 = "sha256-wr2teKpm0FyqNudKYlTD49pTFDis33Fo+0LULNYIJko=";
})
# Adds x86_64 support
(fetchpatch {
url = "https://git.adelielinux.org/adelie/packages/-/raw/1b708c8a90e3548c4954c6367a9376f76f3746bd/user/mac-fdisk/mac-fdisk-amd64.patch";
sha256 = "sha256-iO4/sY5sGKQyymMmAOb/TlCc9id2qgEDw7E8pFZpsHI=";
})
# Fix missing header in fdisk.c on musl
(fetchpatch {
url = "https://git.adelielinux.org/adelie/packages/-/raw/1fa4c88ee21866eeb0feae8f6b0bf609a04711cc/user/mac-fdisk/mac-fdisk-fdisk-header-musl.patch";
sha256 = "sha256-mKBVjvLKtxKPADeoPqp17YdJ1QWj2enAYhKKSqTnQ44=";
})
# Support disks >550GB
(fetchpatch {
url = "https://git.adelielinux.org/adelie/packages/-/raw/1fa4c88ee21866eeb0feae8f6b0bf609a04711cc/user/mac-fdisk/mac-fdisk-large-disk-support.patch";
sha256 = "sha256-IXZZdozqZKyZEz87ZzB8Jof22GgvHf4GaXBqSKn8su8=";
})
# Enable Large File Support (>2GiB)
(fetchpatch {
url = "https://git.adelielinux.org/adelie/packages/-/raw/1fa4c88ee21866eeb0feae8f6b0bf609a04711cc/user/mac-fdisk/mac-fdisk-largerthan2gb.patch";
sha256 = "sha256-ATK7QYXV7BOk8iIFeXY8g+ZHLuuhww9pcrqOMDn/oLM=";
})
# Fix compilation on non-glibc
(fetchpatch {
url = "https://git.adelielinux.org/adelie/packages/-/raw/1fa4c88ee21866eeb0feae8f6b0bf609a04711cc/user/mac-fdisk/mac-fdisk-non-glibc-support.patch";
sha256 = "sha256-CBZUKf7dPvvpuG5L+SI1FQ4W7/fDgeKXHUMFkJNu/MY=";
})
# Flush stdout after printing prompt for better UX
(fetchpatch {
url = "https://git.adelielinux.org/adelie/packages/-/raw/656ae6bf9f8a64aee95c4797b20bfe713627f1f4/user/mac-fdisk/flush-stdout.patch";
sha256 = "sha256-k7+UPiUf/oCQdDhxDcC+FRwkxS89WSsYzFw6fUB/10I=";
})
];
nativeBuildInputs = [
installShellFiles
];
enableParallelBuilding = true;
env.NIX_CFLAGS_COMPILE = "-D_GNU_SOURCE";
hardeningDisable = [ "format" ];
installPhase = ''
runHook preInstall
install -Dm755 pdisk $out/sbin/mac-fdisk
install -Dm755 fdisk $out/sbin/pmac-fdisk
for manpage in {,p}mac-fdisk.8; do
mv "$manpage".in $manpage
installManPage $manpage
done
runHook postInstall
'';
meta = with lib; {
description = "68K and PowerPC Mac disk partitioning utility, Adélie Linux version";
# http://ftp.mklinux.apple.com:/pub/Other_Tools/ but that one's looong dead, link goes to the patch compilation we're using
homepage = "https://git.adelielinux.org/adelie/packages/-/tree/master/user/mac-fdisk";
license = with licenses; [
hpnd # original license statements seems to match this (in files that are shared with pdisk)
gpl1Plus # fdisk.c
];
maintainers = with maintainers; [ OPNA2608 ];
# the toolchain that's being expected for Mac support (SCSI.h from Universal Headers 2.0, SIOUX.h from Metrowerks CoreWarrior) is ancient, unsure about BSDs
platforms = platforms.linux;
badPlatforms = platforms.aarch64; # missing some platform definitions
};
}

View File

@@ -0,0 +1,44 @@
{
lib,
stdenv,
fetchurl,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "mac-robber";
version = "1.02";
src = fetchurl {
url = "mirror://sourceforge/project/mac-robber/mac-robber/${finalAttrs.version}/mac-robber-${finalAttrs.version}.tar.gz";
hash = "sha256-WJXTMuyNh+FfIUQcYVRbf2iDCi7iyWfTgXc70IUEgG0=";
};
patches = [
# add GCC hardening.
(fetchurl {
name = "10_add-GCC-hardening.patch";
url = "https://salsa.debian.org/pkg-security-team/mac-robber/-/raw/b6a59d78e2f58fbfab7f1b3ed9b72531d28693ca/debian/patches/10_add-GCC-hardening.patch";
hash = "sha256-1ma6Vh1MTE6WlCcm2KzRLK/ZV3hAw7xP25yi7TrIqLI=";
})
];
makeFlags = [
"CC=${stdenv.cc.targetPrefix}cc"
"GCC_OPT="
];
installPhase = ''
runHook preInstall
install -D mac-robber $out/bin/mac-robber
runHook postInstall
'';
meta = with lib; {
description = "Digital investigation tool that collects data from allocated files in a mounted file system";
mainProgram = "mac-robber";
homepage = "https://www.sleuthkit.org/mac-robber/";
maintainers = with maintainers; [ d3vil0p3r ];
platforms = platforms.unix;
license = licenses.gpl2Only;
};
})

View File

@@ -0,0 +1,65 @@
{
lib,
stdenv,
fetchFromGitHub,
fetchpatch,
autoreconfHook,
texinfo,
}:
stdenv.mkDerivation rec {
pname = "macchanger";
version = "1.7.0";
src = fetchFromGitHub {
owner = "alobbs";
repo = "macchanger";
rev = version;
sha256 = "1hypx6sxhd2b1nsxj314hpkhj7q4x9p2kfaaf20rjkkkig0nck9r";
};
patches = [
(fetchpatch {
url = "https://sources.debian.org/data/main/m/macchanger/1.7.0-5.3/debian/patches/02-fix_usage_message.patch";
sha256 = "0pxljmq0l0znylbhms09i19qwil74gm8gx3xx2ffx00dajaizj18";
})
(fetchpatch {
url = "https://sources.debian.org/data/main/m/macchanger/1.7.0-5.3/debian/patches/06-update_OUI_list.patch";
sha256 = "04kbd784z9nwkjva5ckkvb0yb3pim9valb1viywn1yyh577d0y7w";
})
(fetchpatch {
url = "https://sources.debian.org/data/main/m/macchanger/1.7.0-5.3/debian/patches/08-fix_random_MAC_choice.patch";
sha256 = "1vz3appxxsdf1imzrn57amazfwlbrvx6g78b6n88aqgwzy5dm34d";
})
(fetchpatch {
url = "https://sources.debian.org/data/main/m/macchanger/1.7.0-5.3/debian/patches/check-random-device-read-errors.patch";
sha256 = "0pra6qnk39crjlidspg3l6hpaqiw43cypahx793l59mqn956cngc";
})
(fetchpatch {
url = "https://sources.debian.org/data/main/m/macchanger/1.7.0-5.3/debian/patches/verify-changed-MAC.patch";
sha256 = "0vjhf2fnj1hlghjl821p6idrfc8hmd4lgps5lf1l68ylqvwjw0zj";
})
];
nativeBuildInputs = [
autoreconfHook
texinfo
];
outputs = [
"out"
"info"
];
meta = with lib; {
description = "Utility for viewing/manipulating the MAC address of network interfaces";
maintainers = with maintainers; [
joachifm
dotlambda
];
license = licenses.gpl2Plus;
homepage = "https://github.com/alobbs/macchanger";
platforms = platforms.linux;
mainProgram = "macchanger";
};
}

View File

@@ -0,0 +1,40 @@
{
lib,
rustPlatform,
fetchFromGitHub,
installShellFiles,
}:
rustPlatform.buildRustPackage rec {
pname = "macchina";
version = "6.4.0";
src = fetchFromGitHub {
owner = "Macchina-CLI";
repo = "macchina";
rev = "v${version}";
hash = "sha256-GZO9xGc3KGdq2WdA10m/XV8cNAlQjUZFUVu1CzidJ5c=";
};
cargoHash = "sha256-B3dylFOMQ1a1DfemfQFFlLVKCmB+ipUMV45iDh8fSqY=";
nativeBuildInputs = [
installShellFiles
];
postInstall = ''
installManPage doc/macchina.{1,7}
'';
meta = {
description = "Fast, minimal and customizable system information fetcher";
homepage = "https://github.com/Macchina-CLI/macchina";
changelog = "https://github.com/Macchina-CLI/macchina/releases/tag/v${version}";
license = with lib.licenses; [ mit ];
maintainers = with lib.maintainers; [
_414owen
figsoda
];
mainProgram = "macchina";
};
}

View File

@@ -0,0 +1,41 @@
{
lib,
stdenvNoCC,
fetchurl,
unzip,
}:
stdenvNoCC.mkDerivation (finalAttrs: {
pname = "maccy";
version = "2.5.1";
src = fetchurl {
url = "https://github.com/p0deje/Maccy/releases/download/${finalAttrs.version}/Maccy.app.zip";
hash = "sha256-pwMiCAS+1uEtEQv2e1UflxYuuh/qqYJbMcp2ZVvZBTA=";
};
dontUnpack = true;
nativeBuildInputs = [ unzip ];
installPhase = ''
runHook preInstall
mkdir -p $out/Applications
unzip -d $out/Applications $src
runHook postInstall
'';
meta = with lib; {
description = "Simple clipboard manager for macOS";
homepage = "https://maccy.app";
license = licenses.mit;
sourceProvenance = with lib.sourceTypes; [ binaryNativeCode ];
maintainers = with maintainers; [
emilytrau
baongoc124
];
platforms = platforms.darwin;
};
})

View File

@@ -0,0 +1,45 @@
{
lib,
stdenv,
makeWrapper,
fetchFromGitHub,
cctools,
}:
stdenv.mkDerivation rec {
pname = "macdylibbundler";
version = "1.0.4";
src = fetchFromGitHub {
owner = "auriamg";
repo = "macdylibbundler";
rev = version;
sha256 = "0j4ij48jf5izgymzxxaakf6vc50w9q0761yir6nfj1n6qlnrlidf";
};
nativeBuildInputs = [ makeWrapper ];
makeFlags = [ "PREFIX=$(out)" ];
postInstall = ''
wrapProgram $out/bin/dylibbundler \
--prefix PATH ":" "${cctools}/bin"
'';
meta = with lib; {
description = "Utility to ease bundling libraries into executables for OSX";
longDescription = ''
dylibbundler is a small command-line programs that aims to make bundling
.dylibs as easy as possible. It automatically determines which dylibs are
needed by your program, copies these libraries inside the app bundle, and
fixes both them and the executable to be ready for distribution... all
this with a single command on the teminal! It will also work if your
program uses plug-ins that have dependencies too.
'';
homepage = "https://github.com/auriamg/macdylibbundler";
license = licenses.mit;
platforms = platforms.all;
maintainers = [ maintainers.nomeata ];
};
}

View File

@@ -0,0 +1,77 @@
{
lib,
stdenv,
fetchurl,
cpio,
xar,
undmg,
libtapi,
}:
stdenv.mkDerivation rec {
pname = "macfuse-stubs";
version = "4.8.0";
src = fetchurl {
url = "https://github.com/osxfuse/osxfuse/releases/download/macfuse-${version}/macfuse-${version}.dmg";
hash = "sha256-ucTzO2qdN4QkowMVvC3+4pjEVjbwMsB0xFk+bvQxwtQ=";
};
nativeBuildInputs = [
cpio
xar
undmg
libtapi
];
postUnpack = ''
xar -xf 'Install macFUSE.pkg'
cd Core.pkg
gunzip -dc Payload | cpio -i
'';
sourceRoot = ".";
buildPhase = ''
pushd usr/local/lib
for f in *.dylib; do
tapi stubify --filetype=tbd-v2 "$f" -o "''${f%%.dylib}.tbd"
done
sed -i "s|^prefix=.*|prefix=$out|" pkgconfig/fuse.pc
popd
'';
# NOTE: Keep in mind that different parts of macFUSE are distributed under a
# different license
installPhase = ''
mkdir -p $out/include $out/lib/pkgconfig
cp usr/local/lib/*.tbd $out/lib
cp usr/local/lib/pkgconfig/*.pc $out/lib/pkgconfig
cp -R usr/local/include/* $out/include
'';
meta = with lib; {
homepage = "https://osxfuse.github.io";
description = "Build time stubs for FUSE on macOS";
longDescription = ''
macFUSE is required for this package to work on macOS. To install macFUSE,
use the installer from the <link xlink:href="https://osxfuse.github.io/">
project website</link>.
'';
platforms = platforms.darwin;
maintainers = with maintainers; [ midchildan ];
# macFUSE as a whole includes code with restrictions on commercial
# redistribution. However, the build artifacts that we actually touch for
# this derivation are distributed under a free license.
license = with licenses; [
lgpl2Plus # libfuse
];
};
passthru.warning = ''
macFUSE is required for this package to work on macOS. To install macFUSE,
use the installer from the <link xlink:href="https://osxfuse.github.io/">
project website</link>.
'';
}

View File

@@ -0,0 +1,49 @@
{
stdenv,
lib,
buildGoModule,
fetchFromGitHub,
makeWrapper,
iproute2,
net-tools,
}:
buildGoModule rec {
pname = "mackerel-agent";
version = "0.85.2";
src = fetchFromGitHub {
owner = "mackerelio";
repo = "mackerel-agent";
rev = "v${version}";
sha256 = "sha256-3A3x32JytJGXebgZeJcToHXNqRB+rbyziT5Zwgc9rEM=";
};
nativeBuildInputs = [ makeWrapper ];
nativeCheckInputs = lib.optionals (!stdenv.hostPlatform.isDarwin) [ net-tools ];
buildInputs = lib.optionals (!stdenv.hostPlatform.isDarwin) [ iproute2 ];
vendorHash = "sha256-Ubk/ms/3FwH1ZqZ5uTy0MubXhrKBoeaC85Y1KKH5cIw=";
subPackages = [ "." ];
ldflags = [
"-X=main.version=${version}"
"-X=main.gitcommit=v${version}"
];
postInstall = ''
wrapProgram $out/bin/mackerel-agent \
--prefix PATH : "${lib.makeBinPath buildInputs}"
'';
doCheck = true;
meta = with lib; {
description = "System monitoring service for mackerel.io";
mainProgram = "mackerel-agent";
homepage = "https://github.com/mackerelio/mackerel-agent";
license = licenses.asl20;
maintainers = with maintainers; [ midchildan ];
};
}

View File

@@ -0,0 +1,45 @@
{
lib,
python3Packages,
fetchFromGitHub,
procps,
}:
python3Packages.buildPythonApplication rec {
pname = "mackup";
version = "0.8.41";
pyproject = true;
src = fetchFromGitHub {
owner = "lra";
repo = "mackup";
rev = "${version}";
hash = "sha256-eWSBl8BTg2FLI21DQcnepBFPF08bfm0V8lYB4mMbAiw=";
};
postPatch = ''
substituteInPlace mackup/utils.py \
--replace-fail '"/usr/bin/pgrep"' '"${lib.getExe' procps "pgrep"}"' \
'';
build-system = with python3Packages; [ poetry-core ];
dependencies = with python3Packages; [ docopt ];
pythonImportsCheck = [ "mackup" ];
nativeCheckInputs = with python3Packages; [ pytestCheckHook ];
enabledTestPaths = [ "tests/*.py" ];
# Disabling tests failing on darwin due to a missing pgrep binary on procps
disabledTests = [ "test_is_process_running" ];
meta = {
description = "Tool to keep your application settings in sync (OS X/Linux)";
changelog = "https://github.com/lra/mackup/releases/tag/${version}";
license = lib.licenses.agpl3Only;
homepage = "https://github.com/lra/mackup";
maintainers = with lib.maintainers; [ luftmensch-luftmensch ];
mainProgram = "mackup";
};
}

View File

@@ -0,0 +1,27 @@
{
lib,
rustPlatform,
fetchFromGitHub,
}:
rustPlatform.buildRustPackage rec {
pname = "macmon";
version = "0.6.1";
src = fetchFromGitHub {
owner = "vladkens";
repo = "macmon";
rev = "v${version}";
hash = "sha256-GiSF5PBRUcKZzd9vWf9MmKKZbtqchnu0DjFgbXmp7bg=";
};
cargoHash = "sha256-b9CpHSC3/kj7lHs+QhDqnRZfda9rtJJEs3j24NDZSPQ=";
meta = {
homepage = "https://github.com/vladkens/macmon";
description = "Sudoless performance monitoring for Apple Silicon processors";
platforms = [ "aarch64-darwin" ];
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ schrobingus ];
};
}

View File

@@ -0,0 +1,54 @@
{
lib,
stdenv,
fetchurl,
pkg-config,
gtk3,
openssl,
versionCheckHook,
}:
stdenv.mkDerivation rec {
pname = "macopix";
version = "3.4.0";
# GitHub does not contain tags
# https://github.com/chimari/MaCoPiX/issues/6
src = fetchurl {
url = "http://rosegray.sakura.ne.jp/macopix/macopix-${version}.tar.gz";
hash = "sha256-1AjqdPPCc9UQWqLdWlA+Va+MmvKL8dAIfJURPifN7RI=";
};
nativeBuildInputs = [ pkg-config ];
buildInputs = [
gtk3
openssl
];
preConfigure = ''
# Build fails on Linux with windres.
export ac_cv_prog_WINDRES=
'';
enableParallelBuilding = true;
# Workaround build failure on -fno-common toolchains:
# ld: dnd.o:src/main.h:136: multiple definition of
# `MENU_EXT'; main.o:src/main.h:136: first defined here
env.NIX_CFLAGS_COMPILE = "-fcommon";
NIX_LDFLAGS = "-lX11";
nativeInstallCheckInputs = [
versionCheckHook
];
doInstallCheck = true;
meta = {
description = "Mascot Constructive Pilot for X";
mainProgram = "macopix";
homepage = "http://rosegray.sakura.ne.jp/macopix/index-e.html";
license = lib.licenses.gpl2Plus;
platforms = lib.platforms.linux;
};
}

View File

@@ -0,0 +1,37 @@
{
lib,
fetchFromGitHub,
rustPlatform,
nix-update-script,
}:
rustPlatform.buildRustPackage (finalAttrs: {
pname = "macos-defaults";
version = "0.2.0";
src = fetchFromGitHub {
owner = "dsully";
repo = "macos-defaults";
tag = finalAttrs.version;
hash = "sha256-dSZjMuw7ott0dgiYo0rqekEvScmrX6iG7xHaPAgo1/E=";
};
cargoHash = "sha256-xSg6WAkFPS8B1G4WqMW77egCMmOEo3rK2EKcrDYaBjA=";
checkFlags = [
# accesses home dir
"--skip=defaults::tests::plist_path_tests"
# accesses system_profiler
"--skip=defaults::tests::test_get_hardware_uuid"
];
passthru.updateScript = nix-update-script { };
meta = {
description = "Tool for managing macOS defaults declaratively via YAML files";
homepage = "https://github.com/dsully/macos-defaults";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ josh ];
mainProgram = "macos-defaults";
platforms = lib.platforms.darwin;
};
})

View File

@@ -0,0 +1,44 @@
{
stdenvNoCC,
fetchurl,
lib,
_7zz,
}:
stdenvNoCC.mkDerivation (finalAttrs: {
pname = "instantview";
version = "3.22R0002";
src = fetchurl {
url = "https://www.siliconmotion.com/downloads/macOS_InstantView_V${finalAttrs.version}.dmg";
hash = "sha256-PdgX9zCrVYtNbuOCYKVo9cegCG/VY7QXetivVsUltbg=";
};
nativeBuildInputs = [ _7zz ];
dontUnpack = true;
dontConfigure = true;
dontBuild = true;
installPhase = ''
runHook preInstall
mkdir -p "$out/Applications"
# Extract the DMG using 7zip
7zz x "$src" -oextracted -y
# Move the extracted contents to $out
cp -r extracted/* "$out/Applications/"
runHook postInstall
'';
meta = {
platforms = lib.platforms.darwin;
description = "USB Docking Station plugin-and-display support with SM76x driver";
homepage = "https://www.siliconmotion.com/events/instantview/";
license = lib.licenses.unfree;
sourceProvenance = [ lib.sourceTypes.binaryNativeCode ];
maintainers = with lib.maintainers; [ aspauldingcode ];
};
})

View File

@@ -0,0 +1,51 @@
{
lib,
python3Packages,
fetchFromGitHub,
}:
python3Packages.buildPythonApplication {
pname = "macpm";
version = "0.24-unstable-2024-11-19";
pyproject = true;
src = fetchFromGitHub {
owner = "visualcjy";
repo = "macpm";
rev = "7882d4c86c84bb23a8966ca57990de9b11397bd4";
hash = "sha256-jqaPPvYbuL8q6grmBLyZLf8aDmjugYxMOWAh1Ix82jc=";
};
build-system = with python3Packages; [
setuptools
];
dependencies = with python3Packages; [
dashing
humanize
psutil
];
# has no tests
doCheck = false;
# backwards compatibility for users still expecting 'asitop'
postInstall = ''
ln -rs $out/bin/macpm $out/bin/asitop
'';
pythonImportsCheck = [ "macpm" ];
meta = {
description = "Perf monitoring CLI tool for Apple Silicon; previously named 'asitop'";
homepage = "https://github.com/visualcjy/macpm";
mainProgram = "macpm";
platforms = [ "aarch64-darwin" ];
license = lib.licenses.mit;
maintainers = with lib.maintainers; [
juliusrickert
siriobalmelli
];
};
}

View File

@@ -0,0 +1,61 @@
{
lib,
python311,
fetchpatch,
fetchPypi,
}:
# pin python311 because macs2 does not support python 3.12
# https://github.com/macs3-project/MACS/issues/598#issuecomment-1812622572
python311.pkgs.buildPythonPackage rec {
pname = "macs2";
version = "2.2.9.1";
pyproject = true;
src = fetchPypi {
pname = lib.toUpper pname;
inherit version;
hash = "sha256-jVa8N/uCP8Y4fXgTjOloQFxUoKjNl3ZoJwX9CYMlLRY=";
};
patches = [
# https://github.com/macs3-project/MACS/pull/590
(fetchpatch {
name = "remove-pip-build-dependency.patch";
url = "https://github.com/macs3-project/MACS/commit/cf95a930daccf9f16e5b9a9224c5a2670cf67939.patch";
hash = "sha256-WB3Ubqk5fKtZt97QYo/sZDU/yya9MUo1NL4VsKXR+Yo=";
})
];
build-system = with python311.pkgs; [
cython_0
numpy
setuptools
];
dependencies = with python311.pkgs; [
numpy
];
__darwinAllowLocalNetworking = true;
nativeCheckInputs = with python311.pkgs; [
unittestCheckHook
];
unittestFlagsArray = [
"-s"
"test"
];
pythonImportsCheck = [ "MACS2" ];
meta = {
description = "Model-based Analysis for ChIP-Seq";
mainProgram = "macs2";
homepage = "https://github.com/macs3-project/MACS/";
changelog = "https://github.com/macs3-project/MACS/releases/tag/v${version}";
license = lib.licenses.bsd3;
maintainers = with lib.maintainers; [ gschwartz ];
};
}

View File

@@ -0,0 +1,40 @@
{
lib,
stdenv,
fetchurl,
jre,
makeWrapper,
}:
stdenv.mkDerivation rec {
pname = "macse";
version = "2.03";
src = fetchurl {
url = "https://bioweb.supagro.inra.fr/${pname}/releases/${pname}_v${version}.jar";
sha256 = "0jnjyz4f255glg37rawzdv4m6nfs7wfwc5dny7afvx4dz2sv4ssh";
};
nativeBuildInputs = [ makeWrapper ];
dontUnpack = true;
dontBuild = true;
installPhase = ''
runHook preInstall
mkdir -p $out/share/java
cp -s $src $out/share/java/macse.jar
makeWrapper ${jre}/bin/java $out/bin/macse --add-flags "-jar $out/share/java/macse.jar"
runHook postInstall
'';
meta = with lib; {
description = "Multiple alignment of coding sequences";
mainProgram = "macse";
homepage = "https://bioweb.supagro.inra.fr/macse/";
sourceProvenance = with sourceTypes; [ binaryBytecode ];
license = licenses.gpl2;
maintainers = [ maintainers.bzizou ];
platforms = platforms.all;
};
}

View File

@@ -0,0 +1,63 @@
{
lib,
stdenvNoCC,
fetchurl,
_7zz,
cpio,
xar,
darwin,
nix-update-script,
}:
stdenvNoCC.mkDerivation (finalAttrs: {
pname = "macskk";
version = "1.11.0";
src = fetchurl {
url = "https://github.com/mtgto/macSKK/releases/download/${finalAttrs.version}/macSKK-${finalAttrs.version}.dmg";
hash = "sha256-CqtW6bfSuAo+9VRmRTgx0aKpBKBEDIxidOh7V5vD7ww=";
};
nativeBuildInputs = [
_7zz
cpio
xar
]
++ lib.optionals stdenvNoCC.hostPlatform.isAarch64 [ darwin.autoSignDarwinBinariesHook ];
unpackPhase = ''
runHook preUnpack
7zz x $src
xar -xf macSKK-${finalAttrs.version}.pkg
cat app.pkg/Payload | gunzip -dc | cpio -i
cat dict.pkg/Payload | gunzip -dc | cpio -i
runHook postUnpack
'';
installPhase = ''
runHook preInstall
mkdir -p "$out"/Library/{Containers,Input\ Methods}
mkdir -p "$out/bin"
cp -a "Library/Input Methods/macSKK.app" "$out/Library/Input Methods/"
cp -a "Library/Containers/net.mtgto.inputmethod.macSKK" "$out/Library/Containers/"
ln -s "$out/Library/Input Methods/macSKK.app/Contents/MacOS/macSKK" "$out/bin/macSKK"
runHook postInstall
'';
passthru.updateScript = nix-update-script { };
meta = {
description = "Yet Another macOS SKK Input Method";
homepage = "https://github.com/mtgto/macSKK";
changelog = "https://github.com/mtgto/macSKK/blob/${finalAttrs.version}/CHANGELOG.md";
license = lib.licenses.gpl3Plus;
maintainers = with lib.maintainers; [ wattmto ];
platforms = lib.platforms.darwin;
sourceProvenance = with lib.sourceTypes; [ binaryNativeCode ];
mainProgram = "macSKK";
};
})

View File

@@ -0,0 +1,39 @@
{
lib,
buildGoModule,
fetchFromGitHub,
versionCheckHook,
}:
buildGoModule rec {
pname = "mactop";
version = "0.2.3";
src = fetchFromGitHub {
owner = "context-labs";
repo = "mactop";
tag = "v${version}";
hash = "sha256-xWUCOmNwhxmutY7G+FmxT7mabexuBIcgFzX++zsdnN4=";
};
vendorHash = "sha256-BFvd1jJzGYsI2E6BdFy+BwHOAy7VgblcByV/oRCKORs=";
ldflags = [
"-s"
"-w"
];
doInstallCheck = true;
nativeInstallCheckInputs = [ versionCheckHook ];
versionCheckProgramArg = "--version";
meta = {
description = "Terminal-based monitoring tool 'top' designed to display real-time metrics for Apple Silicon chips";
homepage = "https://github.com/context-labs/mactop";
changelog = "https://github.com/context-labs/mactop/releases/tag/${src.tag}";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ natsukium ];
mainProgram = "mactop";
platforms = [ "aarch64-darwin" ];
};
}

View File

@@ -0,0 +1,78 @@
{
lib,
stdenvNoCC,
fetchurl,
unzip,
writeShellApplication,
curl,
cacert,
libxml2,
xmlstarlet,
common-updater-scripts,
versionCheckHook,
writeShellScript,
xcbuild,
}:
stdenvNoCC.mkDerivation (finalAttrs: {
pname = "mactracker";
version = "7.13.5";
src = fetchurl {
url = "https://mactracker.ca/downloads/Mactracker_${finalAttrs.version}.zip";
hash = "sha256-VCcpEgMWo5U3BJpDSc0mQUIlmPuTKD7JBcmmKmYNf1Y=";
};
dontPatch = true;
dontConfigure = true;
dontBuild = true;
dontFixup = true;
dontUnpack = true;
nativeBuildInputs = [ unzip ];
sourceRoot = "Mactracker.app";
installPhase = ''
runHook preInstall
mkdir -p $out/Applications
unzip -d $out/Applications $src -x '__MACOSX/*'
runHook postInstall
'';
passthru.updateScript = lib.getExe (writeShellApplication {
name = "mactracker-update-script";
runtimeInputs = [
curl
cacert
libxml2
xmlstarlet
common-updater-scripts
];
text = ''
url="https://mactracker.ca/releasenotes-mac.html"
version=$(curl -s "$url" | xmllint -html -xmlout - | xmlstarlet sel -t -v "//faq/h5[1]")
update-source-version mactracker "$version"
'';
});
nativeInstallCheckInputs = [ versionCheckHook ];
versionCheckProgram = writeShellScript "version-check" ''
${xcbuild}/bin/PlistBuddy -c "Print :CFBundleVersion" "$1"
'';
versionCheckProgramArg = [ "${placeholder "out"}/Applications/Mactracker.app/Contents/Info.plist" ];
doInstallCheck = true;
meta = {
description = "Provides detailed information on every Apple Macintosh, iPod, iPhone, iPad, and Apple Watch ever made";
homepage = "https://mactracker.ca";
changelog = "https://mactracker.ca/releasenotes-mac.html";
license = lib.licenses.unfree;
sourceProvenance = with lib.sourceTypes; [ binaryNativeCode ];
maintainers = with lib.maintainers; [ DimitarNestorov ];
platforms = [
"aarch64-darwin"
"x86_64-darwin"
];
};
})

View File

@@ -0,0 +1,73 @@
{
lib,
stdenv,
buildGoModule,
fetchFromGitHub,
pam,
coreutils,
installShellFiles,
scdoc,
nixosTests,
}:
buildGoModule rec {
pname = "maddy";
version = "0.8.1";
src = fetchFromGitHub {
owner = "foxcpp";
repo = "maddy";
rev = "v${version}";
sha256 = "sha256-cR5qRUYQnFfm+ZOwwwNNRo1odq/ntI2QlGmhJBTjaF4=";
};
vendorHash = "sha256-YbXhxcRDTkNDdlCAKtQS2G8fwRIrRGpouIYx+5RG2lY=";
tags = [ "libpam" ];
ldflags = [
"-s"
"-w"
"-X github.com/foxcpp/maddy.Version=${version}"
];
subPackages = [ "cmd/maddy" ];
buildInputs = [ pam ];
nativeBuildInputs = [
installShellFiles
scdoc
];
postInstall = ''
for f in docs/man/*.scd; do
local page="docs/man/$(basename "$f" .scd)"
scdoc < "$f" > "$page"
installManPage "$page"
done
ln -s "$out/bin/maddy" "$out/bin/maddyctl"
mkdir -p $out/lib/systemd/system
substitute dist/systemd/maddy.service $out/lib/systemd/system/maddy.service \
--replace "/usr/local/bin/maddy" "$out/bin/maddy" \
--replace "/bin/kill" "${coreutils}/bin/kill"
substitute dist/systemd/maddy@.service $out/lib/systemd/system/maddy@.service \
--replace "/usr/local/bin/maddy" "$out/bin/maddy" \
--replace "/bin/kill" "${coreutils}/bin/kill"
'';
env.NIX_CFLAGS_COMPILE = lib.optionalString stdenv.cc.isClang "-Wno-error=strict-prototypes";
passthru.tests.nixos = nixosTests.maddy;
meta = with lib; {
description = "Composable all-in-one mail server";
homepage = "https://maddy.email";
license = licenses.gpl3Plus;
maintainers = with maintainers; [ nickcao ];
};
}

View File

@@ -0,0 +1,62 @@
{
lib,
rustPlatform,
fetchFromGitHub,
pkg-config,
installShellFiles,
oniguruma,
rust-jemalloc-sys,
stdenv,
}:
rustPlatform.buildRustPackage (finalAttrs: {
pname = "mado";
version = "0.3.0";
src = fetchFromGitHub {
owner = "akiomik";
repo = "mado";
tag = "v${finalAttrs.version}";
hash = "sha256-wAuV4w0dKfUbJVLTdp59/u4y13SPy3wkRfTlpvyE/zY=";
};
cargoHash = "sha256-fkalUnPkjjzhLaACh+WQP4tG5VzZ7wmrh5T1DVgSDwM=";
nativeBuildInputs = [
pkg-config
installShellFiles
];
buildInputs = [
oniguruma
rust-jemalloc-sys
];
env = {
RUSTONIG_SYSTEM_LIBONIG = true;
};
postInstall = lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) ''
installShellCompletion --cmd mado \
--bash <($out/bin/mado generate-shell-completion bash) \
--zsh <($out/bin/mado generate-shell-completion zsh) \
--fish <($out/bin/mado generate-shell-completion fish)
'';
checkFlags = [
# # seem to be slightly broken inside of the build sandbox
"--skip=check_empty_stdin_with_file"
"--skip=check_stdin"
"--skip=check_stdin_with_file"
"--skip=generate_shell_completion_invalid"
"--skip=unknown_command"
];
meta = {
description = "Markdown linter written in Rust";
homepage = "https://github.com/akiomik/mado";
changelog = "https://github.com/akiomik/mado/blob/v${finalAttrs.version}/CHANGELOG.md";
license = lib.licenses.asl20;
maintainers = with lib.maintainers; [ jasonxue1 ];
mainProgram = "mado";
};
})

View File

@@ -0,0 +1,49 @@
{
lib,
stdenv,
buildGoModule,
fetchFromGitHub,
installShellFiles,
testers,
madonctl,
}:
buildGoModule rec {
pname = "madonctl";
version = "3.0.3";
src = fetchFromGitHub {
owner = "McKael";
repo = "madonctl";
rev = "v${version}";
hash = "sha256-R/es9QVTBpLiCojB/THWDkgQcxexyX/iH9fF3Q2tq54=";
};
vendorHash = null;
nativeBuildInputs = [ installShellFiles ];
ldflags = [
"-s"
"-w"
];
postInstall = lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) ''
installShellCompletion --cmd madonctl \
--bash <($out/bin/madonctl completion bash) \
--zsh <($out/bin/madonctl completion zsh)
'';
passthru.tests.version = testers.testVersion {
package = madonctl;
command = "madonctl version";
};
meta = with lib; {
description = "CLI for the Mastodon social network API";
homepage = "https://github.com/McKael/madonctl";
license = licenses.mit;
maintainers = [ ];
mainProgram = "madonctl";
};
}

View File

@@ -0,0 +1,58 @@
{
stdenv,
lib,
fetchurl,
makeWrapper,
git,
coreutils,
jdk,
gnuplot,
graphviz,
}:
stdenv.mkDerivation rec {
pname = "maelstrom";
version = "0.2.4";
src = fetchurl {
url = "https://github.com/jepsen-io/maelstrom/releases/download/v${version}/maelstrom.tar.bz2";
hash = "sha256-MB7HHWsSrw12XttBP1z1qhBGtWCb1OMTdqC1SVSOV5k=";
};
installPhase = ''
runHook preInstall
mkdir $out
cp -R lib $out/lib
# see https://github.com/jepsen-io/maelstrom/blob/b91beef83ee40add17dfe0baf2df272869e144cf/pkg/maelstrom
makeWrapper ${jdk}/bin/java $out/bin/maelstrom \
--add-flags -Djava.awt.headless=true \
--add-flags "-jar $out/lib/maelstrom.jar" \
--set PATH ${lib.makeBinPath runtimeDependencies}
runHook postInstall
'';
nativeBuildInputs = [
makeWrapper
];
runtimeDependencies = [
git
coreutils
jdk
gnuplot
graphviz
];
meta = {
description = "Workbench for writing toy implementations of distributed systems";
homepage = "https://github.com/jepsen-io/maelstrom";
changelog = "https://github.com/jepsen-io/maelstrom/releases/tag/${version}";
mainProgram = "maelstrom";
sourceProvenance = [ lib.sourceTypes.binaryBytecode ];
license = lib.licenses.epl10;
maintainers = [ lib.maintainers.emilioziniades ];
platforms = lib.platforms.linux ++ lib.platforms.darwin;
};
}

View File

@@ -0,0 +1,12 @@
diff --git a/Maelstrom-netd.c b/Maelstrom-netd.c
index 3e6e942..41ed9a5 100644
--- a/Maelstrom-netd.c
+++ b/Maelstrom-netd.c
@@ -13,6 +13,7 @@
#include <arpa/inet.h>
#include <netdb.h>
#include <unistd.h>
+#include <time.h>
/* We wait in a loop for players to connect and tell us how many people
are playing. Then, once all players have connected, then we broadcast

View File

@@ -0,0 +1,32 @@
diff --git a/fastrand.cpp b/fastrand.cpp
index 3714f02..d1cf224 100644
--- a/fastrand.cpp
+++ b/fastrand.cpp
@@ -30,10 +30,10 @@ Uint32 GetRandSeed(void)
Uint16 FastRandom(Uint16 range)
{
Uint16 result;
- register Uint32 calc;
- register Uint32 regD0;
- register Uint32 regD1;
- register Uint32 regD2;
+ Uint32 calc;
+ Uint32 regD0;
+ Uint32 regD1;
+ Uint32 regD2;
#ifdef SERIOUS_DEBUG
fprintf(stderr, "FastRandom(%hd) Seed in: %lu ", range, randomSeed);
diff --git a/screenlib/SDL_FrameBuf.cpp b/screenlib/SDL_FrameBuf.cpp
index 2f7b44c..c8e394b 100644
--- a/screenlib/SDL_FrameBuf.cpp
+++ b/screenlib/SDL_FrameBuf.cpp
@@ -555,7 +555,7 @@ static inline void memswap(Uint8 *dst, Uint8 *src, Uint8 len)
}
#else
/* Swap two buffers using a temporary variable */
- register Uint8 tmp;
+ Uint8 tmp;
while ( len-- ) {
tmp = *dst;

View File

@@ -0,0 +1,42 @@
diff -Naur Maelstrom-3.0.7/buttonlist.h Maelstrom-3.0.7-patched/buttonlist.h
--- Maelstrom-3.0.7/buttonlist.h 2000-01-25 11:41:32.000000000 -0500
+++ Maelstrom-3.0.7-patched/buttonlist.h 2021-02-22 08:34:01.000000000 -0500
@@ -16,7 +16,7 @@
void Add_Button(Uint16 x, Uint16 y, Uint16 width, Uint16 height,
void (*callback)(void)) {
- struct button *belem;
+ button *belem;
for ( belem=&button_list; belem->next; belem=belem->next );
belem->next = new button;
@@ -30,7 +30,7 @@
}
void Activate_Button(Uint16 x, Uint16 y) {
- struct button *belem;
+ button *belem;
for ( belem=button_list.next; belem; belem=belem->next ) {
if ( (x >= belem->x1) && (x <= belem->x2) &&
@@ -42,7 +42,7 @@
}
void Delete_Buttons(void) {
- struct button *belem, *btemp;
+ button *belem, *btemp;
for ( belem=button_list.next; belem; ) {
btemp = belem;
diff -Naur Maelstrom-3.0.7/main.cpp Maelstrom-3.0.7-patched/main.cpp
--- Maelstrom-3.0.7/main.cpp 2021-02-04 11:50:27.000000000 -0500
+++ Maelstrom-3.0.7-patched/main.cpp 2021-02-22 08:34:34.000000000 -0500
@@ -153,7 +153,7 @@
error("or\n");
error("Usage: %s <options>\n\n", progname);
error("Where <options> can be any of:\n\n"
-" -fullscreen # Run Maelstrom in full-screen mode\n"
+" -windowed # Run Maelstrom in windowed mode\n"
" -gamma [0-8] # Set the gamma correction\n"
" -volume [0-8] # Set the sound volume\n"
" -netscores # Use the world-wide network score server\n"

View File

@@ -0,0 +1,56 @@
{
lib,
stdenv,
fetchurl,
makeDesktopItem,
SDL2,
SDL2_net,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "maelstrom";
version = "3.0.7";
src = fetchurl {
url = "http://www.libsdl.org/projects/Maelstrom/src/Maelstrom-${finalAttrs.version}.tar.gz";
sha256 = "0dm0m5wd7amrsa8wnrblkv34sq4v4lglc2wfx8klfkdhyhi06s4k";
};
patches = [
# this fixes a typedef compilation error with gcc-3.x
./fix-compilation.patch
# removes register keyword
./c++17-fixes.diff
# fix build with gcc14
./add-maelstrom-netd-include-time.diff
];
buildInputs = [
SDL2
SDL2_net
];
postInstall = ''
mkdir -p $out/bin
ln -s $out/games/Maelstrom/Maelstrom $out/bin/maelstrom
'';
desktopItems = [
(makeDesktopItem {
name = "maelstrom";
exec = "maelstrom";
desktopName = "Maelstrom";
genericName = "Maelstrom";
comment = "An arcade-style game resembling Asteroids";
categories = [ "Game" ];
})
];
meta = {
description = "Arcade-style game resembling Asteroids";
mainProgram = "maelstrom";
license = lib.licenses.gpl2Plus;
platforms = lib.platforms.all;
maintainers = with lib.maintainers; [ tmountain ];
};
})

View File

@@ -0,0 +1,34 @@
{
fetchFromGitHub,
lib,
stdenv,
boost,
zlib,
cmake,
}:
stdenv.mkDerivation rec {
pname = "maeparser";
version = "1.3.3";
src = fetchFromGitHub {
owner = "schrodinger";
repo = "maeparser";
rev = "v${version}";
sha256 = "sha256-xRyf/n8ezmMPMhlQFapVpnT2LReLe7spXB9jFC+VPRA=";
};
nativeBuildInputs = [ cmake ];
buildInputs = [
boost
zlib
];
meta = with lib; {
homepage = "https://github.com/schrodinger/maeparser";
description = "Maestro file parser";
maintainers = [ maintainers.rmcgibbo ];
license = licenses.mit;
platforms = platforms.unix;
};
}

View File

@@ -0,0 +1,57 @@
{
lib,
stdenv,
fetchurl,
unzip,
makeWrapper,
jre_headless,
writeScript,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "maestro";
version = "2.0.3";
src = fetchurl {
url = "https://github.com/mobile-dev-inc/maestro/releases/download/cli-${finalAttrs.version}/maestro.zip";
hash = "sha256-J15cSuxSVOyPLEPPVAbL35/JTbBRlb8+1bA9QE3eNeQ=";
};
dontUnpack = true;
nativeBuildInputs = [
unzip
makeWrapper
];
installPhase = ''
mkdir $out
unzip $src -d $out
mv $out/maestro/* $out
rm -rf $out/maestro
'';
postFixup = ''
wrapProgram $out/bin/maestro --prefix PATH : "${lib.makeBinPath [ jre_headless ]}"
'';
passthru.updateScript = writeScript "update-maestro" ''
#!/usr/bin/env nix-shell
#!nix-shell -i bash -p curl jq common-updater-scripts
set -o errexit -o nounset -o pipefail
NEW_VERSION=$(curl --silent https://api.github.com/repos/mobile-dev-inc/maestro/releases | jq 'first(.[].tag_name | ltrimstr("cli-") | select(contains("dev.") | not))' --raw-output)
update-source-version "maestro" "$NEW_VERSION" --print-changes
'';
meta = with lib; {
description = "Mobile UI Automation tool";
homepage = "https://maestro.mobile.dev/";
license = licenses.asl20;
platforms = lib.platforms.all;
sourceProvenance = [ lib.sourceTypes.binaryNativeCode ];
changelog = "https://github.com/mobile-dev-inc/maestro/blob/main/CHANGELOG.md";
maintainers = with maintainers; [ SubhrajyotiSen ];
mainProgram = "maestro";
};
})

View File

@@ -0,0 +1,55 @@
{
lib,
stdenv,
fetchFromGitLab,
runCommand,
mafft,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "mafft";
version = "7.526";
src = fetchFromGitLab {
owner = "sysimm";
repo = "mafft";
rev = "v${finalAttrs.version}";
hash = "sha256-VNe00r12qEkLEbpZdJCe5xZ73JA3uAmuAeG+eSeRDI0=";
};
preBuild = ''
cd ./core
make clean
'';
makeFlags = [
"CC=${stdenv.cc.targetPrefix}cc"
"PREFIX=$(out)"
];
passthru.tests = {
simple = runCommand "${finalAttrs.pname}-test" { } ''
mkdir $out
cd ${finalAttrs.src}/test
${lib.getExe mafft} sample > $out/test.fftns2
${lib.getExe mafft} --maxiterate 100 sample > $out/test.fftnsi
${lib.getExe mafft} --globalpair sample > $out/test.gins1
${lib.getExe mafft} --globalpair --maxiterate 100 sample > $out/test.ginsi
${lib.getExe mafft} --localpair sample > $out/test.lins1
${lib.getExe mafft} --localpair --maxiterate 100 sample > $out/test.linsi
diff $out/test.fftns2 sample.fftns2
diff $out/test.fftnsi sample.fftnsi
diff $out/test.gins1 sample.gins1
diff $out/test.ginsi sample.ginsi
diff $out/test.lins1 sample.lins1
'';
};
meta = with lib; {
description = "Multiple alignment program for amino acid or nucleotide sequences";
homepage = "https://mafft.cbrc.jp/alignment/software/";
license = licenses.bsd3;
maintainers = with maintainers; [ natsukium ];
platforms = platforms.unix;
};
})

View File

@@ -0,0 +1,35 @@
{
buildGoModule,
fetchFromGitHub,
lib,
}:
buildGoModule rec {
pname = "mage";
version = "1.15.0";
src = fetchFromGitHub {
owner = "magefile";
repo = "mage";
rev = "v${version}";
sha256 = "sha256-aZPv3+F4VMiThjR0nFP+mKQLI9zKj2jaOawClROnT34=";
};
vendorHash = null;
doCheck = false;
ldflags = [
"-X github.com/magefile/mage/mage.commitHash=v${version}"
"-X github.com/magefile/mage/mage.gitTag=v${version}"
"-X github.com/magefile/mage/mage.timestamp=1970-01-01T00:00:00Z"
];
meta = with lib; {
description = "Make/Rake-like Build Tool Using Go";
mainProgram = "mage";
homepage = "https://magefile.org/";
license = licenses.asl20;
maintainers = with maintainers; [ swdunlop ];
};
}

View File

@@ -0,0 +1,59 @@
{
lib,
stdenvNoCC,
fetchurl,
makeBinaryWrapper,
php,
writableTmpDirAsHomeHook,
versionCheckHook,
}:
stdenvNoCC.mkDerivation (finalAttrs: {
pname = "magento-cloud";
version = "1.46.1";
src = fetchurl {
url = "https://accounts.magento.cloud/sites/default/files/magento-cloud-v${finalAttrs.version}.phar";
hash = "sha256-QrrD5pz6Juov1u3QYcuLr6aEKe/4DX5wFKs+hp6KjJ8=";
};
dontUnpack = true;
dontBuild = true;
dontConfigure = true;
nativeBuildInputs = [ makeBinaryWrapper ];
installPhase = ''
runHook preInstall
mkdir -p $out/bin
install -D ${finalAttrs.src} $out/libexec/magento-cloud/magento-cloud.phar
makeWrapper ${lib.getExe php} $out/bin/magento-cloud \
--add-flags "$out/libexec/magento-cloud/magento-cloud.phar"
runHook postInstall
'';
nativeInstallCheckInputs = [
writableTmpDirAsHomeHook
versionCheckHook
];
doInstallCheck = true;
versionCheckProgramArg = "--version";
versionCheckKeepEnvironment = [ "HOME" ];
passthru = {
updateScript = ./update.sh;
};
meta = {
homepage = "https://experienceleague.adobe.com/en/docs/commerce-cloud-service/user-guide/dev-tools/cloud-cli/cloud-cli-overview";
description = "Adobe Commerce Cloud CLI";
longDescription = ''
Adobe Commerce Cloud CLI enables developers and system administrators the ability to manage Cloud projects and environments, perform routines and run automation tasks locally.
'';
mainProgram = "magento-cloud";
maintainers = with lib.maintainers; [ piotrkwiecinski ];
license = lib.licenses.unfree;
};
})

View File

@@ -0,0 +1,6 @@
#!/usr/bin/env nix-shell
#!nix-shell --pure -i bash -p bash curl jq nix-update cacert git
set -euo pipefail
new_version="$(curl https://accounts.magento.cloud/cli/manifest.json | jq --raw-output .[0].version)"
nix-update magento-cloud --version "$new_version"

View File

@@ -0,0 +1,40 @@
{
fetchFromGitHub,
lib,
stdenv,
cmake,
nix-update-script,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "magic-enum";
version = "0.9.7";
src = fetchFromGitHub {
owner = "Neargye";
repo = "magic_enum";
tag = "v${finalAttrs.version}";
hash = "sha256-P6fl/dcGOSE1lTJwZlimbvsTPelHwdQdZr18H4Zji20=";
};
nativeBuildInputs = [ cmake ];
cmakeFlags = [
# the cmake package does not handle absolute CMAKE_INSTALL_INCLUDEDIR correctly
# (setting it to an absolute path causes include files to go to $out/$out/include,
# because the absolute path is interpreted with root at $out).
(lib.cmakeFeature "CMAKE_INSTALL_INCLUDEDIR" "include")
(lib.cmakeFeature "CMAKE_INSTALL_LIBDIR" "lib")
];
passthru = {
updateScript = nix-update-script { };
};
meta = {
description = "Static reflection for enums (to string, from string, iteration) for modern C++";
homepage = "https://github.com/Neargye/magic_enum";
changelog = "https://github.com/Neargye/magic_enum/releases/tag/v${finalAttrs.version}";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ Alper-Celik ];
};
})

View File

@@ -0,0 +1,99 @@
{
lib,
stdenv,
fetchFromGitHub,
git,
python3,
m4,
cairo,
libX11,
mesa,
mesa_glu,
ncurses,
tcl,
tcsh,
tk,
fixDarwinDylibNames,
}:
stdenv.mkDerivation rec {
pname = "magic-vlsi";
version = "8.3.555";
src = fetchFromGitHub {
owner = "RTimothyEdwards";
repo = "magic";
tag = "${version}";
sha256 = "sha256-O/W2gWdL4z7JSAv+ZvTkQ6ApKLhrg4UwGde68qSwq3c=";
leaveDotGit = true;
};
nativeBuildInputs = [
python3
git
]
++ lib.optionals stdenv.hostPlatform.isDarwin [
fixDarwinDylibNames
];
buildInputs = [
cairo
libX11
m4
mesa
mesa_glu
ncurses
tcl
tcsh
tk
];
enableParallelBuilding = true;
configureFlags = [
"--with-tcl=${tcl}"
"--with-tk=${tk}"
"--disable-werror"
];
postPatch = ''
patchShebangs scripts/*
'';
postInstall = ''
# Fix necessary files missing in sys directory
mkdir -p $out/lib/magic/sys
shopt -s nullglob
for techfile in scmos/*.tech; do
install -Dm644 "$techfile" $out/lib/magic/sys/$(basename "$techfile")
done
for dstylefile in scmos/*.dstyle; do
install -Dm644 "$dstylefile" $out/lib/magic/sys/$(basename "$dstylefile")
done
for cmapfile in scmos/*.cmap; do
install -Dm644 "$cmapfile" $out/lib/magic/sys/$(basename "$cmapfile")
done
'';
postFixup = lib.optionalString stdenv.hostPlatform.isDarwin ''
# Fix dylib paths on macOS
install_name_tool -add_rpath ${mesa.out}/lib $out/lib/magic/tcl/tclmagic.dylib
install_name_tool -add_rpath ${mesa_glu.out}/lib $out/lib/magic/tcl/tclmagic.dylib
install_name_tool -add_rpath ${mesa.out}/lib $out/lib/magic/tcl/magicexec
install_name_tool -add_rpath ${mesa_glu.out}/lib $out/lib/magic/tcl/magicexec
'';
env.NIX_CFLAGS_COMPILE = "-Wno-implicit-function-declaration";
env.NIX_LDFLAGS = lib.optionalString stdenv.hostPlatform.isDarwin "-headerpad_max_install_names";
meta = with lib; {
description = "VLSI layout tool written in Tcl";
homepage = "http://opencircuitdesign.com/magic/";
license = licenses.mit;
maintainers = with maintainers; [ thoughtpolice ];
};
}

View File

@@ -0,0 +1,44 @@
{
lib,
stdenv,
fetchFromGitHub,
rustPlatform,
libxcb,
installShellFiles,
}:
rustPlatform.buildRustPackage rec {
pname = "magic-wormhole-rs";
version = "0.7.6";
src = fetchFromGitHub {
owner = "magic-wormhole";
repo = "magic-wormhole.rs";
rev = version;
sha256 = "sha256-01u1DJNd/06q9dH/Y4E5kj5gb2CA7EKdoPtMhzCLtso=";
};
cargoHash = "sha256-sZuvhJWgBlptfgsKglWvL6oxK5W3y2x0Gwf+r2pNRi8=";
buildInputs = lib.optionals (!stdenv.hostPlatform.isDarwin) [ libxcb ];
nativeBuildInputs = [ installShellFiles ];
postInstall = lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) ''
installShellCompletion --cmd wormhole-rs \
--bash <($out/bin/wormhole-rs completion bash) \
--fish <($out/bin/wormhole-rs completion fish) \
--zsh <($out/bin/wormhole-rs completion zsh)
'';
meta = {
description = "Rust implementation of Magic Wormhole, with new features and enhancements";
homepage = "https://github.com/magic-wormhole/magic-wormhole.rs";
changelog = "https://github.com/magic-wormhole/magic-wormhole.rs/raw/${version}/changelog.md";
license = lib.licenses.eupl12;
maintainers = with lib.maintainers; [
zeri
piegames
];
mainProgram = "wormhole-rs";
};
}

View File

@@ -0,0 +1,52 @@
--- a/CMakeLists.txt 2022-10-20 17:03:52.000000000 +0200
+++ b/CMakeLists.txt 2024-09-05 21:39:27.172090291 +0200
@@ -98,7 +98,9 @@
src/magencd.c
src/rp2mag.c
src/utils.c
- src/rp2mag_encode.c)
+ src/rp2mag_encode.c
+ src/commandmb1.c
+ src/command_helper.c)
target_compile_options(rastertoultra PRIVATE ${CUPS_CFLAGS})
target_link_libraries(rastertoultra ${CUPS_LIBS})
@@ -164,38 +166,3 @@
)
set(CPACK_VERBATIM_VARIABLES YES)
include(CPack)
-
-## TESTS
-
-add_subdirectory(test/unity EXCLUDE_FROM_ALL)
-add_executable(test_rp2_mag EXCLUDE_FROM_ALL test/test_rp2_mag.c
- src/rp2mag.c
- src/rp2mag_encode.c
- src/utils.c)
-target_compile_definitions(test_rp2_mag PRIVATE TEST)
-target_include_directories(test_rp2_mag PRIVATE src)
-target_link_libraries(test_rp2_mag unity)
-
-add_executable(test_dpi EXCLUDE_FROM_ALL test/test_dpi.c
- src/rastertoultra.c
- src/utils.c
- src/crc32.c
- src/rp2mag.c
- src/colrmtch.c
- src/rp2mag_encode.c
- src/magencd.c
- src/colour-profiles/magir2x.c
- src/colour-profiles/magiox.c
- src/colour-profiles/magiry.c)
-target_include_directories(test_dpi PRIVATE src)
-target_compile_definitions(test_dpi PRIVATE TEST)
-target_compile_options(test_dpi PRIVATE -Wno-unused-function)
-target_link_libraries(test_dpi unity m ${CUPS_LIBS})
-
-enable_testing()
-add_test(test_rp2_mag test_rp2_mag)
-add_test(test_dpi test_dpi)
-
-# Autotools-style "make check" command
-add_custom_target(check COMMAND ${CMAKE_CTEST_COMMAND})
-add_dependencies(check test_rp2_mag test_dpi)

View File

@@ -0,0 +1,78 @@
{
stdenv,
lib,
fetchzip,
cmake,
cups,
}:
stdenv.mkDerivation rec {
pname = "magicard-cups-driver";
version = "1.4.0";
src = fetchzip {
# https://support.magicard.com/solution/linux-driver/
url = "https://f08ddbe93aa02eaf9a6c-f08cd513e3a8c914f4f8f62af1786149.ssl.cf3.rackcdn.com/magicard_ltd-linux_driver-${version}.tar.gz";
hash = "sha256-1k2Twn1JBizw/tzQ0xF1uJIecblRd6VurB7FAUop5F0=";
};
src_v1_3_4 = fetchzip {
url = "https://techs.magicard.com/linux/v1.3.4/magicard_ltd-linux_driver-1.3.4.tar.gz";
hash = "sha256-6UIL2wyFOjOJeyGjYScfjbpURycN469raye6DnP19jg=";
};
nativeBuildInputs = [ cmake ];
buildInputs = [ cups ];
# Replace the supplied cmake generated makefile (which is useless on a different machine)
# with the CMakeLists.txt taken from v1.3.4 of the driver and patch it to make it compatible with v1.4.0
prePatch = ''
cp ${src_v1_3_4}/CMakeLists.txt CMakeLists.txt
rm makefile
'';
patches = [ ./CMakeLists.patch ];
cmakeFlags = [
"-DCUPS_SERVER_BIN=lib/cups"
"-DCUPS_DATA_DIR=share/cups"
];
meta = {
description = "CUPS driver for Magicard Printers";
longDescription = ''
This driver supports Magicard printers and rebrands sold at least under the following brands:
- Aisino
- AlphaCard
- BOOD
- Brady
- Cardmaker
- Centena
- DTP
- Digital ID
- DoH
- Elliaden
- Fagoo
- Goodcard
- Gudecard
- IDentilam
- IDville
- ilinkcard
- Intersider
- Magicard
- Orphicard
- PPC ID
- Polaroid
- PriceCardPro
- Pridento
- ScreenCheck
- Titan
- Ying
'';
homepage = "https://support.magicard.com/solution/linux-driver/";
license = lib.licenses.gpl2Plus;
platforms = lib.platforms.linux;
maintainers = with lib.maintainers; [ _0x3f ];
};
}

View File

@@ -0,0 +1,42 @@
{
lib,
stdenv,
fetchFromGitHub,
fetchpatch,
gdbm, # ndbm.h for dupemap binary
perl,
}:
stdenv.mkDerivation {
pname = "magicrescue";
version = "1.1.10-unstable-2021-09-12";
src = fetchFromGitHub {
owner = "jbj";
repo = "magicrescue";
rev = "d9a57931d437674009bfd2f98451b3d71058eade";
hash = "sha256-jVBzsa39TQjeDZ4zuXn3UA+4WectjNRwPNb1AkLuIbg=";
};
patches = [
# Add PERL as processor for file.
(fetchpatch {
url = "https://salsa.debian.org/pkg-security-team/magicrescue/-/raw/6331d088a159ae21ad4ab5f18b9bf892ebe18ce3/debian/patches/020_add-Perl-preprocessor.patch";
hash = "sha256-XX3Rlv/qKB2y/csuaPiliv4cu9KKHNpG/E88VSVP0sg=";
})
];
buildInputs = [
gdbm
perl
];
meta = with lib; {
description = "Find and recover deleted files on block devices";
mainProgram = "magicrescue";
homepage = "https://github.com/jbj/magicrescue";
maintainers = with maintainers; [ d3vil0p3r ];
platforms = platforms.unix;
license = licenses.gpl2Plus;
};
}

View File

@@ -0,0 +1,403 @@
{
autoPatchelfHook,
blas,
cmake,
cudaPackages,
cudaSupport ? config.cudaSupport,
fetchpatch,
fetchurl,
gfortran,
gpuTargets ? [ ], # Non-CUDA targets, that is HIP
rocmPackages,
lapack,
lib,
libpthreadstubs,
ninja,
python3,
config,
# At least one back-end has to be enabled,
# and we can't default to CUDA since it's unfree
rocmSupport ? !cudaSupport,
runCommand,
static ? stdenv.hostPlatform.isStatic,
stdenv,
writeShellApplication,
}:
let
inherit (lib)
getLib
lists
strings
trivial
;
inherit (cudaPackages) cudaAtLeast flags cudaOlder;
supportedGpuTargets = [
"700"
"701"
"702"
"703"
"704"
"705"
"801"
"802"
"803"
"805"
"810"
"900"
"902"
"904"
"906"
"908"
"909"
"90c"
"1010"
"1011"
"1012"
"1030"
"1031"
"1032"
"1033"
];
# NOTE: The lists.subtractLists function is perhaps a bit unintuitive. It subtracts the elements
# of the first list *from* the second list. That means:
# lists.subtractLists a b = b - a
# For ROCm
# NOTE: The hip.gpuTargets are prefixed with "gfx" instead of "sm" like flags.realArches.
# For some reason, Magma's CMakeLists.txt file does not handle the "gfx" prefix, so we must
# remove it.
rocmArches = lists.map (x: strings.removePrefix "gfx" x) rocmPackages.clr.gpuTargets;
supportedRocmArches = lists.intersectLists rocmArches supportedGpuTargets;
unsupportedRocmArches = lists.subtractLists supportedRocmArches rocmArches;
supportedCustomGpuTargets = lists.intersectLists gpuTargets supportedGpuTargets;
unsupportedCustomGpuTargets = lists.subtractLists supportedCustomGpuTargets gpuTargets;
# Use trivial.warnIf to print a warning if any unsupported GPU targets are specified.
gpuArchWarner =
supported: unsupported:
trivial.throwIf (supported == [ ]) (
"No supported GPU targets specified. Requested GPU targets: "
+ strings.concatStringsSep ", " unsupported
) supported;
gpuTargetString = strings.concatStringsSep "," (
if gpuTargets != [ ] then
# If gpuTargets is specified, it always takes priority.
gpuArchWarner supportedCustomGpuTargets unsupportedCustomGpuTargets
else if rocmSupport then
gpuArchWarner supportedRocmArches unsupportedRocmArches
else if cudaSupport then
[ ] # It's important we pass explicit -DGPU_TARGET to reset magma's defaults
else
throw "No GPU targets specified"
);
cudaArchitecturesString = flags.cmakeCudaArchitecturesString;
minArch =
let
# E.g. [ "80" "86" "90" ]
cudaArchitectures = (map flags.dropDots flags.cudaCapabilities);
minArch' = builtins.head (builtins.sort strings.versionOlder cudaArchitectures);
in
# "75" -> "750" Cf. https://github.com/icl-utk-edu/magma/blob/v2.9.0/CMakeLists.txt#L200-L201
"${minArch'}0";
in
assert (builtins.match "[^[:space:]]*" gpuTargetString) != null;
stdenv.mkDerivation (finalAttrs: {
pname = "magma";
version = "2.9.0";
src = fetchurl {
url = "https://icl.cs.utk.edu/projectsfiles/magma/downloads/magma-${finalAttrs.version}.tar.gz";
hash = "sha256-/3f9Nyaz3+w7+1V5CwZICqXMOEOWwts1xW/a5KgsZBw=";
};
# Magma doesn't have anything which could be run under doCheck, but it does build test suite executables.
# These are moved to $test/bin/ and $test/lib/ in postInstall.
outputs = [
"out"
"test"
];
patches = [
(fetchpatch {
# [PATCH] Drop CMP0037 to fix cmake 4.0 build error
name = "drop-cmp0037-old.patch";
url = "https://github.com/icl-utk-edu/magma/commit/2fecaf3f0c811344363f713669c1fe30f6879acd.patch";
hash = "sha256-Dfzq2gqoLSByCLWV5xvY/lXZeVa/yQ67lDSoIAa9jUU=";
})
];
postPatch = ''
# For rocm version script invoked by cmake
patchShebangs tools/
# Fixup for the python test runners
patchShebangs ./testing/run_{tests,summarize}.py
'';
nativeBuildInputs = [
autoPatchelfHook
cmake
ninja
gfortran
]
++ lists.optionals cudaSupport [
cudaPackages.cuda_nvcc
];
buildInputs = [
libpthreadstubs
lapack
blas
python3
(getLib gfortran.cc) # libgfortran.so
]
++ lists.optionals cudaSupport (
with cudaPackages;
[
cuda_cccl # <nv/target> and <cuda/std/type_traits>
cuda_cudart # cuda_runtime.h
libcublas # cublas_v2.h
libcusparse # cusparse.h
cuda_profiler_api # <cuda_profiler_api.h>
]
)
++ lists.optionals rocmSupport (
with rocmPackages;
[
clr
hipblas
hipsparse
llvm.openmp
]
);
env.CFLAGS = "-DADD_" + lib.optionalString rocmSupport " -fopenmp";
env.CXXFLAGS = finalAttrs.env.CFLAGS;
env.FFLAGS = "-DADD_";
cmakeFlags = [
(strings.cmakeFeature "GPU_TARGET" gpuTargetString)
(strings.cmakeBool "MAGMA_ENABLE_CUDA" cudaSupport)
(strings.cmakeBool "MAGMA_ENABLE_HIP" rocmSupport)
(strings.cmakeBool "BUILD_SHARED_LIBS" (!static))
# Set the Fortran name mangling scheme explicitly. We must set FORTRAN_CONVENTION manually because it will
# otherwise not be set in NVCC_FLAGS or DEVCCFLAGS (which we cannot modify).
# See https://github.com/NixOS/nixpkgs/issues/281656#issuecomment-1902931289
(strings.cmakeBool "USE_FORTRAN" true)
]
++ lists.optionals cudaSupport [
(strings.cmakeFeature "CMAKE_CUDA_ARCHITECTURES" cudaArchitecturesString)
(strings.cmakeFeature "MIN_ARCH" minArch) # Disarms magma's asserts
]
++ lists.optionals rocmSupport [
# Can be removed once https://github.com/icl-utk-edu/magma/pull/27 is merged
# Can't easily apply the PR as a patch because we rely on the tarball with pregenerated
# hipified files ∴ fetchpatch of the PR will apply cleanly but fail to build
(strings.cmakeFeature "ROCM_CORE" "${rocmPackages.clr}")
(strings.cmakeFeature "CMAKE_C_COMPILER" "${rocmPackages.clr}/bin/clang")
(strings.cmakeFeature "CMAKE_CXX_COMPILER" "${rocmPackages.clr}/bin/clang++")
];
# Magma doesn't have a test suite we can easily run, just loose executables, all of which require a GPU.
doCheck = false;
# Copy the files to the test output and fix the RPATHs.
postInstall =
# NOTE: The python scripts aren't copied by CMake into the build directory, so we must copy them from the source.
# TODO(@connorbaker): This should be handled by having CMakeLists.txt install them, but such a patch is
# out of the scope of the PR which introduces the `test` output: https://github.com/NixOS/nixpkgs/pull/283777.
# See https://github.com/NixOS/nixpkgs/pull/283777#discussion_r1482125034 for more information.
# Such work is tracked by https://github.com/NixOS/nixpkgs/issues/296286.
''
install -Dm755 ../testing/run_{tests,summarize}.py -t "$test/bin/"
''
# Copy core test executables and libraries over to the test output.
# NOTE: Magma doesn't provide tests for sparse solvers for ROCm, but it does for CUDA -- we put them both in the same
# install command to avoid the case where a glob would fail to find any files and cause the install command to fail
# because it has no files to install.
+ ''
install -Dm755 ./testing/testing_* ./sparse/testing/testing_* -t "$test/bin/"
install -Dm755 ./lib/lib*test*.* -t "$test/lib/"
''
# All of the test executables and libraries will have a reference to the build directory in their RPATH, which we
# must remove. We do this by shrinking the RPATH to only include the Nix store. The autoPatchelfHook will take care
# of supplying the correct RPATH for needed libraries (like `libtester.so`).
+ ''
find "$test" -type f -exec \
patchelf \
--shrink-rpath \
--allowed-rpath-prefixes "$NIX_STORE" \
{} \;
'';
passthru = {
inherit
cudaPackages
cudaSupport
rocmSupport
gpuTargets
;
testers = {
all =
let
magma = finalAttrs.finalPackage;
in
writeShellApplication {
derivationArgs = {
__structuredAttrs = true;
strictDeps = true;
};
name = "magma-testers-all";
text = ''
logWithDate() {
printf "%s: %s\n" "$(date --utc --iso-8601=seconds)" "$*"
}
isIgnoredTest() {
case $1 in
# Skip the python scripts
*.py) return 0 ;;
# These test require files, so we skip them
testing_?io) ;&
testing_?madd) ;&
testing_?matrix) ;&
testing_?matrixcapcup) ;&
testing_?matrixinfo) ;&
testing_?mcompressor) ;&
testing_?mconverter) ;&
testing_?preconditioner) ;&
testing_?solver) ;&
testing_?solver_rhs) ;&
testing_?solver_rhs_scaling) ;&
testing_?sort) ;&
testing_?spmm) ;&
testing_?spmv) ;&
testing_?spmv_check) ;&
testing_?sptrsv) ;&
testing_dsspmv_mixed) ;&
testing_zcspmv_mixed)
logWithDate "skipping $1 because it requires input"
return 0
;;
# These test require outputing to files, so we skip them
testing_?print)
logWithDate "skipping $1 because it requires creating output"
return 0
;;
# These test succeed but exit with a non-zero code
testing_[cdz]gglse) ;&
testing_sgemm_fp16)
logWithDate "skipping $1 because has a non-zero exit code"
return 0
;;
# These test have memory freeing/allocation errors:
testing_?mdotc)
logWithDate "skipping $1 because it fails to allocate or free memory"
return 0
;;
# Test is not ignored otherwise.
*) return 1 ;;
esac
}
runTests() {
local -nr outputArray="$1"
local -i programExitCode=0
local file
# TODO: Collect and sort filenames prior to iterating so the order isn't dependent on the filesystem.
for file in "${magma.test}"/bin/*; do
if isIgnoredTest "$(basename "$file")"; then
continue
fi
logWithDate "Starting $file"
# Since errexit is set, we need to reset programExitCode every iteration and use an OR
# to set it only when the test fails (which should not fail, avoiding tripping errexit).
programExitCode=0
# A number of test cases require an input <=128, so we set the range to include [128, 1024].
# Batch is kept small to keep tests fast.
"$file" --range 128:1024:896 --batch 32 || programExitCode=$?
logWithDate "Finished $file with exit code $programExitCode"
if ((programExitCode)); then
outputArray+=("$file")
fi
done
}
main() {
local -a failedPrograms=()
runTests failedPrograms
if ((''${#failedPrograms[@]})); then
logWithDate "The following programs had non-zero exit codes:"
for file in "''${failedPrograms[@]}"; do
# Using echo to avoid printing the date
echo "- $file"
done
logWithDate "Exiting with code 1 because at least one test failed."
exit 1
fi
logWithDate "All tests passed!"
exit 0
}
main
'';
runtimeInputs = [ magma.test ];
};
};
tests = {
all =
runCommand "magma-tests-all"
{
__structuredAttrs = true;
strictDeps = true;
nativeBuildInputs = [ finalAttrs.passthru.testers.all ];
requiredSystemFeatures = lib.optionals cudaSupport [ "cuda" ];
}
''
if magma-testers-all; then
touch "$out"
else
exit 1
fi
'';
};
};
meta = {
description = "Matrix Algebra on GPU and Multicore Architectures";
license = lib.licenses.bsd3;
homepage = "https://icl.utk.edu/magma/";
changelog = "https://github.com/icl-utk-edu/magma/blob/v${finalAttrs.version}/ReleaseNotes";
platforms = lib.platforms.linux;
maintainers = with lib.maintainers; [ connorbaker ];
# Cf. https://github.com/icl-utk-edu/magma/blob/v2.9.0/CMakeLists.txt#L24-L31
broken =
# dynamic CUDA support is broken https://github.com/NixOS/nixpkgs/issues/239237
(cudaSupport && !static)
|| !(cudaSupport || rocmSupport) # At least one back-end enabled
|| (cudaSupport && rocmSupport); # Mutually exclusive
};
})

View File

@@ -0,0 +1,111 @@
{
lib,
stdenv,
fetchFromGitHub,
gtk-engine-murrine,
jdupes,
sassc,
accent ? [ "default" ],
shade ? "dark",
size ? "standard",
tweaks ? [ ],
}:
let
validAccents = [
"default"
"purple"
"pink"
"red"
"orange"
"yellow"
"green"
"teal"
"grey"
"all"
];
validShades = [
"light"
"dark"
];
validSizes = [
"standard"
"compact"
];
validTweaks = [
"frappe"
"macchiato"
"black"
"float"
"outline"
"macos"
];
single = x: lib.optional (x != null) x;
pname = "Catppuccin-GTK";
in
lib.checkListOfEnum "${pname} Valid theme accent(s)" validAccents accent lib.checkListOfEnum
"${pname} Valid shades"
validShades
(single shade)
lib.checkListOfEnum
"${pname} Valid sizes"
validSizes
(single size)
lib.checkListOfEnum
"${pname} Valid tweaks"
validTweaks
tweaks
stdenv.mkDerivation
{
pname = "magnetic-${lib.toLower pname}";
version = "0-unstable-2025-04-25";
src = fetchFromGitHub {
owner = "Fausto-Korpsvart";
repo = "Catppuccin-GTK-Theme";
rev = "c961826d027ed93fae12a9a309616e36d140e6b9";
hash = "sha256-7F4FrhM+kBFPeLp2mjmYkoDiF9iKDUkC27LUBuFyz7g=";
};
nativeBuildInputs = [
jdupes
sassc
];
propagatedUserEnvPkgs = [ gtk-engine-murrine ];
postPatch = ''
find -name "*.sh" -print0 | while IFS= read -r -d ''' file; do
patchShebangs "$file"
done
'';
dontBuild = true;
installPhase = ''
runHook preInstall
mkdir -p $out/share/themes
./themes/install.sh \
--name ${pname} \
${toString (map (x: "--theme " + x) accent)} \
${lib.optionalString (shade != null) ("--color " + shade)} \
${lib.optionalString (size != null) ("--size " + size)} \
${toString (map (x: "--tweaks " + x) tweaks)} \
--dest $out/share/themes
jdupes --quiet --link-soft --recurse $out/share
runHook postInstall
'';
meta = {
description = "GTK Theme with Catppuccin colour scheme";
homepage = "https://github.com/Fausto-Korpsvart/Catppuccin-GTK-Theme";
license = lib.licenses.gpl3Only;
maintainers = with lib.maintainers; [ icy-thought ];
platforms = lib.platforms.all;
};
}

View File

@@ -0,0 +1,46 @@
{
lib,
stdenv,
fetchFromGitea,
buildGoModule,
nixosTests,
sqlite,
}:
buildGoModule rec {
pname = "magnetico";
version = "0.13.0";
src = fetchFromGitea {
domain = "maxwell.eurofusion.eu/git";
owner = "rnhmjoj";
repo = "magnetico";
rev = "v${version}";
hash = "sha256-TqzsgUSPIBQT+k+ZrJPkF7uIt8o018ZN5p8nHom8cXM=";
};
vendorHash = "sha256-ZUtmQib6BD7P07ALYXKp/JAQodYnQCuvWZnWl9888Mg=";
buildInputs = [ sqlite ];
tags = [
"fts5"
"libsqlite3"
];
ldflags = [
"-s"
"-w"
];
doCheck = !stdenv.hostPlatform.isStatic;
passthru.tests = { inherit (nixosTests) magnetico; };
meta = with lib; {
description = "Autonomous (self-hosted) BitTorrent DHT search engine suite";
homepage = "https://maxwell.eurofusion.eu/git/rnhmjoj/magnetico";
license = licenses.agpl3Only;
badPlatforms = platforms.darwin;
maintainers = with maintainers; [ rnhmjoj ];
};
}

View File

@@ -0,0 +1,44 @@
{
lib,
rustPlatform,
fetchFromGitHub,
pkg-config,
openssl,
versionCheckHook,
}:
rustPlatform.buildRustPackage (finalAttrs: {
pname = "mago";
version = "1.0.0-beta.14";
src = fetchFromGitHub {
owner = "carthage-software";
repo = "mago";
tag = finalAttrs.version;
hash = "sha256-UKoq4RkFcLS47DZHPY/MhrRuLQoWYLoOzO2BeeJZoQw=";
};
cargoHash = "sha256-/THZFU3lJbgJGA4lxWt6fyiHqIgQ539vj57iKoQfXZo=";
env = {
# Get openssl-sys to use pkg-config
OPENSSL_NO_VENDOR = 1;
};
nativeBuildInputs = [ pkg-config ];
buildInputs = [ openssl ];
doInstallCheck = true;
nativeInstallCheckInputs = [ versionCheckHook ];
versionCheckProgramArg = "--version";
meta = {
changelog = "https://github.com/carthage-software/mago/releases/tag/${finalAttrs.version}";
description = "Toolchain for PHP that aims to provide a set of tools to help developers write better code";
homepage = "https://github.com/carthage-software/mago";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ gaelreyrol ];
mainProgram = "mago";
};
})

View File

@@ -0,0 +1,188 @@
{
fetchFromGitHub,
runCommand,
lib,
fetchpatch,
stdenv,
pkg-config,
gnome-settings-daemon,
gettext,
gobject-introspection,
cairo,
colord,
lcms2,
pango,
json-glib,
libstartup_notification,
libcanberra,
ninja,
xvfb-run,
xkeyboard_config,
libxcvt,
libxkbfile,
libXdamage,
libxkbcommon,
libXtst,
libinput,
libdrm,
libgbm,
gsettings-desktop-schemas,
glib,
gtk3,
gnome-desktop,
pipewire,
libgudev,
libwacom,
mesa-gl-headers,
meson,
nix-update-script,
validatePkgConfig,
xorgserver,
python3,
wrapGAppsHook3,
gi-docgen,
sysprof,
testers,
libsysprof-capture,
desktop-file-utils,
libcap_ng,
graphene,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "magpie";
version = "0.9.4";
outputs = [
"out"
"dev"
"devdoc"
];
src = fetchFromGitHub {
owner = "BuddiesOfBudgie";
repo = "magpie";
rev = "v${finalAttrs.version}";
hash = "sha256-a8e0uzbS0HEH/0sOOnwIiQI0/BizKbpdlVdfb3IbmcU=";
};
patches = [
# Fix build with separate sysprof.
# https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2572
(fetchpatch {
url = "https://gitlab.gnome.org/GNOME/mutter/-/commit/285a5a4d54ca83b136b787ce5ebf1d774f9499d5.patch";
hash = "sha256-/npUE3idMSTVlFptsDpZmGWjZ/d2gqruVlJKq4eF4xU=";
})
];
mesonFlags = [
"-Degl_device=true"
"-Dprofiler=true"
"-Ddocs=true"
];
propagatedBuildInputs = [
# required for pkg-config to detect magpie-clutter
json-glib
libXtst
libcap_ng
graphene
mesa-gl-headers
];
nativeBuildInputs = [
desktop-file-utils
gettext
libxcvt
meson
ninja
xvfb-run
pkg-config
python3
validatePkgConfig
wrapGAppsHook3
gi-docgen
xorgserver
];
buildInputs = [
cairo
glib
gnome-desktop
gnome-settings-daemon
gobject-introspection
gsettings-desktop-schemas
gtk3
libcanberra
libdrm
libgbm
libgudev
libinput
libstartup_notification
libwacom
libxkbcommon
libxkbfile
libXdamage
colord
lcms2
pango
pipewire
sysprof # for D-Bus interfaces
libsysprof-capture
xkeyboard_config
];
postPatch = ''
patchShebangs src/backends/native/gen-default-modes.py
# Magpie does not install any .desktop files
substituteInPlace scripts/mesonPostInstall.sh --replace "update-desktop-database" "# update-desktop-database"
# https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3187
substituteInPlace meson.build \
--replace "dependency('sysprof-4')" "dependency('sysprof-6')"
'';
postFixup = ''
# Cannot be in postInstall, otherwise _multioutDocs hook in preFixup will move right back.
# TODO: Move this into a directory devhelp can find.
moveToOutput "share/magpie-0/doc" "$devdoc"
'';
# Install udev files into our own tree.
PKG_CONFIG_UDEV_UDEVDIR = "${placeholder "out"}/lib/udev";
separateDebugInfo = true;
passthru = {
libdir = "${finalAttrs.finalPackage}/lib/magpie-0";
tests = {
libdirExists = runCommand "magpie-libdir-exists" { } ''
if [[ ! -d ${finalAttrs.finalPackage.libdir} ]]; then
echo "passthru.libdir should contain a directory, ${finalAttrs.finalPackage.libdir} is not one."
exit 1
fi
touch $out
'';
pkg-config = testers.hasPkgConfigModules { package = finalAttrs.finalPackage; };
};
updateScript = nix-update-script { };
};
meta = {
description = "Softish fork of Mutter 43.x";
homepage = "https://github.com/BuddiesOfBudgie/magpie";
changelog = "https://github.com/BuddiesOfBudgie/magpie/releases/tag/v${finalAttrs.version}";
license = lib.licenses.gpl2Plus;
teams = [ lib.teams.budgie ];
platforms = lib.platforms.linux;
pkgConfigModules = [
"libmagpie-0"
"magpie-clutter-0"
"magpie-cogl-0"
"magpie-cogl-pango-0"
];
};
})

View File

@@ -0,0 +1,3 @@
source 'https://rubygems.org'
gem 'maid', '~> 0.10.0'
gem 'rake'

View File

@@ -0,0 +1,61 @@
GEM
remote: https://rubygems.org/
specs:
base64 (0.2.0)
concurrent-ruby (1.3.5)
csv (3.3.4)
deprecated (3.0.1)
dimensions (1.3.0)
escape (0.0.4)
et-orbi (1.2.11)
tzinfo
exifr (1.3.10)
ffi (1.17.2)
fugit (1.11.1)
et-orbi (~> 1, >= 1.2.11)
raabro (~> 1.4)
geocoder (1.8.5)
base64 (>= 0.1.0)
csv (>= 3.0.0)
listen (3.8.0)
rb-fsevent (~> 0.10, >= 0.10.3)
rb-inotify (~> 0.9, >= 0.9.10)
logger (1.7.0)
maid (0.10.0)
deprecated (~> 3.0.0)
dimensions (>= 1.0.0, < 2.0)
escape (>= 0.0.1, < 0.1.0)
exifr (~> 1.3.10)
geocoder (~> 1.8.1)
listen (~> 3.8.0)
mime-types (~> 3.0, < 4.0)
rubyzip (~> 2.3.2)
rufus-scheduler (~> 3.8.2)
thor (~> 1.2.1)
xdg (~> 2.2.3)
mime-types (3.7.0)
logger
mime-types-data (~> 3.2025, >= 3.2025.0507)
mime-types-data (3.2025.0520)
raabro (1.4.0)
rake (13.2.1)
rb-fsevent (0.11.2)
rb-inotify (0.11.1)
ffi (~> 1.0)
rubyzip (2.3.2)
rufus-scheduler (3.8.2)
fugit (~> 1.1, >= 1.1.6)
thor (1.2.2)
tzinfo (2.0.6)
concurrent-ruby (~> 1.0)
xdg (2.2.5)
PLATFORMS
ruby
DEPENDENCIES
maid (~> 0.10.0)
rake
BUNDLED WITH
2.6.6

View File

@@ -0,0 +1,285 @@
{
base64 = {
groups = [ "default" ];
platforms = [ ];
source = {
remotes = [ "https://rubygems.org" ];
sha256 = "01qml0yilb9basf7is2614skjp8384h2pycfx86cr8023arfj98g";
type = "gem";
};
version = "0.2.0";
};
concurrent-ruby = {
groups = [ "default" ];
platforms = [ ];
source = {
remotes = [ "https://rubygems.org" ];
sha256 = "1ipbrgvf0pp6zxdk5ascp6i29aybz2bx9wdrlchjmpx6mhvkwfw1";
type = "gem";
};
version = "1.3.5";
};
csv = {
groups = [ "default" ];
platforms = [ ];
source = {
remotes = [ "https://rubygems.org" ];
sha256 = "1kfqg0m6vqs6c67296f10cr07im5mffj90k2b5dsm51liidcsvp9";
type = "gem";
};
version = "3.3.4";
};
deprecated = {
groups = [ "default" ];
platforms = [ ];
source = {
remotes = [ "https://rubygems.org" ];
sha256 = "1ky20wy29jdhfy4xdw1lgxggciq4ywizmh265fyvwxbj6svw6b03";
type = "gem";
};
version = "3.0.1";
};
dimensions = {
groups = [ "default" ];
platforms = [ ];
source = {
remotes = [ "https://rubygems.org" ];
sha256 = "1jlkyfqk14291wbw8ly46jvp8vrcvswlns4078y1m44bb3rgm123";
type = "gem";
};
version = "1.3.0";
};
escape = {
groups = [ "default" ];
platforms = [ ];
source = {
remotes = [ "https://rubygems.org" ];
sha256 = "0sa1xkfc9jvkwyw1jbz3jhkq0ms1zrvswi6mmfiwcisg5fp497z4";
type = "gem";
};
version = "0.0.4";
};
et-orbi = {
dependencies = [ "tzinfo" ];
groups = [ "default" ];
platforms = [ ];
source = {
remotes = [ "https://rubygems.org" ];
sha256 = "0r6zylqjfv0xhdxvldr0kgmnglm57nm506pcm6085f0xqa68cvnj";
type = "gem";
};
version = "1.2.11";
};
exifr = {
groups = [ "default" ];
platforms = [ ];
source = {
remotes = [ "https://rubygems.org" ];
sha256 = "08fmmswa9fwymwsa2gzlm856ak3y9kjxdzm4zdrcrfyxs2p8yqwc";
type = "gem";
};
version = "1.3.10";
};
ffi = {
groups = [ "default" ];
platforms = [ ];
source = {
remotes = [ "https://rubygems.org" ];
sha256 = "19kdyjg3kv7x0ad4xsd4swy5izsbb1vl1rpb6qqcqisr5s23awi9";
type = "gem";
};
version = "1.17.2";
};
fugit = {
dependencies = [
"et-orbi"
"raabro"
];
groups = [ "default" ];
platforms = [ ];
source = {
remotes = [ "https://rubygems.org" ];
sha256 = "0s4qhq3mjl0gak5wl20w9d5jhq069mk1393dkj76s8i2pvkqb578";
type = "gem";
};
version = "1.11.1";
};
geocoder = {
dependencies = [
"base64"
"csv"
];
groups = [ "default" ];
platforms = [ ];
source = {
remotes = [ "https://rubygems.org" ];
sha256 = "1gzn754d1b614svgrxfjcxjvf5ghrpcmsadndls9mzd4wmg4zx6a";
type = "gem";
};
version = "1.8.5";
};
listen = {
dependencies = [
"rb-fsevent"
"rb-inotify"
];
groups = [ "default" ];
platforms = [ ];
source = {
remotes = [ "https://rubygems.org" ];
sha256 = "13rgkfar8pp31z1aamxf5y7cfq88wv6rxxcwy7cmm177qq508ycn";
type = "gem";
};
version = "3.8.0";
};
logger = {
groups = [ "default" ];
platforms = [ ];
source = {
remotes = [ "https://rubygems.org" ];
sha256 = "00q2zznygpbls8asz5knjvvj2brr3ghmqxgr83xnrdj4rk3xwvhr";
type = "gem";
};
version = "1.7.0";
};
maid = {
dependencies = [
"deprecated"
"dimensions"
"escape"
"exifr"
"geocoder"
"listen"
"mime-types"
"rubyzip"
"rufus-scheduler"
"thor"
"xdg"
];
groups = [ "default" ];
platforms = [ ];
source = {
remotes = [ "https://rubygems.org" ];
sha256 = "0v1lhwgxyli10rinw6h33ikhskx9j3b20h7plrx8c69z05sfsdd9";
type = "gem";
};
version = "0.10.0";
};
mime-types = {
dependencies = [
"logger"
"mime-types-data"
];
groups = [ "default" ];
platforms = [ ];
source = {
remotes = [ "https://rubygems.org" ];
sha256 = "0mjyxl7c0xzyqdqa8r45hqg7jcw2prp3hkp39mdf223g4hfgdsyw";
type = "gem";
};
version = "3.7.0";
};
mime-types-data = {
groups = [ "default" ];
platforms = [ ];
source = {
remotes = [ "https://rubygems.org" ];
sha256 = "042zxrr8xm9nijn7jp0qnrwns32sv5m814ifkbpil8a3kv47ixci";
type = "gem";
};
version = "3.2025.0520";
};
raabro = {
groups = [ "default" ];
platforms = [ ];
source = {
remotes = [ "https://rubygems.org" ];
sha256 = "10m8bln9d00dwzjil1k42i5r7l82x25ysbi45fwyv4932zsrzynl";
type = "gem";
};
version = "1.4.0";
};
rake = {
groups = [ "default" ];
platforms = [ ];
source = {
remotes = [ "https://rubygems.org" ];
sha256 = "17850wcwkgi30p7yqh60960ypn7yibacjjha0av78zaxwvd3ijs6";
type = "gem";
};
version = "13.2.1";
};
rb-fsevent = {
groups = [ "default" ];
platforms = [ ];
source = {
remotes = [ "https://rubygems.org" ];
sha256 = "1zmf31rnpm8553lqwibvv3kkx0v7majm1f341xbxc0bk5sbhp423";
type = "gem";
};
version = "0.11.2";
};
rb-inotify = {
dependencies = [ "ffi" ];
groups = [ "default" ];
platforms = [ ];
source = {
remotes = [ "https://rubygems.org" ];
sha256 = "0vmy8xgahixcz6hzwy4zdcyn2y6d6ri8dqv5xccgzc1r292019x0";
type = "gem";
};
version = "0.11.1";
};
rubyzip = {
groups = [ "default" ];
platforms = [ ];
source = {
remotes = [ "https://rubygems.org" ];
sha256 = "0grps9197qyxakbpw02pda59v45lfgbgiyw48i0mq9f2bn9y6mrz";
type = "gem";
};
version = "2.3.2";
};
rufus-scheduler = {
dependencies = [ "fugit" ];
groups = [ "default" ];
platforms = [ ];
source = {
remotes = [ "https://rubygems.org" ];
sha256 = "1as4yrb8y5lq49div8p3vqgwrrhdgwnvx4m73y3712nmnlpx6cws";
type = "gem";
};
version = "3.8.2";
};
thor = {
groups = [ "default" ];
platforms = [ ];
source = {
remotes = [ "https://rubygems.org" ];
sha256 = "0k7j2wn14h1pl4smibasw0bp66kg626drxb59z7rzflch99cd4rg";
type = "gem";
};
version = "1.2.2";
};
tzinfo = {
dependencies = [ "concurrent-ruby" ];
groups = [ "default" ];
platforms = [ ];
source = {
remotes = [ "https://rubygems.org" ];
sha256 = "16w2g84dzaf3z13gxyzlzbf748kylk5bdgg3n1ipvkvvqy685bwd";
type = "gem";
};
version = "2.0.6";
};
xdg = {
groups = [ "default" ];
platforms = [ ];
source = {
remotes = [ "https://rubygems.org" ];
sha256 = "04xr4cavnzxlk926pkji7b5yiqy4qsd3gdvv8mg6jliq6sczg9gk";
type = "gem";
};
version = "2.2.5";
};
}

View File

@@ -0,0 +1,24 @@
{
bundlerApp,
bundlerUpdateScript,
callPackage,
lib,
}:
bundlerApp rec {
pname = "maid";
gemdir = ./.;
exes = [ "maid" ];
passthru.updateScript = bundlerUpdateScript pname;
passthru.tests.run = callPackage ./test.nix { };
meta = with lib; {
description = "Rule-based file mover and cleaner in Ruby";
homepage = "https://github.com/maid/maid";
license = licenses.gpl2Only;
maintainers = with maintainers; [ alanpearce ];
platforms = platforms.unix;
};
}

View File

@@ -0,0 +1,21 @@
{ runCommandLocal, maid }:
runCommandLocal "test-maid-run"
{
nativeBuildInputs = [ maid ];
}
''
mkdir -p $out/test
export HOME=$out
cd $out
touch test/a.iso test/b.txt
cat > rules.rb <<EOF
Maid.rules do
rule 'ISO' do
trash(dir('test/*.iso'))
end
end
EOF
maid clean --rules rules.rb --force
[ -f test/b.txt ] && [ ! -f test/a.iso ]
''

View File

@@ -0,0 +1,115 @@
{
lib,
stdenv,
fetchFromGitHub,
fetchpatch,
python312,
}:
python312.pkgs.buildPythonApplication rec {
pname = "maigret";
version = "0.4.4";
pyproject = true;
src = fetchFromGitHub {
owner = "soxoj";
repo = "maigret";
tag = "v${version}";
hash = "sha256-Z8SnA7Z5+oKW0AOaNf+c/zR30lrPFmXaxxKkbnDXNNs=";
};
patches = [
# https://github.com/soxoj/maigret/pull/1117
(fetchpatch {
name = "pytest-7.3-compatibility.patch";
url = "https://github.com/soxoj/maigret/commit/ecb33de9e6eec12b6b45a1152199177f32c85be2.patch";
hash = "sha256-nFx3j1Q37YLtYhb0QS34UgZFgAc5Z/RVgbO9o1n1ONE=";
})
];
build-system = with python312.pkgs; [ setuptools ];
dependencies = with python312.pkgs; [
aiodns
aiohttp
aiohttp-socks
arabic-reshaper
async-timeout
attrs
beautifulsoup4
certifi
chardet
cloudscraper
colorama
future
html5lib
idna
jinja2
lxml
markupsafe
mock
multidict
networkx
pycountry
pypdf2
pysocks
python-bidi
pyvis
requests
requests-futures
six
socid-extractor
soupsieve
stem
torrequest
tqdm
typing-extensions
webencodings
xhtml2pdf
xmind
yarl
];
nativeCheckInputs = with python312.pkgs; [
pytest-httpserver
pytest-asyncio
pytestCheckHook
];
pythonRelaxDeps = true;
pythonRemoveDeps = [ "future-annotations" ];
pytestFlags = [
# DeprecationWarning: There is no current event loop
"-Wignore::DeprecationWarning"
];
disabledTests = [
# Tests require network access
"test_extract_ids_from_page"
"test_import_aiohttp_cookies"
"test_maigret_results"
"test_pdf_report"
"test_self_check_db_negative_enabled"
"test_self_check_db_positive_enable"
]
++ lib.optionals stdenv.hostPlatform.isDarwin [
# AsyncioProgressbarExecutor is slower on darwin than it should be,
# Upstream issue: https://github.com/soxoj/maigret/issues/679
"test_asyncio_progressbar_executor"
];
pythonImportsCheck = [ "maigret" ];
meta = {
description = "Tool to collect details about an username";
homepage = "https://maigret.readthedocs.io";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [
fab
thtrf
];
broken = stdenv.hostPlatform.isDarwin;
};
}

View File

@@ -0,0 +1,37 @@
{
lib,
stdenv,
fetchFromGitHub,
cmake,
xorg,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "maiko";
version = "250616-de1fafba";
src = fetchFromGitHub {
owner = "Interlisp";
repo = "maiko";
tag = "maiko-${finalAttrs.version}";
hash = "sha256-RYBV3gqcDPxRteCvUyqm8lKUpW4r0L7kJLlED8M72DI=";
};
nativeBuildInputs = [ cmake ];
buildInputs = [ xorg.libX11 ];
installPhase = ''
runHook preInstall
find . -maxdepth 1 -executable -type f -exec install -Dt $out/bin '{}' \;
runHook postInstall
'';
meta = {
description = "Medley Interlisp virtual machine";
homepage = "https://interlisp.org/";
changelog = "https://github.com/Interlisp/maiko/releases";
license = lib.licenses.mit;
inherit (xorg.libX11.meta) platforms;
};
})

View File

@@ -0,0 +1,66 @@
{
lib,
stdenv,
fetchurl,
nixosTests,
# updater
git,
coreutils,
gawk,
gnused,
writeScript,
nix-update,
}:
stdenv.mkDerivation rec {
pname = "mailcap";
version = "2.1.54";
src = fetchurl {
url = "https://releases.pagure.org/mailcap/mailcap-${version}.tar.xz";
hash = "sha256-mkAyIC/A0rCFj0GxZzianP5SrCTsKC5kebkHZTGd4RM=";
};
installPhase = ''
runHook preInstall
substituteInPlace mailcap --replace "/usr/bin/" ""
sh generate-nginx-mimetypes.sh < mime.types > nginx-mime.types
install -D -m0644 nginx-mime.types $out/etc/nginx/mime.types
install -D -m0644 -t $out/etc mailcap mime.types
install -D -m0644 -t $out/share/man/man5 mailcap.5
runHook postInstall
'';
passthru.updateScript = writeScript "update-mailcap" ''
export PATH=${
lib.makeBinPath [
git
coreutils
gawk
gnused
nix-update
]
}:$PATH
VERSION="$(git ls-remote --tags --sort="v:refname" https://pagure.io/mailcap.git | \
awk '{ print $2 }' | \
grep "refs/tags/r" | \
sed -E -e "s,refs/tags/r(.*)$,\1," -e "s/-/./g" | \
sort --version-sort --reverse | \
head -n1)"
exec nix-update --version "$VERSION" "$@"
'';
passthru.tests.nginx-mime = nixosTests.nginx-mime;
meta = with lib; {
description = "Helper application and MIME type associations for file types";
homepage = "https://pagure.io/mailcap";
license = licenses.mit;
maintainers = with maintainers; [ c0bw3b ];
platforms = platforms.all;
};
}

View File

@@ -0,0 +1,2 @@
source 'https://rubygems.org'
gem 'mailcatcher'

View File

@@ -0,0 +1,68 @@
GEM
remote: https://rubygems.org/
specs:
base64 (0.3.0)
daemons (1.4.1)
date (3.4.1)
eventmachine (1.2.7)
faye-websocket (0.11.4)
eventmachine (>= 0.12.0)
websocket-driver (>= 0.5.1, < 0.8.0)
mail (2.8.1)
mini_mime (>= 0.1.1)
net-imap
net-pop
net-smtp
mailcatcher (0.10.0)
eventmachine (~> 1.0)
faye-websocket (~> 0.11.1)
mail (~> 2.3)
net-smtp
rack (~> 2.2)
sinatra (~> 3.2)
sqlite3 (~> 1.3)
thin (~> 1.8)
mini_mime (1.1.5)
mini_portile2 (2.8.9)
mustermann (3.0.4)
ruby2_keywords (~> 0.0.1)
net-imap (0.5.9)
date
net-protocol
net-pop (0.1.2)
net-protocol
net-protocol (0.2.2)
timeout
net-smtp (0.5.1)
net-protocol
rack (2.2.17)
rack-protection (3.2.0)
base64 (>= 0.1.0)
rack (~> 2.2, >= 2.2.4)
ruby2_keywords (0.0.5)
sinatra (3.2.0)
mustermann (~> 3.0)
rack (~> 2.2, >= 2.2.4)
rack-protection (= 3.2.0)
tilt (~> 2.0)
sqlite3 (1.7.3)
mini_portile2 (~> 2.8.0)
thin (1.8.2)
daemons (~> 1.0, >= 1.0.9)
eventmachine (~> 1.0, >= 1.0.4)
rack (>= 1, < 3)
tilt (2.6.1)
timeout (0.4.3)
websocket-driver (0.7.7)
base64
websocket-extensions (>= 0.1.0)
websocket-extensions (0.1.5)
PLATFORMS
ruby
DEPENDENCIES
mailcatcher
BUNDLED WITH
2.6.9

View File

@@ -0,0 +1,290 @@
{
base64 = {
groups = [ "default" ];
platforms = [ ];
source = {
remotes = [ "https://rubygems.org" ];
sha256 = "0yx9yn47a8lkfcjmigk79fykxvr80r4m1i35q82sxzynpbm7lcr7";
type = "gem";
};
version = "0.3.0";
};
daemons = {
groups = [ "default" ];
platforms = [ ];
source = {
remotes = [ "https://rubygems.org" ];
sha256 = "07cszb0zl8mqmwhc8a2yfg36vi6lbgrp4pa5bvmryrpcz9v6viwg";
type = "gem";
};
version = "1.4.1";
};
date = {
groups = [ "default" ];
platforms = [ ];
source = {
remotes = [ "https://rubygems.org" ];
sha256 = "0kz6mc4b9m49iaans6cbx031j9y7ldghpi5fzsdh0n3ixwa8w9mz";
type = "gem";
};
version = "3.4.1";
};
eventmachine = {
groups = [ "default" ];
platforms = [ ];
source = {
remotes = [ "https://rubygems.org" ];
sha256 = "0wh9aqb0skz80fhfn66lbpr4f86ya2z5rx6gm5xlfhd05bj1ch4r";
type = "gem";
};
version = "1.2.7";
};
faye-websocket = {
dependencies = [
"eventmachine"
"websocket-driver"
];
groups = [ "default" ];
platforms = [ ];
source = {
remotes = [ "https://rubygems.org" ];
sha256 = "1p4xwf5lqrfbc9xbyf20hlyckm1issl5gscdnpglss3x4rwqj0dq";
type = "gem";
};
version = "0.11.4";
};
mail = {
dependencies = [
"mini_mime"
"net-imap"
"net-pop"
"net-smtp"
];
groups = [ "default" ];
platforms = [ ];
source = {
remotes = [ "https://rubygems.org" ];
sha256 = "1bf9pysw1jfgynv692hhaycfxa8ckay1gjw5hz3madrbrynryfzc";
type = "gem";
};
version = "2.8.1";
};
mailcatcher = {
dependencies = [
"eventmachine"
"faye-websocket"
"mail"
"net-smtp"
"rack"
"sinatra"
"sqlite3"
"thin"
];
groups = [ "default" ];
platforms = [ ];
source = {
remotes = [ "https://rubygems.org" ];
sha256 = "0383smildpjh0zrcq38x1y1ka6rkpdwjnlx4ng9dlyv8hkhnz6zm";
type = "gem";
};
version = "0.10.0";
};
mini_mime = {
groups = [ "default" ];
platforms = [ ];
source = {
remotes = [ "https://rubygems.org" ];
sha256 = "1vycif7pjzkr29mfk4dlqv3disc5dn0va04lkwajlpr1wkibg0c6";
type = "gem";
};
version = "1.1.5";
};
mini_portile2 = {
groups = [ "default" ];
platforms = [ ];
source = {
remotes = [ "https://rubygems.org" ];
sha256 = "12f2830x7pq3kj0v8nz0zjvaw02sv01bqs1zwdrc04704kwcgmqc";
type = "gem";
};
version = "2.8.9";
};
mustermann = {
dependencies = [ "ruby2_keywords" ];
groups = [ "default" ];
platforms = [ ];
source = {
remotes = [ "https://rubygems.org" ];
sha256 = "08ma2fmxlm6i7lih4mc3har2fzsbj1pl4hhva65kljf6nfvdryl5";
type = "gem";
};
version = "3.0.4";
};
net-imap = {
dependencies = [
"date"
"net-protocol"
];
groups = [ "default" ];
platforms = [ ];
source = {
remotes = [ "https://rubygems.org" ];
sha256 = "1z1kpshd0r09jv0091bcr4gfx3i1psbqdzy7zyag5n8v3qr0anfr";
type = "gem";
};
version = "0.5.9";
};
net-pop = {
dependencies = [ "net-protocol" ];
groups = [ "default" ];
platforms = [ ];
source = {
remotes = [ "https://rubygems.org" ];
sha256 = "1wyz41jd4zpjn0v1xsf9j778qx1vfrl24yc20cpmph8k42c4x2w4";
type = "gem";
};
version = "0.1.2";
};
net-protocol = {
dependencies = [ "timeout" ];
groups = [ "default" ];
platforms = [ ];
source = {
remotes = [ "https://rubygems.org" ];
sha256 = "1a32l4x73hz200cm587bc29q8q9az278syw3x6fkc9d1lv5y0wxa";
type = "gem";
};
version = "0.2.2";
};
net-smtp = {
dependencies = [ "net-protocol" ];
groups = [ "default" ];
platforms = [ ];
source = {
remotes = [ "https://rubygems.org" ];
sha256 = "0dh7nzjp0fiaqq1jz90nv4nxhc2w359d7c199gmzq965cfps15pd";
type = "gem";
};
version = "0.5.1";
};
rack = {
groups = [ "default" ];
platforms = [ ];
source = {
remotes = [ "https://rubygems.org" ];
sha256 = "1pcr8sn02lwzv3z6vx5n41b6ybcnw9g9h05s3lkv4vqdm0f2mq2z";
type = "gem";
};
version = "2.2.17";
};
rack-protection = {
dependencies = [
"base64"
"rack"
];
groups = [ "default" ];
platforms = [ ];
source = {
remotes = [ "https://rubygems.org" ];
sha256 = "1zzvivmdb4dkscc58i3gmcyrnypynsjwp6xgc4ylarlhqmzvlx1w";
type = "gem";
};
version = "3.2.0";
};
ruby2_keywords = {
groups = [ "default" ];
platforms = [ ];
source = {
remotes = [ "https://rubygems.org" ];
sha256 = "1vz322p8n39hz3b4a9gkmz9y7a5jaz41zrm2ywf31dvkqm03glgz";
type = "gem";
};
version = "0.0.5";
};
sinatra = {
dependencies = [
"mustermann"
"rack"
"rack-protection"
"tilt"
];
groups = [ "default" ];
platforms = [ ];
source = {
remotes = [ "https://rubygems.org" ];
sha256 = "01wq20aqk5kfggq3wagx5xr1cz0x08lg6dxbk9yhd1sf0d6pywkf";
type = "gem";
};
version = "3.2.0";
};
sqlite3 = {
dependencies = [ "mini_portile2" ];
groups = [ "default" ];
platforms = [ ];
source = {
remotes = [ "https://rubygems.org" ];
sha256 = "073hd24qwx9j26cqbk0jma0kiajjv9fb8swv9rnz8j4mf0ygcxzs";
type = "gem";
};
version = "1.7.3";
};
thin = {
dependencies = [
"daemons"
"eventmachine"
"rack"
];
groups = [ "default" ];
platforms = [ ];
source = {
remotes = [ "https://rubygems.org" ];
sha256 = "08g1yq6zzvgndj8fd98ah7pp8g2diw28p8bfjgv7rvjvp8d2am8w";
type = "gem";
};
version = "1.8.2";
};
tilt = {
groups = [ "default" ];
platforms = [ ];
source = {
remotes = [ "https://rubygems.org" ];
sha256 = "0w27v04d7rnxjr3f65w1m7xyvr6ch6szjj2v5wv1wz6z5ax9pa9m";
type = "gem";
};
version = "2.6.1";
};
timeout = {
groups = [ "default" ];
platforms = [ ];
source = {
remotes = [ "https://rubygems.org" ];
sha256 = "03p31w5ghqfsbz5mcjzvwgkw3h9lbvbknqvrdliy8pxmn9wz02cm";
type = "gem";
};
version = "0.4.3";
};
websocket-driver = {
dependencies = [
"base64"
"websocket-extensions"
];
groups = [ "default" ];
platforms = [ ];
source = {
remotes = [ "https://rubygems.org" ];
sha256 = "1d26l4qn55ivzahbc7fwc4k4z3j7wzym05i9n77i4mslrpr9jv85";
type = "gem";
};
version = "0.7.7";
};
websocket-extensions = {
groups = [ "default" ];
platforms = [ ];
source = {
remotes = [ "https://rubygems.org" ];
sha256 = "0hc2g9qps8lmhibl5baa91b4qx8wqw872rgwagml78ydj8qacsqw";
type = "gem";
};
version = "0.1.5";
};
}

View File

@@ -0,0 +1,30 @@
{
ruby,
lib,
bundlerApp,
bundlerUpdateScript,
nixosTests,
}:
bundlerApp {
pname = "mailcatcher";
gemdir = ./.;
exes = [
"mailcatcher"
"catchmail"
];
passthru.updateScript = bundlerUpdateScript "mailcatcher";
passthru.tests = { inherit (nixosTests) mailcatcher; };
meta = {
description = "SMTP server and web interface to locally test outbound emails";
homepage = "https://mailcatcher.me/";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [
zarelit
nicknovitski
];
platforms = lib.platforms.unix;
};
}

View File

@@ -0,0 +1,22 @@
diff -u a/Makefile b/Makefile
--- a/Makefile 2015-04-05 19:31:41.871227295 +0100
+++ b/Makefile 2015-04-05 19:42:49.743517508 +0100
@@ -1,3 +1,5 @@
+prefix=$(out)
+
all: mailcheck
debug: mailcheck.c netrc.c netrc.h socket.c
@@ -7,8 +9,10 @@
$(CC) -Wall -O2 mailcheck.c netrc.c socket.c -s -o mailcheck
install: mailcheck
- install mailcheck $(prefix)/usr/bin
- install -m 644 mailcheckrc $(prefix)/etc
+ [ -d $(prefix)/bin ] || mkdir $(prefix)/bin
+ [ -d $(prefix)/etc ] || mkdir $(prefix)/etc
+ install mailcheck $(prefix)/bin/
+ install -m 644 mailcheckrc $(prefix)/etc/
distclean: clean

View File

@@ -0,0 +1,30 @@
{
lib,
stdenv,
fetchurl,
}:
stdenv.mkDerivation rec {
pname = "mailcheck";
version = "1.91.2";
patches = [ ./mailcheck-Makefile.patch ];
src = fetchurl {
url = "mirror://sourceforge/mailcheck/mailcheck_${version}.tar.gz";
sha256 = "0p0azaxsnjvjbg41ycicc1i0kzw6jiynq8k49cfkdhlckxfdm9kc";
};
meta = {
description = "Simple command line tool to check for new messages";
mainProgram = "mailcheck";
homepage = "https://mailcheck.sourceforge.net/";
license = lib.licenses.gpl2;
maintainers = with lib.maintainers; [ kovirobi ];
platforms = lib.platforms.linux;
longDescription = ''
A simple command line tool to check for new mail in local mbox and
maildir and remote POP3 and IMAP mailboxes.
'';
};
}

View File

@@ -0,0 +1,30 @@
{
lib,
buildGoModule,
fetchFromGitHub,
nix-update-script,
}:
buildGoModule rec {
pname = "maildir-rank-addr";
version = "1.4.1";
src = fetchFromGitHub {
owner = "ferdinandyb";
repo = "maildir-rank-addr";
tag = "v${version}";
hash = "sha256-3iDvVeiQjyck4+/IvxOe6w2ebR7yju2dV1ijVpajsKU=";
};
vendorHash = "sha256-Wl7KfvNYtvSUiYS1LpN027SrU+K3Uq0UQHv7slC2Xwc=";
passthru.updateScript = nix-update-script { };
meta = {
description = "Generate a ranked addressbook from a maildir folder";
homepage = "https://github.com/ferdinandyb/maildir-rank-addr";
changelog = "https://github.com/ferdinandyb/maildir-rank-addr/blob/v${version}/CHANGELOG.md";
license = lib.licenses.mit;
mainProgram = "maildir-rank-addr";
maintainers = with lib.maintainers; [ antonmosich ];
};
}

View File

@@ -0,0 +1,13 @@
--- a/libs/maildrop/configure 2012-09-06 01:52:13.000000000 +0100
+++ b/libs/maildrop/configure 2013-01-04 03:00:57.095628327 +0000
@@ -19857,8 +19862,8 @@
check_spooldir() {
if test "$CHECKED_SPOOLDIR" != 1
then
- get_spooldir
- MBOX_DIR="$SPOOLDIR"
+ MBOX_DIR="/var/spool/mail"
+ MBOX_RESET_GID=0
CHECKED_SPOOLDIR=1
fi
}

View File

@@ -0,0 +1,39 @@
{
fetchurl,
lib,
stdenv,
pkg-config,
courier-unicode,
pcre2,
libidn2,
perl,
}:
stdenv.mkDerivation rec {
pname = "maildrop";
version = "3.1.8";
src = fetchurl {
url = "mirror://sourceforge/courier/maildrop/${version}/maildrop-${version}.tar.bz2";
sha256 = "sha256-foJsAxkXRE8berccH82QODWVZEhG4rOyYONSsc4D6VA=";
};
nativeBuildInputs = [ pkg-config ];
buildInputs = [
courier-unicode
libidn2
pcre2
perl
];
patches = [ ./maildrop.configure.hack.patch ]; # for building in chroot
doCheck = false; # fails with "setlocale: LC_ALL: cannot change locale (en_US.UTF-8)"
meta = with lib; {
homepage = "http://www.courier-mta.org/maildrop/";
description = "Mail filter/mail delivery agent that is used by the Courier Mail Server";
license = licenses.gpl3;
platforms = platforms.linux;
};
}

View File

@@ -0,0 +1,144 @@
From 0ffd4dcbc7df1510213ec8f2c20b94fb016d390e Mon Sep 17 00:00:00 2001
From: wxt <3264117476@qq.com>
Date: Thu, 17 Apr 2025 20:52:12 +0800
Subject: [PATCH] Update go.mod & go.sum
---
go.mod | 37 +++++++++++++++++++++++++++
go.sum | 80 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
2 files changed, 117 insertions(+)
create mode 100644 go.mod
create mode 100644 go.sum
diff --git a/go.mod b/go.mod
new file mode 100644
index 0000000..594f99f
--- /dev/null
+++ b/go.mod
@@ -0,0 +1,37 @@
+module github.com/mailhog/MailHog
+
+go 1.24.1
+
+require (
+ github.com/gorilla/pat v1.0.2
+ github.com/ian-kent/envconf v0.0.0-20141026121121-c19809918c02
+ github.com/ian-kent/go-log v0.0.0-20160113211217-5731446c36ab
+ github.com/mailhog/MailHog-Server v1.0.1
+ github.com/mailhog/MailHog-UI v1.0.1
+ github.com/mailhog/http v1.0.1
+ github.com/mailhog/mhsendmail v0.2.1-0.20170416184902-9e70164f299c
+ golang.org/x/crypto v0.37.0
+)
+
+require (
+ github.com/bmizerany/assert v0.0.0-20160611221934-b7ed37b82869 // indirect
+ github.com/gorilla/context v1.1.2 // indirect
+ github.com/gorilla/mux v1.8.1 // indirect
+ github.com/gorilla/websocket v1.5.3 // indirect
+ github.com/ian-kent/goose v0.0.0-20141221090059-c3541ea826ad // indirect
+ github.com/ian-kent/linkio v0.0.0-20170807205755-97566b872887 // indirect
+ github.com/kr/pretty v0.3.1 // indirect
+ github.com/mailhog/data v1.0.1 // indirect
+ github.com/mailhog/smtp v1.0.1 // indirect
+ github.com/mailhog/storage v1.0.1 // indirect
+ github.com/ogier/pflag v0.0.1 // indirect
+ github.com/philhofer/fwd v1.1.3-0.20240916144458-20a13a1f6b7c // indirect
+ github.com/smartystreets/goconvey v1.8.1 // indirect
+ github.com/spf13/pflag v1.0.6 // indirect
+ github.com/stretchr/testify v1.10.0 // indirect
+ github.com/t-k/fluent-logger-golang v1.0.0 // indirect
+ github.com/tinylib/msgp v1.2.5 // indirect
+ gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c // indirect
+ gopkg.in/mgo.v2 v2.0.0-20190816093944-a6b53ec6cb22 // indirect
+ gopkg.in/yaml.v2 v2.4.0 // indirect
+)
diff --git a/go.sum b/go.sum
new file mode 100644
index 0000000..87a8922
--- /dev/null
+++ b/go.sum
@@ -0,0 +1,80 @@
+github.com/bmizerany/assert v0.0.0-20160611221934-b7ed37b82869 h1:DDGfHa7BWjL4YnC6+E63dPcxHo2sUxDIu8g3QgEJdRY=
+github.com/bmizerany/assert v0.0.0-20160611221934-b7ed37b82869/go.mod h1:Ekp36dRnpXw/yCqJaO+ZrUyxD+3VXMFFr56k5XYrpB4=
+github.com/creack/pty v1.1.9/go.mod h1:oKZEueFk5CKHvIhNR5MUki03XCEU+Q6VDXinZuGJ33E=
+github.com/davecgh/go-spew v1.1.1 h1:vj9j/u1bqnvCEfJOwUhtlOARqs3+rkHYY13jYWTU97c=
+github.com/davecgh/go-spew v1.1.1/go.mod h1:J7Y8YcW2NihsgmVo/mv3lAwl/skON4iLHjSsI+c5H38=
+github.com/gopherjs/gopherjs v1.17.2 h1:fQnZVsXk8uxXIStYb0N4bGk7jeyTalG/wsZjQ25dO0g=
+github.com/gopherjs/gopherjs v1.17.2/go.mod h1:pRRIvn/QzFLrKfvEz3qUuEhtE/zLCWfreZ6J5gM2i+k=
+github.com/gorilla/context v1.1.2 h1:WRkNAv2uoa03QNIc1A6u4O7DAGMUVoopZhkiXWA2V1o=
+github.com/gorilla/context v1.1.2/go.mod h1:KDPwT9i/MeWHiLl90fuTgrt4/wPcv75vFAZLaOOcbxM=
+github.com/gorilla/mux v1.8.1 h1:TuBL49tXwgrFYWhqrNgrUNEY92u81SPhu7sTdzQEiWY=
+github.com/gorilla/mux v1.8.1/go.mod h1:AKf9I4AEqPTmMytcMc0KkNouC66V3BtZ4qD5fmWSiMQ=
+github.com/gorilla/pat v1.0.2 h1:TDh/RulbnPxMQACcwbgMF5Bf00jaGoeYBNu+XUFuwtE=
+github.com/gorilla/pat v1.0.2/go.mod h1:ioQ7dFQ2KXmOmWLJs6vZAfRikcm2D2JyuLrL9b5wVCg=
+github.com/gorilla/websocket v1.5.3 h1:saDtZ6Pbx/0u+bgYQ3q96pZgCzfhKXGPqt7kZ72aNNg=
+github.com/gorilla/websocket v1.5.3/go.mod h1:YR8l580nyteQvAITg2hZ9XVh4b55+EU/adAjf1fMHhE=
+github.com/ian-kent/envconf v0.0.0-20141026121121-c19809918c02 h1:dU8zq210pt1b71X8xh9GOxC7uBHNtQ9BYC+Lb6SA/mA=
+github.com/ian-kent/envconf v0.0.0-20141026121121-c19809918c02/go.mod h1:1m5fo3aKG2moYtGHC4I2nFkXmG97+vCeaEIWC+mXTSI=
+github.com/ian-kent/go-log v0.0.0-20160113211217-5731446c36ab h1:OgrFrYWlVzY7Tc8rq7Y4ErlKo28igc70gbfJGTVWTJk=
+github.com/ian-kent/go-log v0.0.0-20160113211217-5731446c36ab/go.mod h1:6HitiSDIbT2r0dab4CoKoMAtR7tb0ORQ3OmjkjCZ+zk=
+github.com/ian-kent/goose v0.0.0-20141221090059-c3541ea826ad h1:5UZIY1lPvsBrRQRgyt00lJ1J6HH6CwWAVQB6azyAA1c=
+github.com/ian-kent/goose v0.0.0-20141221090059-c3541ea826ad/go.mod h1:VHyJj0/IJFmpYvVqWFIN2HgjCatXujj7XaLLyOMC23M=
+github.com/ian-kent/linkio v0.0.0-20170807205755-97566b872887 h1:LPaZmcRJS13h+igi07S26uKy0qxCa76u1+pArD+JGrY=
+github.com/ian-kent/linkio v0.0.0-20170807205755-97566b872887/go.mod h1:aE63iKqF9rMrshaEiYZroUYFZLaYoTuA7pBMsg3lJoY=
+github.com/jtolds/gls v4.20.0+incompatible h1:xdiiI2gbIgH/gLH7ADydsJ1uDOEzR8yvV7C0MuV77Wo=
+github.com/jtolds/gls v4.20.0+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU=
+github.com/kr/pretty v0.2.1/go.mod h1:ipq/a2n7PKx3OHsz4KJII5eveXtPO4qwEXGdVfWzfnI=
+github.com/kr/pretty v0.3.1 h1:flRD4NNwYAUpkphVc1HcthR4KEIFJ65n8Mw5qdRn3LE=
+github.com/kr/pretty v0.3.1/go.mod h1:hoEshYVHaxMs3cyo3Yncou5ZscifuDolrwPKZanG3xk=
+github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ=
+github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI=
+github.com/kr/text v0.2.0 h1:5Nx0Ya0ZqY2ygV366QzturHI13Jq95ApcVaJBhpS+AY=
+github.com/kr/text v0.2.0/go.mod h1:eLer722TekiGuMkidMxC/pM04lWEeraHUUmBw8l2grE=
+github.com/mailhog/MailHog-Server v1.0.1 h1:mK9inUHV2p6pO55cHZTCdZ8D4aXzd+M9wvqtU0XmWcM=
+github.com/mailhog/MailHog-Server v1.0.1/go.mod h1:ScCrImbapPxdrQ85qoxkMygsSiY74ohIj1knLzuN8J0=
+github.com/mailhog/MailHog-UI v1.0.1 h1:B3mVLiVLd4amNVQtiklr+srI3eMKiMzYSXXqDGa7JzA=
+github.com/mailhog/MailHog-UI v1.0.1/go.mod h1:zLEw2DaBMXpL6nmpdB8S5U1Y3MMSATlTcjUYSTAB7HQ=
+github.com/mailhog/data v1.0.1 h1:7I+opBvVdi4EMJaihXavM98jp/ovt4o6mz47446RAW8=
+github.com/mailhog/data v1.0.1/go.mod h1:tjR/iXRhbSUKHzAAMd99RygVaDB5rIDC/bmWc363MzU=
+github.com/mailhog/http v1.0.1 h1:i3sxAt7/WcdRXdKJZgiDRkWIAYScnrqqHQTZSxXkM0I=
+github.com/mailhog/http v1.0.1/go.mod h1:91oqUCI9ZoSDY2cTj4pWDJVBHCK1U762V2a4if4KlOw=
+github.com/mailhog/mhsendmail v0.2.0 h1:C5HUC4obHfXIkttLfGBUopYbsJmh+bnExGWHBpWQ8IA=
+github.com/mailhog/mhsendmail v0.2.0/go.mod h1:B0778+OoPEc5aEFqatEnSO4ZWl9FCTxvaY+c7OOQadM=
+github.com/mailhog/mhsendmail v0.2.1-0.20170416184902-9e70164f299c h1:Tci7WxOyjr3Vs+oCoMT4F4LMNsaxh4eJzq9CKivNRuo=
+github.com/mailhog/mhsendmail v0.2.1-0.20170416184902-9e70164f299c/go.mod h1:B0778+OoPEc5aEFqatEnSO4ZWl9FCTxvaY+c7OOQadM=
+github.com/mailhog/smtp v1.0.1 h1:igL3N/L+pWuGCqUaje21HX3VIVnqHoVlqWO0t+wJEYE=
+github.com/mailhog/smtp v1.0.1/go.mod h1:GMrAdv1hXro38xj5dsWPAk5ZiXJHFx9t7W9Yqsk0XUM=
+github.com/mailhog/storage v1.0.1 h1:uut2nlG5hIxbsl6f8DGznPAHwQLf3/7Na2t4gmrIais=
+github.com/mailhog/storage v1.0.1/go.mod h1:4EAUf5xaEVd7c/OhvSxOOwQ66jT6q2er+BDBQ0EVrew=
+github.com/ogier/pflag v0.0.1 h1:RW6JSWSu/RkSatfcLtogGfFgpim5p7ARQ10ECk5O750=
+github.com/ogier/pflag v0.0.1/go.mod h1:zkFki7tvTa0tafRvTBIZTvzYyAu6kQhPZFnshFFPE+g=
+github.com/philhofer/fwd v1.1.3-0.20240916144458-20a13a1f6b7c h1:dAMKvw0MlJT1GshSTtih8C2gDs04w8dReiOGXrGLNoY=
+github.com/philhofer/fwd v1.1.3-0.20240916144458-20a13a1f6b7c/go.mod h1:RqIHx9QI14HlwKwm98g9Re5prTQ6LdeRQn+gXJFxsJM=
+github.com/pkg/diff v0.0.0-20210226163009-20ebb0f2a09e/go.mod h1:pJLUxLENpZxwdsKMEsNbx1VGcRFpLqf3715MtcvvzbA=
+github.com/pmezard/go-difflib v1.0.0 h1:4DBwDE0NGyQoBHbLQYPwSUPoCMWR5BEzIk/f1lZbAQM=
+github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
+github.com/rogpeppe/go-internal v1.9.0 h1:73kH8U+JUqXU8lRuOHeVHaa/SZPifC7BkcraZVejAe8=
+github.com/rogpeppe/go-internal v1.9.0/go.mod h1:WtVeX8xhTBvf0smdhujwtBcq4Qrzq/fJaraNFVN+nFs=
+github.com/smarty/assertions v1.15.0 h1:cR//PqUBUiQRakZWqBiFFQ9wb8emQGDb0HeGdqGByCY=
+github.com/smarty/assertions v1.15.0/go.mod h1:yABtdzeQs6l1brC900WlRNwj6ZR55d7B+E8C6HtKdec=
+github.com/smartystreets/goconvey v1.8.1 h1:qGjIddxOk4grTu9JPOU31tVfq3cNdBlNa5sSznIX1xY=
+github.com/smartystreets/goconvey v1.8.1/go.mod h1:+/u4qLyY6x1jReYOp7GOM2FSt8aP9CzCZL03bI28W60=
+github.com/spf13/pflag v1.0.6 h1:jFzHGLGAlb3ruxLB8MhbI6A8+AQX/2eW4qeyNZXNp2o=
+github.com/spf13/pflag v1.0.6/go.mod h1:McXfInJRrz4CZXVZOBLb0bTZqETkiAhM9Iw0y3An2Bg=
+github.com/stretchr/testify v1.10.0 h1:Xv5erBjTwe/5IxqUQTdXv5kgmIvbHo3QQyRwhJsOfJA=
+github.com/stretchr/testify v1.10.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY=
+github.com/t-k/fluent-logger-golang v1.0.0 h1:4IQzY+/l66Zkkhk9eB3LwF9vPkgKHJ1rpYdrRiap0EI=
+github.com/t-k/fluent-logger-golang v1.0.0/go.mod h1:6vC3Vzp9Kva0l5J9+YDY5/ROePwkAqwLK+KneCjSm4w=
+github.com/tinylib/msgp v1.2.5 h1:WeQg1whrXRFiZusidTQqzETkRpGjFjcIhW6uqWH09po=
+github.com/tinylib/msgp v1.2.5/go.mod h1:ykjzy2wzgrlvpDCRc4LA8UXy6D8bzMSuAF3WD57Gok0=
+golang.org/x/crypto v0.37.0 h1:kJNSjF/Xp7kU0iB2Z+9viTPMW4EqqsrywMXLJOOsXSE=
+golang.org/x/crypto v0.37.0/go.mod h1:vg+k43peMZ0pUMhYmVAWysMK35e6ioLh3wB8ZCAfbVc=
+gopkg.in/check.v1 v0.0.0-20161208181325-20d25e280405/go.mod h1:Co6ibVJAznAaIkqp8huTwlJQCZ016jof/cbN4VW5Yz0=
+gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c h1:Hei/4ADfdWqJk1ZMxUNpqntNwaWcugrBjAiHlqqRiVk=
+gopkg.in/check.v1 v1.0.0-20201130134442-10cb98267c6c/go.mod h1:JHkPIbrfpd72SG/EVd6muEfDQjcINNoR0C8j2r3qZ4Q=
+gopkg.in/mgo.v2 v2.0.0-20190816093944-a6b53ec6cb22 h1:VpOs+IwYnYBaFnrNAeB8UUWtL3vEUnzSCL1nVjPhqrw=
+gopkg.in/mgo.v2 v2.0.0-20190816093944-a6b53ec6cb22/go.mod h1:yeKp02qBN3iKW1OzL3MGk2IdtZzaj7SFntXj72NppTA=
+gopkg.in/yaml.v2 v2.4.0 h1:D8xgwECY7CYvx+Y2n4sBz93Jn9JRvxdiyyo8CTfuKaY=
+gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ=
+gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA=
+gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM=
--
2.48.1

View File

@@ -0,0 +1,48 @@
{
lib,
buildGoModule,
fetchFromGitHub,
nixosTests,
}:
buildGoModule rec {
pname = "MailHog";
version = "1.0.1";
src = fetchFromGitHub {
owner = "mailhog";
repo = "MailHog";
rev = "v${version}";
hash = "sha256-flxEp9iXLLm/FPP8udlnpbHQpGnqxAhgyOIUUJAJgog=";
};
patches = [
# Generate by go mod init github.com/mailhog/MailHog && go mod tidy && go get github.com/mailhog/mhsendmail@9e70164f299c9e06af61402e636f5bbdf03e7dbb
./0001-Add-go.mod-go.sum.patch
];
vendorHash = "sha256-YfqC8MEdiLcucOaXOsLI9H4NDQ/4T0newb6q7v0uDbw=";
deleteVendor = true;
ldflags = [
"-s"
"-X main.version=${version}"
];
passthru.tests = {
inherit (nixosTests) mailhog;
};
meta = {
description = "Web and API based SMTP testing";
mainProgram = "MailHog";
homepage = "https://github.com/mailhog/MailHog";
changelog = "https://github.com/mailhog/MailHog/releases/tag/v${version}";
maintainers = with lib.maintainers; [
disassembler
jojosch
];
license = lib.licenses.mit;
};
}

View File

@@ -0,0 +1,101 @@
{
lib,
stdenv,
buildGoModule,
nodejs,
python3,
libtool,
cctools,
npmHooks,
fetchFromGitHub,
fetchNpmDeps,
testers,
mailpit,
nixosTests,
}:
let
source = import ./source.nix;
inherit (source)
version
vendorHash
;
src = fetchFromGitHub {
owner = "axllent";
repo = "mailpit";
rev = "v${version}";
hash = source.hash;
};
libtool' = if stdenv.hostPlatform.isDarwin then cctools else libtool;
# Separate derivation, because if we mix this in buildGoModule, the separate
# go-modules build inherits specific attributes and fails. Getting that to
# work is hackier than just splitting the build.
ui = stdenv.mkDerivation {
pname = "mailpit-ui";
inherit src version;
npmDeps = fetchNpmDeps {
inherit src;
hash = source.npmDepsHash;
};
nativeBuildInputs = [
nodejs
python3
libtool'
npmHooks.npmConfigHook
];
buildPhase = ''
npm run package
'';
installPhase = ''
mv server/ui/dist $out
'';
};
in
buildGoModule {
pname = "mailpit";
inherit src version vendorHash;
env.CGO_ENABLED = 0;
ldflags = [
"-s"
"-w"
"-X github.com/axllent/mailpit/config.Version=${version}"
];
preBuild = ''
cp -r ${ui} server/ui/dist
'';
passthru.tests = {
inherit (nixosTests) mailpit;
version = testers.testVersion {
package = mailpit;
command = "mailpit version --no-release-check";
};
};
passthru.updateScript = {
supportedFeatures = [ "commit" ];
command = ./update.sh;
};
meta = with lib; {
description = "Email and SMTP testing tool with API for developers";
homepage = "https://github.com/axllent/mailpit";
changelog = "https://github.com/axllent/mailpit/releases/tag/v${version}";
maintainers = with maintainers; [ stephank ];
license = licenses.mit;
mainProgram = "mailpit";
};
}

View File

@@ -0,0 +1,6 @@
{
version = "1.27.9";
hash = "sha256-COPNi7AoHYyY8pfTSJYKxUG2Mh08czBjiD0VzLu0V6I=";
npmDepsHash = "sha256-QEjfCHqE8r41fgylNRY5Gk0tYQSYuFxHrHT6/7vtLxg=";
vendorHash = "sha256-Nmupbw8ouxsc7/CEAWz4Cj0cyEMP4WFPZ+P5ornf1AI=";
}

View File

@@ -0,0 +1,73 @@
#!/usr/bin/env nix-shell
#!nix-shell -i bash -p nix coreutils curl jq nix-prefetch-git prefetch-npm-deps
set -euo pipefail
OWNER=axllent
REPO=mailpit
TARGET_TAG="$(curl -L -s ${GITHUB_TOKEN:+-u ":${GITHUB_TOKEN}"} "https://api.github.com/repos/$OWNER/$REPO/releases/latest" | jq -r '.tag_name')"
TARGET_VERSION="$(echo "$TARGET_TAG" | sed -e 's/^v//')"
if [[ "$UPDATE_NIX_OLD_VERSION" == "$TARGET_VERSION" ]]; then
# mailpit is up-to-date
if [[ -n "$UPDATE_NIX_ATTR_PATH" ]]; then
echo "[{}]";
fi
exit 0
fi
extractVendorHash() {
original="${1?original hash missing}"
result="$(nix-build -A mailpit.goModules 2>&1 | tail -n3 | grep 'got:' | cut -d: -f2- | xargs echo || true)"
[ -z "$result" ] && { echo "$original"; } || { echo "$result"; }
}
TMP="$(mktemp -d)"
trap 'rm -rf "$TMP"' exit
NIXPKGS_MAILPIT_PATH=$(cd $(dirname ${BASH_SOURCE[0]}); pwd -P)/
SOURCE_NIX="$NIXPKGS_MAILPIT_PATH/source.nix"
PREFETCH_JSON=$TMP/prefetch.json
nix-prefetch-git --rev "$TARGET_TAG" --url "https://github.com/$OWNER/$REPO" > "$PREFETCH_JSON"
PREFETCH_HASH="$(jq '.hash' -r < "$PREFETCH_JSON")"
PREFETCH_PATH="$(jq '.path' -r < "$PREFETCH_JSON")"
NPM_DEPS_HASH="$(prefetch-npm-deps $PREFETCH_PATH/package-lock.json)"
FAKE_HASH="sha256-AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=";
cat > $SOURCE_NIX <<-EOF
{
version = "$TARGET_VERSION";
hash = "$PREFETCH_HASH";
npmDepsHash = "$NPM_DEPS_HASH";
vendorHash = "$FAKE_HASH";
}
EOF
GO_HASH="$(nix-instantiate --eval -A mailpit.vendorHash | tr -d '"')"
VENDOR_HASH=$(extractVendorHash "$GO_HASH")
cat > $SOURCE_NIX <<-EOF
{
version = "$TARGET_VERSION";
hash = "$PREFETCH_HASH";
npmDepsHash = "$NPM_DEPS_HASH";
vendorHash = "$VENDOR_HASH";
}
EOF
if [[ -z "$UPDATE_NIX_ATTR_PATH" ]]; then
exit 0
fi
cat <<-EOF
[{
"attrPath": "$UPDATE_NIX_ATTR_PATH",
"oldVersion": "$UPDATE_NIX_OLD_VERSION",
"newVersion": "$TARGET_VERSION",
"files": ["$SOURCE_NIX"]
}]
EOF

View File

@@ -0,0 +1,63 @@
{
lib,
stdenv,
fetchFromGitHub,
fetchpatch,
openssl,
versionCheckHook,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "mailsend";
version = "1.19";
src = fetchFromGitHub {
owner = "muquit";
repo = "mailsend";
tag = finalAttrs.version;
hash = "sha256-g1V4NrFlIz8oh7IS+cGWG6eje6kBGvPZS7Q131ESrXI=";
};
buildInputs = [
openssl
];
configureFlags = [
"--with-openssl=${openssl.dev}"
];
patches = [
# OpenSSL 1.1 support for HMAC api
(fetchpatch {
name = "openssl-1-1-hmac.patch";
url = "https://github.com/muquit/mailsend/commit/960df6d7a11eef90128dc2ae660866b27f0e4336.patch";
hash = "sha256-Gy4pZMYoUXcjMatw5BSk+IUKXjgpLCwPXtfC++WPKAM=";
})
# Pull fix pending upstream inclusion for parallel build failures:
# https://github.com/muquit/mailsend/pull/165
(fetchpatch {
name = "parallel-install.patch";
url = "https://github.com/muquit/mailsend/commit/acd4ebedbce0e4af3c7b6632f905f73e642ca38c.patch";
hash = "sha256-p8tNnkU6cMopuP63kVtRbD9aenhzL1EAXlvvFh4fucE=";
})
];
NIX_CFLAGS_COMPILE = "-Wno-error=implicit-function-declaration";
enableParallelBuilding = true;
nativeInstallCheckInputs = [
versionCheckHook
];
doInstallCheck = true;
versionCheckProgramArg = "-V";
meta = {
description = "CLI email sending tool";
license = lib.licenses.bsd3;
maintainers = with lib.maintainers; [ raskin ];
platforms = lib.platforms.linux;
homepage = "https://github.com/muquit/mailsend";
downloadPage = "https://github.com/muquit/mailsend/releases";
mainProgram = "mailsend";
};
})

View File

@@ -0,0 +1,34 @@
{
stdenv,
fetchurl,
pname,
version,
meta,
unzip,
makeWrapper,
}:
stdenv.mkDerivation (finalAttrs: {
inherit pname version meta;
src = fetchurl {
url = "https://github.com/Foundry376/Mailspring/releases/download/${finalAttrs.version}/Mailspring-AppleSilicon.zip";
hash = "sha256-jbsU8pSvhPFKFjIr+2ZHETOihKKoqQiZmKQ6eGtAIKk=";
};
dontUnpack = true;
nativeBuildInputs = [
unzip
makeWrapper
];
installPhase = ''
runHook preInstall
mkdir -p $out/Applications $out/bin
unzip $src -d $out/Applications
makeWrapper $out/Applications/Mailspring.app/Contents/MacOS/Mailspring $out/bin/mailspring
runHook postInstall
'';
})

View File

@@ -0,0 +1,94 @@
{
stdenv,
lib,
pname,
version,
meta,
fetchurl,
autoPatchelfHook,
alsa-lib,
coreutils,
db,
dpkg,
glib,
gtk3,
wrapGAppsHook3,
libkrb5,
libsecret,
nss,
openssl,
udev,
xorg,
libgbm,
libdrm,
libappindicator,
}:
stdenv.mkDerivation (finalAttrs: {
inherit pname version meta;
src = fetchurl {
url = "https://github.com/Foundry376/Mailspring/releases/download/${finalAttrs.version}/mailspring-${finalAttrs.version}-amd64.deb";
hash = "sha256-iJ6VzwvNTIRqUq9OWNOWOSuLbqhx+Lqx584kuyIslyA=";
};
nativeBuildInputs = [
autoPatchelfHook
dpkg
wrapGAppsHook3
];
buildInputs = [
alsa-lib
db
glib
gtk3
libkrb5
libsecret
nss
xorg.libxkbfile
xorg.libXdamage
xorg.libXScrnSaver
xorg.libXtst
xorg.libxshmfence
libgbm
libdrm
];
runtimeDependencies = [
coreutils
openssl
(lib.getLib udev)
libappindicator
libsecret
];
unpackPhase = ''
runHook preUnpack
dpkg -x $src .
runHook postUnpack
'';
installPhase = ''
runHook preInstall
mkdir -p $out/{bin,lib}
cp -ar ./usr/share $out
substituteInPlace $out/share/mailspring/resources/app.asar.unpacked/mailsync \
--replace-fail dirname ${coreutils}/bin/dirname
ln -s $out/share/mailspring/mailspring $out/bin/mailspring
ln -s ${lib.getLib openssl}/lib/libcrypto.so $out/lib/libcrypto.so.1.0.0
runHook postInstall
'';
postFixup = # sh
''
substituteInPlace $out/share/applications/Mailspring.desktop \
--replace-fail Exec=mailspring Exec=$out/bin/mailspring
'';
})

View File

@@ -0,0 +1,31 @@
{
lib,
stdenv,
callPackage,
}:
let
pname = "mailspring";
version = "1.16.0";
meta = {
description = "Beautiful, fast and maintained fork of Nylas Mail by one of the original authors";
downloadPage = "https://github.com/Foundry376/Mailspring";
homepage = "https://getmailspring.com";
license = lib.licenses.gpl3Plus;
longDescription = ''
Mailspring is an open-source mail client forked from Nylas Mail and built with Electron.
Mailspring's sync engine runs locally, but its source is not open.
'';
mainProgram = "mailspring";
maintainers = with lib.maintainers; [ toschmidt ];
platforms = [
"x86_64-linux"
"aarch64-darwin"
];
sourceProvenance = with lib.sourceTypes; [ binaryNativeCode ];
};
linux = callPackage ./linux.nix { inherit pname version meta; };
darwin = callPackage ./darwin.nix { inherit pname version meta; };
in
if stdenv.hostPlatform.isDarwin then darwin else linux

View File

@@ -0,0 +1,36 @@
{
lib,
buildNpmPackage,
fetchFromGitHub,
}:
buildNpmPackage rec {
pname = "mailsy";
version = "5.0.0";
src = fetchFromGitHub {
owner = "BalliAsghar";
repo = "Mailsy";
rev = version;
hash = "sha256-RnOWvu023SOcN83xEEkYFwgDasOmkMwSzJ/QYjvTBDo=";
};
npmDepsHash = "sha256-ljmqNmLvRHPdsKyOdDfECBXHTIExM6nPZF45lqV+pDM=";
npmFlags = [ "--legacy-peer-deps" ];
dontNpmBuild = true;
postPatch = ''
substituteInPlace utils/index.js \
--replace-fail 'dirname, "../data/account.json"' 'process.cwd(), "account.json"' \
--replace-fail 'dirname, "../data/email.html"' 'process.cwd(), "email.html"'
'';
meta = {
description = "Quickly generate a disposable email straight from terminal";
mainProgram = "mailsy";
homepage = "https://fig.io/manual/mailsy";
license = lib.licenses.mit;
maintainers = [ lib.maintainers._404wolf ];
};
}

View File

@@ -0,0 +1,59 @@
From 59a1abfa7b339bccfc228f38cc791cdacf4010d4 Mon Sep 17 00:00:00 2001
From: Michal Sojka <michal.sojka@cvut.cz>
Date: Sat, 1 Apr 2023 10:59:00 +0200
Subject: [PATCH] Don't use descrypt password in the test suite
The descrypt method is not considered strong and some
distributions (like NixOS) start compiling libxcrypt without it [1].
To start using different hash methods, it is not sufficient to replace
the password hash in testsuite/etc/passwd.in, because differently
hashed passwords contain '$' characters (e.g.
$y$j9T$lP8UWS9GZ4zfeTVDpmtbr1$dVozXOvWQXLQyhWGX7YyW8TIQTg8EfQLUzYPp3WCWo9)
and the test suite replaces '$'-starting strings with values of the
corresponding variables. Since I've not found a way to escape dollars
for TCL's subst function, we do not hardcode the passwd hash directly
to the file, but generate it dynamically and replace it in the file
via a variable.
[1]: https://github.com/NixOS/nixpkgs/pull/220557
---
pop3d/testsuite/lib/pop3d.exp | 1 +
testsuite/etc/passwd.in | 2 +-
testsuite/lib/mailutils.exp | 1 +
3 files changed, 3 insertions(+), 1 deletion(-)
diff --git a/pop3d/testsuite/lib/pop3d.exp b/pop3d/testsuite/lib/pop3d.exp
index 930861d8a..3b67844d2 100644
--- a/pop3d/testsuite/lib/pop3d.exp
+++ b/pop3d/testsuite/lib/pop3d.exp
@@ -26,6 +26,7 @@ if ![mu_check_capability ENABLE_VIRTUAL_DOMAINS] {
}
set POP3D_ETC_DIR "$MU_DATA_DIR/etc"
+set MU_PASSWD_HASH [exec mkpasswd --method=yescrypt guessme]
mu_makespool "$MU_RC_DIR" "$POP3D_ETC_DIR"
mu_create_config pop3d
diff --git a/testsuite/etc/passwd.in b/testsuite/etc/passwd.in
index c4e471b09..b13a75238 100644
--- a/testsuite/etc/passwd.in
+++ b/testsuite/etc/passwd.in
@@ -1 +1 @@
-user:abld/G2Q2Le2w:1000:1000:Test User:$MU_SPOOL_DIR:/bin/sh
+user:$MU_PASSWD_HASH:1000:1000:Test User:$MU_SPOOL_DIR:/bin/sh
diff --git a/testsuite/lib/mailutils.exp b/testsuite/lib/mailutils.exp
index e4d45c85b..725ccf259 100644
--- a/testsuite/lib/mailutils.exp
+++ b/testsuite/lib/mailutils.exp
@@ -39,6 +39,7 @@ proc mu_copy_file {src dst} {
global MU_FOLDER_DIR
global MU_RC_DIR
global MU_DATA_DIR
+ global MU_PASSWD_HASH
set input [open $src r]
set output [open $dst w]
--
2.39.2

View File

@@ -0,0 +1,14 @@
diff --git a/frm/frm.h b/frm/frm.h
index 178b87d54..7931faada 100644
--- a/frm/frm.h
+++ b/frm/frm.h
@@ -34,6 +34,9 @@
#ifdef HAVE_ICONV_H
# include <iconv.h>
#endif
+#ifdef HAVE_LIMITS_H
+# include <limits.h>
+#endif
#ifndef MB_LEN_MAX
# define MB_LEN_MAX 4
#endif

View File

@@ -0,0 +1,152 @@
{
lib,
stdenv,
fetchurl,
fetchpatch,
autoreconfHook,
dejagnu,
gettext,
gnum4,
pkg-config,
texinfo,
fribidi,
gdbm,
gnutls,
gss,
guile,
libmysqlclient,
mailcap,
net-tools,
pam,
readline,
ncurses,
python3,
gsasl,
system-sendmail,
libxcrypt,
mkpasswd,
pythonSupport ? true,
guileSupport ? true,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "mailutils";
version = "3.19";
src = fetchurl {
url = "mirror://gnu/mailutils/mailutils-${finalAttrs.version}.tar.xz";
hash = "sha256-UCMNIANsW4rYyWsNmWF38fEz+6THx+O0YtOe6zCEn0U=";
};
separateDebugInfo = true;
postPatch = ''
sed -i -e '/chown root:mail/d' \
-e 's/chmod [24]755/chmod 0755/' \
*/Makefile{.in,.am}
sed -i 's:/usr/lib/mysql:${libmysqlclient}/lib/mysql:' configure.ac
'';
nativeBuildInputs = [
autoreconfHook
gettext
gnum4
pkg-config
texinfo
];
buildInputs = [
fribidi
gdbm
gnutls
gss
libmysqlclient
mailcap
ncurses
pam
readline
gsasl
libxcrypt
]
++ lib.optionals stdenv.hostPlatform.isLinux [ net-tools ]
++ lib.optionals pythonSupport [ python3 ]
++ lib.optionals guileSupport [ guile ];
patches = [
./fix-build-mb-len-max.patch
./path-to-cat.patch
# Fix cross-compilation
# https://lists.gnu.org/archive/html/bug-mailutils/2020-11/msg00038.html
(fetchpatch {
url = "https://lists.gnu.org/archive/html/bug-mailutils/2020-11/txtiNjqcNpqOk.txt";
hash = "sha256-2rhuopBANngq/PRCboIr+ewdawr8472cYwiLjtHCHz4=";
})
# Avoid hardeningDisable = [ "format" ]; - this patch is from the project's master branch and can be removed at the next version
(fetchpatch {
url = "https://cgit.git.savannah.gnu.org/cgit/mailutils.git/patch/?id=9379ec9e25ae6bdbd3d6f5ef9930ac2176d2efe7";
hash = "sha256-00R1DLMDPsvz3R6UgRO1ZvgMNCiHYS3lfjqAC9VD+Y4=";
})
# https://github.com/NixOS/nixpkgs/issues/223967
# https://lists.gnu.org/archive/html/bug-mailutils/2023-04/msg00000.html
./don-t-use-descrypt-password-in-the-test-suite.patch
];
enableParallelBuilding = true;
strictDeps = true;
configureFlags = [
"--sysconfdir=/etc"
"--with-gssapi"
"--with-gsasl"
"--with-mysql"
"--with-path-sendmail=${system-sendmail}/bin/sendmail"
"--with-mail-rc=/etc/mail.rc"
"DEFAULT_CUPS_CONFDIR=${mailcap}/etc" # provides mime.types to mimeview
]
++ lib.optional (!pythonSupport) "--without-python"
++ lib.optional (!guileSupport) "--without-guile";
nativeCheckInputs = [
dejagnu
mkpasswd
];
doCheck = !stdenv.hostPlatform.isDarwin; # ERROR: All 46 tests were run, 46 failed unexpectedly.
meta = {
description = "Rich and powerful protocol-independent mail framework";
longDescription = ''
GNU Mailutils is a rich and powerful protocol-independent mail
framework. It contains a series of useful mail libraries, clients, and
servers. These are the primary mail utilities for the GNU system. The
central library is capable of handling electronic mail in various
mailbox formats and protocols, both local and remote. Specifically,
this project contains a POP3 server, an IMAP4 server, and a Sieve mail
filter. It also provides a POSIX `mailx' client, and a collection of
other handy tools.
The GNU Mailutils libraries supply an ample set of primitives for
handling electronic mail in programs written in C, C++, Python or
Scheme.
The utilities provided by Mailutils include imap4d and pop3d mail
servers, mail reporting utility comsatd, mail filtering program sieve,
and an implementation of MH message handling system.
'';
license = with lib.licenses; [
lgpl3Plus # libraries
gpl3Plus # tools
];
maintainers = with lib.maintainers; [ orivej ];
homepage = "https://www.gnu.org/software/mailutils/";
changelog = "https://git.savannah.gnu.org/cgit/mailutils.git/tree/NEWS";
# Some of the dependencies fail to build on {cyg,dar}win.
platforms = lib.platforms.gnu ++ lib.platforms.unix;
};
})

View File

@@ -0,0 +1,52 @@
diff --git a/mh/show.c b/mh/show.c
index a43afe10c..6985386ec 100644
--- a/mh/show.c
+++ b/mh/show.c
@@ -254,7 +254,7 @@ main (int argc, char **argv)
*/
if (!use_showproc)
- showproc = "/bin/cat";
+ showproc = "cat";
else
showproc = mh_global_profile_get ("showproc", NULL);
diff --git a/mh/tests/mhparam.at b/mh/tests/mhparam.at
index 54b7fc06a..3abd5bf9b 100644
--- a/mh/tests/mhparam.at
+++ b/mh/tests/mhparam.at
@@ -28,7 +28,7 @@ mhparam -all | tr '\t' ' ' | sed 's/^Path:.*/Path: Mail/;s/^mhetcdir:.*/mhetcdir
[0],
[Path: Mail
mhetcdir: dir
-moreproc: /bin/cat
+moreproc: cat
Sequence-Negation: not
Draft-Folder: Mail/drafts
Aliasfile: .mh_aliases
diff --git a/mh/tests/testsuite.at b/mh/tests/testsuite.at
index c6820843c..6675a4a9c 100644
--- a/mh/tests/testsuite.at
+++ b/mh/tests/testsuite.at
@@ -25,7 +25,7 @@ export MH
cat > $MH <<EOT
Path: $HOME/Mail
mhetcdir: $abs_top_srcdir/mh/etc
-moreproc: /bin/cat
+moreproc: cat
EOT
MTSTAILOR=$HOME/mtstailor
export MTSTAILOR
diff --git a/testsuite/lib/mailutils.exp b/testsuite/lib/mailutils.exp
index d4691d922..c1b056933 100644
--- a/testsuite/lib/mailutils.exp
+++ b/testsuite/lib/mailutils.exp
@@ -728,7 +728,7 @@ proc mu_test_file {args} {
set pattern [lrange $args 1 end]
}
- set res [remote_spawn host "/bin/cat $filename"]
+ set res [remote_spawn host "cat $filename"]
if { $res < 0 || $res == "" } {
perror "Reading $filename failed."
return 1;

View File

@@ -0,0 +1,73 @@
{
lib,
stdenv,
fetchFromGitHub,
cmake,
pkg-config,
zlib,
libpng,
libjpeg,
libwebp,
libGLU,
libGL,
glm,
libX11,
libXext,
libXfixes,
libXrandr,
libXcomposite,
slop,
icu,
}:
stdenv.mkDerivation rec {
pname = "maim";
version = "5.8.1";
src = fetchFromGitHub {
owner = "naelstrof";
repo = "maim";
rev = "v${version}";
hash = "sha256-bbjV3+41cxAlKCEd1/nvnZ19GhctWOr5Lu4X+Vg3EAk=";
};
# TODO: drop -DCMAKE_POLICY_VERSION_MINIMUM once maim adds CMake 4 support
cmakeFlags = [ "-DCMAKE_POLICY_VERSION_MINIMUM=3.10" ];
nativeBuildInputs = [
cmake
pkg-config
];
buildInputs = [
zlib
libpng
libjpeg
libwebp
libGLU
libGL
glm
libX11
libXext
libXfixes
libXrandr
libXcomposite
slop
icu
];
doCheck = false;
meta = {
mainProgram = "maim";
inherit (src.meta) homepage;
description = "Command-line screenshot utility";
longDescription = ''
maim (make image) takes screenshots of your desktop. It has options to
take only a region, and relies on slop to query for regions. maim is
supposed to be an improved scrot.
'';
changelog = "https://github.com/naelstrof/maim/releases/tag/v${version}";
platforms = lib.platforms.all;
license = lib.licenses.gpl3Plus;
maintainers = [ ];
};
}

View File

@@ -0,0 +1,49 @@
{
lib,
buildNpmPackage,
fetchFromGitHub,
}:
buildNpmPackage rec {
pname = "mainsail";
version = "2.14.0";
src = fetchFromGitHub {
owner = "mainsail-crew";
repo = "mainsail";
rev = "v${version}";
hash = "sha256-hZgENY1Vb0wr6fqQfodjXQ+a/JAca0AQFKHlTc4EG68=";
};
npmDepsHash = "sha256-9pkcQS281OC9q9WadctQ/GAgbaeejrj7HLwKK/SDkAU=";
# Prevent Cypress binary download.
CYPRESS_INSTALL_BINARY = 0;
preConfigure = ''
# Make the build.zip target do nothing, since we will just copy these files later.
sed -e 's/"build.zip":.*,$/"build.zip": "",/g' -i package.json
'';
installPhase = ''
runHook preInstall
mkdir -p $out/share
cp -r ./dist $out/share/mainsail
runHook postInstall
'';
meta = {
description = "Web interface for managing and controlling 3D printers with Klipper";
homepage = "https://docs.mainsail.xyz";
changelog = "https://github.com/mainsail-crew/mainsail/releases/tag/v${version}";
license = lib.licenses.gpl3Plus;
platforms = lib.platforms.linux;
maintainers = with lib.maintainers; [
shhht
lovesegfault
wulfsta
];
};
}

View File

@@ -0,0 +1,39 @@
{
lib,
stdenv,
fetchFromGitHub,
zlib,
bzip2,
bison,
flex,
}:
stdenv.mkDerivation {
pname = "mairix";
version = "0.24-unstable-2024-09-14";
src = fetchFromGitHub {
owner = "vandry";
repo = "mairix";
rev = "f6c7a5aa141d2b201e8a299ab889ff1ed23992ea";
hash = "sha256-7SgBbQPuz07eoZJ9km6yYEjkyf2p+BPW1ec0X2X8pKE=";
};
buildInputs = [
zlib
bzip2
bison
flex
];
enableParallelBuilding = true;
meta = {
homepage = "http://www.rc0.org.uk/mairix";
license = lib.licenses.gpl2Plus;
description = "Program for indexing and searching email messages stored in maildir, MH or mbox";
mainProgram = "mairix";
maintainers = [ ];
platforms = lib.platforms.all;
};
}

View File

@@ -0,0 +1,29 @@
{
lib,
buildNpmPackage,
fetchFromGitHub,
}:
buildNpmPackage rec {
pname = "maizzle";
version = "2.0.0";
src = fetchFromGitHub {
owner = "maizzle";
repo = "cli";
rev = "v${version}";
hash = "sha256-Nzl4Pp1jY+LaQgLDJHjEdDA8b6MOfMXZNpvazPdmrTA=";
};
npmDepsHash = "sha256-ZPZALeuerHXAJuoCcqIwxsChuhBJ/zABYjb7+pcs4pU=";
dontNpmBuild = true;
meta = {
description = "CLI tool for the Maizzle Email Framework";
homepage = "https://github.com/maizzle/cli";
license = lib.licenses.mit;
mainProgram = "maizzle";
maintainers = with lib.maintainers; [ happysalada ];
};
}

View File

@@ -0,0 +1,26 @@
{
lib,
fetchFromSourcehut,
rustPlatform,
}:
rustPlatform.buildRustPackage {
pname = "majima";
version = "0.5.1";
src = fetchFromSourcehut {
owner = "~wq";
repo = "majima";
rev = "630427fcd158ccbaafe8bc3f7368fa8577b03548";
hash = "sha256-znlJY/U7H+BvBM7n4IqE5x9ek1/QVxYkptsAnODz/Q0=";
};
cargoHash = "sha256-I0txA41rmTZ3AHllRVsJzmZXbrm5+GSdd08EatxKCzk=";
meta = {
description = "Generate random usernames quickly and in various formats";
homepage = "https://majima.matte.fyi/";
license = lib.licenses.mit;
maintainers = [ lib.maintainers.ufUNnxagpM ];
mainProgram = "majima";
};
}

View File

@@ -0,0 +1,43 @@
{
lib,
stdenvNoCC,
fetchFromGitHub,
}:
stdenvNoCC.mkDerivation {
pname = "major-mono-display";
version = "2.000";
src = fetchFromGitHub {
owner = "googlefonts";
repo = "majormono";
rev = "fae0bb9c728fe082097baedaf23604e290ddac16";
hash = "sha256-ishGGr8bY6UjEG/Hn5We8hOO5mcDq/41+DMn+dQGGUA=";
};
installPhase = ''
runHook preInstall
install -Dm444 -t $out/share/fonts/truetype fonts/*.ttf
runHook postInstall
'';
meta = {
description = "Monospaced geometric sans serif all-uppercase typeface";
longDescription = ''
Majör is a monospaced geometric sans serif all-uppercase typeface
which also has a complete set of constructivist display characters
with a playful attitude. It has many Opentype features but the basic
variation between serious/playful faces can be implemented on web use
where Opentype features can be hard to apply, thanks to the fact that
the sans serif and the display versions of the letterforms can be
reached via lowercase and uppercase options. This makes Majör a great
choice for web typography, especially at large point-sizes.
'';
homepage = "https://github.com/googlefonts/majormono";
license = lib.licenses.ofl;
platforms = lib.platforms.all;
maintainers = with lib.maintainers; [ mimvoid ];
};
}

View File

@@ -0,0 +1,480 @@
set -euo pipefail
# Assert that FILE exists and is executable
#
# assertExecutable FILE
assertExecutable() {
local file="$1"
[[ -f "$file" && -x "$file" ]] || \
die "Cannot wrap '$file' because it is not an executable file"
}
# Generate a binary executable wrapper for wrapping an executable.
# The binary is compiled from generated C-code using gcc.
# makeWrapper EXECUTABLE OUT_PATH ARGS
# ARGS:
# --argv0 NAME : set the name of the executed process to NAME
# (if unset or empty, defaults to EXECUTABLE)
# --inherit-argv0 : the executable inherits argv0 from the wrapper.
# (use instead of --argv0 '$0')
# --resolve-argv0 : if argv0 doesn't include a / character, resolve it against PATH
# --set VAR VAL : add VAR with value VAL to the executable's environment
# --set-default VAR VAL : like --set, but only adds VAR if not already set in
# the environment
# --unset VAR : remove VAR from the environment
# --chdir DIR : change working directory (use instead of --run "cd DIR")
# --add-flag ARG : prepend the single argument ARG to the invocation of the executable
# (that is, *before* any arguments passed on the command line)
# --append-flag ARG : append the single argument ARG to the invocation of the executable
# (that is, *after* any arguments passed on the command line)
# --add-flags ARGS : prepend the whitespace-separated list of arguments ARGS to the invocation of the executable
# --append-flags ARGS : append the whitespace-separated list of arguments ARGS to the invocation of the executable
# --prefix ENV SEP VAL : suffix/prefix ENV with VAL, separated by SEP
# --suffix
# To troubleshoot a binary wrapper after you compiled it,
# use the `strings` command or open the binary file in a text editor.
makeWrapper() { makeBinaryWrapper "$@"; }
makeBinaryWrapper() {
local NIX_CFLAGS_COMPILE= NIX_CFLAGS_LINK=
local original="$1"
local wrapper="$2"
shift 2
assertExecutable "$original"
mkdir -p "$(dirname "$wrapper")"
makeDocumentedCWrapper "$original" "$@" | \
@cc@ \
-Wall -Werror -Wpedantic \
-Wno-overlength-strings \
-Os \
-x c \
-o "$wrapper" -
}
# Syntax: wrapProgram <PROGRAM> <MAKE-WRAPPER FLAGS...>
wrapProgram() { wrapProgramBinary "$@"; }
wrapProgramBinary() {
local prog="$1"
local hidden
assertExecutable "$prog"
hidden="$(dirname "$prog")/.$(basename "$prog")"-wrapped
while [ -e "$hidden" ]; do
hidden="${hidden}_"
done
mv "$prog" "$hidden"
makeBinaryWrapper "$hidden" "$prog" --inherit-argv0 "${@:2}"
}
# Generate source code for the wrapper in such a way that the wrapper inputs
# will still be readable even after compilation
# makeDocumentedCWrapper EXECUTABLE ARGS
# ARGS: same as makeWrapper
makeDocumentedCWrapper() {
local src docs
src=$(makeCWrapper "$@")
docs=$(docstring "$@")
printf '%s\n\n' "$src"
printf '%s\n' "$docs"
}
# makeCWrapper EXECUTABLE ARGS
# ARGS: same as makeWrapper
makeCWrapper() {
local argv0 inherit_argv0 n params cmd main flags executable length
local uses_prefix uses_suffix uses_assert uses_assert_success uses_stdio uses_asprintf
local flagsBefore=() flagsAfter=()
executable=$(escapeStringLiteral "$1")
params=("$@")
length=${#params[*]}
for ((n = 1; n < length; n += 1)); do
p="${params[n]}"
case $p in
--set)
cmd=$(setEnv "${params[n + 1]}" "${params[n + 2]}")
main="$main$cmd"$'\n'
n=$((n + 2))
[ $n -ge "$length" ] && main="$main#error makeCWrapper: $p takes 2 arguments"$'\n'
;;
--set-default)
cmd=$(setDefaultEnv "${params[n + 1]}" "${params[n + 2]}")
main="$main$cmd"$'\n'
uses_stdio=1
uses_assert_success=1
n=$((n + 2))
[ $n -ge "$length" ] && main="$main#error makeCWrapper: $p takes 2 arguments"$'\n'
;;
--unset)
cmd=$(unsetEnv "${params[n + 1]}")
main="$main$cmd"$'\n'
uses_stdio=1
uses_assert_success=1
n=$((n + 1))
[ $n -ge "$length" ] && main="$main#error makeCWrapper: $p takes 1 argument"$'\n'
;;
--prefix)
cmd=$(setEnvPrefix "${params[n + 1]}" "${params[n + 2]}" "${params[n + 3]}")
main="$main$cmd"$'\n'
uses_prefix=1
uses_asprintf=1
uses_stdio=1
uses_assert_success=1
uses_assert=1
n=$((n + 3))
[ $n -ge "$length" ] && main="$main#error makeCWrapper: $p takes 3 arguments"$'\n'
;;
--suffix)
cmd=$(setEnvSuffix "${params[n + 1]}" "${params[n + 2]}" "${params[n + 3]}")
main="$main$cmd"$'\n'
uses_suffix=1
uses_asprintf=1
uses_stdio=1
uses_assert_success=1
uses_assert=1
n=$((n + 3))
[ $n -ge "$length" ] && main="$main#error makeCWrapper: $p takes 3 arguments"$'\n'
;;
--chdir)
cmd=$(changeDir "${params[n + 1]}")
main="$main$cmd"$'\n'
uses_stdio=1
uses_assert_success=1
n=$((n + 1))
[ $n -ge "$length" ] && main="$main#error makeCWrapper: $p takes 1 argument"$'\n'
;;
--add-flag)
flagsBefore+=("${params[n + 1]}")
uses_assert=1
n=$((n + 1))
[ $n -ge "$length" ] && main="$main#error makeCWrapper: $p takes 1 argument"$'\n'
;;
--append-flag)
flagsAfter+=("${params[n + 1]}")
uses_assert=1
n=$((n + 1))
[ $n -ge "$length" ] && main="$main#error makeCWrapper: $p takes 1 argument"$'\n'
;;
--add-flags)
read -ra flags <<< "${params[n + 1]}"
flagsBefore+=("${flags[@]}")
uses_assert=1
n=$((n + 1))
[ $n -ge "$length" ] && main="$main#error makeCWrapper: $p takes 1 argument"$'\n'
;;
--append-flags)
read -ra flags <<< "${params[n + 1]}"
flagsAfter+=("${flags[@]}")
uses_assert=1
n=$((n + 1))
[ $n -ge "$length" ] && main="$main#error makeCWrapper: $p takes 1 argument"$'\n'
;;
--argv0)
argv0=$(escapeStringLiteral "${params[n + 1]}")
inherit_argv0=
n=$((n + 1))
[ $n -ge "$length" ] && main="$main#error makeCWrapper: $p takes 1 argument"$'\n'
;;
--inherit-argv0)
# Whichever comes last of --argv0 and --inherit-argv0 wins
inherit_argv0=1
;;
--resolve-argv0)
# this gets processed after other argv0 flags
uses_stdio=1
uses_string=1
resolve_argv0=1
;;
*) # Using an error macro, we will make sure the compiler gives an understandable error message
main="$main#error makeCWrapper: Unknown argument ${p}"$'\n'
;;
esac
done
(( ${#flagsBefore[@]} + ${#flagsAfter[@]} > 0 )) && main="$main"${main:+$'\n'}$(addFlags flagsBefore flagsAfter)$'\n'$'\n'
[ -z "$inherit_argv0" ] && main="${main}argv[0] = \"${argv0:-${executable}}\";"$'\n'
[ -z "$resolve_argv0" ] || main="${main}argv[0] = resolve_argv0(argv[0]);"$'\n'
main="${main}return execv(\"${executable}\", argv);"$'\n'
[ -z "$uses_asprintf" ] || printf '%s\n' "#define _GNU_SOURCE /* See feature_test_macros(7) */"
printf '%s\n' "#include <unistd.h>"
printf '%s\n' "#include <stdlib.h>"
[ -z "$uses_assert" ] || printf '%s\n' "#include <assert.h>"
[ -z "$uses_stdio" ] || printf '%s\n' "#include <stdio.h>"
[ -z "$uses_string" ] || printf '%s\n' "#include <string.h>"
[ -z "$uses_assert_success" ] || printf '\n%s\n' "#define assert_success(e) do { if ((e) < 0) { perror(#e); abort(); } } while (0)"
[ -z "$uses_prefix" ] || printf '\n%s\n' "$(setEnvPrefixFn)"
[ -z "$uses_suffix" ] || printf '\n%s\n' "$(setEnvSuffixFn)"
[ -z "$resolve_argv0" ] || printf '\n%s\n' "$(resolveArgv0Fn)"
printf '\n%s' "int main(int argc, char **argv) {"
printf '\n%s' "$(indent4 "$main")"
printf '\n%s\n' "}"
}
addFlags() {
local n flag var
local -n before=$1
local -n after=$2
var="argv_tmp"
printf '%s\n' "char **$var = calloc(${#before[@]} + argc + ${#after[@]} + 1, sizeof(*$var));"
printf '%s\n' "assert($var != NULL);"
printf '%s\n' "${var}[0] = argv[0];"
for ((n = 0; n < ${#before[@]}; n += 1)); do
flag=$(escapeStringLiteral "${before[n]}")
printf '%s\n' "${var}[$((n + 1))] = \"$flag\";"
done
printf '%s\n' "for (int i = 1; i < argc; ++i) {"
printf '%s\n' " ${var}[${#before[@]} + i] = argv[i];"
printf '%s\n' "}"
for ((n = 0; n < ${#after[@]}; n += 1)); do
flag=$(escapeStringLiteral "${after[n]}")
printf '%s\n' "${var}[${#before[@]} + argc + $n] = \"$flag\";"
done
printf '%s\n' "${var}[${#before[@]} + argc + ${#after[@]}] = NULL;"
printf '%s\n' "argv = $var;"
}
# chdir DIR
changeDir() {
local dir
dir=$(escapeStringLiteral "$1")
printf '%s' "assert_success(chdir(\"$dir\"));"
}
# prefix ENV SEP VAL
setEnvPrefix() {
local env sep val
env=$(escapeStringLiteral "$1")
sep=$(escapeStringLiteral "$2")
val=$(escapeStringLiteral "$3")
printf '%s' "set_env_prefix(\"$env\", \"$sep\", \"$val\");"
assertValidEnvName "$1"
}
# suffix ENV SEP VAL
setEnvSuffix() {
local env sep val
env=$(escapeStringLiteral "$1")
sep=$(escapeStringLiteral "$2")
val=$(escapeStringLiteral "$3")
printf '%s' "set_env_suffix(\"$env\", \"$sep\", \"$val\");"
assertValidEnvName "$1"
}
# setEnv KEY VALUE
setEnv() {
local key value
key=$(escapeStringLiteral "$1")
value=$(escapeStringLiteral "$2")
printf '%s' "putenv(\"$key=$value\");"
assertValidEnvName "$1"
}
# setDefaultEnv KEY VALUE
setDefaultEnv() {
local key value
key=$(escapeStringLiteral "$1")
value=$(escapeStringLiteral "$2")
printf '%s' "assert_success(setenv(\"$key\", \"$value\", 0));"
assertValidEnvName "$1"
}
# unsetEnv KEY
unsetEnv() {
local key
key=$(escapeStringLiteral "$1")
printf '%s' "assert_success(unsetenv(\"$key\"));"
assertValidEnvName "$1"
}
# Makes it safe to insert STRING within quotes in a C String Literal.
# escapeStringLiteral STRING
escapeStringLiteral() {
local result
result=${1//$'\\'/$'\\\\'}
result=${result//\"/'\"'}
result=${result//$'\n'/"\n"}
result=${result//$'\r'/"\r"}
printf '%s' "$result"
}
# Indents every non-empty line by 4 spaces. To avoid trailing whitespace, we don't indent empty lines
# indent4 TEXT_BLOCK
indent4() {
printf '%s' "$1" | awk '{ if ($0 != "") { print " "$0 } else { print $0 }}'
}
assertValidEnvName() {
case "$1" in
*=*) printf '\n%s\n' "#error Illegal environment variable name \`$1\` (cannot contain \`=\`)";;
"") printf '\n%s\n' "#error Environment variable name can't be empty.";;
esac
}
setEnvPrefixFn() {
printf '%s' "\
void set_env_prefix(char *env, char *sep, char *prefix) {
char *existing = getenv(env);
if (existing) {
char *val;
assert_success(asprintf(&val, \"%s%s%s\", prefix, sep, existing));
assert_success(setenv(env, val, 1));
free(val);
} else {
assert_success(setenv(env, prefix, 1));
}
}
"
}
setEnvSuffixFn() {
printf '%s' "\
void set_env_suffix(char *env, char *sep, char *suffix) {
char *existing = getenv(env);
if (existing) {
char *val;
assert_success(asprintf(&val, \"%s%s%s\", existing, sep, suffix));
assert_success(setenv(env, val, 1));
free(val);
} else {
assert_success(setenv(env, suffix, 1));
}
}
"
}
resolveArgv0Fn() {
printf '%s' "\
char *resolve_argv0(char *argv0) {
if (strchr(argv0, '/') != NULL) {
return argv0;
}
char *path = getenv(\"PATH\");
if (path == NULL) {
return argv0;
}
char *path_copy = strdup(path);
if (path_copy == NULL) {
return argv0;
}
char *dir = strtok(path_copy, \":\");
while (dir != NULL) {
char *candidate = malloc(strlen(dir) + strlen(argv0) + 2);
if (candidate == NULL) {
free(path_copy);
return argv0;
}
sprintf(candidate, \"%s/%s\", dir, argv0);
if (access(candidate, X_OK) == 0) {
free(path_copy);
return candidate;
}
free(candidate);
dir = strtok(NULL, \":\");
}
free(path_copy);
return argv0;
}
"
}
# Embed a C string which shows up as readable text in the compiled binary wrapper,
# giving instructions for recreating the wrapper.
# Keep in sync with makeBinaryWrapper.extractCmd
docstring() {
printf '%s' "const char * DOCSTRING = \"$(escapeStringLiteral "
# ------------------------------------------------------------------------------------
# The C-code for this binary wrapper has been generated using the following command:
makeCWrapper $(formatArgs "$@")
# (Use \`nix-shell -p makeBinaryWrapper\` to get access to makeCWrapper in your shell)
# ------------------------------------------------------------------------------------
")\";"
}
# formatArgs EXECUTABLE ARGS
formatArgs() {
printf '%s' "${1@Q}"
shift
while [ $# -gt 0 ]; do
case "$1" in
--set)
formatArgsLine 2 "$@"
shift 2
;;
--set-default)
formatArgsLine 2 "$@"
shift 2
;;
--unset)
formatArgsLine 1 "$@"
shift 1
;;
--prefix)
formatArgsLine 3 "$@"
shift 3
;;
--suffix)
formatArgsLine 3 "$@"
shift 3
;;
--chdir)
formatArgsLine 1 "$@"
shift 1
;;
--add-flag)
formatArgsLine 1 "$@"
shift 1
;;
--append-flag)
formatArgsLine 1 "$@"
shift 1
;;
--add-flags)
formatArgsLine 1 "$@"
shift 1
;;
--append-flags)
formatArgsLine 1 "$@"
shift 1
;;
--argv0)
formatArgsLine 1 "$@"
shift 1
;;
--inherit-argv0)
formatArgsLine 0 "$@"
;;
esac
shift
done
printf '%s\n' ""
}
# formatArgsLine ARG_COUNT ARGS
formatArgsLine() {
local ARG_COUNT LENGTH
ARG_COUNT=$1
LENGTH=$#
shift
printf '%s' $' \\\n '"$1"
shift
while [ "$ARG_COUNT" -gt $((LENGTH - $# - 2)) ]; do
printf ' %s' "${1@Q}"
shift
done
}

View File

@@ -0,0 +1,33 @@
{
targetPackages,
lib,
makeSetupHook,
dieHook,
writeShellScript,
tests,
cc ? targetPackages.stdenv.cc,
sanitizers ? [ ],
}:
makeSetupHook {
name = "make-binary-wrapper-hook";
propagatedBuildInputs = [ dieHook ];
substitutions = {
cc = "${cc}/bin/${cc.targetPrefix}cc ${
lib.escapeShellArgs (map (s: "-fsanitize=${s}") sanitizers)
+ lib.optionalString (
cc.isClang && !cc.stdenv.hostPlatform.isDarwin
) "--ld-path=${cc.targetPrefix}ld"
}";
};
passthru = {
# Extract the function call used to create a binary wrapper from its embedded docstring
extractCmd = writeShellScript "extract-binary-wrapper-cmd" ''
${targetPackages.gnuStdenv.cc.bintools.targetPrefix}strings -dw "$1" | sed -n '/^makeCWrapper/,/^$/ p'
'';
tests = tests.makeBinaryWrapper;
};
} ./make-binary-wrapper.sh

View File

@@ -0,0 +1,23 @@
{
lib,
stdenv,
fetchurl,
}:
stdenv.mkDerivation rec {
pname = "makebootfat";
version = "1.4";
src = fetchurl {
url = "mirror://sourceforge/advancemame/makebootfat-${version}.tar.gz";
sha256 = "0v0g1xax0y6hmw2x10nfhchp9n7vqyvgc33gcxqax8jdq2pxm1q2";
};
meta = with lib; {
description = "Create bootable USB disks using the FAT filesystem and syslinux";
homepage = "http://advancemame.sourceforge.net/boot-readme.html";
license = licenses.gpl2Plus;
platforms = platforms.linux;
mainProgram = "makebootfat";
};
}

View File

@@ -0,0 +1,43 @@
{
lib,
stdenv,
fetchurl,
pkg-config,
writeScript,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "makedepend";
version = "1.0.9";
src = fetchurl {
url = "mirror://xorg/individual/util/makedepend-${finalAttrs.version}.tar.xz";
hash = "sha256-ktDetln/9tjdvB0n/EyozrK22+Fdc/CgTtwJ8cV4LdQ=";
};
strictDeps = true;
nativeBuildInputs = [ pkg-config ];
passthru = {
updateScript = writeScript "update-${finalAttrs.pname}" ''
#!/usr/bin/env nix-shell
#!nix-shell -i bash -p common-updater-scripts
version="$(list-directory-versions --pname ${finalAttrs.pname} \
--url https://xorg.freedesktop.org/releases/individual/util/ \
| sort -V | tail -n1)"
update-source-version ${finalAttrs.pname} "$version"
'';
};
meta = {
description = "Parse C sources to make dependency lists for Makefiles";
homepage = "https://gitlab.freedesktop.org/xorg/util/makedepend";
license = with lib.licenses; [
mitOpenGroup
hpnd
];
mainProgram = "makedepend";
maintainers = [ ];
platforms = lib.platforms.unix;
};
})

View File

@@ -0,0 +1,40 @@
{
lib,
stdenv,
fetchFromGitHub,
makeWrapper,
bash,
gnumake,
}:
stdenv.mkDerivation rec {
pname = "makefile2graph";
version = "2021.11.06";
src = fetchFromGitHub {
owner = "lindenb";
repo = "makefile2graph";
tag = version;
hash = "sha256-4jyftC0eCJ13X/L4uEWhT5FA5/UXUmSHSoba89GSySQ=";
};
nativeBuildInputs = [ makeWrapper ];
makeFlags = [ "prefix=$(out)" ];
fixupPhase = ''
substituteInPlace $out/bin/makefile2graph \
--replace '/bin/sh' ${bash}/bin/bash \
--replace 'make2graph' "$out/bin/make2graph"
wrapProgram $out/bin/makefile2graph \
--set PATH ${lib.makeBinPath [ gnumake ]}
'';
meta = with lib; {
homepage = "https://github.com/lindenb/makefile2graph";
description = "Creates a graph of dependencies from GNU-Make; Output is a graphiz-dot file or a Gexf-XML file";
maintainers = with maintainers; [ cmcdragonkai ];
license = licenses.mit;
platforms = platforms.all;
};
}

View File

@@ -0,0 +1,51 @@
{
lib,
python3Packages,
fetchFromGitHub,
}:
python3Packages.buildPythonApplication rec {
pname = "makejinja";
version = "2.8.1";
pyproject = true;
src = fetchFromGitHub {
owner = "mirkolenz";
repo = "makejinja";
tag = "v${version}";
hash = "sha256-vK5MJb4n3/NmkohpJ1shEexvjHlEAfwZJWy2oL+rzRk=";
};
build-system = with python3Packages; [ setuptools ];
dependencies =
with python3Packages;
[
jinja2
pyyaml
rich-click
typed-settings
immutables
]
++ typed-settings.optional-dependencies.attrs
++ typed-settings.optional-dependencies.cattrs
++ typed-settings.optional-dependencies.click;
nativeCheckInputs = with python3Packages; [
pytest-cov-stub
pytestCheckHook
];
meta = {
description = "Generate entire directory structures using Jinja templates with support for external data and custom plugins";
homepage = "https://github.com/mirkolenz/makejinja";
license = lib.licenses.mit;
mainProgram = "makejinja";
maintainers = with lib.maintainers; [
tomasajt
mirkolenz
];
platforms = lib.platforms.darwin ++ lib.platforms.linux;
changelog = "https://github.com/mirkolenz/makejinja/blob/${src.tag}/CHANGELOG.md";
};
}

View File

@@ -0,0 +1,139 @@
{
autoPatchelfHook,
common-updater-scripts,
curl,
fetchurl,
ffmpeg,
lib,
stdenv,
qt5,
openssl,
pkg-config,
rubyPackages,
writeShellApplication,
zlib,
withJava ? true,
jre_headless,
}:
let
version = "1.18.2";
# Using two URLs as the first one will break as soon as a new version is released
src_bin = fetchurl {
urls = [
"http://www.makemkv.com/download/makemkv-bin-${version}.tar.gz"
"http://www.makemkv.com/download/old/makemkv-bin-${version}.tar.gz"
];
hash = "sha256-v8THzrwPAEl2cf/Vbmo08HcKnmr37/LwEn76FD8oY24=";
};
src_oss = fetchurl {
urls = [
"http://www.makemkv.com/download/makemkv-oss-${version}.tar.gz"
"http://www.makemkv.com/download/old/makemkv-oss-${version}.tar.gz"
];
hash = "sha256-uUl/VVXCV/XTx/GLarA8dM/z6kQ36ANJ1hjRFb9fpEU=";
};
in
stdenv.mkDerivation {
pname = "makemkv";
inherit version;
srcs = [
src_bin
src_oss
];
sourceRoot = "makemkv-oss-${version}";
patches = [ ./r13y.patch ];
enableParallelBuilding = true;
nativeBuildInputs = [
autoPatchelfHook
pkg-config
qt5.wrapQtAppsHook
];
buildInputs = [
ffmpeg
openssl
qt5.qtbase
zlib
];
runtimeDependencies = [ (lib.getLib curl) ];
qtWrapperArgs =
let
binPath = lib.makeBinPath [ jre_headless ];
in
lib.optionals withJava [ "--prefix PATH : ${binPath}" ];
installPhase = ''
runHook preInstall
install -Dm555 -t $out/bin out/makemkv out/mmccextr out/mmgplsrv ../makemkv-bin-${version}/bin/amd64/makemkvcon
install -D -t $out/lib out/lib{driveio,makemkv,mmbd}.so.*
install -D -t $out/share/MakeMKV ../makemkv-bin-${version}/src/share/*
install -Dm444 -t $out/share/applications ../makemkv-oss-${version}/makemkvgui/share/makemkv.desktop
install -Dm444 -t $out/share/icons/hicolor/16x16/apps ../makemkv-oss-${version}/makemkvgui/share/icons/16x16/*
install -Dm444 -t $out/share/icons/hicolor/32x32/apps ../makemkv-oss-${version}/makemkvgui/share/icons/32x32/*
install -Dm444 -t $out/share/icons/hicolor/64x64/apps ../makemkv-oss-${version}/makemkvgui/share/icons/64x64/*
install -Dm444 -t $out/share/icons/hicolor/128x128/apps ../makemkv-oss-${version}/makemkvgui/share/icons/128x128/*
install -Dm444 -t $out/share/icons/hicolor/256x256/apps ../makemkv-oss-${version}/makemkvgui/share/icons/256x256/*
runHook postInstall
'';
passthru = {
srcs = {
inherit src_bin src_oss;
};
updateScript = lib.getExe (writeShellApplication {
name = "update-makemkv";
runtimeInputs = [
common-updater-scripts
curl
rubyPackages.nokogiri
];
text = ''
get_version() {
# shellcheck disable=SC2016
curl --fail --silent 'https://forum.makemkv.com/forum/viewtopic.php?f=3&t=224' \
| nokogiri -e 'puts $_.css("head title").first.text.match(/\bMakeMKV (\d+\.\d+\.\d+) /)[1]'
}
oldVersion=${lib.escapeShellArg version}
newVersion=$(get_version)
if [[ $oldVersion == "$newVersion" ]]; then
echo "$0: New version same as old version, nothing to do." >&2
exit
fi
update-source-version makemkv "$newVersion" --source-key=passthru.srcs.src_bin
update-source-version makemkv "$newVersion" --source-key=passthru.srcs.src_oss --ignore-same-version
'';
});
};
meta = with lib; {
description = "Convert blu-ray and dvd to mkv";
longDescription = ''
makemkv is a one-click QT application that transcodes an encrypted
blu-ray or DVD disc into a more portable set of mkv files, preserving
subtitles, chapter marks, all video and audio tracks.
Program is time-limited -- it will stop functioning after 60 days. You
can always download the latest version from makemkv.com that will reset the
expiration date.
'';
sourceProvenance = with sourceTypes; [ binaryNativeCode ];
license = [
licenses.unfree
licenses.lgpl21
];
homepage = "https://makemkv.com";
platforms = [ "x86_64-linux" ];
maintainers = with maintainers; [ jchw ];
};
}

View File

@@ -0,0 +1,13 @@
diff --git a/Makefile.in b/Makefile.in
index 61c47fc..e08ffac 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -27,7 +27,7 @@ INSTALL=@INSTALL@
OBJCOPY=@OBJCOPY@
LD=@LD@
BUILDINFO_ARCH_NAME=$(shell $(GCC) -dumpmachine)
-BUILDINFO_BUILD_DATE=$(shell date)
+BUILDINFO_BUILD_DATE=$(shell date -d @${SOURCE_DATE_EPOCH})
top_srcdir ?= .
INCF=-I$(top_srcdir)/

View File

@@ -0,0 +1,43 @@
{
lib,
fetchFromGitHub,
rustPlatform,
go-md2man,
installShellFiles,
}:
rustPlatform.buildRustPackage rec {
pname = "maker-panel";
version = "0.12.4";
src = fetchFromGitHub {
owner = "twitchyliquid64";
repo = "maker-panel";
rev = version;
sha256 = "0dlsy0c46781sb652kp80pvga7pzx6xla64axir92fcgg8k803bi";
};
cargoHash = "sha256-H4eKZlay0IZ8vAclGruDAyh7Vd6kCvGLxJ5y/cuF+F4=";
cargoPatches = [ ./update-gerber-types-to-0.3.patch ];
nativeBuildInputs = [
go-md2man
installShellFiles
];
postBuild = ''
go-md2man --in docs/spec-reference.md --out maker-panel.5
'';
postInstall = ''
installManPage maker-panel.5
'';
meta = with lib; {
description = "Make mechanical PCBs by combining shapes together";
homepage = "https://github.com/twitchyliquid64/maker-panel";
license = with licenses; [ mit ];
maintainers = [ ];
};
}

View File

@@ -0,0 +1,109 @@
From e616648213b75f60703bd68e028f0af78199a565 Mon Sep 17 00:00:00 2001
From: Leah Amelia Chen <hi@pluie.me>
Date: Mon, 6 May 2024 10:43:56 +0200
Subject: [PATCH] Update gerber-types to 0.3.0
Required to update num-bigint to ^0.3.3, in order to compile on modern
Rust versions with a native `div_ceil` on unsigned integers.
---
Cargo.lock | 26 ++++++++++++++++----------
Cargo.toml | 2 +-
2 files changed, 17 insertions(+), 11 deletions(-)
diff --git a/Cargo.lock b/Cargo.lock
index 1b15393..41cd500 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -387,7 +387,7 @@ dependencies = [
"log",
"memmap2",
"ttf-parser",
- "uuid",
+ "uuid 0.8.2",
]
[[package]]
@@ -471,15 +471,15 @@ dependencies = [
[[package]]
name = "gerber-types"
-version = "0.2.0"
+version = "0.3.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "c7badd25c55b207eb6607600b73293d9627587b2dc0608031aa8de50e63810d3"
+checksum = "aecf78a269d7b4f73953f30174b18f52c1bb44f7d58f4d830a76c0ea023ad8bc"
dependencies = [
"chrono",
"conv",
"num-rational",
"thiserror",
- "uuid",
+ "uuid 1.8.0",
]
[[package]]
@@ -780,9 +780,9 @@ dependencies = [
[[package]]
name = "num-bigint"
-version = "0.3.2"
+version = "0.4.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "7d0a3d5e207573f948a9e5376662aa743a2ea13f7c50a554d7af443a73fbfeba"
+checksum = "608e7659b5c3d7cba262d894801b9ec9d00de989e8a82bd4bef91d08da45cdc0"
dependencies = [
"autocfg",
"num-integer",
@@ -801,9 +801,9 @@ dependencies = [
[[package]]
name = "num-rational"
-version = "0.3.2"
+version = "0.4.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "12ac428b1cb17fce6f731001d307d351ec70a6d202fc2e60f7d4c5e42d8f4f07"
+checksum = "0638a1c9d0a3c0914158145bc76cff373a75a627e6ecbfb71cbe6f453a5a19b0"
dependencies = [
"autocfg",
"num-bigint",
@@ -813,9 +813,9 @@ dependencies = [
[[package]]
name = "num-traits"
-version = "0.2.14"
+version = "0.2.19"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "9a64b1ec5cda2586e284722486d802acf1f7dbdc623e2bfc57e65ca1cd099290"
+checksum = "071dfc062690e90b734c0b2273ce72ad0ffa95f0c74596bc250dcfd960262841"
dependencies = [
"autocfg",
]
@@ -1379,6 +1379,12 @@ dependencies = [
"getrandom 0.2.2",
]
+[[package]]
+name = "uuid"
+version = "1.8.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "a183cf7feeba97b4dd1c0d46788634f6221d87fa961b305bed08c851829efcc0"
+
[[package]]
name = "vec_map"
version = "0.8.2"
diff --git a/Cargo.toml b/Cargo.toml
index 2f9e8ea..09f0410 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -13,7 +13,7 @@ geo-booleanop = "0.3.2"
geo = "0.16"
usvg = { version = "0.12", default-features = false }
resvg = { version = "0.12", default-features = false }
-gerber-types = "0.2"
+gerber-types = "0.3"
#{ git = "https://github.com/twitchyliquid64/gerber-types-rs", rev = "e927ed2ff68d9e8629dbc36d5f1e5626da472376" }
structopt = "0.3"
zip = { version = "0.5", default-features = false }
--
2.44.0

View File

@@ -0,0 +1,40 @@
{
lib,
stdenv,
fetchFromGitHub,
zlib,
libarchive,
openssl,
}:
stdenv.mkDerivation rec {
version = "1.0";
pname = "makerpm";
installPhase = ''
mkdir -p $out/bin
cp makerpm $out/bin
'';
buildInputs = [
zlib
libarchive
openssl
];
src = fetchFromGitHub {
owner = "ivan-tkatchev";
repo = "makerpm";
rev = version;
sha256 = "089dkbh5705ppyi920rd0ksjc0143xmvnhm8qrx93rsgwc1ggi1y";
};
meta = with lib; {
homepage = "https://github.com/ivan-tkatchev/makerpm/";
description = "Clean, simple RPM packager reimplemented completely from scratch";
mainProgram = "makerpm";
license = licenses.free;
platforms = platforms.all;
maintainers = [ maintainers.ivan-tkatchev ];
};
}

View File

@@ -0,0 +1,60 @@
{
lib,
stdenv,
fetchFromGitHub,
which,
zstd,
pbzip2,
installShellFiles,
}:
stdenv.mkDerivation rec {
pname = "makeself";
version = "2.5.0";
src = fetchFromGitHub {
owner = "megastep";
repo = "makeself";
tag = "release-${version}";
fetchSubmodules = true;
hash = "sha256-QPisihCGnzG9gaZyb/bUroWdPAoC2GdQiz1tSkoScjs=";
};
nativeBuildInputs = [ installShellFiles ];
postPatch = "patchShebangs test";
# Issue #110149: our default /bin/sh apparently has 32-bit math only
# (attribute busybox-sandbox-shell), and that causes problems
# when running these tests inside build, based on free disk space.
doCheck = false;
checkTarget = "test";
nativeCheckInputs = [
which
zstd
pbzip2
];
sharePath = "$out/share/${pname}";
installPhase = ''
runHook preInstall
installManPage makeself.1
install -Dm555 makeself.sh $out/bin/makeself
install -Dm444 -t ${sharePath}/ README.md makeself-header.sh
runHook postInstall
'';
fixupPhase = ''
sed -e "s|^HEADER=.*|HEADER=${sharePath}/makeself-header.sh|" -i $out/bin/makeself
'';
meta = with lib; {
homepage = "https://makeself.io";
description = "Utility to create self-extracting packages";
license = licenses.gpl2;
maintainers = [ maintainers.wmertens ];
platforms = platforms.all;
mainProgram = "makeself";
};
}

View File

@@ -0,0 +1,33 @@
{
lib,
rustPlatform,
fetchFromGitHub,
pkg-config,
udev,
}:
rustPlatform.buildRustPackage rec {
pname = "makima";
version = "0.10.2";
src = fetchFromGitHub {
owner = "cyber-sushi";
repo = "makima";
rev = "v${version}";
hash = "sha256-qvIzoYGU0WZdEPlJ3AR3uqOt2br73Vp8+ZU2xkX2si0=";
};
cargoHash = "sha256-8814sRjYlnWAdOOLjj0VAuDr+Hlr1xTcvqx4Ul6XhR4=";
nativeBuildInputs = [ pkg-config ];
buildInputs = [ udev ];
meta = with lib; {
description = "Linux daemon to remap and create macros for keyboards, mice and controllers";
homepage = "https://github.com/cyber-sushi/makima";
license = licenses.gpl3Plus;
maintainers = with maintainers; [ ByteSudoer ];
platforms = platforms.linux;
mainProgram = "makima";
};
}

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