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,36 @@
{
lib,
buildNpmPackage,
fetchFromGitHub,
npm-lockfile-fix,
}:
buildNpmPackage rec {
pname = "pm2";
version = "6.0.13";
src = fetchFromGitHub {
owner = "Unitech";
repo = "pm2";
rev = "v${version}";
hash = "sha256-Tvwx6yqNH1Ab30DCT18HtHAp/ruTJFult4bvFzKTy7Y=";
# Requested patch upstream: https://github.com/Unitech/pm2/pull/5985
postFetch = ''
${lib.getExe npm-lockfile-fix} $out/package-lock.json
'';
};
npmDepsHash = "sha256-2+onHdd8BvSTOavXw32vAId7Epd+1Y7OM95DBslcR2o=";
dontNpmBuild = true;
meta = {
changelog = "https://github.com/Unitech/pm2/blob/${src.rev}/CHANGELOG.md";
description = "Node.js production process manager with a built-in load balancer";
homepage = "https://github.com/Unitech/pm2";
license = lib.licenses.agpl3Only;
mainProgram = "pm2";
maintainers = with lib.maintainers; [ jeremyschlatter ];
};
}

View File

@@ -0,0 +1,94 @@
{
lib,
stdenv,
fetchFromGitHub,
pkg-config,
autoreconfHook,
libtool,
libpcap,
libcdada,
# Optional Dependencies
withKafka ? true,
rdkafka,
withJansson ? true,
jansson,
withNflog ? true,
libnetfilter_log,
withSQLite ? true,
sqlite,
withPgSQL ? true,
libpq,
withMysql ? true,
libmysqlclient,
zlib,
numactl,
gnutlsSupport ? false,
gnutls,
testers,
}:
stdenv.mkDerivation (finalAttrs: {
version = "1.7.9";
pname = "pmacct";
src = fetchFromGitHub {
owner = "pmacct";
repo = "pmacct";
rev = "v${finalAttrs.version}";
hash = "sha256-3gV6GUhTQnH09NRIJQI0xBn05Bgo3AJsE2cSxNPXITo=";
};
nativeBuildInputs = [
autoreconfHook
pkg-config
libtool
];
buildInputs = [
libcdada
libpcap
]
++ lib.optional withKafka rdkafka
++ lib.optional withJansson jansson
++ lib.optional withNflog libnetfilter_log
++ lib.optional withSQLite sqlite
++ lib.optional withPgSQL libpq
++ lib.optionals withMysql [
libmysqlclient
zlib
numactl
]
++ lib.optional gnutlsSupport gnutls;
MYSQL_CONFIG = lib.optionalString withMysql "${lib.getDev libmysqlclient}/bin/mysql_config";
configureFlags = [
"--with-pcap-includes=${libpcap}/include"
]
++ lib.optional withKafka "--enable-kafka"
++ lib.optional withJansson "--enable-jansson"
++ lib.optional withNflog "--enable-nflog"
++ lib.optional withSQLite "--enable-sqlite3"
++ lib.optional withPgSQL "--enable-pgsql"
++ lib.optional withMysql "--enable-mysql"
++ lib.optional gnutlsSupport "--enable-gnutls";
passthru.tests = {
version = testers.testVersion {
package = finalAttrs.finalPackage;
command = "pmacct -V";
};
};
meta = {
description = "Small set of multi-purpose passive network monitoring tools";
longDescription = ''
pmacct is a small set of multi-purpose passive network monitoring tools
[NetFlow IPFIX sFlow libpcap BGP BMP RPKI IGP Streaming Telemetry]
'';
homepage = "http://www.pmacct.net/";
changelog = "https://github.com/pmacct/pmacct/blob/v${finalAttrs.version}/ChangeLog";
license = lib.licenses.gpl2Plus;
maintainers = with lib.maintainers; [ _0x4A6F ];
platforms = lib.platforms.unix;
};
})

View File

