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,41 @@
{
lib,
stdenv,
fetchFromGitHub,
cmake,
}:
stdenv.mkDerivation rec {
pname = "pe-parse";
version = "2.1.1";
src = fetchFromGitHub {
owner = "trailofbits";
repo = "pe-parse";
rev = "v${version}";
hash = "sha256-XegSZWRoQg6NEWuTSFI1RMvN3GbpLDrZrloPU2XdK2M=";
};
nativeBuildInputs = [ cmake ];
env.NIX_CFLAGS_COMPILE = toString (
lib.optionals stdenv.cc.isClang [
"-Wno-error=deprecated-declarations"
]
);
doInstallCheck = true;
installCheckPhase = ''
$out/bin/dump-pe ../tests/assets/example.exe
'';
meta = {
description = "Principled, lightweight parser for Windows portable executable files";
homepage = "https://github.com/trailofbits/pe-parse";
changelog = "https://github.com/trailofbits/pe-parse/releases/tag/v${version}";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ arturcygan ];
mainProgram = "dump-pe";
platforms = lib.platforms.unix;
};
}

View File

@@ -0,0 +1,72 @@
{
stdenv,
lib,
fetchFromGitHub,
cmake,
config,
enableCuda ? config.cudaSupport,
cudaPackages,
versionCheckHook,
installShellFiles,
unstableGitUpdater,
autoAddDriverRunpath,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "peakperf";
version = "1.17-unstable-2024-10-07";
src = fetchFromGitHub {
owner = "Dr-Noob";
repo = "peakperf";
rev = "289c8a2f58eb51712d346d5c993b3c1d136bf031";
hash = "sha256-CoGWj+zskcv8caFjhy55GKTKqFq2y1/nMjiVc6TzU1c=";
};
nativeBuildInputs = [
cmake
installShellFiles
]
++ lib.optionals enableCuda [
cudaPackages.cuda_nvcc
autoAddDriverRunpath
];
buildInputs = lib.optionals enableCuda [
cudaPackages.cuda_cudart
cudaPackages.cuda_nvml_dev
];
postInstall = ''
installManPage ${finalAttrs.src}/peakperf.1
'';
passthru = {
updateScript = unstableGitUpdater { };
};
nativeInstallCheckInputs = [
versionCheckHook
];
versionCheckProgramArg = [
"-v"
];
preVersionCheck = ''
export version=1.17
'';
doInstallCheck = true;
versionCheckProgram = "${placeholder "out"}/bin/peakperf";
meta = {
homepage = "https://github.com/Dr-Noob/peakperf";
description = "Achieve peak performance on x86 CPUs and NVIDIA GPUs";
mainProgram = "peakperf";
maintainers = with lib.maintainers; [ bot-wxt1221 ];
platforms = [ "x86_64-linux" ];
license = lib.licenses.gpl2Only;
};
})

View File