@@ -0,0 +1,92 @@
diff '--color=auto' -ruN a/src/cdb.c b/src/cdb.c
--- a/src/cdb.c 1970-01-01 01:00:01.000000000 +0100
+++ b/src/cdb.c 2024-10-08 11:28:57.892951658 +0200
@@ -1564,7 +1564,7 @@
(warriorsLeft ? warriorsLeft : 1));
substitute(buf[bi1], "CYCLE", outs, buf[bi2]);
SWITCHBI;
- sprintf(outs, "%d", round);
+ sprintf(outs, "%d", roundCounter);
substitute(buf[bi1], "ROUND", outs, buf[bi2]);
SWITCHBI;
@@ -1875,7 +1875,7 @@
#endif
int nFuture, nPast, count, taskHalf = (coreSize <= 10000 ? 7 : 5);
- sprintf(outs, roundOfCycle, round, rounds,
+ sprintf(outs, roundOfCycle, roundCounter, rounds,
(cycle + (warriorsLeft ? warriorsLeft : 1) - 1) /
(warriorsLeft ? warriorsLeft : 1));
cdb_fputs(outs, COND);
diff '--color=auto' -ruN a/src/curdisp.c b/src/curdisp.c
--- a/src/curdisp.c 1970-01-01 01:00:01.000000000 +0100
+++ b/src/curdisp.c 2024-10-08 11:29:52.129955266 +0200
@@ -156,7 +156,7 @@
wstandend(corewin);
if (!--refreshCounter) {
refreshCounter = refreshInterval;
- update_statusline(round);
+ update_statusline(roundCounter);
wrefresh(corewin);
}
}
@@ -542,7 +542,7 @@
text_display_close()
{
if (displayLevel) {
- update_statusline(round - 1);
+ update_statusline(roundCounter - 1);
wstandout(corewin);
mvwaddstr(corewin, 0, 0, pressAnyKey);
wrefresh(corewin);
diff '--color=auto' -ruN a/src/sim.c b/src/sim.c
--- a/src/sim.c 1970-01-01 01:00:01.000000000 +0100
+++ b/src/sim.c 2024-10-08 11:28:21.848284678 +0200
@@ -173,7 +173,7 @@
mem_struct FAR *memory;
long cycle;
-int round;
+int roundCounter;
char alloc_p = 0; /* indicate whether memory has been allocated */
int warriorsLeft; /* number of warriors still left in core */
@@ -328,7 +328,7 @@
#endif
display_init();
- round = 1;
+ roundCounter = 1;
do { /* each round */
#if defined(DOS16) && !defined(SERVER) && !defined(DOSTXTGRAPHX) && !defined(DOSGRXGRAPHX) && !defined(DJGPP)
fputc('\r', stdout); /* enable interruption by Ctrl-C */
@@ -1421,13 +1421,13 @@
#ifndef SERVER
if (debugState == BREAK) {
if (warriorsLeft == 1 && warriors != 1)
- sprintf(outs, warriorTerminatedEndOfRound, W - warrior, W->name, round);
+ sprintf(outs, warriorTerminatedEndOfRound, W - warrior, W->name, roundCounter);
else
- sprintf(outs, endOfRound, round);
+ sprintf(outs, endOfRound, roundCounter);
debugState = cdb(outs);
}
#endif
- } while (++round <= rounds);
+ } while (++roundCounter <= rounds);
display_close();
#ifdef PERMUTATE
diff '--color=auto' -ruN a/src/sim.h b/src/sim.h
--- a/src/sim.h 1970-01-01 01:00:01.000000000 +0100
+++ b/src/sim.h 2024-10-08 11:27:46.730634854 +0200
@@ -89,7 +89,7 @@
#define FAR
#endif
-extern int round;
+extern int roundCounter;
extern long cycle;
extern ADDR_T progCnt; /* program counter */
extern warrior_struct *W; /* indicate which warrior is running */

View File

@@ -0,0 +1,52 @@
diff '--color=auto' -ruN a/src/pmars.c b/src/pmars.c
--- a/src/pmars.c 2024-11-12 20:36:28.142766807 +0100
+++ b/src/pmars.c 2024-11-12 20:39:48.096710063 +0100
@@ -72,7 +72,7 @@
#ifdef PSPACE
void pspace_init(void);
#endif
-#if defined(unix) || defined(__MSDOS__) || defined(VMS)
+#if defined(unix) || defined(__MSDOS__) || defined(VMS) || defined(__MACH__)
void sighandler(int dummy);
#endif
#if defined(CURSESGRAPHX)
@@ -87,7 +87,7 @@
#ifdef PSPACE
void pspace_init();
#endif
-#if defined(unix) || defined(__MSDOS__)
+#if defined(unix) || defined(__MSDOS__) || defined(__MACH__)
void sighandler();
#endif
#if defined(CURSESGRAPHX)
@@ -224,7 +224,7 @@
}
/* called when ctrl-c is pressed; prepares for debugger entry */
-#if defined(unix) || defined(__MSDOS__) || defined (__OS2__)
+#if defined(unix) || defined(__MSDOS__) || defined (__OS2__) || defined(__MACH__)
void
#ifdef __OS2__
_cdecl
@@ -290,7 +290,7 @@
int argc;
char **argv;
{
-#if defined(unix) && !defined(DJGPP)
+#if (defined(unix) && !defined(DJGPP)) || defined(__MACH__)
#ifdef SIGINT
signal(SIGINT, sighandler);
#endif
diff '--color=auto' -ruN a/src/xwindisp.c b/src/xwindisp.c
--- a/src/xwindisp.c 2024-11-12 20:36:28.143766827 +0100
+++ b/src/xwindisp.c 2024-11-12 20:37:39.708178145 +0100
@@ -61,6 +61,9 @@
#define YELLOW 14
#define WHITE 15
+/* defined in pmars.c */
+extern void sighandler(int dummy);
+
/* X names of the colors we allocate */
static char *xColorNames[MAXXCOLOR] = {
"black", "blue3", "green3", "cyan3",

View File

@@ -0,0 +1,57 @@
diff '--color=auto' -ruN a/src/curdisp.c b/src/curdisp.c
--- a/src/curdisp.c 2025-05-08 23:23:48.070346219 +0200
+++ b/src/curdisp.c 2025-05-08 23:29:33.851400436 +0200
@@ -28,12 +28,6 @@
#include "sim.h"
#endif
-/* For window structure in BSD 4.4/Curses 8.x library */
-#ifdef BSD44
-#define _curx curx
-#define _cury cury
-#endif
-
typedef struct win_st {
WINDOW *win;
int page;
@@ -428,18 +422,18 @@
str--;
maxchar++;
leaveok(curwin, TRUE);
- if (ox = curwin->_curx) {
+ if (ox = getcurx(curwin)) {
#if 0
#ifdef ATTRIBUTE
- mvwaddch(curwin, curwin->_cury, --ox, ' ' | attr);
+ mvwaddch(curwin, getcury(curwin), --ox, ' ' | attr);
#else
- mvwaddch(curwin, curwin->_cury, --ox, ' ');
+ mvwaddch(curwin, getcury(curwin), --ox, ' ');
#endif
#endif /* 0 */
- mvwaddch(curwin, curwin->_cury, --ox, ' ');
- wmove(curwin, curwin->_cury, ox);
+ mvwaddch(curwin, getcury(curwin), --ox, ' ');
+ wmove(curwin, getcury(curwin), ox);
} else {
- oy = curwin->_cury - 1;
+ oy = getcury(curwin) - 1;
#if 0
#ifdef ATTRIBUTE
mvwaddch(curwin, oy, COLS - 1, ' ' | attr);
@@ -470,12 +464,12 @@
if (ox--)
#if 0
#ifdef ATTRIBUTE
- mvwaddch(curwin, curwin->_cury, ox, ' ' | attr);
+ mvwaddch(curwin, getcury(curwin), ox, ' ' | attr);
#else
- mvwaddch(curwin, curwin->_cury, ox, ' ');
+ mvwaddch(curwin, getcury(curwin), ox, ' ');
#endif
#endif /* 0 */
- mvwaddch(curwin, curwin->_cury, ox, ' ');
+ mvwaddch(curwin, getcury(curwin), ox, ' ');
else
#if 0
#ifdef ATTRIBUTE

View File

@@ -0,0 +1,107 @@
{
stdenv,
lib,
fetchzip,
installShellFiles,
libX11,
ncurses,
pkg-config,
enableXwinGraphics ? false,
}:
let
options = [
"${if enableXwinGraphics then "XWIN" else "CURSES"}GRAPHX"
"EXT94"
"PERMUTATE"
"RWLIMIT"
];
pkgConfigLibs =
lib.optionals enableXwinGraphics [ "x11" ] ++ lib.optionals (!enableXwinGraphics) [ "ncurses" ];
in
stdenv.mkDerivation (finalAttrs: {
pname = "pmars";
version = "0.9.4";
src = fetchzip {
url = "http://www.koth.org/pmars/pmars-${finalAttrs.version}.zip";
hash = "sha256-68zsH9HWWp13pozjMajayS/VhY8iTosUp1CvcAmj/dE=";
};
patches = [
# Error under Clang due to global "round" variable: redefinition of 'round' as different kind of symbol
./0001-fix-round-redefinition.patch
# call to undeclared function 'sighandler' & undefined sighandler on Darwin
./0002-fix-sighandler.patch
# ncurses' WINDOW struct was turned opaque for outside code, use functions for accessing values instead
./0003-fix-ncurses-opaque-WINDOW.patch
];
postPatch = ''
substituteInPlace src/Makefile \
--replace-fail 'CC = gcc' "CC = $CC" \
--replace-fail '@strip' "@$STRIP" \
--replace-fail 'CFLAGS = -O -DEXT94 -DXWINGRAPHX -DPERMUTATE -DRWLIMIT' "CFLAGS = ${
lib.concatMapStringsSep " " (opt: "-D${opt}") options
} ${
lib.optionalString (
pkgConfigLibs != [ ]
) "$($PKG_CONFIG --cflags ${lib.strings.concatStringsSep " " pkgConfigLibs})"
}" \
--replace-fail 'LIB = -L/usr/X11R6/lib -lX11' "LIB = ${
lib.optionalString (
pkgConfigLibs != [ ]
) "$($PKG_CONFIG --libs ${lib.strings.concatStringsSep " " pkgConfigLibs})"
}"
'';
nativeBuildInputs = [ installShellFiles ] ++ lib.optionals (pkgConfigLibs != [ ]) [ pkg-config ];
buildInputs =
lib.optionals enableXwinGraphics [ libX11 ] ++ lib.optionals (!enableXwinGraphics) [ ncurses ];
preConfigure = ''
cd src
'';
hardeningDisable = [ "format" ];
enableParallelBuilding = true;
installPhase = ''
runHook preInstall
install -Dm755 pmars $out/bin/pmars
mkdir -p $out/share/pmars
cp -R -t $out/share/pmars/ ../{AUTHORS,COPYING,README,config,warriors}
installManPage ../doc/pmars.6
mkdir -p $out/share/doc/pmars
cp -t $out/share/doc/pmars/ ../doc/{primer.*,redcode.ref}
runHook postInstall
'';
passthru = {
inherit options;
};
meta = {
description = "Official Core War simulator";
longDescription = ''
Portable MARS is the official Core War simulator of the ICWS and the rec.games.corewar newsgroup. pMARS serves as
a test bed for new Redcode standards and tournament styles. It has also been used in genetic algorithm experiments
and as an assembly language teaching aid. pMARS is under active development by a group of Core War enthusiasts who
put a lot of time into this project.
'';
homepage = "http://www.koth.org/pmars/";
license = lib.licenses.gpl2Plus;
mainProgram = "pmars";
maintainers = with lib.maintainers; [ OPNA2608 ];
platforms = lib.platforms.unix;
};
})

View File

@@ -0,0 +1,90 @@
{
stdenv,
lib,
git,
multipath-tools,
openssl,
ps,
fetchFromGitLab,
sudo,
python3Packages,
gitUpdater,
util-linux,
versionCheckHook,
}:
python3Packages.buildPythonApplication rec {
pname = "pmbootstrap";
version = "3.5.2";
pyproject = true;
src = fetchFromGitLab {
owner = "postmarketOS";
repo = "pmbootstrap";
tag = version;
hash = "sha256-fkzDVMO0huAuJDJIt0dyNGnRD6Go7XZ/YRv/JMtlbss=";
domain = "gitlab.postmarketos.org";
};
pmb_test = "${src}/test";
# Tests depend on sudo
doCheck = stdenv.hostPlatform.isLinux;
build-system = [
python3Packages.setuptools
];
nativeCheckInputs = [
git
multipath-tools
openssl
ps
python3Packages.pytestCheckHook
sudo
util-linux
versionCheckHook
];
# Add test dependency in PATH
preCheck = ''
export PYTHONPATH=$PYTHONPATH:${pmb_test}
'';
# skip impure tests
disabledTests = [
"test_pkgrepo_pmaports"
"test_random_valid_deviceinfos"
]
++ lib.optionals (stdenv.hostPlatform.isLinux && stdenv.hostPlatform.isAarch64) [
# assert chroot.type == ChrootType.BUILDROOT
# AssertionError: assert <ChrootType.NATIVE: 'native'> == <ChrootType.BUILDROOT: 'buildroot'>
"test_valid_chroots"
];
versionCheckProgramArg = "--version";
makeWrapperArgs = [
"--prefix PATH : ${
lib.makeBinPath [
git
openssl
multipath-tools
util-linux
]
}"
];
passthru.updateScript = gitUpdater { };
meta = {
description = "Sophisticated chroot/build/flash tool to develop and install postmarketOS";
homepage = "https://gitlab.postmarketos.org/postmarketOS/pmbootstrap";
license = lib.licenses.gpl3Plus;
maintainers = with lib.maintainers; [
onny
lucasew
];
mainProgram = "pmbootstrap";
};
}

View File

@@ -0,0 +1,15 @@
diff --git a/decomment.c b/decomment.c
index 400707a..aea29fd 100644
--- a/decomment.c
+++ b/decomment.c
@@ -11,6 +11,10 @@
#include "getopt.h"
#endif
+#ifdef __APPLE__
+#include "getopt.h"
+#endif
+
#ifdef NEED_OPTIND
extern int optind;
#endif

View File

@@ -0,0 +1,58 @@
{
lib,
stdenv,
fetchurl,
}:
stdenv.mkDerivation rec {
pname = "pmccabe";
version = "2.6";
src = fetchurl {
url = "http://http.debian.net/debian/pool/main/p/pmccabe/pmccabe_${version}.tar.gz";
sha256 = "0a3h1b9fb87c82d5fbql5lc4gp338pa5s9i66dhw7zk8jdygx474";
};
patches = [ ./getopt_on_darwin.patch ];
# GCC 14 made implicit function declarations an error. With this switch we turn them
# back into a warning.
env.NIX_CFLAGS_COMPILE = "-Wno-error=implicit-function-declaration";
configurePhase = ''
runHook preConfigure
sed -i -r Makefile \
-e 's,/usr/,/,g' \
-e "s,^DESTDIR =.*$,DESTDIR = $out," \
-e "s,^INSTALL = install.*$,INSTALL = install," \
-e "s,^all:.*$,all: \$(PROGS),"
runHook postConfigure
'';
checkPhase = "make test";
doCheck = true;
meta = with lib; {
description = "McCabe-style function complexity and line counting for C and C++";
homepage = "https://people.debian.org/~bame/pmccabe/";
license = licenses.gpl2Plus;
longDescription = ''
pmccabe calculates McCabe-style cyclomatic complexity for C and
C++ source code. Per-function complexity may be used for
spotting likely trouble spots and for estimating testing
effort.
pmccabe also includes a non-commented line counter, decomment which
only removes comments from source code; codechanges, a program to
calculate the amount of change which has occurred between two source
trees or files; and vifn, to invoke vi given a function name rather
than a file name.
'';
maintainers = with maintainers; [ peterhoeg ];
platforms = platforms.unix;
};
}

View File

@@ -0,0 +1,54 @@
{
lib,
stdenv,
fetchurl,
unzip,
makeWrapper,
jdk8,
}:
stdenv.mkDerivation rec {
pname = "pmd";
version = "6.55.0";
src = fetchurl {
url = "https://github.com/pmd/pmd/releases/download/pmd_releases/${version}/pmd-bin-${version}.zip";
hash = "sha256-Iaz5bUPLQNWRyszMHCCmb8eW6t32nqYYEllER7rHoR0=";
};
nativeBuildInputs = [
unzip
makeWrapper
];
dontConfigure = true;
dontBuild = true;
installPhase = ''
runHook preInstall
install -Dm755 bin/run.sh $out/libexec/pmd
install -Dm644 lib/*.jar -t $out/lib/pmd
wrapProgram $out/libexec/pmd \
--prefix PATH : ${jdk8.jre}/bin \
--set LIB_DIR $out/lib/pmd
for app in pmd cpd cpdgui designer bgastviewer designerold ast-dump; do
makeWrapper $out/libexec/pmd $out/bin/$app --argv0 $app --add-flags $app
done
runHook postInstall
'';
meta = with lib; {
description = "Extensible cross-language static code analyzer";
homepage = "https://pmd.github.io/";
changelog = "https://pmd.github.io/pmd-${version}/pmd_release_notes.html";
platforms = platforms.unix;
license = with licenses; [
bsdOriginal
asl20
];
};
}

View File

@@ -0,0 +1,63 @@
{
lib,
stdenv,
fetchFromGitHub,
writeText,
fontconfig,
imlib2,
libX11,
libXext,
libXft,
libXinerama,
libXrender,
conf ? null,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "pmenu";
version = "3.1.1";
src = fetchFromGitHub {
owner = "phillbush";
repo = "pmenu";
rev = "v${finalAttrs.version}";
hash = "sha256-7NI5az3LxOYEnsts8Qqi3gvO3dXpNjPDOTW2c5Y25Lc=";
};
buildInputs = [
fontconfig
imlib2
libX11
libXext
libXft
libXinerama
libXrender
];
postPatch =
let
configFile =
if lib.isDerivation conf || builtins.isPath conf then conf else writeText "config.h" conf;
in
lib.optionalString (conf != null) "mv ${configFile} config.h";
makeFlags = [
"INSTALL=install"
"PREFIX=\${out}"
];
meta = {
description = "Pie-menu tool";
homepage = "https://github.com/phillbush/pmenu";
changelog = "https://github.com/phillbush/pmenu/releases/tag/v${finalAttrs.version}";
license = lib.licenses.mit;
longDescription = ''
πmenu is a pie menu utility for X. πmenu receives a menu specification in
stdin, shows a menu for the user to select one of the options, and outputs
the option selected to stdout.
'';
maintainers = [ ];
platforms = lib.platforms.unix;
mainProgram = "pmenu";
};
})

View File

@@ -0,0 +1,27 @@
{
lib,
stdenv,
fetchurl,
alsa-lib,
version ? "1.7.1",
sourceSha256 ? "051mv6f13c8y13c1iv3279k1hhzpz4fm9sfczhgp9sim2bjdj055",
}:
stdenv.mkDerivation {
pname = "pmidi";
inherit version;
src = fetchurl {
url = "mirror://sourceforge/pmidi/${version}/pmidi-${version}.tar.gz";
sha256 = sourceSha256;
};
buildInputs = [ alsa-lib ];
meta = with lib; {
homepage = "https://www.parabola.me.uk/alsa/pmidi.html";
description = "Straightforward command line program to play midi files through the ALSA sequencer";
maintainers = [ ];
license = licenses.gpl2;
mainProgram = "pmidi";
};
}

View File

@@ -0,0 +1,113 @@
{
lib,
stdenv,
fetchFromGitHub,
perl,
autoconf,
automake,
removeReferencesTo,
libtool,
python3,
flex,
libevent,
targetPackages,
makeWrapper,
hwloc,
munge,
zlib,
gitMinimal,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "pmix";
version = "5.0.9";
src = fetchFromGitHub {
repo = "openpmix";
owner = "openpmix";
tag = "v${finalAttrs.version}";
hash = "sha256-3z3NZPssaKBujulASYEJXwX/dhyCQxmRmjy31kOMpAQ=";
fetchSubmodules = true;
};
outputs = [ "out" ] ++ lib.optionals stdenv.hostPlatform.isLinux [ "dev" ];
postPatch = ''
patchShebangs ./autogen.pl
patchShebangs ./config
'';
nativeBuildInputs = [
perl
autoconf
automake
libtool
flex
gitMinimal
python3
removeReferencesTo
makeWrapper
];
buildInputs = [
libevent
hwloc
munge
zlib
];
configureFlags = [
"--with-libevent=${lib.getDev libevent}"
"--with-libevent-libdir=${lib.getLib libevent}/lib"
"--with-munge=${munge}"
"--with-hwloc=${lib.getDev hwloc}"
"--with-hwloc-libdir=${lib.getLib hwloc}/lib"
];
preConfigure = ''
./autogen.pl
'';
postInstall = ''
find $out/lib/ -name "*.la" -exec rm -f \{} \;
moveToOutput "bin/pmix_info" "''${!outputDev}"
moveToOutput "bin/pmixcc" "''${!outputDev}"
moveToOutput "share/pmix/pmixcc-wrapper-data.txt" "''${!outputDev}"
''
# From some reason the Darwin build doesn't include this file, so we
# currently disable this substitution for any non-Linux platform, until a
# Darwin user will care enough about this cross platform fix.
+ lib.optionalString stdenv.hostPlatform.isLinux ''
# Pin the compiler to the current version in a cross compiler friendly way.
# Same pattern as for openmpi (see https://github.com/NixOS/nixpkgs/pull/58964#discussion_r275059427).
substituteInPlace "''${!outputDev}"/share/pmix/pmixcc-wrapper-data.txt \
--replace-fail compiler=${stdenv.cc.targetPrefix}gcc \
compiler=${targetPackages.stdenv.cc}/bin/${targetPackages.stdenv.cc.targetPrefix}cc
'';
postFixup = lib.optionalString (lib.elem "dev" finalAttrs.outputs) ''
# The build info (parameters to ./configure) are hardcoded
# into the library. This clears all references to $dev/include.
remove-references-to -t "''${!outputDev}" $(readlink -f $out/lib/libpmix.so)
# The path to the pmixcc-wrapper-data.txt is hard coded and
# points to $out instead of dev. Use wrapper to fix paths.
wrapProgram "''${!outputDev}"/bin/pmixcc \
--set PMIX_INCLUDEDIR "''${!outputDev}"/include \
--set PMIX_PKGDATADIR "''${!outputDev}"/share/pmix
'';
enableParallelBuilding = true;
meta = {
description = "Process Management Interface for HPC environments";
homepage = "https://openpmix.github.io/";
license = lib.licenses.bsd3;
maintainers = with lib.maintainers; [
markuskowa
doronbehar
];
};
})

View File

@@ -0,0 +1,85 @@
{
lib,
stdenv,
fetchurl,
fetchpatch,
intltool,
ntfs3g,
util-linux,
mediaDir ? "/media/",
lockDir ? "/var/lock/pmount",
whiteList ? "/etc/pmount.allow",
}:
# constraint mention in the configure.ac
assert lib.hasSuffix "/" mediaDir;
stdenv.mkDerivation rec {
pname = "pmount";
version = "0.9.23";
src = fetchurl {
url = "mirror://debian/pool/main/p/pmount/pmount_${version}.orig.tar.bz2";
sha256 = "db38fc290b710e8e9e9d442da2fb627d41e13b3ee80326c15cc2595ba00ea036";
};
patches =
let
# https://salsa.debian.org/debian/pmount/-/tree/debian/master/debian/patches
fetchDebPatch =
{ name, hash }:
fetchpatch {
inherit name hash;
url = "https://salsa.debian.org/debian/pmount/-/raw/ba05283d4a53aba5349d4397a98d9f45206fb29f/debian/patches/${name}";
};
in
map fetchDebPatch [
{
name = "10_fix-spelling-binary-errors.patch";
hash = "sha256-G4GsUe1ZdYB7Qv333X1hUjOELITR8A2pqyfEnMDTwHI=";
}
{
name = "20_fix-spelling-manpage-error.patch";
hash = "sha256-9phF8s7MFSjkhPP24cipeBUps5W1L7YmAE0B1QPx5jk=";
}
{
name = "fix-implicit-function-declaration.patch";
hash = "sha256-kdwdS9G1X5RtQFKzF6oMIUubGNP7n1ZQNHu8sN1oV4Q=";
}
{
name = "30_exfat-support.patch";
hash = "sha256-kg9gLhOtdrEDlZfUnT910xI5rNR1zgKKRx2kvFQjbi8=";
}
];
nativeBuildInputs = [
intltool
util-linux
];
buildInputs = [ util-linux ];
configureFlags = [
"--with-media-dir=${mediaDir}"
"--with-lock-dir=${lockDir}"
"--with-whitelist=${whiteList}"
"--with-mount-prog=${util-linux}/bin/mount"
"--with-umount-prog=${util-linux}/bin/umount"
"--with-mount-ntfs3g=${ntfs3g}/sbin/mount.ntfs-3g"
];
postConfigure = ''
# etc/Mafile.am is hardcoded and it does not respect the --prefix option.
substituteInPlace ./etc/Makefile --replace DESTDIR prefix
# Do not change ownership & Do not add the set user ID bit
substituteInPlace ./src/Makefile --replace '-o root -g root -m 4755 ' '-m 755 '
'';
doCheck = false; # fails 1 out of 1 tests with "Error: could not open fstab-type file: No such file or directory"
meta = {
homepage = "https://bazaar.launchpad.net/~fourmond/pmount/main/files";
description = "Mount removable devices as normal user";
license = lib.licenses.gpl2Only;
platforms = lib.platforms.linux;
};
}

View File

@@ -0,0 +1,27 @@
{
lib,
fetchFromGitHub,
buildGoModule,
}:
buildGoModule {
pname = "pms";
version = "unstable-2022-11-12";
src = fetchFromGitHub {
owner = "ambientsound";
repo = "pms";
rev = "40d6e37111293187ab4542c7a64bd73d1b13974f";
sha256 = "sha256-294MiS4c2PO2lFSSRrg8ns7sXzZsEUAqPG3q2z3TRUg=";
};
vendorHash = "sha256-XNFzG4hGDUN0wWbpBoQWUH1bWIgoYcyP4tNRGSV4ro4=";
meta = with lib; {
description = "Interactive Vim-like console client for MPD";
homepage = "https://ambientsound.github.io/pms/";
license = licenses.mit;
maintainers = with maintainers; [ deejayem ];
mainProgram = "pms";
};
}

View File

@@ -0,0 +1,38 @@
{
lib,
buildGoModule,
fetchFromGitHub,
}:
buildGoModule rec {
pname = "pmtiles";
version = "1.28.1";
src = fetchFromGitHub {
owner = "protomaps";
repo = "go-pmtiles";
tag = "v${version}";
hash = "sha256-Ti6ljJeC6hqA5edzyUqOShBIbdmrsz4TDnQ44TMJQ8Q=";
};
vendorHash = "sha256-kfEzpaFMf0W8Ygtl40LBy3AZQSL+9Uo+n2x9OTOavqk=";
ldflags = [
"-s"
"-w"
"-X main.version=${version}"
"-X main.commit=v${version}"
];
postInstall = ''
mv $out/bin/go-pmtiles $out/bin/pmtiles
'';
meta = {
description = "Single-file utility for creating and working with PMTiles archives";
homepage = "https://github.com/protomaps/go-pmtiles";
license = lib.licenses.bsd3;
maintainers = with lib.maintainers; [ theaninova ];
teams = [ lib.teams.geospatial ];
mainProgram = "pmtiles";
};
}

View File

@@ -0,0 +1,70 @@
{
lib,
stdenv,
fetchurl,
coreutils,
gnugrep,
util-linux,
kmod,
procps,
kbd,
dbus,
}:
let
binPath = lib.makeBinPath [
coreutils
gnugrep
util-linux
kmod
procps
kbd
dbus
];
sbinPath = lib.makeSearchPathOutput "bin" "sbin" [ procps ];
in
stdenv.mkDerivation rec {
pname = "pm-utils";
version = "1.4.1";
src = fetchurl {
url = "https://pm-utils.freedesktop.org/releases/pm-utils-${version}.tar.gz";
sha256 = "02qc6zaf7ams6qcc470fwb6jvr4abv3lrlx16clqpn36501rkn4f";
};
configureFlags = [ "--sysconfdir=/etc" ];
preConfigure = ''
# Install the manpages (xmlto isn't really needed).
substituteInPlace man/Makefile.in --replace '@HAVE_XMLTO_TRUE@' ""
# Set the PATH properly.
substituteInPlace pm/pm-functions.in --replace '/sbin:/usr/sbin:/bin:/usr/bin' '$PATH:${binPath}:${sbinPath}'
substituteInPlace src/pm-action.in --replace 'tr ' '${coreutils}/bin/tr '
substituteInPlace pm/sleep.d/00logging --replace /bin/uname "$(type -P uname)"
substituteInPlace pm/sleep.d/90clock --replace /sbin/hwclock hwclock
'';
postInstall = ''
# Remove some hooks that have doubtful usefulness. See
# http://zinc.canonical.com/~cking/power-benchmarking/pm-utils-results/results.txt.
# In particular, journal-commit breaks things if you have
# read-only bind mounts, since it ends up remounting the
# underlying filesystem read-only.
rm $out/lib/pm-utils/power.d/{journal-commit,readahead}
'';
meta = {
homepage = "https://pm-utils.freedesktop.org/wiki/";
description = "Small collection of scripts that handle suspend and resume on behalf of HAL";
license = lib.licenses.gpl2Plus;
platforms = lib.platforms.linux;
};
}