@@ -0,0 +1,141 @@
{
stdenv,
lib,
fetchFromGitHub,
qt6Packages,
fpc,
lazarus,
xorg,
runCommand,
_7zz,
brotli,
upx,
zpaq,
zstd,
writableTmpDirAsHomeHook,
}:
let
# peazip looks for the "7z", not "7zz"
_7z = runCommand "7z" { } ''
mkdir -p $out/bin
ln -s ${_7zz}/bin/7zz $out/bin/7z
'';
in
stdenv.mkDerivation (finalAttrs: {
pname = "peazip";
version = "10.6.1";
src = fetchFromGitHub {
owner = "peazip";
repo = "peazip";
rev = finalAttrs.version;
hash = "sha256-y+q4S3XHkN2dvHMaRxPQwK9l9LaA5rGvrzzZ+x76qUQ=";
};
sourceRoot = "${finalAttrs.src.name}/peazip-sources";
postPatch = ''
# set it to use compression programs from $PATH
substituteInPlace dev/peach.pas --replace-fail " HSYSBIN = 0;" " HSYSBIN = 2;"
'';
nativeBuildInputs = [
qt6Packages.wrapQtAppsHook
lazarus
fpc
# lazarus tries to create files in $HOME/.lazarus
writableTmpDirAsHomeHook
];
buildInputs = [
xorg.libX11
]
++ (with qt6Packages; [
qtbase
libqtpas
]);
env.NIX_LDFLAGS = "--as-needed -rpath ${lib.makeLibraryPath finalAttrs.buildInputs}";
buildPhase = ''
pushd dev
lazbuild --lazarusdir=${lazarus}/share/lazarus --add-package metadarkstyle/metadarkstyle.lpk
lazbuild --lazarusdir=${lazarus}/share/lazarus --widgetset=qt6 --build-all project_pea.lpi
lazbuild --lazarusdir=${lazarus}/share/lazarus --widgetset=qt6 --build-all project_peach.lpi
popd
'';
installPhase = ''
runHook preInstall
install -D dev/{pea,peazip} -t $out/lib/peazip
mkdir -p $out/bin
makeWrapper $out/lib/peazip/peazip $out/bin/peazip \
--prefix PATH : ${
lib.makeBinPath [
_7z
brotli
upx
zpaq
zstd
]
} \
''${qtWrapperArgs[@]} # putting this here as to not have double wrapping
makeWrapper $out/lib/peazip/pea $out/bin/pea \
''${qtWrapperArgs[@]} # putting this here as to not have double wrapping
mkdir -p $out/share/peazip $out/lib/peazip/res
ln -s $out/share/peazip $out/lib/peazip/res/share
cp -r res/share/{icons,lang,themes,presets} $out/share/peazip/
# Install desktop entries
# We don't copy res/share/batch/freedesktop_integration/additional-desktop-files/*.desktop because they are just duplicates of res/share/batch/freedesktop_integration/*.desktop
install -D res/share/batch/freedesktop_integration/*.desktop -t $out/share/applications
install -D res/share/batch/freedesktop_integration/KDE-servicemenus/KDE6-dolphin/*.desktop -t $out/share/kio/servicemenus
install -D res/share/batch/freedesktop_integration/KDE-servicemenus/KDE5-dolphin/*.desktop -t $out/share/kservices5/ServiceMenus
install -D res/share/batch/freedesktop_integration/KDE-servicemenus/KDE4-dolphin/*.desktop -t $out/share/kde4/services/ServiceMenus
install -D res/share/batch/freedesktop_integration/KDE-servicemenus/KDE3-konqueror/*.desktop -t $out/share/apps/konqueror/servicemenus
# Install desktop entries's icons
for size in {48,256}; do
mkdir -p $out/share/icons/hicolor/"$size"x"$size"/apps
mkdir $out/share/icons/hicolor/"$size"x"$size"/mimetypes
mkdir $out/share/icons/hicolor/"$size"x"$size"/actions
done
pushd res/share/batch/freedesktop_integration
cp peazip.png $out/share/icons/hicolor/256x256/apps/
pushd additional-desktop-files
cp peazip_{7z,cd,zip}.png $out/share/icons/hicolor/256x256/mimetypes/
cp peazip_{add,extract,convert}.png $out/share/icons/hicolor/256x256/actions/
popd
pushd alternative-icons/48px
# for some reason the maintainer only made 48px version of *some* icons
cp peazip.png $out/share/icons/hicolor/48x48/apps/
cp peazip_{add,extract}.png $out/share/icons/hicolor/48x48/actions/
popd
popd
runHook postInstall
'';
dontWrapQtApps = true;
meta = {
description = "File and archive manager";
longDescription = ''
Free Zip / Unzip software and Rar file extractor. File and archive manager.
Features volume spanning, compression, authenticated encryption.
Supports 7Z, 7-Zip sfx, ACE, ARJ, Brotli, BZ2, CAB, CHM, CPIO, DEB, GZ, ISO, JAR, LHA/LZH, NSIS, OOo, PEA, RAR, RPM, split, TAR, Z, ZIP, ZIPX, Zstandard.
'';
license = lib.licenses.gpl3Only;
homepage = "https://peazip.github.io";
platforms = lib.platforms.linux;
maintainers = with lib.maintainers; [ annaaurora ];
mainProgram = "peazip";
};
})

View File

@@ -0,0 +1,40 @@
{
lib,
buildGoModule,
fetchFromGitHub,
nixosTests,
}:
buildGoModule rec {
pname = "pebble";
version = "2.6.0";
src = fetchFromGitHub {
owner = "letsencrypt";
repo = "pebble";
rev = "v${version}";
hash = "sha256-YPU/bl7h6rOWg+5ut0Thn2UupeKpJ7u4KXc2svIeZEM=";
};
vendorHash = null;
ldflags = [
"-s"
"-w"
"-X main.version=${version}"
];
passthru.tests = {
smoke-test-http = nixosTests.acme.http01-builtin;
smoke-test-dns = nixosTests.acme.dns01;
};
meta = {
homepage = "https://github.com/letsencrypt/pebble";
description = "Small RFC 8555 ACME test server";
longDescription = "Miniature version of Boulder, Pebble is a small RFC 8555 ACME test server not suited for a production CA";
license = [ lib.licenses.mpl20 ];
mainProgram = "pebble";
teams = [ lib.teams.acme ];
};
}

View File

@@ -0,0 +1,34 @@
{
lib,
stdenvNoCC,
fetchurl,
}:
stdenvNoCC.mkDerivation {
pname = "pecita";
version = "5.4";
src = fetchurl {
url = "http://pecita.eu/b/Pecita.otf";
hash = "sha256-D9IZ+p4UFHUNt9me7D4vv0x6rMK9IaViKPliCEyX6t4=";
};
dontUnpack = true;
installPhase = ''
runHook preInstall
mkdir -p $out/share/fonts/opentype
cp -v $src $out/share/fonts/opentype/Pecita.otf
runHook postInstall
'';
meta = with lib; {
homepage = "https://pecita.eu/police-en.php";
description = "Handwritten font with connected glyphs";
license = licenses.ofl;
platforms = platforms.all;
maintainers = [ maintainers.rycee ];
};
}

View File

@@ -0,0 +1,30 @@
{
lib,
buildGoModule,
fetchFromGitHub,
}:
buildGoModule rec {
pname = "peco";
version = "0.5.11";
subPackages = [ "cmd/peco" ];
src = fetchFromGitHub {
owner = "peco";
repo = "peco";
rev = "v${version}";
sha256 = "sha256-OVUfeNpnmuJsgD//JTn6n9n4oOBxep69LhIpHX+ru2w=";
};
vendorHash = "sha256-+HQz7UUgATdgSWlI1dg2DdQRUSke9MyAtXgLikFhF90=";
meta = {
description = "Simplistic interactive filtering tool";
mainProgram = "peco";
homepage = "https://github.com/peco/peco";
changelog = "https://github.com/peco/peco/blob/v${version}/Changes";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ pSub ];
};
}

View File

@@ -0,0 +1,100 @@
{
stdenv,
lib,
fetchFromGitHub,
fetchpatch,
nix-update-script,
meson,
ninja,
gettext,
desktop-file-utils,
appstream-glib,
pkg-config,
txt2man,
vala,
wrapGAppsHook3,
gsettings-desktop-schemas,
gtk3,
glib,
cairo,
keybinder3,
ffmpeg-full,
python3,
libxml2,
gst_all_1,
which,
gifski,
}:
stdenv.mkDerivation rec {
pname = "peek";
version = "1.5.1";
src = fetchFromGitHub {
owner = "phw";
repo = "peek";
rev = version;
sha256 = "1xwlfizga6hvjqq127py8vabaphsny928ar7mwqj9cyqfl6fx41x";
};
patches = [
# Fix compatibility with GNOME Shell ≥ 40.
# https://github.com/phw/peek/pull/910
(fetchpatch {
url = "https://github.com/phw/peek/commit/008d15316ab5428363c512b263ca8138cb8f52ba.patch";
sha256 = "xxJ+r5uRk93MEzWTFla88ewZsnUl3+YKTenzDygtKP0=";
})
];
nativeBuildInputs = [
appstream-glib
desktop-file-utils
gettext
meson
ninja
libxml2
pkg-config
txt2man
python3
vala
wrapGAppsHook3
];
buildInputs = [
cairo
glib
gsettings-desktop-schemas
gtk3
gst_all_1.gstreamer
gst_all_1.gst-plugins-good
gst_all_1.gst-plugins-ugly
keybinder3
];
postPatch = ''
patchShebangs build-aux/meson/postinstall.py data/man/build_man.sh
'';
preFixup = ''
gappsWrapperArgs+=(--prefix PATH : ${
lib.makeBinPath [
which
ffmpeg-full
gifski
]
})
'';
passthru = {
updateScript = nix-update-script { };
};
meta = with lib; {
homepage = "https://github.com/phw/peek";
description = "Simple animated GIF screen recorder with an easy to use interface";
license = licenses.gpl3Plus;
maintainers = with maintainers; [ puffnfresh ];
platforms = platforms.linux;
mainProgram = "peek";
};
}

View File

@@ -0,0 +1,28 @@
{
lib,
rustPlatform,
fetchFromGitHub,
}:
rustPlatform.buildRustPackage rec {
pname = "peep";
version = "0.1.6";
src = fetchFromGitHub {
owner = "ryochack";
repo = "peep";
rev = "v${version}";
hash = "sha256-6Y7ZI0kIPE7uMMOkXgm75JMEec090xZPBJFJr9DaswA=";
};
cargoHash = "sha256-9VybBzW+saOjtQiyGu2pKHm94yCPw35Y56mhayCeW/c=";
meta = with lib; {
description = "CLI text viewer tool that works like less command on small pane within the terminal window";
homepage = "https://github.com/ryochack/peep";
changelog = "https://github.com/ryochack/peep/releases/tag/${src.rev}";
license = licenses.mit;
maintainers = with maintainers; [ figsoda ];
mainProgram = "peep";
};
}

View File

@@ -0,0 +1,103 @@
{
lib,
stdenv,
fetchFromGitHub,
ant,
jdk,
openjdk8-bootstrap,
jre,
stripJavaArchivesHook,
makeWrapper,
nix-update-script,
}:
let
tweetnacl = stdenv.mkDerivation {
pname = "tweetnacl";
version = "0-unstable-2020-02-12";
src = fetchFromGitHub {
owner = "ianopolous";
repo = "tweetnacl-java";
rev = "6d1bde81ea63051750cda40422b62e478b85d2b0";
hash = "sha256-BDWzDpUBi4UuvxFwA9ton+RtHOzDcWql1ti+cdvhzks=";
};
postPatch = ''
substituteInPlace Makefile \
--replace-fail gcc cc
'';
makeFlags = [ "jni" ];
nativeBuildInputs = [
openjdk8-bootstrap # javah
];
installPhase = ''
install -Dvm644 libtweetnacl.so $out/lib/libtweetnacl.so
'';
};
in
stdenv.mkDerivation rec {
pname = "peergos";
version = "1.11.0";
src = fetchFromGitHub {
owner = "Peergos";
repo = "web-ui";
rev = "v${version}";
hash = "sha256-JUeNNBWzIZlC1+sc1YV+3iPg4PMt+BevG5dDi4JybPk=";
fetchSubmodules = true;
};
nativeBuildInputs = [
ant
jdk
stripJavaArchivesHook
makeWrapper
];
postPatch = ''
substituteInPlace build.xml \
--replace-fail '${"\${repository.version}"}' '${version}'
'';
buildPhase = ''
runHook preBuild
ant dist
runHook postBuild
'';
installPhase = ''
runHook preInstall
install -Dvm644 server/Peergos.jar $out/share/java/peergos.jar
install -Dvm644 ${tweetnacl}/lib/libtweetnacl.so $out/native-lib/libtweetnacl.so
# --chdir as peergos expects to find `libtweetnacl.so` in `native-lib/`
makeWrapper ${lib.getExe jre} $out/bin/peergos \
--chdir $out \
--add-flags "-Djava.library.path=native-lib -jar $out/share/java/peergos.jar"
runHook postInstall
'';
passthru.updateScript = nix-update-script { };
meta = {
changelog = "https://github.com/Peergos/web-ui/releases/tag/v${version}";
description = "P2P, secure file storage, social network and application protocol";
downloadPage = "https://github.com/Peergos/web-ui";
homepage = "https://peergos.org/";
license = [
lib.licenses.agpl3Only # server
lib.licenses.gpl3Only # web-ui
];
mainProgram = "peergos";
maintainers = with lib.maintainers; [
raspher
christoph-heiss
];
platforms = lib.platforms.all;
};
}

View File

@@ -0,0 +1,89 @@
{
python3,
fetchFromGitHub,
nixosTests,
lib,
plugins ? ps: [ ],
}:
python3.pkgs.buildPythonApplication rec {
pname = "peering-manager";
version = "1.9.7";
src = fetchFromGitHub {
owner = "peering-manager";
repo = "peering-manager";
tag = "v${version}";
sha256 = "sha256-lxelWtiMO6w8Tt7zK/NDdmc3PaKlGibKjSfhD+tGrCU=";
};
format = "other";
propagatedBuildInputs =
with python3.pkgs;
[
django
django-debug-toolbar
django-filter
django-postgresql-netfields
django-prometheus
django-redis
django-rq
django-tables2
django-taggit
djangorestframework
drf-spectacular
drf-spectacular-sidecar
dulwich
jinja2
markdown
napalm
packaging
psycopg2
pyixapi
pynetbox
pyyaml
requests
social-auth-app-django
tzdata
]
++ plugins python3.pkgs;
buildPhase = ''
runHook preBuild
cp peering_manager/configuration{.example,}.py
python3 manage.py collectstatic --no-input
rm -f peering_manager/configuration.py
runHook postBuild
'';
installPhase = ''
runHook preInstall
mkdir -p $out/opt/peering-manager
cp -r . $out/opt/peering-manager
chmod +x $out/opt/peering-manager/manage.py
makeWrapper $out/opt/peering-manager/manage.py $out/bin/peering-manager \
--prefix PYTHONPATH : "$PYTHONPATH"
runHook postInstall
'';
passthru = {
# PYTHONPATH of all dependencies used by the package
python = python3;
pythonPath = python3.pkgs.makePythonPath propagatedBuildInputs;
tests = {
inherit (nixosTests) peering-manager;
};
};
meta = with lib; {
homepage = "https://peering-manager.net/";
license = licenses.asl20;
description = "BGP sessions management tool";
mainProgram = "peering-manager";
teams = [ teams.wdz ];
platforms = platforms.linux;
};
}

View File

@@ -0,0 +1,27 @@
{
lib,
fetchFromGitLab,
rustPlatform,
}:
rustPlatform.buildRustPackage {
pname = "peertube-viewer";
version = "1.8.6";
src = fetchFromGitLab {
owner = "peertube-viewer";
repo = "peertube-viewer-rs";
rev = "v1.8.6";
hash = "sha256-ZzeWk01migUrKR7GndtNo0kLYSCUXCg0H0eCXgrDXaM==";
};
cargoHash = "sha256-Pf8Jj8XGYbNOAyYEBdAysOK92S3S7bZHerQh/2UlrbQ=";
meta = with lib; {
description = "Simple CLI browser for the peertube federated video platform";
homepage = "https://gitlab.com/peertube-viewer/peertube-viewer-rs";
license = licenses.agpl3Only;
maintainers = with maintainers; [ haruki7049 ];
mainProgram = "peertube-viewer-rs";
};
}

View File

@@ -0,0 +1,232 @@
{
lib,
stdenv,
fetchurl,
fetchFromGitHub,
fetchYarnDeps,
nixosTests,
brotli,
fixup-yarn-lock,
jq,
fd,
nodejs_20,
which,
yarn,
}:
let
bcryptHostPlatformAttrs = {
x86_64-linux = {
arch = "linux-x64";
libc = "glibc";
hash = "sha256-C5N6VgFtXPLLjZt0ZdRTX095njRIT+12ONuUaBBj7fQ=";
};
aarch64-linux = {
arch = "linux-arm64";
libc = "glibc";
hash = "sha256-TerDujO+IkSRnHYlSbAKSP9IS7AT7XnQJsZ8D8pCoGc=";
};
x86_64-darwin = {
arch = "darwin-x64";
libc = "unknown";
hash = "sha256-gphOONWujbeCCr6dkmMRJP94Dhp1Jvp2yt+g7n1HTv0=";
};
aarch64-darwin = {
arch = "darwin-arm64";
libc = "unknown";
hash = "sha256-JMnELVUxoU1C57Tzue3Sg6OfDFAjfCnzgDit0BWzmlo=";
};
};
bcryptAttrs =
bcryptHostPlatformAttrs."${stdenv.hostPlatform.system}"
or (throw "Unsupported architecture: ${stdenv.hostPlatform.system}");
bcryptVersion = "5.1.1";
bcryptLib = fetchurl {
url = "https://github.com/kelektiv/node.bcrypt.js/releases/download/v${bcryptVersion}/bcrypt_lib-v${bcryptVersion}-napi-v3-${bcryptAttrs.arch}-${bcryptAttrs.libc}.tar.gz";
inherit (bcryptAttrs) hash;
};
in
stdenv.mkDerivation (finalAttrs: {
pname = "peertube";
version = "7.3.0";
src = fetchFromGitHub {
owner = "Chocobozzz";
repo = "PeerTube";
tag = "v${finalAttrs.version}";
hash = "sha256-WbZFOOvX6WzKB9tszxJl6z+V6cDBH6Y2SjoxF17WvUo=";
};
yarnOfflineCacheServer = fetchYarnDeps {
yarnLock = "${finalAttrs.src}/yarn.lock";
hash = "sha256-T1stKz8+1ghQBJB8kujwcqmygMdoswjFBL/QWAHSis0=";
};
yarnOfflineCacheClient = fetchYarnDeps {
yarnLock = "${finalAttrs.src}/client/yarn.lock";
hash = "sha256-jeE6Xpi/A1Ldbbp12rkG19auud61AZna/vbVE2mpp/8=";
};
yarnOfflineCacheAppsCli = fetchYarnDeps {
yarnLock = "${finalAttrs.src}/apps/peertube-cli/yarn.lock";
hash = "sha256-lcWtZGE/6XGm8KXmzSowCHAb/vGwBoqkwk32Ru3mMYU=";
};
yarnOfflineCacheAppsRunner = fetchYarnDeps {
yarnLock = "${finalAttrs.src}/apps/peertube-runner/yarn.lock";
hash = "sha256-OX9em03iqaRCqFuo2QO/r+CBdk7hHk3WY1EBXlFr1cY=";
};
outputs = [
"out"
"cli"
"runner"
];
nativeBuildInputs = [
brotli
fixup-yarn-lock
jq
which
yarn
fd
];
buildInputs = [ nodejs_20 ];
buildPhase = ''
# Build node modules
export HOME=$PWD
fixup-yarn-lock ~/yarn.lock
fixup-yarn-lock ~/client/yarn.lock
fixup-yarn-lock ~/apps/peertube-cli/yarn.lock
fixup-yarn-lock ~/apps/peertube-runner/yarn.lock
yarn config --offline set yarn-offline-mirror $yarnOfflineCacheServer
yarn install --offline --frozen-lockfile --ignore-engines --ignore-scripts --no-progress
cd ~/client
yarn config --offline set yarn-offline-mirror $yarnOfflineCacheClient
yarn install --offline --frozen-lockfile --ignore-engines --ignore-scripts --no-progress
# Switch sass-embedded to sass
find node_modules/vite/dist -name "*.js" -type f -exec grep -l "sass-embedded" {} \; | while read file; do
echo "Patching $file"
sed -i 's/"sass-embedded"/"sass"/g; s/'"'"'sass-embedded'"'"'/'"'"'sass'"'"'/g' "$file"
done
cd ~/apps/peertube-cli
yarn config --offline set yarn-offline-mirror $yarnOfflineCacheAppsCli
yarn install --offline --frozen-lockfile --ignore-engines --ignore-scripts --no-progress
cd ~/apps/peertube-runner
yarn config --offline set yarn-offline-mirror $yarnOfflineCacheAppsRunner
yarn install --offline --frozen-lockfile --ignore-engines --ignore-scripts --no-progress
patchShebangs ~/{node_modules,client/node_modules,/apps/peertube-cli/node_modules,apps/peertube-runner/node_modules,scripts}
# Fix bcrypt node module
cd ~/node_modules/bcrypt
if [ "${bcryptVersion}" != "$(cat package.json | jq -r .version)" ]; then
echo "Mismatching version please update bcrypt in derivation"
exit
fi
mkdir -p ./lib/binding && tar -C ./lib/binding -xf ${bcryptLib}
# Return to home directory
cd ~
# Build PeerTube server
npm run build:server
# Build PeerTube client
npm run build:client
# Build PeerTube cli
npm run build:peertube-cli
patchShebangs ~/apps/peertube-cli/dist/peertube.js
# Build PeerTube runner
npm run build:peertube-runner
patchShebangs ~/apps/peertube-runner/dist/peertube-runner.js
# Clean up declaration files
find ~/dist/ \
~/packages/core-utils/dist/ \
~/packages/ffmpeg/dist/ \
~/packages/models/dist/ \
~/packages/node-utils/dist/ \
~/packages/server-commands/dist/ \
~/packages/transcription/dist/ \
~/packages/typescript-utils/dist/ \
\( -name '*.d.ts' -o -name '*.d.ts.map' \) -type f -delete
'';
installPhase = ''
mkdir -p $out/dist
mv ~/dist $out
mv ~/node_modules $out/node_modules
mkdir $out/client
mv ~/client/{dist,node_modules,package.json,yarn.lock} $out/client
mkdir -p $out/packages/{core-utils,ffmpeg,models,node-utils,server-commands,transcription,typescript-utils}
mv ~/packages/core-utils/{dist,package.json} $out/packages/core-utils
mv ~/packages/ffmpeg/{dist,package.json} $out/packages/ffmpeg
mv ~/packages/models/{dist,package.json} $out/packages/models
mv ~/packages/node-utils/{dist,package.json} $out/packages/node-utils
mv ~/packages/server-commands/{dist,package.json} $out/packages/server-commands
mv ~/packages/transcription/{dist,package.json} $out/packages/transcription
mv ~/packages/typescript-utils/{dist,package.json} $out/packages/typescript-utils
mv ~/{config,support,CREDITS.md,FAQ.md,LICENSE,README.md,package.json,yarn.lock} $out
# Remove broken symlinks in node_modules from workspace packages that aren't needed
# by the built artifact. If any new packages break the check for broken symlinks,
# they should be checked before adding them here to make sure they aren't likely to
# be needed, either now or in the future. If they might be, then we probably want
# to move the package to $out above instead of removing the broken symlink.
rm $out/node_modules/@peertube/{peertube-server,peertube-transcription-devtools,peertube-types-generator,tests}
rm $out/client/node_modules/@peertube/{peertube-transcription-devtools,peertube-types-generator,tests,player}
mkdir -p $cli/bin
mv ~/apps/peertube-cli/{dist,node_modules,package.json,yarn.lock} $cli
ln -s $cli/dist/peertube.js $cli/bin/peertube-cli
mkdir -p $runner/bin
mv ~/apps/peertube-runner/{dist,node_modules,package.json,yarn.lock} $runner
ln -s $runner/dist/peertube-runner.js $runner/bin/peertube-runner
# Create static gzip and brotli files
fd -e css -e eot -e html -e js -e json -e svg -e webmanifest -e xlf \
--type file --search-path $out/client/dist --threads $NIX_BUILD_CORES \
--exec gzip -9 -n -c {} > {}.gz \;\
--exec brotli --best -f {} -o {}.br
'';
passthru.tests.peertube = nixosTests.peertube;
meta = {
description = "Free software to take back control of your videos";
longDescription = ''
PeerTube aspires to be a decentralized and free/libre alternative to video
broadcasting services.
PeerTube is not meant to become a huge platform that would centralize
videos from all around the world. Rather, it is a network of
inter-connected small videos hosters.
Anyone with a modicum of technical skills can host a PeerTube server, aka
an instance. Each instance hosts its users and their videos. In this way,
every instance is created, moderated and maintained independently by
various administrators.
You can still watch from your account videos hosted by other instances
though if the administrator of your instance had previously connected it
with other instances.
'';
license = lib.licenses.agpl3Plus;
homepage = "https://joinpeertube.org/";
platforms = [
"x86_64-linux"
"aarch64-linux"
# feasible, looking for maintainer to help out
# "x86_64-darwin" "aarch64-darwin"
];
maintainers = with lib.maintainers; [
immae
izorkin
stevenroose
];
};
})

View File

@@ -0,0 +1,29 @@
{
lib,
stdenv,
fetchurl,
}:
stdenv.mkDerivation rec {
pname = "peg";
version = "0.1.20";
src = fetchurl {
url = "${meta.homepage}/${pname}-${version}.tar.gz";
sha256 = "sha256-uLcXvJOll2ijXWUlZ5pODOlOa/ZvkrrPKXnGR0VytFo=";
};
postPatch = ''
substituteInPlace Makefile \
--replace-fail "strip" '$(STRIP)'
'';
preBuild = "makeFlagsArray+=( PREFIX=$out )";
meta = with lib; {
homepage = "http://piumarta.com/software/peg/";
description = "Tools for generating recursive-descent parsers: programs that perform pattern matching on text";
platforms = platforms.all;
license = licenses.mit;
};
}

View File

@@ -0,0 +1,39 @@
{
cmake,
fetchFromGitHub,
gitUpdater,
lib,
ninja,
stdenv,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "pegtl";
version = "3.2.8";
src = fetchFromGitHub {
owner = "taocpp";
repo = "PEGTL";
rev = finalAttrs.version;
hash = "sha256-nPWSO2wPl/qenUQgvQDQu7Oy1dKa/PnNFSclmkaoM8A=";
};
nativeBuildInputs = [
cmake
ninja
];
passthru.updateScript = gitUpdater { };
meta = {
homepage = "https://github.com/taocpp/pegtl";
description = "Parsing Expression Grammar Template Library";
longDescription = ''
Zero-dependency C++ header-only parser combinator library
for creating parsers according to a Parsing Expression Grammar (PEG).
'';
license = lib.licenses.boost;
maintainers = [ ];
platforms = lib.platforms.all;
};
})

View File

@@ -0,0 +1,82 @@
{
lib,
stdenv,
fetchFromGitHub,
awk,
cmake,
grep,
libXext,
libXft,
libXinerama,
libXpm,
libXrandr,
libjpeg,
libpng,
pkg-config,
runtimeShell,
sed,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "pekwm";
version = "0.3.2";
src = fetchFromGitHub {
owner = "pekdon";
repo = "pekwm";
rev = "release-${finalAttrs.version}";
hash = "sha256-rwvecE9T+/zZg0rRUDl/DEMGH9ZmuvYj/Rz6vzmMv1I=";
};
nativeBuildInputs = [
cmake
pkg-config
];
buildInputs = [
libXext
libXft
libXinerama
libXpm
libXrandr
libjpeg
libpng
];
outputs = [
"out"
"man"
];
strictDeps = true;
cmakeFlags = [
"-DAWK=${lib.getBin awk}/bin/awk"
"-DGREP=${lib.getBin grep}/bin/grep"
"-DSED=${lib.getBin sed}/bin/sed"
"-DSH=${runtimeShell}"
];
meta = {
homepage = "https://www.pekwm.se/";
description = "Lightweight window manager";
longDescription = ''
pekwm is a window manager that once upon a time was based on the aewm++
window manager, but it has evolved enough that it no longer resembles
aewm++ at all. It has a much expanded feature-set, including window
grouping (similar to ion, pwm, or fluxbox), autoproperties, xinerama,
keygrabber that supports keychains, and much more.
- Lightweight and Unobtrusive, a window manager shouldn't be noticed.
- Very configurable, we all work and think in different ways.
- Automatic properties, for all the lazy people, make things appear as
they should when starting applications.
- Chainable Keygrabber, usability for everyone.
'';
changelog = "https://raw.githubusercontent.com/pekwm/pekwm/release-${finalAttrs.version}/NEWS.md";
license = lib.licenses.gpl2Plus;
mainProgram = "pekwm";
maintainers = [ ];
platforms = lib.platforms.linux;
};
})

View File

@@ -0,0 +1,48 @@
{
lib,
stdenv,
fetchFromGitHub,
scsh,
sox,
libnotify,
}:
stdenv.mkDerivation {
pname = "pell";
version = "0.0.4";
src = fetchFromGitHub {
owner = "ebzzry";
repo = "pell";
rev = "f251625ece6bb5517227970287119e7d2dfcea8b";
sha256 = "0k8m1lv2kyrs8fylxmbgxg3jn65g57frf2bndc82gkr5svwb554a";
};
installPhase = ''
mkdir -p $out/bin
mkdir -p $out/share
cp pell $out/bin
cp resources/online.mp3 $out/share
cp resources/offline.mp3 $out/share
chmod +x $out/bin/pell
'';
postFixup = ''
substituteInPlace $out/bin/pell --replace "/usr/bin/env scsh" "${scsh}/bin/scsh"
substituteInPlace $out/bin/pell --replace "(play " "(${sox}/bin/play "
substituteInPlace $out/bin/pell --replace "(notify-send " "(${libnotify}/bin/notify-send "
substituteInPlace $out/bin/pell --replace "/usr/share/pell/online.mp3" "$out/share/online.mp3"
substituteInPlace $out/bin/pell --replace "/usr/share/pell/offline.mp3" "$out/share/offline.mp3"
'';
meta = with lib; {
homepage = "https://github.com/ebzzry/pell";
description = "Simple host availability monitor";
license = licenses.mit;
maintainers = [ maintainers.ebzzry ];
platforms = platforms.unix;
mainProgram = "pell";
};
dontBuild = true;
}

View File

@@ -0,0 +1,139 @@
{
stdenv,
fetchurl,
lib,
makeWrapper,
wrapGAppsHook3,
# build dependencies
alsa-lib,
atk,
at-spi2-atk,
at-spi2-core,
cairo,
cups,
dbus,
expat,
fontconfig,
freetype,
gdk-pixbuf,
glib,
glibc,
gtk3,
libuuid,
nspr,
nss,
pango,
xorg,
systemd,
}:
let
deps = [
alsa-lib
atk
at-spi2-atk
at-spi2-core
cairo
cups
dbus
expat
fontconfig
freetype
gdk-pixbuf
glib
glibc
gtk3
libuuid
nspr
nss
pango
xorg.libX11
xorg.libxcb
xorg.libXScrnSaver
xorg.libXcomposite
xorg.libXcursor
xorg.libXdamage
xorg.libXext
xorg.libXfixes
xorg.libXi
xorg.libXrandr
xorg.libXrender
xorg.libXtst
(lib.getLib stdenv.cc.cc)
stdenv.cc.cc
];
in
stdenv.mkDerivation rec {
version = "3.1.0";
pname = "pencil";
src = fetchurl {
url = "http://pencil.evolus.vn/dl/V${version}.ga/pencil_${version}.ga_amd64.deb";
sha256 = "01ae54b1a1351b909eb2366c6ec00816e1deba370e58f35601cf7368f10aaba3";
};
sourceRoot = ".";
unpackCmd = ''
ar p "$src" data.tar.gz | tar xz
'';
dontBuild = true;
nativeBuildInputs = [
makeWrapper
wrapGAppsHook3
];
buildInputs = deps;
installPhase = ''
mkdir -p $out/bin $out/opt $out/share/applications
cp -R usr/share $out/
cp -R opt/pencil*/ $out/opt/pencil
cp $out/opt/pencil/pencil.desktop $out/share/applications/
# fix the path in the desktop file
substituteInPlace \
$out/share/applications/pencil.desktop \
--replace /opt/ $out/opt/
# symlink the binary to bin/
ln -s $out/opt/pencil/pencil $out/bin/pencil
'';
preFixup =
let
packages = deps;
libPathNative = lib.makeLibraryPath packages;
libPath64 = lib.makeSearchPathOutput "lib" "lib64" packages;
libPath = "${libPathNative}:${libPath64}";
in
''
# patch executable
patchelf \
--set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \
--set-rpath "${libPath}:$out/opt/pencil" \
$out/opt/pencil/pencil
# fix missing libudev
ln -s ${lib.getLib systemd}/lib/libudev.so.1 $out/opt/pencil/libudev.so.1
wrapProgram $out/opt/pencil/pencil \
--prefix LD_LIBRARY_PATH : $out/opt/pencil
'';
meta = with lib; {
description = "GUI prototyping/mockup tool";
mainProgram = "pencil";
homepage = "https://pencil.evolus.vn/";
sourceProvenance = with sourceTypes; [ binaryNativeCode ];
license = licenses.gpl2; # Commercial license is also available
maintainers = with maintainers; [
bjornfor
prikhi
mrVanDalo
];
platforms = platforms.linux;
};
}

View File

@@ -0,0 +1,13 @@
--- a/app/app.pro
+++ b/app/app.pro
@@ -208,8 +208,8 @@
GIT {
DEFINES += GIT_EXISTS \
- "GIT_CURRENT_SHA1=$$system(git --git-dir=.git --work-tree=. -C $$_PRO_FILE_PWD_/../ rev-parse HEAD)" \
- "GIT_TIMESTAMP=$$system(git --git-dir=.git --work-tree=. -C $$_PRO_FILE_PWD_/../ log -n 1 --pretty=format:"%cd" --date=format:"%Y-%m-%d_%H:%M:%S")"
+ "GIT_CURRENT_SHA1=$$cat($$_PRO_FILE_PWD_/../COMMIT)" \
+ "GIT_TIMESTAMP=$$cat($$_PRO_FILE_PWD_/../SOURCE_TIMESTAMP_EPOCH)"
}
macx {

View File

@@ -0,0 +1,67 @@
{
lib,
stdenv,
fetchFromGitHub,
qt5,
git,
ffmpeg_6,
nix-update-script,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "pencil2d";
version = "0.7.0";
src = fetchFromGitHub {
owner = "pencil2d";
repo = "pencil";
tag = "v${finalAttrs.version}";
hash = "sha256-l+iW0k3WdNXDwXtt958JJWSe3zNhQVul4FUcPPMrVxE=";
leaveDotGit = true;
postFetch = ''
# Obtain the last commit ID and its timestamp, then zap .git for reproducibility
cd $out
git rev-parse HEAD > $out/COMMIT
# 0000-00-00T00:00:00Z
date -u -d "@$(git log -1 --pretty=%ct)" "+%Y-%m-%d_%H:%M:%S" > $out/SOURCE_TIMESTAMP_EPOCH
find "$out" -name .git -print0 | xargs -0 rm -rf
'';
};
patches = [ ./git-inherit.patch ];
nativeBuildInputs = with qt5; [
qmake
wrapQtAppsHook
qttools
git
];
qmakeFlags = [
"pencil2d.pro"
"CONFIG+=release"
"CONFIG+=PENCIL2D_RELEASE"
"CONFIG+=GIT"
"VERSION=${finalAttrs.version}"
];
passthru.updateScript = nix-update-script { };
buildInputs = with qt5; [
qtbase
qtmultimedia
qtsvg
qtwayland
ffmpeg_6
];
meta = {
description = "Easy, intuitive tool to make 2D hand-drawn animations";
homepage = "https://www.pencil2d.org/";
downloadPage = "https://github.com/pencil2d/pencil";
license = lib.licenses.gpl2;
maintainers = with lib.maintainers; [ agvantibo ];
platforms = lib.platforms.linux;
mainProgram = "pencil2d";
};
})

View File

@@ -0,0 +1,39 @@
{
lib,
python3,
fetchFromGitHub,
}:
python3.pkgs.buildPythonApplication rec {
pname = "penelope";
version = "0.14.8";
pyproject = true;
src = fetchFromGitHub {
owner = "brightio";
repo = "penelope";
tag = "v${version}";
hash = "sha256-m4EYP1lKte8r9Xa/xAuv6aiwMNha+B8HXUCizH0JgmI=";
};
postPatch = ''
substituteInPlace pyproject.toml \
--replace-fail "[project.scripts]" "" \
--replace-fail 'penelope = "penelope:main"' ""
'';
build-system = with python3.pkgs; [ setuptools ];
# Project has no tests
doCheck = false;
meta = {
description = "Penelope Shell Handler";
homepage = "https://github.com/brightio/penelope";
changelog = "https://github.com/brightio/penelope/releases/tag/v${version}";
license = lib.licenses.gpl3Only;
maintainers = with lib.maintainers; [ fab ];
mainProgram = "penelope.py";
platforms = lib.platforms.all;
};
}

View File

@@ -0,0 +1,32 @@
{
lib,
stdenv,
fetchFromGitHub,
qt5,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "penguin-subtitle-player";
version = "1.6.0";
src = fetchFromGitHub {
owner = "carsonip";
repo = "Penguin-Subtitle-Player";
tag = "v${finalAttrs.version}";
hash = "sha256-AhdShg/eWqF44W1r+KmcHzbGKF2TNSD/wPKj+x4oQkM=";
fetchSubmodules = true;
};
nativeBuildInputs = [ qt5.wrapQtAppsHook ];
buildInputs = [ qt5.qmake ];
meta = {
description = "Open-source, cross-platform and standalone subtitle player";
homepage = "https://github.com/carsonip/Penguin-Subtitle-Player";
license = lib.licenses.gpl3Only;
maintainers = with lib.maintainers; [ eljamm ];
platforms = lib.platforms.all;
mainProgram = "PenguinSubtitlePlayer";
};
})

View File

@@ -0,0 +1,44 @@
{
lib,
stdenvNoCC,
fetchzip,
}:
let
majorVersion = "0";
minorVersion = "100";
in
stdenvNoCC.mkDerivation {
pname = "penna";
version = "${majorVersion}.${minorVersion}";
src = fetchzip {
url = "https://dotcolon.net/download/fonts/penna_${majorVersion}${minorVersion}.zip";
hash = "sha256-fmCJnEaoUGdW9JK3J7JSm5D4qOMRW7qVKPgVE7uCH5w=";
stripRoot = false;
};
installPhase = ''
runHook preInstall
install -D -m444 -t $out/share/fonts/opentype $src/*.otf
runHook postInstall
'';
meta = with lib; {
homepage = "http://dotcolon.net/font/penna/";
description = "Geometric sans serif designed by Sora Sagano";
longDescription = ''
Penna is a geometric sans serif designed by Sora Sagano,
with outsized counters in the uppercase and a lowercase
with a small x-height.
'';
platforms = platforms.all;
maintainers = with maintainers; [
leenaars
minijackson
];
license = licenses.cc0;
};
}

View File

@@ -0,0 +1,108 @@
{
lib,
buildNpmPackage,
copyDesktopItems,
electron,
fetchFromGitHub,
jq,
makeDesktopItem,
makeWrapper,
nodejs_24,
stdenv,
}:
let
description = "Unofficial desktop application for the open-source design tool, Penpot";
icon = "penpot";
nodejs = nodejs_24;
in
buildNpmPackage rec {
pname = "penpot-desktop";
version = "0.18.1";
src = fetchFromGitHub {
owner = "author-more";
repo = "penpot-desktop";
tag = "v${version}";
hash = "sha256-MxkdGifPaakhX/tLHiD7Y6xCe3cZ7ELiAhD7GSmdtvk=";
};
makeCacheWritable = true;
npmFlags = [
"--engine-strict"
"--legacy-peer-deps"
];
npmDepsHash = "sha256-zOoED2WKfiDgfWQDgRrr7Gf09GbSFK+8rOsNr8VQpgY=";
# Do not run the default build script as it leads to errors caused by the electron-builder configuration
dontNpmBuild = true;
env.ELECTRON_SKIP_BINARY_DOWNLOAD = "1";
nativeBuildInputs = [
jq
nodejs
makeWrapper
copyDesktopItems
];
preBuild = ''
if [[ $(jq --raw-output '.devDependencies.electron' < package.json | grep -E --only-matching '\^[0-9]+' | sed -e 's/\^//') != ${lib.escapeShellArg (lib.versions.major electron.version)} ]]; then
echo 'ERROR: electron version mismatch'
exit 1
fi
'';
postBuild = ''
npm exec electron-builder -- \
--dir \
--c.electronDist=${electron.dist} \
--c.electronVersion=${electron.version}
'';
installPhase = ''
runHook preInstall
mkdir $out
pushd dist/linux-${lib.optionalString stdenv.hostPlatform.isAarch64 "arm64-"}unpacked
mkdir -p $out/opt/Penpot
cp -r locales resources{,.pak} $out/opt/Penpot
popd
makeWrapper '${lib.getExe electron}' "$out/bin/penpot-desktop" \
--add-flags $out/opt/Penpot/resources/app.asar \
--add-flags "\''${NIXOS_OZONE_WL:+\''${WAYLAND_DISPLAY:+--ozone-platform-hint=auto --enable-features=WaylandWindowDecorations --enable-wayland-ime=true}}" \
--set-default ELECTRON_IS_DEV 0 \
--inherit-argv0
pushd build
dir=$out/share/icons/hicolor/512x512/apps
mkdir -p "$dir"
cp icon.png "$dir"/${icon}.png
popd
runHook postInstall
'';
desktopItems = [
(makeDesktopItem {
name = "Penpot";
exec = "penpot-desktop %U";
inherit icon;
comment = description;
desktopName = "Penpot";
categories = [ "Graphics" ];
})
];
meta = {
changelog = "https://github.com/author-more/penpot-desktop/releases/tag/v${version}";
inherit description;
homepage = "https://github.com/author-more/penpot-desktop";
license = lib.licenses.agpl3Only;
maintainers = with lib.maintainers; [ ntbbloodbath ];
platforms = electron.meta.platforms;
badPlatforms = lib.platforms.darwin;
mainProgram = "penpot-desktop";
};
}

View File

@@ -0,0 +1,59 @@
{
lib,
fetchFromGitHub,
python3,
}:
python3.pkgs.buildPythonApplication rec {
pname = "pentestgpt";
version = "unstable-2023-06-27";
pyproject = true;
src = fetchFromGitHub {
owner = "GreyDGL";
repo = "PentestGPT";
rev = "e63a91f466a035e036827e8f492bc47c5c1135af";
hash = "sha256-m0R/kMmbr5Ixuqvw6ZRoaAGCnI3j86Iwk4+TYqv0WbU=";
};
build-system = with python3.pkgs; [ setuptools ];
pythonRelaxDeps = [ "playwright" ];
pythonRemoveDeps = [
"beautifulsoup4"
"black"
"pytest"
];
dependencies = with python3.pkgs; [
beautifulsoup4
colorama
google
langchain
loguru
openai
playwright
prompt-toolkit
pycookiecheat
pyyaml
requests
rich
sqlmap
tiktoken
];
# Tests require network access
doCheck = false;
pythonImportsCheck = [
"pentestgpt"
];
meta = {
description = "GPT-empowered penetration testing tool";
homepage = "https://github.com/GreyDGL/PentestGPT";
changelog = "https://github.com/GreyDGL/PentestGPT/releases/tag/v${version}";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ fab ];
};
}

View File

@@ -0,0 +1,63 @@
{
lib,
stdenvNoCC,
fetchzip,
rpmextract,
}:
stdenvNoCC.mkDerivation rec {
pname = "perccli";
# On a new release, update version, URL, hash, and meta.homepage
version = "7.2313.00";
src = fetchzip {
# On pkg update: manually adjust the version in the URL because of the different format.
url = "https://dl.dell.com/FOLDER09770976M/1/PERCCLI_7.2313.0_A14_Linux.tar.gz";
hash = "sha256-IhclHVkdihRx5CzyO2dlOEhCon+0/HB3Fkue7MWsWnw=";
# Dell seems to block "uncommon" user-agents, such as Nixpkgs's custom one.
# 403 otherwise
curlOptsList = [
"--user-agent"
"Mozilla/5.0"
];
};
nativeBuildInputs = [ rpmextract ];
unpackPhase = ''
rpmextract $src/perccli-00${version}00.0000-1.noarch.rpm
'';
dontPatch = true;
dontConfigure = true;
dontBuild = true;
installPhase =
let
inherit (stdenvNoCC.hostPlatform) system;
platforms = {
x86_64-linux = ''
install -D ./opt/MegaRAID/perccli/perccli64 $out/bin/perccli64
ln -s perccli64 $out/bin/perccli
'';
};
in
platforms.${system} or (throw "unsupported system: ${system}");
# Not needed because the binary is statically linked
dontFixup = true;
meta = with lib; {
description = "Perccli Support for PERC RAID controllers";
# Must be updated with every release
homepage = "https://www.dell.com/support/home/en-us/drivers/driversdetails?driverid=tdghn";
sourceProvenance = with sourceTypes; [ binaryNativeCode ];
license = licenses.unfree;
maintainers = with maintainers; [ panicgh ];
platforms = [ "x86_64-linux" ];
};
}

View File

@@ -0,0 +1,31 @@
{
lib,
stdenv,
fetchFromGitHub,
cmake,
freeimage,
}:
stdenv.mkDerivation rec {
pname = "perceptualdiff";
version = "2.1";
src = fetchFromGitHub {
owner = "myint";
repo = "perceptualdiff";
rev = "v${version}";
sha256 = "176n518xv0pczf1yyz9r5a8zw5r6sh5ym596kmvw30qznp8n4a8j";
};
nativeBuildInputs = [ cmake ];
buildInputs = [ freeimage ];
meta = with lib; {
description = "Program that compares two images using a perceptually based image metric";
homepage = "https://github.com/myint/perceptualdiff";
license = licenses.gpl2Plus;
maintainers = with maintainers; [ uri-canva ];
platforms = platforms.unix;
mainProgram = "perceptualdiff";
};
}

View File

@@ -0,0 +1,50 @@
{
lib,
buildNpmPackage,
fetchFromGitHub,
chromium,
makeWrapper,
}:
buildNpmPackage rec {
pname = "percollate";
version = "4.3.0";
src = fetchFromGitHub {
owner = "danburzo";
repo = "percollate";
rev = "v${version}";
hash = "sha256-nu72jkqGt2ntlCxKptRlfTTd3SAVlv/QPTwkIUpVd2g=";
};
npmDepsHash = "sha256-O74AVF3PwLzkWPAqTmfsxPefevvv3VRIstb0OI2/bQ0=";
dontNpmBuild = true;
# Dev dependencies include an unnecessary Java dependency (epubchecker)
# https://github.com/danburzo/percollate/blob/v4.3.0/package.json#L40
npmInstallFlags = [ "--omit=dev" ];
nativeBuildInputs = [ makeWrapper ];
env = {
PUPPETEER_SKIP_CHROMIUM_DOWNLOAD = true;
};
postPatch = ''
substituteInPlace package.json --replace "git config core.hooksPath .git-hooks" ""
'';
postInstall = ''
wrapProgram $out/bin/percollate \
--set PUPPETEER_EXECUTABLE_PATH ${chromium}/bin/chromium
'';
meta = with lib; {
description = "Command-line tool to turn web pages into readable PDF, EPUB, HTML, or Markdown docs";
homepage = "https://github.com/danburzo/percollate";
license = licenses.mit;
maintainers = [ maintainers.austinbutler ];
mainProgram = "percollate";
};
}

View File

@@ -0,0 +1,51 @@
{
stdenv,
lib,
perlPackages,
makeWrapper,
}:
let
perconaToolkit = perlPackages.PerconaToolkit;
in
stdenv.mkDerivation {
pname = perconaToolkit.name;
version = perconaToolkit.version;
nativeBuildInputs = [ makeWrapper ];
src = perconaToolkit;
dontBuild = true;
installPhase = ''
mkdir -p $out/bin
# make sure dest already exists before symlink
# this prevents installing a broken link into the path
ln -s ${perconaToolkit}/lib $out/lib
ln -s ${perconaToolkit}/share $out/share
for cmd in ${perconaToolkit}/bin/*; do
ln -s $cmd $out/bin
done
'';
dontStrip = true;
postFixup = ''
for cmd in $out/bin/*; do
wrapProgram $cmd --prefix PERL5LIB
done
'';
meta = {
inherit (perconaToolkit.meta)
description
homepage
license
platforms
changelog
;
maintainers = with lib.maintainers; [ michaelglass ];
};
}

View File

@@ -0,0 +1,48 @@
{
lib,
stdenv,
fetchFromGitHub,
perl,
}:
stdenv.mkDerivation {
pname = "perf-tools";
version = "unstable-2017-12-19";
src = fetchFromGitHub {
owner = "brendangregg";
repo = "perf-tools";
rev = "98d42a2a1493d2d1c651a5c396e015d4f082eb20";
sha256 = "09qnss9pd4kr6qadvp62m2g8sfrj86fksi1rr8m8w4314pzfb93c";
};
buildInputs = [ perl ];
patchPhase = ''
for i in execsnoop iolatency iosnoop kernel/funcslower killsnoop opensnoop; do
substituteInPlace $i \
--replace /usr/bin/gawk "$(type -p gawk)" \
--replace /usr/bin/mawk /no-such-path \
--replace /usr/bin/getconf "$(type -p getconf)" \
--replace awk=awk "awk=$(type -p gawk)"
done
rm -rf examples deprecated
'';
installPhase = ''
d=$out/libexec/perf-tools
mkdir -p $d $out/share
cp -prvd . $d/
ln -s $d/bin $out/bin
mv $d/man $out/share/
'';
meta = with lib; {
platforms = platforms.linux;
homepage = "https://github.com/brendangregg/perf-tools";
description = "Performance analysis tools based on Linux perf_events (aka perf) and ftrace";
maintainers = [ ];
license = licenses.gpl2Plus;
};
}

View File

@@ -0,0 +1,173 @@
{
lib,
stdenv,
fetchurl,
linux_latest,
elfutils,
python3,
newt,
slang,
asciidoc,
xmlto,
makeWrapper,
docbook_xsl,
docbook_xml_dtd_45,
libxslt,
flex,
bison,
pkg-config,
libunwind,
binutils-unwrapped,
libiberty,
audit,
libopcodes,
libpfm,
libtraceevent,
openssl,
systemtap-unwrapped,
numactl,
zlib,
babeltrace,
withGtk ? false,
gtk2,
withZstd ? true,
zstd,
withLibcap ? true,
libcap,
buildPackages,
}:
let
d3-flame-graph-templates = stdenv.mkDerivation rec {
pname = "d3-flame-graph-templates";
version = "4.1.3";
src = fetchurl {
url = "https://registry.npmjs.org/d3-flame-graph/-/d3-flame-graph-${version}.tgz";
sha256 = "sha256-W5/Vh5jarXUV224aIiTB2TnBFYT3naEIcG2945QjY8Q=";
};
installPhase = ''
install -D -m 0755 -t $out/share/d3-flame-graph/ ./dist/templates/*
'';
};
in
stdenv.mkDerivation {
pname = "perf-linux";
inherit (linux_latest) version src;
strictDeps = true;
depsBuildBuild = [ buildPackages.stdenv.cc ];
postPatch = ''
# Linux scripts
patchShebangs scripts
patchShebangs tools/perf/check-headers.sh
# perf-specific scripts
patchShebangs tools/perf/pmu-events
cd tools/perf
for x in util/build-id.c util/dso.c; do
substituteInPlace $x --replace /usr/lib/debug /run/current-system/sw/lib/debug
done
substituteInPlace scripts/python/flamegraph.py \
--replace "/usr/share/d3-flame-graph/d3-flamegraph-base.html" \
"${d3-flame-graph-templates}/share/d3-flame-graph/d3-flamegraph-base.html"
patchShebangs pmu-events/jevents.py
'';
makeFlags = [
"prefix=$(out)"
"WERROR=0"
"ASCIIDOC8=1"
"ARCH=${stdenv.hostPlatform.linuxArch}"
"CROSS_COMPILE=${stdenv.cc.targetPrefix}"
]
++ lib.optional (!withGtk) "NO_GTK2=1"
++ lib.optional (!withZstd) "NO_LIBZSTD=1"
++ lib.optional (!withLibcap) "NO_LIBCAP=1";
hardeningDisable = [ "format" ];
# perf refers both to newt and slang
nativeBuildInputs = [
asciidoc
xmlto
docbook_xsl
docbook_xml_dtd_45
libxslt
flex
bison
libiberty
audit
makeWrapper
pkg-config
python3
];
buildInputs = [
elfutils
newt
slang
libtraceevent
libunwind
zlib
openssl
numactl
python3
babeltrace
libopcodes
libpfm
python3.pkgs.setuptools
]
++ lib.optional (lib.meta.availableOn stdenv.hostPlatform systemtap-unwrapped) systemtap-unwrapped
++ lib.optional withGtk gtk2
++ lib.optional withZstd zstd
++ lib.optional withLibcap libcap;
env.NIX_CFLAGS_COMPILE = toString [
"-Wno-error=cpp"
"-Wno-error=bool-compare"
"-Wno-error=deprecated-declarations"
"-Wno-error=stringop-truncation"
];
doCheck = false; # requires "sparse"
installTargets = [
"install-tools" # don't install tests, as those depend on perl
"install-man"
];
# TODO: Add completions based on perf-completion.sh
postInstall = ''
# Same as perf. Remove.
rm -f $out/bin/trace
'';
separateDebugInfo = true;
preFixup = ''
# Pull in 'objdump' into PATH to make annotations work.
# The embedded Python interpreter will search PATH to calculate the Python path configuration(Should be fixed by upstream).
# Add python.interpreter to PATH for now.
wrapProgram $out/bin/perf \
--prefix PATH : ${
lib.makeBinPath [
binutils-unwrapped
python3
]
}
'';
meta = with lib; {
homepage = "https://perf.wiki.kernel.org/";
description = "Linux tools to profile with performance counters";
mainProgram = "perf";
maintainers = with maintainers; [ tobim ];
platforms = platforms.linux;
};
}

View File

@@ -0,0 +1,77 @@
{
lib,
stdenv,
buildBazelPackage,
fetchFromGitHub,
bazel_7,
jdk,
elfutils,
libcap,
}:
let
system = stdenv.hostPlatform.system;
registry = fetchFromGitHub {
owner = "bazelbuild";
repo = "bazel-central-registry";
rev = "ef34e6bfad5a6ab54080ddcc83a4d65849855e3a";
hash = "sha256-PhacBegQDwWZqZeoZjoLR4akhVV3QrSPr1KflCuied0=";
};
in
buildBazelPackage {
pname = "perf_data_converter";
version = "0-unstable-2024-10-14";
src = fetchFromGitHub {
owner = "google";
repo = "perf_data_converter";
rev = "f76cd4dd1e85bb54d60ea3fe69f92168fdf94edb";
hash = "sha256-AScXL74K0Eiajdib56+7ay3K/MMWbmeUWkRWMaEJRC8=";
};
bazel = bazel_7;
bazelFlags = [
"--registry"
"file://${registry}"
];
fetchAttrs = {
hash =
{
aarch64-linux = "sha256-GvuOEQfzPF5J75TRlEc4oDiXXUN4G3fMfRhMDmg3FL0=";
x86_64-linux = "sha256-A47JJg+GUIhR7FhufxEsfsIuSg6dd7sPNzSWiQZXIEE=";
}
.${system} or (throw "No hash for system: ${system}");
};
nativeBuildInputs = [ jdk ];
buildInputs = [
elfutils
libcap
];
removeRulesCC = false;
bazelBuildFlags = [ "-c opt" ];
bazelTargets = [ "src:perf_to_profile" ];
doCheck = true;
bazelTestTargets = [ "src:all" ];
buildAttrs = {
installPhase = ''
runHook preInstall
install -Dm555 -t "$out/bin" bazel-bin/src/perf_to_profile
runHook postInstall
'';
};
meta = with lib; {
description = "Tool to convert Linux perf files to the profile.proto format used by pprof";
homepage = "https://github.com/google/perf_data_converter";
license = licenses.bsd3;
maintainers = with maintainers; [ hzeller ];
platforms = platforms.linux;
};
}

View File

@@ -0,0 +1,43 @@
{
lib,
python3,
fetchFromGitHub,
}:
python3.pkgs.buildPythonApplication rec {
pname = "perfect-hash";
version = "0.4.1";
pyproject = true;
# Archive on pypi does not contain examples, which are very helpful to
# understand how to use this program, so we use git source.
src = fetchFromGitHub {
owner = "ilanschnell";
repo = "perfect-hash";
rev = version;
sha256 = "0gkc3n613hl0q4jknrh2nm1n96j97p36q9jjgarb9d8yii9q7792";
};
build-system = with python3.pkgs; [ setuptools ];
postInstall = ''
mkdir -p $out/share/doc/perfect-hash
cp README.md $out/share/doc/perfect-hash
cp -r examples $out/share/doc/perfect-hash
'';
meta = with lib; {
description = "Minimal perfect hash function generator";
mainProgram = "perfect-hash";
longDescription = ''
Generate a minimal perfect hash function for a given set of keys.
A given code template is filled with parameters, such that the
output is code which implements the hash function. Templates can
easily be constructed for any programming language.
'';
license = licenses.bsd3;
maintainers = [ maintainers.kaction ];
homepage = "https://github.com/ilanschnell/perfect-hash";
platforms = platforms.unix;
};
}

View File

@@ -0,0 +1,139 @@
{
lib,
stdenv,
fetchFromGitHub,
sdl2-compat,
cmake,
libGL,
pkg-config,
python3,
zlib,
unstableGitUpdater,
romID ? "ntsc-final",
}:
let
roms = [
"ntsc-final"
"pal-final"
"jpn-final"
];
in
assert lib.assertOneOf "romID" romID roms;
stdenv.mkDerivation (finalAttrs: {
pname = "perfect_dark";
version = "0-unstable-2025-08-25";
src = fetchFromGitHub {
owner = "fgsfdsfgs";
repo = "perfect_dark";
rev = "bb4fcffeb5dc382fce4c609897a2e82590d7d709";
hash = "sha256-naWE+oWgvrd4CSoBm6W4em60baTWn4uSnKbWh8WKPDM=";
postFetch = ''
pushd $out
rm tools/gzip
rm -r tools/mkrom
popd
'';
};
enableParallelBuilding = true;
# Fails to build if not set:
hardeningDisable = [ "format" ];
cmakeFlags = [
(lib.cmakeFeature "ROMID" romID)
];
nativeBuildInputs = [
cmake
pkg-config
python3
];
buildInputs = [
sdl2-compat
libGL
zlib
];
postPatch =
# The project uses Git to retrieve version informations but our
# fetcher deletes the .git directory, so we replace the commands
# with the correct data directly.
''
substituteInPlace CMakeLists.txt \
--replace-fail "git rev-parse --short HEAD" \
"echo ${builtins.substring 0 9 finalAttrs.src.rev}" \
--replace-fail "git rev-parse --abbrev-ref HEAD" \
"echo port"
''
# Point toward the compiled binary and not the shell wrapper since
# the rom auto-detection logic is not needed in this build.
+ ''
substituteInPlace dist/linux/io.github.fgsfdsfgs.perfect_dark.desktop \
--replace-fail "Exec=io.github.fgsfdsfgs.perfect_dark.sh" \
"Exec=io.github.fgsfdsfgs.perfect_dark"
'';
preConfigure = ''
patchShebangs --build tools/assetmgr
'';
installPhase = ''
runHook preInstall
pushd ..
install -Dm755 build/pd.* $out/bin/io.github.fgsfdsfgs.perfect_dark
install -Dm644 dist/linux/io.github.fgsfdsfgs.perfect_dark.desktop \
-t $out/share/applications
install -Dm644 dist/linux/io.github.fgsfdsfgs.perfect_dark.png \
-t $out/share/icons/hicolor/256x256/apps
install -Dm644 dist/linux/io.github.fgsfdsfgs.perfect_dark.metainfo.xml \
-t $out/share/metainfo
popd
runHook postInstall
'';
passthru = {
updateScript = unstableGitUpdater { hardcodeZeroVersion = true; };
};
meta = {
description = "Modern cross-platform port of Perfect Dark";
longDescription = ''
This is a port of Ryan Dywer's decompilation of classic N64
shooter Perfect Dark to modern systems.
You will need to provide a copy of the ROM at
`$HOME/.local/share/perfectdark/data/pd.${romID}.z64` to launch
the game.
Though `ntsc-final` is the recommended default, you can change
the ROM variant of this game with an expression like this:
```nix
perfect_dark.override { romID = "jpn-final"; }
```
Supported romIDs are `${lib.generators.toPretty { } roms}`.
'';
homepage = "https://github.com/fgsfdsfgs/perfect_dark/";
license = with lib.licenses; [
# perfect_dark, khrplatform.h, port/fast3d
mit
# Derivative work of "Perfect Dark" © 2000 Rare Ltd.
unfree
];
maintainers = with lib.maintainers; [
PaulGrandperrin
normalcea
sigmasquadron
];
mainProgram = "io.github.fgsfdsfgs.perfect_dark";
platforms = lib.platforms.linux;
};
})

View File

@@ -0,0 +1,100 @@
{
lib,
stdenv,
fetchFromGitHub,
fetchpatch,
SDL2,
aubio,
boost,
cmake,
ffmpeg,
fmt,
gettext,
glew,
glibmm,
glm,
icu,
libepoxy,
librsvg,
libxmlxx,
nlohmann_json,
pango,
pkg-config,
portaudio,
}:
stdenv.mkDerivation rec {
pname = "performous";
version = "1.3.1";
src = fetchFromGitHub {
owner = "performous";
repo = "performous";
tag = version;
hash = "sha256-f70IHA8LqIlkMRwJqSmszx3keStSx50nKcEWLGEjc3g=";
};
cedSrc = fetchFromGitHub {
owner = "performous";
repo = "compact_enc_det";
rev = "9ca1351fe0b1e85992a407b0fc54a63e9b3adc6e";
hash = "sha256-ztfeblR4YnB5+lb+rwOQJjogl+C9vtPH9IVnYO7oxec=";
};
patches = [
./performous-cmake.patch
./performous-fftw.patch
(fetchpatch {
name = "performous-ffmpeg.patch";
url = "https://github.com/performous/performous/commit/f26c27bf74b85fa3e3b150682ab9ecf9aecb3c50.patch";
excludes = [ ".github/workflows/macos.yml" ];
hash = "sha256-cQVelET/g2Kx2PlV3pspjEoNIwwn5Yz6enYl5vCMMKo=";
})
(fetchpatch {
name = "performous-gcc14.patch";
url = "https://github.com/performous/performous/commit/eb9b97f46b7d064c32ed0f086d89a70427ce1d14.patch";
hash = "sha256-98pcO/sFQJ+G67ErwlO/aAITNDPuRgPziQiF1cAlc0g=";
})
];
postPatch = ''
mkdir ced-src
cp -R ${cedSrc}/* ced-src
substituteInPlace data/CMakeLists.txt \
--replace "/usr" "$out"
'';
nativeBuildInputs = [
cmake
gettext
pkg-config
];
buildInputs = [
SDL2
aubio
boost
ffmpeg
fmt
glew
glibmm
glm
icu
libepoxy
librsvg
libxmlxx
nlohmann_json
pango
portaudio
];
meta = with lib; {
description = "Karaoke, band and dancing game";
mainProgram = "performous";
homepage = "https://performous.org/";
license = licenses.gpl2Plus;
maintainers = with maintainers; [ wegank ];
platforms = platforms.linux;
};
}

View File

@@ -0,0 +1,18 @@
diff --git a/cmake/Modules/FindCed.cmake b/cmake/Modules/FindCed.cmake
index 5794bc84..08d6b49d 100644
--- a/cmake/Modules/FindCed.cmake
+++ b/cmake/Modules/FindCed.cmake
@@ -22,12 +22,7 @@ elseif(SELF_BUILT_CED STREQUAL "AUTO")
pkg_check_modules(CED IMPORTED_TARGET GLOBAL CED)
if(NOT CED_FOUND)
message(STATUS "ced build from source because not found on system")
- libfetch_git_pkg(Ced
- REPOSITORY ${SELF_BUILT_GIT_BASE}/compact_enc_det.git
- #https://github.com/google/compact_enc_det.git
- REFERENCE ${Ced_GIT_VERSION}
- FIND_PATH compact_enc_det/compact_enc_det.h
- )
+ add_subdirectory(../ced-src ced-src)
else()
add_library(ced ALIAS PkgConfig::CED)
set(Ced_VERSION ${CED_VERSION})

View File

@@ -0,0 +1,15 @@
diff --git a/game/audio.cc b/game/audio.cc
index da810488..d7f3d072 100644
--- a/game/audio.cc
+++ b/game/audio.cc
@@ -121,8 +121,8 @@ Music::Music(Audio::Files const& files, unsigned int sr, bool preview): srate(sr
suppressCenterChannel = config["audio/suppress_center_channel"].b();
}
-unsigned Audio::aubio_win_size = 1536;
-unsigned Audio::aubio_hop_size = 768;
+unsigned Audio::aubio_win_size = 2048;
+unsigned Audio::aubio_hop_size = 1024;
std::unique_ptr<aubio_tempo_t, void(*)(aubio_tempo_t*)> Audio::aubioTempo =
std::unique_ptr<aubio_tempo_t, void(*)(aubio_tempo_t*)>(

View File

@@ -0,0 +1,45 @@
{
buildGoModule,
fetchFromGitHub,
lib,
}:
buildGoModule {
pname = "perkeep";
# no release or tag since 2020
version = "0-unstable-2024-04-23";
src = fetchFromGitHub {
owner = "perkeep";
repo = "perkeep";
rev = "bb15e6eb48bc9d614673f3af9432c70a76707c22";
hash = "sha256-FUr+OgxYHVUzaahrG/3Adn5KNYHb0S/SKKFddskuvZA=";
};
vendorHash = "sha256-+l1QV7/P0sS1S26xdyQygRZQGKqwbLUhgVtm/yHL6Cc=";
subPackages = [
"server/perkeepd"
"cmd/pk"
"cmd/pk-get"
"cmd/pk-put"
"cmd/pk-mount"
];
# genfileembed gets built regardless of subPackages, to embed static
# content into the Perkeep binaries. Remove it in post-install to
# avoid polluting paths.
postInstall = ''
rm -f $out/bin/genfileembed
'';
meta = {
description = "Way of storing, syncing, sharing, modelling and backing up content (née Camlistore)";
homepage = "https://perkeep.org";
license = lib.licenses.asl20;
maintainers = with lib.maintainers; [
kalbasit
gador
];
};
}

View File

@@ -0,0 +1,52 @@
{
lib,
buildNpmPackage,
fetchFromGitHub,
perl,
# Needed if you want to use it for a perl script with dependencies.
extraPerlPackages ? [ ],
}:
let
perlInterpreter = perl.withPackages (
ps:
[
ps.PadWalker
]
++ extraPerlPackages
);
in
buildNpmPackage rec {
pname = "perl-debug-adapter";
version = "1.0.6";
src = fetchFromGitHub {
owner = "Nihilus118";
repo = "perl-debug-adapter";
rev = version;
hash = "sha256-IXXKhk4rzsWSPA0RT0L3CZuKlgTWtweZ4dQtruTigRs=";
};
npmDepsHash = "sha256-iw7+YC4qkrTVEJuZ9lnjNlUopTCp+fMNoIjFLutmrMw=";
npmBuildScript = "compile";
makeWrapperArgs = [
"--prefix"
"PATH"
":"
(lib.makeBinPath [ perlInterpreter ])
];
passthru = {
inherit perlInterpreter;
};
meta = {
description = "Debug adapter, invokes perl -d and handles communication with VS Code or other editors";
homepage = "https://github.com/Nihilus118/perl-debug-adapter";
changelog = "https://github.com/Nihilus118/perl-debug-adapter/blob/${version}/CHANGELOG.md";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ doronbehar ];
mainProgram = "perl-debug-adapter";
};
}

View File

@@ -0,0 +1,82 @@
{
lib,
buildNpmPackage,
fetchFromGitHub,
}:
let
version = "0.6.3";
src = fetchFromGitHub {
owner = "bscan";
repo = "PerlNavigator";
rev = "v${version}";
hash = "sha256-CNsgFf+W7YQwAR++GwfTka4Cy8woRu02BQIJRmRAxK4=";
};
browser-ext = buildNpmPackage {
pname = "perlnavigator-web-server";
inherit version src;
sourceRoot = "${src.name}/browser-ext";
npmDepsHash = "sha256-PJKW+ni2wKw1ivkgQsL6g0jaxoYboa3XpVEEwgT4jWo=";
dontNpmBuild = true;
installPhase = ''
cp -r . "$out"
'';
};
client = buildNpmPackage {
pname = "perlnavigator-client";
inherit version src;
sourceRoot = "${src.name}/client";
npmDepsHash = "sha256-CM0l+D1VNkXBrZQHQGDiB/vAxMvpbHYoYlIugoLxSfA=";
dontNpmBuild = true;
installPhase = ''
cp -r . "$out"
'';
};
server = buildNpmPackage {
pname = "perlnavigator-server";
inherit version src;
sourceRoot = "${src.name}/server";
npmDepsHash = "sha256-TxK3ba9T97p8TBlULHUov6YX7WRl2QMq6TiNHxBoQeY=";
dontNpmBuild = true;
installPhase = ''
cp -r . "$out"
'';
};
in
buildNpmPackage rec {
pname = "perlnavigator";
inherit version src;
npmDepsHash = "sha256-nEinmgrbbFC+nkfTwu9djiUS+tj0VM4WKl2oqKpcGtM=";
postPatch = ''
sed -i /postinstall/d package.json
rm -r browser-ext client server
cp -r ${browser-ext} browser-ext
cp -r ${client} client
cp -r ${server} server
chmod +w browser-ext client server
'';
env = {
PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD = 1;
};
npmBuildScript = "compile";
postInstall = ''
cp -r ${browser-ext}/node_modules "$out/lib/node_modules/perlnavigator/browser-ext"
cp -r ${client}/node_modules "$out/lib/node_modules/perlnavigator/client"
cp -r ${server}/node_modules "$out/lib/node_modules/perlnavigator/server"
'';
meta = {
changelog = "https://github.com/bscan/PerlNavigator/blob/${src.rev}/CHANGELOG.md";
description = "Perl Language Server that includes syntax checking, perl critic, and code navigation";
homepage = "https://github.com/bscan/PerlNavigator/tree/main/server";
license = lib.licenses.mit;
mainProgram = "perlnavigator";
maintainers = [ ];
};
}

View File

@@ -0,0 +1,67 @@
{
lib,
qt6,
python3,
fetchFromGitHub,
ffmpeg,
pkg-config,
meson,
ninja,
}:
python3.pkgs.buildPythonApplication rec {
pname = "persepolis";
version = "5.2.0";
format = "other";
src = fetchFromGitHub {
owner = "persepolisdm";
repo = "persepolis";
tag = version;
hash = "sha256-E295Y76EmG6H1nwu7d4+OVPRtoCthROqYY5sIsBvUPI=";
};
# prevent double wrapping
dontWrapQtApps = true;
nativeBuildInputs = [
meson
ninja
pkg-config
qt6.wrapQtAppsHook
qt6.qtbase
];
# feed args to wrapPythonApp
makeWrapperArgs = [
"--prefix PATH : ${
lib.makeBinPath [
ffmpeg
]
}"
"\${qtWrapperArgs[@]}"
];
propagatedBuildInputs = [
(with python3.pkgs; [
psutil
pyside6
pysocks
urllib3
dasbus
requests
setproctitle
setuptools
yt-dlp
])
];
meta = with lib; {
description = "Download manager GUI written in Python";
mainProgram = "persepolis";
homepage = "https://persepolisdm.github.io/";
license = licenses.gpl3Plus;
maintainers = with maintainers; [
iFreilicht
L0L1P0P
];
};
}

View File

@@ -0,0 +1,133 @@
{
lib,
stdenv,
fetchFromGitHub,
fetchNpmDeps,
fetchurl,
buildGoModule,
npmHooks,
nodejs,
turbo,
linkFarm,
installShellFiles,
}:
let
# Create a plugins-archive to be embedded into the perses package similar to
# what $src/scripts/install_plugin.go does
pluginsArchive = linkFarm "perses-plugin-archive" (
lib.mapAttrsToList (name: plugin: {
name = "${name}-${plugin.version}.tar.gz";
path = fetchurl {
inherit (plugin) url hash;
};
}) (import ./plugins.nix)
);
in
buildGoModule (finalAttrs: {
pname = "perses";
version = "0.52.0";
src = fetchFromGitHub {
owner = "perses";
repo = "perses";
tag = "v${finalAttrs.version}";
hash = "sha256-VjjTi+RltB4gZloAcaEtRsmFmG9CruYtDphYyAx1Tkc=";
};
outputs = [
"out"
"cue"
];
nativeBuildInputs = [
npmHooks.npmConfigHook
nodejs
turbo
installShellFiles
];
npmDeps = fetchNpmDeps {
inherit (finalAttrs) version src;
pname = "${finalAttrs.pname}-ui";
sourceRoot = "${finalAttrs.src.name}/${finalAttrs.npmRoot}";
hash = "sha256-TteC9/1ORUl41BvhW9rTUW6ZBmDv4ScG6OzsI6WYjiE=";
};
npmRoot = "ui";
overrideModAttrs = oldAttrs: {
nativeBuildInputs = lib.remove npmHooks.npmConfigHook oldAttrs.nativeBuildInputs;
preBuild = null;
};
vendorHash = "sha256-zb8LJIzCCX5bjKl6aDI/vjkaPbEQfiGKVJbpcR596WI=";
ldflags = [
"-s"
"-w"
"-X github.com/prometheus/common/version.Version=${finalAttrs.version}"
"-X github.com/prometheus/common/version.Revision=${finalAttrs.src.tag}"
"-X github.com/prometheus/common/version.Branch=${finalAttrs.src.tag}"
"-X github.com/prometheus/common/version.Date=1970-01-01"
"-X github.com/perses/perses/pkg/model/api/config.DefaultPluginPath=/run/perses/plugins"
"-X github.com/perses/perses/pkg/model/api/config.DefaultArchivePluginPath=${pluginsArchive}"
];
subPackages = [
"cmd/percli"
"cmd/perses"
];
prePatch = ''
patchShebangs .
'';
preBuild = ''
pushd "$npmRoot"
npm run build
popd
go generate ./internal/api
./scripts/compress_assets.sh
'';
postInstall = ''
cp -r cue "$cue"
''
+ (lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) ''
installShellCompletion --cmd percli \
--bash <($out/bin/percli completion bash) \
--zsh <($out/bin/percli completion zsh) \
--fish <($out/bin/percli completion fish)
'');
doInstallCheck = true;
installCheckPhase = ''
runHook preInstallCheck
$out/bin/percli help > /dev/null
$out/bin/perses --help 2> /dev/null
runHook postInstallCheck
'';
passthru = {
updateScript = ./update.sh;
inherit pluginsArchive;
};
meta = {
description = "CNCF sandbox for observability visualisation";
homepage = "https://perses.dev/";
changelog = "https://github.com/perses/perses/releases/tag/v${finalAttrs.version}";
license = lib.licenses.asl20;
maintainers = with lib.maintainers; [ fooker ];
platforms = lib.platforms.unix;
mainProgram = "perses";
};
})

View File

@@ -0,0 +1,109 @@
# This file has been autogenerated by update.sh
# Do not edit this file manually.
{
"BarChart" = {
version = "0.9.0";
url = "https://github.com/perses/plugins/releases/download/barchart/v0.9.0/BarChart-0.9.0.tar.gz";
hash = "sha256-hh447/XUW9QNDz60VvfmDHhVF9VPwZTmjmu5nmc787Y=";
};
"DatasourceVariable" = {
version = "0.3.0";
url = "https://github.com/perses/plugins/releases/download/datasourcevariable/v0.3.0/DatasourceVariable-0.3.0.tar.gz";
hash = "sha256-JRvCYKYZ7eDw3smxxknmetGEQ0wKW/o+ju7a9ZV+SMw=";
};
"FlameChart" = {
version = "0.3.0";
url = "https://github.com/perses/plugins/releases/download/flamechart/v0.3.0/FlameChart-0.3.0.tar.gz";
hash = "sha256-5iGeT87it7wBGKV+CHSlNohDBBbC6kNlu44NJH/+29c=";
};
"GaugeChart" = {
version = "0.9.0";
url = "https://github.com/perses/plugins/releases/download/gaugechart/v0.9.0/GaugeChart-0.9.0.tar.gz";
hash = "sha256-7y9FnopFO0jWf1SViXEpekS16haQ7LsWf5mwszSB5So=";
};
"HistogramChart" = {
version = "0.9.0";
url = "https://github.com/perses/plugins/releases/download/histogramchart/v0.9.0/HistogramChart-0.9.0.tar.gz";
hash = "sha256-qwSbLv1YJOL6QQmc3F65CsKupL5dPDnA76KvXSBvlJo=";
};
"HeatMapChart" = {
version = "0.2.0";
url = "https://github.com/perses/plugins/releases/download/heatmapchart/v0.2.0/HeatMapChart-0.2.0.tar.gz";
hash = "sha256-6fg3Cy5xUUP5OW2WxyVVuhs5XX0t8j2Uf4qN8KLFGrE=";
};
"Loki" = {
version = "0.1.1";
url = "https://github.com/perses/plugins/releases/download/loki/v0.1.1/Loki-0.1.1.tar.gz";
hash = "sha256-gyiD/7PqlZa9GukN7Ptdolq3NdJYvn1yQEMizA47/bc=";
};
"Markdown" = {
version = "0.9.0";
url = "https://github.com/perses/plugins/releases/download/markdown/v0.9.0/Markdown-0.9.0.tar.gz";
hash = "sha256-5Oywh0J7ROQ1JdBE3noxBuhcOqf5rdwFR4OkKAVQQuU=";
};
"PieChart" = {
version = "0.9.0";
url = "https://github.com/perses/plugins/releases/download/piechart/v0.9.0/PieChart-0.9.0.tar.gz";
hash = "sha256-70L3QOdBv0Jy9R6b9eo1WYvqzZIzd0xDEKNeAOYU3L8=";
};
"Prometheus" = {
version = "0.53.3";
url = "https://github.com/perses/plugins/releases/download/prometheus/v0.53.3/Prometheus-0.53.3.tar.gz";
hash = "sha256-6cqoH+xeUj7ViwUzoEbmYnmTeJvkfHxHOTOBFNCEGZM=";
};
"Pyroscope" = {
version = "0.3.1";
url = "https://github.com/perses/plugins/releases/download/pyroscope/v0.3.1/Pyroscope-0.3.1.tar.gz";
hash = "sha256-7LvYbZeDbiwp2/VlRew+jUN8xtyUk0xVr2auiXuqH14=";
};
"ScatterChart" = {
version = "0.8.0";
url = "https://github.com/perses/plugins/releases/download/scatterchart/v0.8.0/ScatterChart-0.8.0.tar.gz";
hash = "sha256-3V2dZP7JgcG0ymg1hPC9YOBCksNay4IW7TSV95BLxZM=";
};
"StatChart" = {
version = "0.9.0";
url = "https://github.com/perses/plugins/releases/download/statchart/v0.9.0/StatChart-0.9.0.tar.gz";
hash = "sha256-w4k1Crg/wRvjlJ7DtnBWaOEGdC/Ii4YxZ8QyI6x76co=";
};
"StaticListVariable" = {
version = "0.5.1";
url = "https://github.com/perses/plugins/releases/download/staticlistvariable/v0.5.1/StaticListVariable-0.5.1.tar.gz";
hash = "sha256-eZicvDKbzGBuxow+KawDBqHMqAtVVsm+vKW5Nn8pTXo=";
};
"StatusHistoryChart" = {
version = "0.9.0";
url = "https://github.com/perses/plugins/releases/download/statushistorychart/v0.9.0/StatusHistoryChart-0.9.0.tar.gz";
hash = "sha256-7RB+aVwut4HcoxzWRtKL57XzdyKeHm2cnw+AFxUvTz4=";
};
"Table" = {
version = "0.8.0";
url = "https://github.com/perses/plugins/releases/download/table/v0.8.0/Table-0.8.0.tar.gz";
hash = "sha256-kBJEVhCNuoI0UIhBnja/L0c84QEwxzhTKpsgHH8CJG8=";
};
"Tempo" = {
version = "0.53.1";
url = "https://github.com/perses/plugins/releases/download/tempo/v0.53.1/Tempo-0.53.1.tar.gz";
hash = "sha256-qRdL3NXi58U2LsbjFU00V/pEKsj9rS+oNigcrSfw2zA=";
};
"TimeSeriesChart" = {
version = "0.10.1";
url = "https://github.com/perses/plugins/releases/download/timeserieschart/v0.10.1/TimeSeriesChart-0.10.1.tar.gz";
hash = "sha256-UqDtkT2ff3VZdJ0n5KytdCHNoJ0ahq5KT1XD5s2UkiE=";
};
"TimeSeriesTable" = {
version = "0.9.0";
url = "https://github.com/perses/plugins/releases/download/timeseriestable/v0.9.0/TimeSeriesTable-0.9.0.tar.gz";
hash = "sha256-pZTXd7XYdo1XYeKNbnlwRZWY+Ff724SWJTVwbRfVTfE=";
};
"TraceTable" = {
version = "0.8.1";
url = "https://github.com/perses/plugins/releases/download/tracetable/v0.8.1/TraceTable-0.8.1.tar.gz";
hash = "sha256-V6k55+YlPr7BqBKiQMCP7nU7hZ69GRoRJ8tYTeQNZog=";
};
"TracingGanttChart" = {
version = "0.9.2";
url = "https://github.com/perses/plugins/releases/download/tracingganttchart/v0.9.2/TracingGanttChart-0.9.2.tar.gz";
hash = "sha256-QdcfoSk1khJMRIBozXMW/9cl2+94p4DD5xjx7UC9Cws=";
};
}

View File

@@ -0,0 +1,35 @@
#!/usr/bin/env nix-shell
#!nix-shell -i bash -p nix-update yq
set -euo pipefail
nix-update "${UPDATE_NIX_ATTR_PATH}"
src="$(nix-build -A "${UPDATE_NIX_ATTR_PATH}".src --no-out-link)"
(
echo "# This file has been autogenerated by update.sh"
echo "# Do not edit this file manually."
echo "{"
yq -r '.[]|[.name, .version] | @tsv' < "${src}/scripts/plugin/plugin.yaml" \
| while IFS=$'\t' read -r name version; do
echo " \"${name}\" = {"
echo " version = \"${version}\";"
url="https://github.com/perses/plugins/releases/download/${name,,}/v${version}/${name}-${version}.tar.gz"
echo " url = \"${url}\";"
hash="$(nix-prefetch-url "${url}" --name "${UPDATE_NIX_PNAME}-${name,,}-${version}.tar.gz")"
hash="$(nix --extra-experimental-features nix-command hash convert --hash-algo sha256 "${hash}")"
echo " hash = \"${hash}\";"
echo " };"
done
echo "}"
) > "$(dirname "${BASH_SOURCE[0]}")/plugins.nix"

View File

@@ -0,0 +1,34 @@
{
lib,
rustPlatform,
fetchCrate,
makeWrapper,
wasm-pack,
}:
rustPlatform.buildRustPackage rec {
pname = "perseus-cli";
version = "0.3.1";
src = fetchCrate {
inherit pname version;
hash = "sha256-IYjLx9/4oWSXa4jhOtGw1GOHmrR7LQ6bWyN5zbOuEFs=";
};
cargoHash = "sha256-9McjhdS6KrFgtWIaP0qKsUYpPxGQjNX7SM9gJ/aJGwc=";
nativeBuildInputs = [ makeWrapper ];
postInstall = ''
wrapProgram $out/bin/perseus \
--prefix PATH : "${lib.makeBinPath [ wasm-pack ]}"
'';
meta = with lib; {
homepage = "https://framesurge.sh/perseus/en-US";
description = "High-level web development framework for Rust with full support for server-side rendering and static generation";
maintainers = with maintainers; [ max-niederman ];
license = with licenses; [ mit ];
mainProgram = "perseus";
};
}

View File

@@ -0,0 +1,46 @@
{
lib,
stdenv,
fetchurl,
unzip,
}:
stdenv.mkDerivation {
pname = "perseus";
version = "4-beta";
nativeBuildInputs = [ unzip ];
hardeningDisable = [ "stackprotector" ];
src = fetchurl {
url = "http://people.maths.ox.ac.uk/nanda/source/perseus_4_beta.zip";
sha256 = "sha256-cnkJEIC4tu+Ni7z0cKdjmLdS8QLe8iKpdA8uha2MeSU=";
};
sourceRoot = ".";
env.NIX_CFLAGS_COMPILE = toString [ "-std=c++14" ];
buildPhase = ''
g++ Pers.cpp -O3 -fpermissive -o perseus
'';
installPhase = ''
mkdir -p $out/bin
cp perseus $out/bin
'';
meta = {
description = "Persistent Homology Software";
mainProgram = "perseus";
longDescription = ''
Persistent homology - or simply, persistence - is an algebraic
topological invariant of a filtered cell complex. Perseus
computes this invariant for a wide class of filtrations built
around datasets arising from point samples, images, distance
matrices and so forth.
'';
homepage = "https://people.maths.ox.ac.uk/nanda/perseus/index.html";
license = lib.licenses.gpl3;
maintainers = with lib.maintainers; [ erikryb ];
platforms = lib.platforms.linux;
};
}

View File

@@ -0,0 +1,98 @@
{
stdenv,
lib,
fetchFromGitLab,
gitUpdater,
testers,
boost,
cmake,
doxygen,
gtest,
leveldb,
lomiri,
pkg-config,
python3,
validatePkgConfig,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "persistent-cache-cpp";
version = "1.0.9";
src = fetchFromGitLab {
owner = "ubports";
repo = "development/core/lib-cpp/persistent-cache-cpp";
rev = finalAttrs.version;
hash = "sha256-1ETr4b0HEJIM6a4ObtKWtxn0y4gQy9fzBjE4QhMPGqU=";
};
outputs = [
"out"
"dev"
"doc"
];
postPatch = ''
# Wrong concatenation
substituteInPlace data/libpersistent-cache-cpp.pc.in \
--replace "\''${prefix}/@CMAKE_INSTALL_LIBDIR@" "\''${prefix}/lib"
# Runs in parallel to other tests, limit to 1 thread
substituteInPlace tests/headers/compile_headers.py \
--replace 'multiprocessing.cpu_count()' '1'
''
+ lib.optionalString finalAttrs.finalPackage.doCheck ''
patchShebangs tests/{headers,whitespace}/*.py
'';
nativeBuildInputs = [
cmake
doxygen
pkg-config
validatePkgConfig
];
buildInputs = [
boost
lomiri.cmake-extras
leveldb
];
nativeCheckInputs = [
python3
];
checkInputs = [
gtest
];
cmakeFlags = [
# error: 'old_version' may be used uninitialized
(lib.cmakeBool "Werror" false)
# Defaults to static if not set
(lib.cmakeBool "BUILD_SHARED_LIBS" (!stdenv.hostPlatform.isStatic))
];
doCheck = stdenv.buildPlatform.canExecute stdenv.hostPlatform;
passthru = {
tests.pkg-config = testers.testMetaPkgConfig finalAttrs.finalPackage;
updateScript = gitUpdater { };
};
meta = {
description = "Cache of key-value pairs with persistent storage for C++ 11";
longDescription = ''
A persistent cache for arbitrary (possibly large amount of data, such as
image files) that is fast, scalable, and crash-proof.
'';
homepage = "https://gitlab.com/ubports/development/core/lib-cpp/persistent-cache-cpp";
changelog = "https://gitlab.com/ubports/development/core/lib-cpp/persistent-cache-cpp/-/blob/${finalAttrs.version}/ChangeLog";
license = lib.licenses.lgpl3Only;
teams = [ lib.teams.lomiri ];
platforms = lib.platforms.unix;
pkgConfigModules = [
"libpersistent-cache-cpp"
];
};
})

View File

@@ -0,0 +1,41 @@
{
lib,
fetchFromGitHub,
python3Packages,
}:
python3Packages.buildPythonApplication rec {
pname = "peru";
version = "1.3.4";
pyproject = true;
disabled = python3Packages.pythonOlder "3.5";
src = fetchFromGitHub {
owner = "buildinspace";
repo = "peru";
rev = version;
sha256 = "sha256-ubkDB/McG2Tp3s0K5PbL6QpHbpqRLAUSHa7v+u/n6hI=";
};
build-system = with python3Packages; [ setuptools ];
dependencies = with python3Packages; [
pyyaml
docopt
];
# No tests in archive
doCheck = false;
pythonImportsCheck = [ "peru" ];
meta = with lib; {
homepage = "https://github.com/buildinspace/peru";
description = "Tool for including other people's code in your projects";
license = licenses.mit;
platforms = platforms.unix;
mainProgram = "peru";
};
}

View File

@@ -0,0 +1,70 @@
{
lib,
stdenv,
fetchFromGitHub,
fetchpatch2,
pkg-config,
nss,
efivar,
util-linux,
popt,
nspr,
mandoc,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "pesign";
version = "116";
src = fetchFromGitHub {
owner = "rhboot";
repo = "pesign";
tag = finalAttrs.version;
hash = "sha256-cuOSD/ZHkilgguDFJviIZCG8kceRWw2JgssQuWN02Do=";
};
patches = [
# fix build with gcc14
# https://github.com/rhboot/pesign/pull/119
(fetchpatch2 {
url = "https://github.com/rhboot/pesign/commit/1f9e2fa0b4d872fdd01ca3ba81b04dfb1211a187.patch?full_index=1";
hash = "sha256-viVM4Z0jAEAWC3EdJVHcWe21aQskH5XE85lOd6Xd/qU=";
})
];
# nss-util is missing because it is already contained in nss
# Red Hat seems to be shipping a separate nss-util:
# https://centos.pkgs.org/7/centos-x86_64/nss-util-devel-3.44.0-4.el7_7.x86_64.rpm.html
# containing things we already have in `nss`.
# We can ignore all the errors pertaining to a missing
# nss-util.pc I suppose.
buildInputs = [
efivar
util-linux
nss
popt
nspr
mandoc
];
nativeBuildInputs = [ pkg-config ];
makeFlags = [ "INSTALLROOT=$(out)" ];
postInstall = ''
mv $out/usr/bin $out/bin
mv $out/usr/share $out/share
rm -rf $out/usr
rm -rf $out/etc
rm -rf $out/run
'';
meta = {
description = "Signing tools for PE-COFF binaries. Compliant with the PE and Authenticode specifications";
homepage = "https://github.com/rhboot/pesign";
license = lib.licenses.gpl2Only;
maintainers = with lib.maintainers; [ raitobezarius ];
# efivar is currently Linux-only.
platforms = lib.platforms.linux;
};
})

View File

@@ -0,0 +1,32 @@
{
lib,
fetchFromGitHub,
rustPlatform,
nix-update-script,
}:
rustPlatform.buildRustPackage rec {
pname = "pest-ide-tools";
version = "0.3.11";
cargoHash = "sha256-wLdVIAwrnAk8IRp4RhO3XgfYtNw2S07uAHB1mokZ2lk=";
src = fetchFromGitHub {
owner = "pest-parser";
repo = "pest-ide-tools";
rev = "v${version}";
sha256 = "sha256-12/FndzUbUlgcYcwMT1OfamSKgy2q+CvtGyx5YY4IFQ=";
};
passthru = {
updateScript = nix-update-script { };
};
meta = with lib; {
description = "IDE support for Pest, via the LSP";
homepage = "https://pest.rs";
license = with licenses; [ asl20 ];
maintainers = with maintainers; [ nickhu ];
mainProgram = "pest-language-server";
};
}

4401
pkgs/by-name/pe/pest/composer.lock generated Normal file

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,29 @@
{
lib,
fetchFromGitHub,
php,
}:
php.buildComposerProject2 (finalAttrs: {
pname = "pest";
version = "3.7.4";
src = fetchFromGitHub {
owner = "pestphp";
repo = "pest";
tag = "v${finalAttrs.version}";
hash = "sha256-ddsdVx/Vsg7GG11fGASouBU3HAJLSjs1AQGHx52TWzA=";
};
composerLock = ./composer.lock;
vendorHash = "sha256-rOJ6PFp4Xfe89usoH455EAT30d2Tu3zd3+C/6K/kGBw=";
meta = {
changelog = "https://github.com/pestphp/pest/releases/tag/v${finalAttrs.version}";
description = "PHP testing framework";
homepage = "https://pestphp.com";
license = lib.licenses.mit;
mainProgram = "pest";
maintainers = [ lib.maintainers.patka ];
};
})

View File

@@ -0,0 +1,53 @@
{
lib,
stdenv,
buildGoModule,
fetchFromGitHub,
installShellFiles,
writableTmpDirAsHomeHook,
}:
buildGoModule rec {
pname = "pet";
version = "1.0.1";
src = fetchFromGitHub {
owner = "knqyf263";
repo = "pet";
rev = "v${version}";
sha256 = "sha256-B0ilobUlp6UUXu6+lVqIHkbFnxVu33eXZFf+F7ODoQU=";
};
vendorHash = "sha256-+ieBk7uMzgeM45uvLfljenNvhGVv1mEazErf4YHPNWQ=";
ldflags = [
"-s"
"-w"
"-X=github.com/knqyf263/pet/cmd.version=${version}"
];
doCheck = false;
subPackages = [ "." ];
nativeBuildInputs = [
installShellFiles
writableTmpDirAsHomeHook
];
postInstall = lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) ''
installShellCompletion --cmd pet \
--bash <($out/bin/pet completion bash) \
--fish <($out/bin/pet completion fish) \
--zsh $src/misc/completions/zsh/_pet
'';
meta = with lib; {
description = "Simple command-line snippet manager, written in Go";
mainProgram = "pet";
homepage = "https://github.com/knqyf263/pet";
license = licenses.mit;
maintainers = with maintainers; [ kalbasit ];
platforms = platforms.linux ++ platforms.darwin;
};
}

View File

@@ -0,0 +1,45 @@
{
lib,
stdenv,
fetchurl,
flex,
bison,
sendmailPath ? "/run/wrappers/bin/sendmail",
versionCheckHook,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "petidomo";
version = "4.3";
src = fetchurl {
url = "mirror://sourceforge/petidomo/petidomo-${finalAttrs.version}.tar.gz";
hash = "sha256-ddNw0fq2MQLJd6YCmIkf9lvq9/Xscl94Ds8xR1hfjXQ=";
};
buildInputs = [
flex
bison
];
configureFlags = [ "--with-mta=${sendmailPath}" ];
# test.c:43:11: error: implicit declaration of function 'gets'; did you mean 'fgets'?
env.NIX_CFLAGS_COMPILE = "-Wno-error=implicit-function-declaration";
enableParallelBuilding = true;
doCheck = true;
doInstallCheck = true;
nativeInstallCheckInputs = [ versionCheckHook ];
meta = {
homepage = "https://petidomo.sourceforge.net/";
description = "Simple and easy to administer mailing list server";
license = lib.licenses.gpl3Plus;
platforms = lib.platforms.unix;
maintainers = [ lib.maintainers.peti ];
};
})

View File

@@ -0,0 +1,22 @@
diff --git a/config/BuildSystem/config/packages/petsc4py.py b/config/BuildSystem/config/packages/petsc4py.py
index 4a58243..831aa04 100644
--- a/config/BuildSystem/config/packages/petsc4py.py
+++ b/config/BuildSystem/config/packages/petsc4py.py
@@ -37,7 +37,7 @@ class Configure(config.package.Package):
def Install(self):
import os
- installLibPath = os.path.join(self.installDir, 'lib')
+ installLibPath = os.path.join(self.installDir, '@PYTHON_SITEPACKAGES@')
if self.setCompilers.isDarwin(self.log):
apple = 'You may need to\n (csh/tcsh) setenv MACOSX_DEPLOYMENT_TARGET 10.X\n (sh/bash) MACOSX_DEPLOYMENT_TARGET=10.X; export MACOSX_DEPLOYMENT_TARGET\nbefore running make on PETSc'
else:
@@ -70,7 +70,7 @@ class Configure(config.package.Package):
newdir += 'NUMPY_INCLUDE="'+numpy_include+'" '
self.addDefine('HAVE_PETSC4PY',1)
- self.addDefine('PETSC4PY_INSTALL_PATH','"'+os.path.join(self.installdir.dir,'lib')+'"')
+ self.addDefine('PETSC4PY_INSTALL_PATH','"'+installLibPath+'"')
self.addMakeMacro('PETSC4PY','yes')
self.addMakeRule('petsc4pybuild','', \
['@echo "*** Building petsc4py ***"',\

View File

@@ -0,0 +1,293 @@
{
lib,
newScope,
stdenv,
fetchzip,
replaceVars,
bash,
pkg-config,
gfortran,
bison,
mpi, # generic mpi dependency
mpiCheckPhaseHook,
python3Packages,
# Build options
debug ? false,
scalarType ? "real",
precision ? "double",
mpiSupport ? true,
fortranSupport ? true,
pythonSupport ? false, # petsc python binding
withExamples ? false,
withFullDeps ? false, # full External libraries support
withCommonDeps ? true, # common External libraries support
# External libraries options
withHdf5 ? withCommonDeps,
withMetis ? withCommonDeps,
withZlib ? (withP4est || withPtScotch),
withScalapack ? withCommonDeps && mpiSupport,
withParmetis ? withFullDeps, # parmetis is unfree
withPtScotch ? withCommonDeps && mpiSupport,
withMumps ? withCommonDeps,
withP4est ? withFullDeps,
withHypre ? withCommonDeps && mpiSupport,
withFftw ? withCommonDeps,
withSuperLu ? withCommonDeps,
withSuperLuDist ? withCommonDeps && mpiSupport,
withSuitesparse ? withCommonDeps,
# External libraries
blas,
lapack,
hdf5,
metis,
parmetis,
scotch,
scalapack,
mumps,
p4est,
zlib, # propagated by p4est but required by petsc
hypre,
fftw,
superlu,
superlu_dist,
suitesparse,
# Used in passthru.tests
petsc,
mpich,
}:
assert withFullDeps -> withCommonDeps;
# This version of PETSc does not support a non-MPI p4est build
assert withP4est -> (mpiSupport && withZlib);
# Package parmetis depend on metis and mpi support
assert withParmetis -> (withMetis && mpiSupport);
assert withPtScotch -> (mpiSupport && withZlib);
assert withScalapack -> mpiSupport;
assert (withMumps && mpiSupport) -> withScalapack;
assert withHypre -> mpiSupport;
assert withSuperLuDist -> mpiSupport;
let
petscPackages = lib.makeScope newScope (self: {
inherit
mpi
python3Packages
# global override options
mpiSupport
fortranSupport
pythonSupport
precision
withPtScotch
;
enableMpi = self.mpiSupport;
petscPackages = self;
# external libraries
blas = self.callPackage blas.override { };
lapack = self.callPackage lapack.override { };
hdf5 = self.callPackage hdf5.override {
fortran = gfortran;
cppSupport = !mpiSupport;
};
metis = self.callPackage metis.override { };
parmetis = self.callPackage parmetis.override { };
scotch = self.callPackage scotch.override { };
scalapack = self.callPackage scalapack.override { };
mumps = self.callPackage mumps.override { };
p4est = self.callPackage p4est.override { };
hypre = self.callPackage hypre.override { };
fftw = self.callPackage fftw.override { };
superlu = self.callPackage superlu.override { };
superlu_dist = self.callPackage superlu_dist.override { };
suitesparse = self.callPackage suitesparse.override { };
});
in
stdenv.mkDerivation (finalAttrs: {
pname = "petsc";
version = "3.24.0";
src = fetchzip {
url = "https://web.cels.anl.gov/projects/petsc/download/release-snapshots/petsc-${finalAttrs.version}.tar.gz";
hash = "sha256-5jqYTo5sfwLNByOlpry0zpI+q3u7ErwJJ97h7w5bvNQ=";
};
patches = [
(replaceVars ./fix-petsc4py-install-prefix.patch {
PYTHON_SITEPACKAGES = python3Packages.python.sitePackages;
})
];
postPatch = ''
patchShebangs ./lib/petsc/bin
substituteInPlace config/example_template.py \
--replace-fail "/usr/bin/env bash" "${bash}/bin/bash"
'';
strictDeps = true;
nativeBuildInputs = [
gfortran
pkg-config
bison
python3Packages.python
]
++ lib.optional mpiSupport mpi
++ lib.optionals pythonSupport [
python3Packages.setuptools
python3Packages.cython
];
buildInputs = [
petscPackages.blas
petscPackages.lapack
]
++ lib.optional withZlib zlib
++ lib.optional withHdf5 petscPackages.hdf5
++ lib.optional withP4est petscPackages.p4est
++ lib.optional withMetis petscPackages.metis
++ lib.optional withParmetis petscPackages.parmetis
++ lib.optional withPtScotch petscPackages.scotch
++ lib.optional withScalapack petscPackages.scalapack
++ lib.optional withMumps petscPackages.mumps
++ lib.optional withHypre petscPackages.hypre
++ lib.optional withSuperLu petscPackages.superlu
++ lib.optional withSuperLuDist petscPackages.superlu_dist
++ lib.optional withFftw petscPackages.fftw
++ lib.optional withSuitesparse petscPackages.suitesparse;
propagatedBuildInputs = lib.optional pythonSupport python3Packages.numpy;
configureFlags = [
"--with-blaslapack=1"
"--with-scalar-type=${scalarType}"
"--with-precision=${precision}"
"--with-mpi=${if mpiSupport then "1" else "0"}"
]
++ lib.optionals (!mpiSupport) [
"--with-cc=${stdenv.cc}/bin/${if stdenv.cc.isGNU then "gcc" else "clang"}"
"--with-cxx=${stdenv.cc}/bin/${if stdenv.cc.isGNU then "g++" else "clang++"}"
"--with-fc=${gfortran}/bin/gfortran"
]
++ lib.optionals mpiSupport [
"--with-cc=${lib.getDev mpi}/bin/mpicc"
"--with-cxx=${lib.getDev mpi}/bin/mpicxx"
"--with-fc=${lib.getDev mpi}/bin/mpif90"
]
++ lib.optional (!debug) "--with-debugging=0"
++ lib.optional (!fortranSupport) "--with-fortran-bindings=0"
++ lib.optional pythonSupport "--with-petsc4py=1"
++ lib.optional withMetis "--with-metis=1"
++ lib.optional withParmetis "--with-parmetis=1"
++ lib.optional withPtScotch "--with-ptscotch=1"
++ lib.optional withScalapack "--with-scalapack=1"
++ lib.optional withMumps "--with-mumps=1"
++ lib.optional (withMumps && !mpiSupport) "--with-mumps-serial=1"
++ lib.optional withP4est "--with-p4est=1"
++ lib.optional withZlib "--with-zlib=1"
++ lib.optional withHdf5 "--with-hdf5=1"
++ lib.optional withHypre "--with-hypre=1"
++ lib.optional withSuperLu "--with-superlu=1"
++ lib.optional withSuperLuDist "--with-superlu_dist=1"
++ lib.optional withFftw "--with-fftw=1"
++ lib.optional withSuitesparse "--with-suitesparse=1";
installTargets = [ (if withExamples then "install" else "install-lib") ];
enableParallelBuilding = true;
# Ensure petscvariables contains absolute paths for compilers and flags so that downstream
# packages relying on PETSc's runtime configuration (e.g. form compilers, code generators)
# can correctly compile and link generated code
postInstall = lib.concatStringsSep "\n" (
map (
package:
let
pname = package.pname or package.name;
prefix =
if (pname == "blas" || pname == "lapack") then
"BLASLAPACK"
else
lib.toUpper (builtins.elemAt (lib.splitString "-" pname) 0);
in
''
substituteInPlace $out/lib/petsc/conf/petscvariables \
--replace-fail "${prefix}_INCLUDE =" "${prefix}_INCLUDE = -I${lib.getDev package}/include" \
--replace-fail "${prefix}_LIB =" "${prefix}_LIB = -L${lib.getLib package}/lib"
''
) finalAttrs.buildInputs
);
__darwinAllowLocalNetworking = true;
# This is needed as the checks need to compile and link the test cases with
# -lpetsc, which is not available in the checkPhase, which is executed before
# the installPhase. The installCheckPhase comes after the installPhase, so
# the library is installed and available.
doInstallCheck = true;
installCheckTarget = "check_install";
# The PETSC4PY=no flag disables the ex100 test,
# which compiles C code to load Python modules for solving a math problem.
# This test fails on the Darwin platform but is rarely a common use case for petsc4py.
installCheckFlags = lib.optional stdenv.hostPlatform.isDarwin "PETSC4PY=no";
nativeInstallCheckInputs = [
mpiCheckPhaseHook
]
++ lib.optionals pythonSupport [
python3Packages.pythonImportsCheckHook
python3Packages.unittestCheckHook
];
unittestFlagsArray = [
"-s"
"src/binding/petsc4py/test"
"-v"
];
pythonImportsCheck = [ "petsc4py" ];
passthru = {
inherit
mpiSupport
pythonSupport
fortranSupport
;
petscPackages = petscPackages.overrideScope (
final: prev: {
petsc = finalAttrs.finalPackage;
}
);
tests = {
serial = petsc.override {
mpiSupport = false;
};
}
// lib.optionalAttrs stdenv.hostPlatform.isLinux {
fullDeps = petsc.override {
withFullDeps = true;
withParmetis = false;
};
mpich = petsc.override {
mpi = mpich;
};
};
};
setupHook = ./setup-hook.sh;
meta = {
description = "Portable Extensible Toolkit for Scientific computation";
homepage = "https://petsc.org/release/";
license = lib.licenses.bsd2;
platforms = lib.platforms.unix;
maintainers = with lib.maintainers; [ qbisi ];
};
})

View File

@@ -0,0 +1 @@
export PETSC_DIR=@out@

View File

@@ -0,0 +1,35 @@
{
lib,
stdenv,
openssl,
fetchFromGitHub,
}:
stdenv.mkDerivation {
pname = "pev";
version = "0-unstable-2020-05-23";
src = fetchFromGitHub {
owner = "merces";
repo = "pev";
rev = "beec2b4f09585fea919ed41ce466dee06be0b6bf";
hash = "sha256-HrMbk9YbuqkoBBM7+rfXpqVEnd1rDl2rMePdcfU1WDg=";
fetchSubmodules = true;
};
buildInputs = [ openssl ];
enableParallelBuilding = true;
makeFlags = [ "prefix=$(out)" ];
installFlags = [ "prefix=$(out)" ];
meta = with lib; {
description = "Full-featured, open source, multiplatform command line toolkit to work with PE (Portable Executables) binaries";
homepage = "https://pev.sourceforge.net/";
license = licenses.gpl2;
maintainers = with maintainers; [ jeschli ];
platforms = platforms.linux;
};
}

View File

@@ -0,0 +1,42 @@
{
lib,
python3,
fetchPypi,
}:
python3.pkgs.buildPythonApplication rec {
pname = "pew";
version = "1.2.0";
pyproject = true;
src = fetchPypi {
inherit pname version;
sha256 = "04anak82p4v9w0lgfs55s7diywxil6amq8c8bhli143ca8l2fcdq";
};
build-system = with python3.pkgs; [
setuptools
];
dependencies = with python3.pkgs; [
virtualenv
virtualenv-clone
setuptools # pkg_resources is imported during runtime
];
# no tests are packaged
checkPhase = ''
$out/bin/pew > /dev/null
'';
pythonImportsCheck = [ "pew" ];
meta = with lib; {
homepage = "https://github.com/berdario/pew";
description = "Tools to manage multiple virtualenvs written in pure python";
mainProgram = "pew";
license = licenses.mit;
platforms = platforms.all;
maintainers = with maintainers; [ berdario ];
};
}