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,177 @@
{
stdenv,
fetchFromGitLab,
python3,
libxml2,
sqlite,
boost,
gtk3-x11,
root,
glib,
gsl,
cmake,
pkg-config,
libpcap,
jansson,
harfbuzz,
freetype,
# for binding generation
castxml ? null,
cppyy ? null,
# can take a long time, generates > 30000 images/graphs
enableDoxygen ? false,
# very long
withManual ? false,
doxygen ? null,
graphviz ? null,
imagemagick ? null,
# for manual, tetex is used to get the eps2pdf binary
# texlive to get latexmk. building manual still fails though
dia,
tetex ? null,
ghostscript ? null,
texliveMedium ? null,
# generates python bindings
pythonSupport ? true,
ncurses ? null,
lib,
}:
let
pythonEnv = python3.withPackages (
ps:
lib.optional withManual ps.sphinx
++ lib.optionals pythonSupport (
with ps;
[
pybindgen
pygccxml
cppyy
]
)
);
in
stdenv.mkDerivation rec {
pname = "ns-3";
version = "44";
src = fetchFromGitLab {
owner = "nsnam";
repo = "ns-3-dev";
rev = "ns-3.${version}";
hash = "sha256-rw/WAMk4ZitULqkdyEh9vAFp1UrD1tw2JqgxOT5JQ5I=";
};
nativeBuildInputs = [
cmake
pkg-config
pythonEnv
];
outputs = [ "out" ];
# ncurses is a hidden dependency of waf when checking python
buildInputs =
lib.optionals pythonSupport [
castxml
ncurses
]
++ lib.optionals enableDoxygen [
doxygen
graphviz
imagemagick
]
++ lib.optionals withManual [
dia
tetex
ghostscript
imagemagick
texliveMedium
]
++ [
libxml2
pythonEnv
sqlite.dev
gsl
boost
root # provides cppyy
glib.out
glib.dev
libpcap
gtk3-x11.dev
harfbuzz
freetype
jansson
];
propagatedBuildInputs = [ pythonEnv ];
preConfigure = ''
substituteInPlace src/tap-bridge/CMakeLists.txt \
--replace '-DTAP_CREATOR="''${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/src/tap-bridge/' "-DTAP_CREATOR=\"$out/libexec/ns3/"
substituteInPlace src/fd-net-device/CMakeLists.txt \
--replace '-DRAW_SOCK_CREATOR="''${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/src/fd-net-device/' "-DRAW_SOCK_CREATOR=\"$out/libexec/ns3/"
substituteInPlace src/fd-net-device/CMakeLists.txt \
--replace '-DTAP_DEV_CREATOR="''${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/src/fd-net-device/' "-DTAP_DEV_CREATOR=\"$out/libexec/ns3/"
'';
doCheck = false;
buildTargets =
"build" + lib.optionalString enableDoxygen " doxygen" + lib.optionalString withManual "sphinx";
# to prevent fatal error: 'backward_warning.h' file not found
CXXFLAGS = "-D_GLIBCXX_PERMIT_BACKWARD_HASH";
# Make generated python bindings discoverable in customized python environment
passthru = {
pythonModule = python3;
};
cmakeFlags = [
"-DPython3_LIBRARY_DIRS=${pythonEnv}/lib"
"-DPython3_INCLUDE_DIRS=${pythonEnv}/include"
"-DPython3_EXECUTABLE=${pythonEnv}/bin/python"
"-DNS3_PYTHON_BINDINGS=ON"
"-DNS3_DES_METRICS=ON"
"-DNS3_BINDINGS_INSTALL_DIR=${pythonEnv.sitePackages}"
"-DNS3_LOG=ON"
"-DNS3_ASSERT=ON"
"-DNS3_GTK3=ON"
"-DGTK3_GLIBCONFIG_INCLUDE_DIR=${glib.out}/lib/glib-2.0/include"
]
++ lib.optional doCheck "-DNS3_TESTS=ON";
# strictoverflow prevents clang from discovering pyembed when bindings
hardeningDisable = [
"fortify"
"strictoverflow"
];
meta = with lib; {
homepage = "http://www.nsnam.org";
license = licenses.gpl3;
description = "Discrete time event network simulator";
platforms = with platforms; unix;
maintainers = with maintainers; [
teto
rgrunbla
];
# never built on aarch64-darwin since first introduction in nixpkgs
broken =
(stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isAarch64)
|| (stdenv.hostPlatform.isLinux && stdenv.hostPlatform.isAarch64);
};
}

View File

@@ -0,0 +1,4 @@
# Nintendo Switch HOS
SUBSYSTEM=="usb", ATTRS{idVendor}=="057e", ATTRS{idProduct}=="3000", MODE="0666"
# Nintendo Switch RCM
SUBSYSTEM=="usb", ATTRS{idVendor}=="0955", ATTRS{idProduct}=="7321", MODE="0666"

View File

@@ -0,0 +1,130 @@
From 3f85e2754144bbf2805ba68d8c76b3dec3299f4d Mon Sep 17 00:00:00 2001
From: Sofi <sofi+git@mailbox.org>
Date: Sat, 29 Jul 2023 11:16:38 +0200
Subject: [PATCH] make deterministic
---
pom.xml | 63 +++++++++++++++++++++++++++++++++++++++++++++++++++------
1 file changed, 57 insertions(+), 6 deletions(-)
diff --git a/pom.xml b/pom.xml
index 320d4f3..5a594e6 100644
--- a/pom.xml
+++ b/pom.xml
@@ -51,6 +51,7 @@
<maven.build.timestamp.format>yyyyMMdd.HHmmss</maven.build.timestamp.format>
<javafx.version>19.0.2.1</javafx.version>
<maven.compiler.release>11</maven.compiler.release>
+ <project.build.outputTimestamp>2023-01-01T00:00:00Z</project.build.outputTimestamp>
</properties>
<issueManagement>
@@ -166,7 +167,7 @@
</dependency>
</dependencies>
<build>
- <finalName>${project.artifactId}-${project.version}-${maven.build.timestamp}</finalName>
+ <finalName>${project.artifactId}-${project.version}</finalName>
<resources>
<resource>
<directory>src/main/resources</directory>
@@ -193,26 +194,51 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
- <version>2.22.2</version>
+ <version>3.1.2</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-failsafe-plugin</artifactId>
- <version>2.22.2</version>
+ <version>3.1.2</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
- <version>3.10.1</version>
+ <version>3.11.0</version>
<configuration>
<release>11</release>
</configuration>
</plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-enforcer-plugin</artifactId>
+ <version>3.3.0</version>
+ <executions>
+ <execution>
+ <id>enforce-versions</id>
+ <phase>validate</phase>
+ <goals>
+ <goal>enforce</goal>
+ </goals>
+ <configuration>
+ <rules>
+ <requireMavenVersion>
+ <version>[3.2.5,)</version>
+ </requireMavenVersion>
+ <requireJavaVersion>
+ <version>[1.8,)</version>
+ </requireJavaVersion>
+ <requirePluginVersions />
+ </rules>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
<!-- Don't generate default JAR without dependencies -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
- <version>3.1.2</version>
+ <version>3.3.0</version>
<!--
<configuration>
<manifestEntries>
@@ -231,7 +257,7 @@
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-assembly-plugin</artifactId>
- <version>3.1.0</version>
+ <version>3.6.0</version>
<configuration>
<archive>
<manifest>
@@ -253,6 +279,31 @@
</execution>
</executions>
</plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-deploy-plugin</artifactId>
+ <version>3.1.1</version>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-resources-plugin</artifactId>
+ <version>3.3.1</version>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-site-plugin</artifactId>
+ <version>4.0.0-M9</version>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-install-plugin</artifactId>
+ <version>3.1.1</version>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-clean-plugin</artifactId>
+ <version>3.3.1</version>
+ </plugin>
</plugins>
</build>
</project>
--
2.41.0

View File

@@ -0,0 +1,70 @@
From ead7a3b988a47a3896ea8a3ff01556e073115f16 Mon Sep 17 00:00:00 2001
From: Sofi <sofi+git@mailbox.org>
Date: Thu, 27 Jul 2023 17:23:31 +0200
Subject: [PATCH] No launch4j
---
pom.xml | 47 +----------------------------------------------
1 file changed, 1 insertion(+), 46 deletions(-)
diff --git a/pom.xml b/pom.xml
index 21352e0..320d4f3 100644
--- a/pom.xml
+++ b/pom.xml
@@ -253,51 +253,6 @@
</execution>
</executions>
</plugin>
- <plugin>
- <groupId>com.akathist.maven.plugins.launch4j</groupId>
- <version>2.2.0</version>
- <artifactId>launch4j-maven-plugin</artifactId>
- <executions>
- <execution>
- <id>l4j-ns-usbloader</id>
- <phase>package</phase>
- <goals>
- <goal>launch4j</goal>
- </goals>
- <configuration>
- <headerType>gui</headerType>
- <icon>appicon.ico</icon>
- <outfile>target/${project.name}.exe</outfile>
- <jar>target/${project.artifactId}-${project.version}-${maven.build.timestamp}.jar</jar>
- <!-- <downloadUrl>https://download.oracle.com/java/17/archive/jdk-17.0.1_windows-x64_bin.msi</downloadUrl> -->
- <errTitle>Launching error</errTitle>
- <!-- <dontWrapJar>true</dontWrapJar> -->
- <jre>
- <path>%PWD%/jdk</path>
- <minVersion>11.0.0</minVersion>
- </jre>
- <versionInfo>
- <fileVersion>${project.version}.0.0</fileVersion>
- <txtFileVersion>${project.version}</txtFileVersion>
- <fileDescription>NS multi-tool</fileDescription>
- <copyright>GNU General Public License v3, ${project.inceptionYear} ${project.organization.name}, Russia.</copyright>
- <productVersion>${project.version}.0.0</productVersion>
- <txtProductVersion>${project.version}</txtProductVersion>
- <companyName>${project.organization.name}</companyName>
- <productName>${project.name}</productName>
- <internalName>${project.name}</internalName>
- <originalFilename>${project.name}.exe</originalFilename>
- </versionInfo>
- <messages>
- <startupErr>Startup error</startupErr>
- <jreNotFoundErr>JDK not found</jreNotFoundErr>
- <jreVersionErr>JDK Version mismatch</jreVersionErr>
- <launcherErr>Launcher Error</launcherErr>
- </messages>
- </configuration>
- </execution>
- </executions>
- </plugin>
</plugins>
</build>
-</project>
\ No newline at end of file
+</project>
--
2.41.0

View File

@@ -0,0 +1,120 @@
{
lib,
stdenv,
fetchFromGitHub,
copyDesktopItems,
makeDesktopItem,
makeWrapper,
wrapGAppsHook3,
gvfs,
maven,
jre,
udevCheckHook,
}:
let
pkgDescription = "All-in-one tool for managing Nintendo Switch homebrew";
selectSystem =
attrs:
attrs.${stdenv.hostPlatform.system} or (throw "Unsupported system: ${stdenv.hostPlatform.system}");
jreWithJavaFX = jre.override { enableJavaFX = true; };
in
maven.buildMavenPackage rec {
pname = "ns-usbloader";
version = "7.2";
src = fetchFromGitHub {
owner = "developersu";
repo = "ns-usbloader";
rev = "v${version}";
sha256 = "sha256-nZfAZ+IjoYXEWwH9oOhOQ5TOYUNiAGAqhHRhskyx/Vo=";
};
patches = [
./no-launch4j.patch
./make-deterministic.patch
];
# JavaFX pulls in architecture dependent jar dependencies. :(
# May be possible to unify these, but could lead to huge closure sizes.
mvnHash = selectSystem {
x86_64-linux = "sha256-vXZAlZOh9pXNF1RL78oQRal5pkXFRKDz/7SP9LibgiA=";
aarch64-linux = "sha256-xC+feb41EPi30gBrVR8usanVULI2Pt0knztzNagPQiw=";
};
nativeBuildInputs = [
copyDesktopItems
makeWrapper
wrapGAppsHook3
gvfs
udevCheckHook
];
doCheck = false;
doInstallCheck = true;
# Don't wrap binaries twice.
dontWrapGApps = true;
### Issues:
# * Set us to only use software rendering with `-Dprism.order=sw`, had a hard time
# getting `prism_es2` happy with NixOS's GL/GLES.
# * Currently, there's also a lot of `Failed to build parent project for org.openjfx:javafx-*`
# at build, but jar runs fine when using `jreWithJavaFX`.
installPhase = ''
runHook preInstall
mkdir -p $out/share/java
install -Dm644 target/ns-usbloader-${version}.jar $out/share/java/ns-usbloader.jar
mkdir -p $out/lib/udev/rules.d
install -Dm644 ${./99-ns-usbloader.rules} $out/lib/udev/rules.d/99-ns-usbloader.rules
mkdir -p $out/share/icons/hicolor
install -Dm644 target/classes/res/app_icon32x32.png $out/share/icons/hicolor/32x32/apps/ns-usbloader.png
install -Dm644 target/classes/res/app_icon48x48.png $out/share/icons/hicolor/48x48/apps/ns-usbloader.png
install -Dm644 target/classes/res/app_icon64x64.png $out/share/icons/hicolor/64x64/apps/ns-usbloader.png
install -Dm644 target/classes/res/app_icon128x128.png $out/share/icons/hicolor/128x128/apps/ns-usbloader.png
runHook postInstall
'';
preFixup = ''
mkdir -p $out/bin
makeWrapper ${jreWithJavaFX}/bin/java $out/bin/ns-usbloader \
--append-flags "-Dprism.order=sw -jar $out/share/java/ns-usbloader.jar" \
"''${gappsWrapperArgs[@]}"
'';
desktopItems = [
(makeDesktopItem {
type = "Application";
name = "ns-usbloader";
desktopName = "NS-USBLoader";
comment = pkgDescription;
exec = "ns-usbloader";
icon = "ns-usbloader";
categories = [ "Game" ];
terminal = false;
keywords = [
"nintendo"
"switch"
];
})
];
meta = with lib; {
description = pkgDescription;
homepage = "https://github.com/developersu/ns-usbloader";
license = licenses.gpl3Only;
maintainers = with maintainers; [ soupglasses ];
platforms = [
"x86_64-linux"
"aarch64-linux"
];
mainProgram = "ns-usbloader";
};
}

View File

@@ -0,0 +1,63 @@
{
lib,
stdenv,
buildGoModule,
fetchFromGitHub,
installShellFiles,
}:
buildGoModule rec {
pname = "nsc";
version = "2.12.0";
src = fetchFromGitHub {
owner = "nats-io";
repo = "nsc";
rev = "v${version}";
hash = "sha256-ct2InMPpqbtFeKtarWXGuPiXS2OD78w2sX0BoFiCl0c=";
};
ldflags = [
"-s"
"-w"
"-X main.version=v${version}"
"-X main.builtBy=nixpkgs"
];
vendorHash = "sha256-0tJHK999AjtKYUB0gC5SlQPqit6UTyGsbb6vC7KdQQc=";
nativeBuildInputs = [ installShellFiles ];
postInstall = lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) ''
installShellCompletion --cmd nsc \
--bash <($out/bin/nsc completion bash) \
--fish <($out/bin/nsc completion fish) \
--zsh <($out/bin/nsc completion zsh)
'';
preInstall = ''
# asc attempt to write to the home directory.
export HOME=$(mktemp -d)
'';
preCheck = preInstall;
# Tests currently fail on darwin because of a test in nsc which
# expects command output to contain a specific path. However
# the test strips table formatting from the command output in a naive way
# that removes all the table characters, including '-'.
# The nix build directory looks something like:
# /private/tmp/nix-build-nsc-2.12.0.drv-0/nsc_test2000598938/keys
# Then the `-` are removed from the path unintentionally and the test fails.
# This should be fixed upstream to avoid mangling the path when
# removing the table decorations from the command output.
doCheck = !stdenv.hostPlatform.isDarwin;
meta = {
description = "Tool for creating NATS account and user access configurations";
homepage = "https://github.com/nats-io/nsc";
license = with lib.licenses; [ asl20 ];
maintainers = with lib.maintainers; [ cbrewster ];
mainProgram = "nsc";
};
}

View File

@@ -0,0 +1,28 @@
{
lib,
stdenvNoCC,
fetchzip,
}:
stdenvNoCC.mkDerivation {
pname = "nsf-ordlista";
version = "unstable-2023-08-20";
src = fetchzip {
url = "http://www2.scrabbleforbundet.no/wp-content/uploads/2023/08/nsf2023.zip";
hash = "sha256-bcVqZ2yPHurl6sRNgeLNAyyR8WR9ewmtn85Xuw/rZ3s=";
};
installPhase = ''
runHook preInstall
install -Dm444 nsf2023.txt $out/share/wordlists/nsf.txt
runHook postInstall
'';
meta = with lib; {
description = "Wordlist from the Norwegian Scrabble Federation";
homepage = "https://www2.scrabbleforbundet.no/";
downloadPage = "https://www2.scrabbleforbundet.no/?p=4881#more-4881";
license = licenses.unfree;
maintainers = with maintainers; [ h7x4 ];
platforms = platforms.all;
};
}

View File

@@ -0,0 +1,38 @@
{
lib,
stdenv,
fetchurl,
bison,
flex,
netsurf-buildsystem,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "nsgenbind";
version = "0.9";
src = fetchurl {
url = "http://download.netsurf-browser.org/libs/releases/nsgenbind-${finalAttrs.version}-src.tar.gz";
hash = "sha256-Iyzg9my8LD7tYoiuJt4sVnu/u8Adiw9vxsHBZJ1LOF0=";
};
nativeBuildInputs = [
bison
flex
];
buildInputs = [ netsurf-buildsystem ];
makeFlags = [
"PREFIX=$(out)"
"NSSHARED=${netsurf-buildsystem}/share/netsurf-buildsystem"
];
meta = {
homepage = "https://www.netsurf-browser.org/";
description = "Generator for JavaScript bindings for netsurf browser";
mainProgram = "nsgenbind";
license = lib.licenses.mit;
inherit (netsurf-buildsystem.meta) maintainers platforms;
};
})

View File

@@ -0,0 +1,37 @@
{
lib,
rustPlatform,
fetchFromGitHub,
}:
rustPlatform.buildRustPackage rec {
pname = "nsh";
version = "0.4.2";
src = fetchFromGitHub {
owner = "nuta";
repo = "nsh";
rev = "v${version}";
sha256 = "1479wv8h5l2b0cwp27vpybq50nyvszhjxmn76n2bz3fchr0lrcbp";
};
cargoHash = "sha256-kbHNFVu5OIg/eKefhsYRGvlXFduB0aBVflPV9hkM4Ec=";
doCheck = false;
meta = {
description = "Command-line shell like fish, but POSIX compatible";
mainProgram = "nsh";
homepage = "https://github.com/nuta/nsh";
changelog = "https://github.com/nuta/nsh/raw/v${version}/docs/changelog.md";
license = [
lib.licenses.cc0 # or
lib.licenses.mit
];
maintainers = with lib.maintainers; [ cafkafk ];
};
passthru = {
shellPath = "/bin/nsh";
};
}

View File

@@ -0,0 +1,77 @@
{
lib,
stdenv,
symlinkJoin,
fetchurl,
fetchzip,
scons,
zlib,
libiconv,
}:
stdenv.mkDerivation rec {
pname = "nsis";
version = "3.11";
src = fetchurl {
url = "mirror://sourceforge/project/nsis/NSIS%203/${version}/nsis-${version}-src.tar.bz2";
sha256 = "19e72062676ebdc67c11dc032ba80b979cdbffd3886c60b04bb442cdd401ff4b";
};
srcWinDistributable = fetchzip {
url = "mirror://sourceforge/project/nsis/NSIS%203/${version}/nsis-${version}.zip";
sha256 = "e574f335ab9d3ad73118f46615e5c9f2a52f3e4622ecbb7e5886badbc8601348";
};
postUnpack = ''
mkdir -p $out/share/nsis
cp -avr ${srcWinDistributable}/{Contrib,Include,Plugins,Stubs} \
$out/share/nsis
chmod -R u+w $out/share/nsis
'';
nativeBuildInputs = [ scons ];
buildInputs = [ zlib ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ libiconv ];
CPPPATH = symlinkJoin {
name = "nsis-includes";
paths = [ zlib.dev ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ libiconv ];
};
LIBPATH = symlinkJoin {
name = "nsis-libs";
paths = [ zlib ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ libiconv ];
};
sconsFlags = [
"SKIPSTUBS=all"
"SKIPPLUGINS=all"
"SKIPUTILS=all"
"SKIPMISC=all"
"NSIS_CONFIG_CONST_DATA=no"
"VERSION=${version}"
]
++ lib.optional stdenv.hostPlatform.isDarwin "APPEND_LINKFLAGS=-liconv";
preBuild = ''
sconsFlagsArray+=(
"PATH=$PATH"
"CC=$CC"
"CXX=$CXX"
"APPEND_CPPPATH=$CPPPATH/include"
"APPEND_LIBPATH=$LIBPATH/lib"
)
'';
prefixKey = "PREFIX=";
installTargets = [ "install-compiler" ];
meta = with lib; {
description = "Free scriptable win32 installer/uninstaller system that doesn't suck and isn't huge";
homepage = "https://nsis.sourceforge.io/";
license = licenses.zlib;
platforms = platforms.unix;
maintainers = with maintainers; [ pombeirp ];
mainProgram = "makensis";
broken = stdenv.hostPlatform.isDarwin;
};
}

View File

@@ -0,0 +1,30 @@
{
stdenv,
fetchFromGitHub,
lib,
ncurses,
}:
stdenv.mkDerivation rec {
pname = "nsnake";
version = "3.0.1";
src = fetchFromGitHub {
owner = "alexdantas";
repo = "nSnake";
rev = "v${version}";
sha256 = "sha256-MixwIhyymruruV8G8PjmR9EoZBpaDVBCKBccSFL0lS8=";
};
buildInputs = [ ncurses ];
makeFlags = [ "PREFIX=$(out)" ];
meta = {
description = "ncurses based snake game for the terminal";
mainProgram = "nsnake";
homepage = "https://github.com/alexdantas/nSnake";
license = lib.licenses.gpl3Plus;
maintainers = with lib.maintainers; [ clerie ];
};
}

View File

@@ -0,0 +1,61 @@
{
lib,
stdenv,
fetchFromGitHub,
rustPlatform,
nix-update-script,
nixosTests,
}:
let
version = "1.5.2";
in
rustPlatform.buildRustPackage {
pname = "nsncd";
inherit version;
src = fetchFromGitHub {
owner = "twosigma";
repo = "nsncd";
tag = "v${version}";
hash = "sha256-HNg2pf6dUQW95B8x/xWa53+GZVWzpTMRVeqWT3dp/M8=";
};
cargoHash = "sha256-kjxRhrgKPLCKWc3/gOvdcmQX7IdxFLuwcV7DRZIte78=";
checkFlags = [
# Relies on the test environment to be able to resolve "localhost"
# on IPv4. That's not the case in the Nix sandbox somehow. Works
# when running cargo test impurely on a (NixOS|Debian) machine.
"--skip=ffi::test_gethostbyname2_r"
# Relies on /etc/services to be present?
"--skip=handlers::test::test_handle_getservbyname_name"
"--skip=handlers::test::test_handle_getservbyname_name_proto"
"--skip=handlers::test::test_handle_getservbyport_port"
"--skip=handlers::test::test_handle_getservbyport_port_proto"
"--skip=handlers::test::test_handle_getservbyport_port_proto_aliases"
];
meta = with lib; {
description = "Name service non-caching daemon";
mainProgram = "nsncd";
longDescription = ''
nsncd is a nscd-compatible daemon that proxies lookups, without caching.
'';
homepage = "https://github.com/twosigma/nsncd";
license = licenses.asl20;
maintainers = with maintainers; [
flokli
picnoir
];
# never built on aarch64-darwin, x86_64-darwin since first introduction in nixpkgs
broken = stdenv.hostPlatform.isDarwin;
};
passthru = {
tests.nscd = nixosTests.nscd;
updateScript = nix-update-script { };
};
}

View File

@@ -0,0 +1,36 @@
{
lib,
stdenv,
fetchFromGitHub,
cmake,
flex,
}:
stdenv.mkDerivation {
pname = "nsplist";
version = "0-unstable-2017-04-11";
src = fetchFromGitHub {
owner = "matthewbauer";
repo = "NSPlist";
rev = "713decf06c1ef6c39a707bc99eb45ac9925f2b8a";
hash = "sha256-mRyuElLTlOZuUlQ3dKZJbclPq73Gv+YFrBCB5nh0nmw=";
};
nativeBuildInputs = [
cmake
flex
];
preConfigure = ''
# Regenerate the lexer for improved compatibility with clang 16.
flex -o src/NSPlistLexer.cpp <(tail --lines=+17 src/NSPlistLexer.l)
'';
meta = with lib; {
maintainers = with maintainers; [ matthewbauer ];
description = "Parses .plist files";
license = licenses.mit;
platforms = platforms.unix;
};
}

View File

@@ -0,0 +1,84 @@
From e5cc8f7c387e3238ebb8239e2555c933a41502c0 Mon Sep 17 00:00:00 2001
From: Graham Christensen <graham@grahamc.com>
Date: Thu, 7 Mar 2019 08:11:32 -0500
Subject: [PATCH] Makefile: use SOURCE_DATE_EPOCH for reproducibility
---
nspr/lib/ds/Makefile.in | 4 ++--
nspr/lib/libc/src/Makefile.in | 4 ++--
nspr/lib/prstreams/Makefile.in | 4 ++--
nspr/pr/src/Makefile.in | 6 +++---
4 files changed, 9 insertions(+), 9 deletions(-)
diff --git a/nspr/lib/ds/Makefile.in b/nspr/lib/ds/Makefile.in
index e737791..d56b0a7 100644
--- a/nspr/lib/ds/Makefile.in
+++ b/nspr/lib/ds/Makefile.in
@@ -101,8 +101,8 @@ ECHO = echo
TINC = $(OBJDIR)/_pl_bld.h
PROD = $(notdir $(SHARED_LIBRARY))
NOW = $(MOD_DEPTH)/config/$(OBJDIR)/now
-SH_DATE = $(shell date "+%Y-%m-%d %T")
-SH_NOW = $(shell $(NOW))
+SH_DATE = $(shell date "+%Y-%m-%d %T" --date $(SOURCE_DATE_EPOCH))
+SH_NOW = $(SOURCE_DATE_EPOCH)000000
ifeq ($(NS_USE_GCC)_$(OS_ARCH),_WINNT)
SUF = i64
diff --git a/nspr/lib/libc/src/Makefile.in b/nspr/lib/libc/src/Makefile.in
index e8a6d9f..0485737 100644
--- a/nspr/lib/libc/src/Makefile.in
+++ b/nspr/lib/libc/src/Makefile.in
@@ -103,8 +103,8 @@ ECHO = echo
TINC = $(OBJDIR)/_pl_bld.h
PROD = $(notdir $(SHARED_LIBRARY))
NOW = $(MOD_DEPTH)/config/$(OBJDIR)/now
-SH_DATE = $(shell date "+%Y-%m-%d %T")
-SH_NOW = $(shell $(NOW))
+SH_DATE = $(shell date "+%Y-%m-%d %T" --date $(SOURCE_DATE_EPOCH))
+SH_NOW = $(SOURCE_DATE_EPOCH)000000
ifeq ($(NS_USE_GCC)_$(OS_ARCH),_WINNT)
SUF = i64
diff --git a/nspr/lib/prstreams/Makefile.in b/nspr/lib/prstreams/Makefile.in
index aeb2944..83ae423 100644
--- a/nspr/lib/prstreams/Makefile.in
+++ b/nspr/lib/prstreams/Makefile.in
@@ -105,8 +105,8 @@ ECHO = echo
TINC = $(OBJDIR)/_pl_bld.h
PROD = $(notdir $(SHARED_LIBRARY))
NOW = $(MOD_DEPTH)/config/$(OBJDIR)/now
-SH_DATE = $(shell date "+%Y-%m-%d %T")
-SH_NOW = $(shell $(NOW))
+SH_DATE = $(shell date "+%Y-%m-%d %T" --date $(SOURCE_DATE_EPOCH))
+SH_NOW = $(SOURCE_DATE_EPOCH)000000
ifeq ($(OS_ARCH), WINNT)
SUF = i64
diff --git a/nspr/pr/src/Makefile.in b/nspr/pr/src/Makefile.in
index 19c5a69..989cc8c 100644
--- a/nspr/pr/src/Makefile.in
+++ b/nspr/pr/src/Makefile.in
@@ -46,7 +46,7 @@ MKSHLIB += -M $(MAPFILE)
endif
#
# In Solaris 2.6 or earlier, -lrt is called -lposix4.
-#
+#
LIBRT_TEST=$(firstword $(sort 5.7 $(OS_RELEASE)))
ifeq (5.7, $(LIBRT_TEST))
LIBRT=-lrt
@@ -311,8 +311,8 @@ PROD = $(notdir $(SHARED_LIBRARY))
endif
NOW = $(MOD_DEPTH)/config/$(OBJDIR)/now
-SH_DATE = $(shell date "+%Y-%m-%d %T")
-SH_NOW = $(shell $(NOW))
+SH_DATE = $(shell date "+%Y-%m-%d %T" --date $(SOURCE_DATE_EPOCH))
+SH_NOW = $(SOURCE_DATE_EPOCH)000000
ifeq ($(NS_USE_GCC)_$(OS_ARCH),_WINNT)
SUF = i64
--
2.19.2

View File

@@ -0,0 +1,65 @@
{
lib,
stdenv,
fetchurl,
buildPackages,
nixosTests,
}:
stdenv.mkDerivation rec {
pname = "nspr";
version = "4.37";
src = fetchurl {
url = "mirror://mozilla/nspr/releases/v${version}/src/nspr-${version}.tar.gz";
hash = "sha256-X5NE7Q4xhVvTj4izPJ2auU9wzlR+8yE+SI0VIPYYQPo=";
};
patches = [
./0001-Makefile-use-SOURCE_DATE_EPOCH-for-reproducibility.patch
];
outputs = [
"out"
"dev"
];
outputBin = "dev";
preConfigure = ''
cd nspr
''
+ lib.optionalString stdenv.hostPlatform.isDarwin ''
substituteInPlace configure --replace '@executable_path/' "$out/lib/"
substituteInPlace configure.in --replace '@executable_path/' "$out/lib/"
'';
HOST_CC = "cc";
depsBuildBuild = [ buildPackages.stdenv.cc ];
configureFlags = [
"--enable-optimize"
"--disable-debug"
]
++ lib.optional stdenv.hostPlatform.is64bit "--enable-64bit";
postInstall = ''
find $out -name "*.a" -delete
moveToOutput share "$dev" # just aclocal
'';
enableParallelBuilding = true;
passthru.tests = {
inherit (nixosTests) firefox firefox-esr;
};
meta = with lib; {
homepage = "https://firefox-source-docs.mozilla.org/nspr/index.html";
description = "Netscape Portable Runtime, a platform-neutral API for system-level and libc-like functions";
maintainers = with maintainers; [
ajs124
hexa
];
platforms = platforms.all;
license = licenses.mpl20;
};
}

View File

@@ -0,0 +1,34 @@
{
lib,
buildGoModule,
fetchFromGitHub,
}:
buildGoModule rec {
pname = "nsq";
version = "1.3.0";
src = fetchFromGitHub {
owner = "nsqio";
repo = "nsq";
rev = "v${version}";
hash = "sha256-qoAp8yAc4lJmlnHHcZskRzkleZ3Q5Gu3Lhk9u1jMR4g=";
};
vendorHash = "sha256-/5nH7zHg8zxWFgtVzSnfp7RZGvPWiuGSEyhx9fE2Pvo=";
excludedPackages = [ "bench" ];
ldflags = [
"-s"
"-w"
];
meta = {
homepage = "https://nsq.io/";
description = "Realtime distributed messaging platform";
changelog = "https://github.com/nsqio/nsq/raw/v${version}/ChangeLog.md";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ blakesmith ];
};
}

View File

@@ -0,0 +1,104 @@
https://bugzilla.redhat.com/show_bug.cgi?id=488857
Distinguish between contexts that are somewhat persistent and one-offs
which are used to fulfill part of a larger request.
diff -up nss_ldap-253/ldap-grp.c nss_ldap-253/ldap-grp.c
--- nss_ldap-253/ldap-grp.c 2009-05-08 13:30:43.000000000 -0400
+++ nss_ldap-253/ldap-grp.c 2009-05-08 13:34:41.000000000 -0400
@@ -857,7 +857,7 @@ ng_chase (const char *dn, ldap_initgroup
LA_STRING (a) = dn;
LA_TYPE (a) = LA_TYPE_STRING;
- if (_nss_ldap_ent_context_init_locked (&ctx) == NULL)
+ if (_nss_ldap_ent_context_init_internal_locked (&ctx) == NULL)
{
return NSS_UNAVAIL;
}
@@ -930,7 +930,7 @@ ng_chase_backlink (const char ** members
LA_STRING_LIST (a) = filteredMembersOf;
LA_TYPE (a) = LA_TYPE_STRING_LIST_OR;
- if (_nss_ldap_ent_context_init_locked (&ctx) == NULL)
+ if (_nss_ldap_ent_context_init_internal_locked (&ctx) == NULL)
{
free (filteredMembersOf);
return NSS_UNAVAIL;
diff -up nss_ldap-253/ldap-netgrp.c nss_ldap-253/ldap-netgrp.c
--- nss_ldap-253/ldap-netgrp.c 2009-05-08 13:31:35.000000000 -0400
+++ nss_ldap-253/ldap-netgrp.c 2009-05-08 13:33:14.000000000 -0400
@@ -691,7 +691,7 @@ do_innetgr_nested (ldap_innetgr_args_t *
LA_TYPE (a) = LA_TYPE_STRING;
LA_STRING (a) = nested; /* memberNisNetgroup */
- if (_nss_ldap_ent_context_init_locked (&ctx) == NULL)
+ if (_nss_ldap_ent_context_init_internal_locked (&ctx) == NULL)
{
debug ("<== do_innetgr_nested: failed to initialize context");
return NSS_UNAVAIL;
diff -up nss_ldap-253/ldap-nss.c nss_ldap-253/ldap-nss.c
--- nss_ldap-253/ldap-nss.c 2009-05-08 13:27:17.000000000 -0400
+++ nss_ldap-253/ldap-nss.c 2009-05-08 14:05:51.000000000 -0400
@@ -1961,6 +1961,7 @@ _nss_ldap_ent_context_init_locked (ent_c
debug ("<== _nss_ldap_ent_context_init_locked");
return NULL;
}
+ ctx->ec_internal = 0;
*pctx = ctx;
}
else
@@ -1990,6 +1991,15 @@ _nss_ldap_ent_context_init_locked (ent_c
return ctx;
}
+ent_context_t *
+_nss_ldap_ent_context_init_internal_locked (ent_context_t ** pctx)
+{
+ ent_context_t *ctx;
+ ctx = _nss_ldap_ent_context_init_locked (pctx);
+ if (ctx != NULL)
+ ctx->ec_internal = 1;
+ return ctx;
+}
/*
* Clears a given context; we require the caller
@@ -2031,7 +2041,8 @@ _nss_ldap_ent_context_release (ent_conte
LS_INIT (ctx->ec_state);
- if (_nss_ldap_test_config_flag (NSS_LDAP_FLAGS_CONNECT_POLICY_ONESHOT))
+ if (!ctx->ec_internal &&
+ _nss_ldap_test_config_flag (NSS_LDAP_FLAGS_CONNECT_POLICY_ONESHOT))
{
do_close ();
}
diff -up nss_ldap-253/ldap-nss.h nss_ldap-253/ldap-nss.h
--- nss_ldap-253/ldap-nss.h 2009-05-08 13:35:47.000000000 -0400
+++ nss_ldap-253/ldap-nss.h 2009-05-08 13:52:25.000000000 -0400
@@ -560,6 +560,8 @@ struct ent_context
ldap_state_t ec_state; /* eg. for services */
int ec_msgid; /* message ID */
LDAPMessage *ec_res; /* result chain */
+ int ec_internal; /* this context is just a part of a larger
+ * query for information */
ldap_service_search_descriptor_t *ec_sd; /* current sd */
struct berval *ec_cookie; /* cookie for paged searches */
};
@@ -744,6 +746,15 @@ ent_context_t *_nss_ldap_ent_context_ini
ent_context_t *_nss_ldap_ent_context_init_locked (ent_context_t **);
/*
+ * _nss_ldap_ent_context_init_internal_locked() has the same
+ * behaviour, except it marks the context as one that's being
+ * used to fetch additional data used in answering a request, i.e.
+ * that this isn't the "main" context
+ */
+
+ent_context_t *_nss_ldap_ent_context_init_internal_locked (ent_context_t **);
+
+/*
* _nss_ldap_ent_context_release() is used to manually free a context
*/
void _nss_ldap_ent_context_release (ent_context_t *);

View File

@@ -0,0 +1,139 @@
https://github.com/archlinuxarm/PKGBUILDs/issues/296
Fixes the bug causing a segfault on nscd and sshd:
symbol lookup error: /usr/lib/libnss_ldap.so.2: undefined symbol: __libc_lock_lock
--- ldap-nss.c.orig 2012-10-17 12:32:03.908730283 +0000
+++ ldap-nss.c 2012-10-17 12:38:10.906767283 +0000
@@ -148,7 +148,7 @@
*/
static ldap_session_t __session = { NULL, NULL, 0, LS_UNINITIALIZED };
-#if defined(HAVE_PTHREAD_ATFORK) || defined(HAVE_LIBC_LOCK_H) || defined(HAVE_BITS_LIBC_LOCK_H)
+#if defined(HAVE_PTHREAD_ATFORK) || defined(HAVE___LIBC_ONCE)
static pthread_once_t __once = PTHREAD_ONCE_INIT;
#endif
@@ -168,7 +168,7 @@
static int __ssl_initialized = 0;
#endif /* HAVE_LDAPSSL_CLIENT_INIT */
-#if defined(HAVE_PTHREAD_ATFORK) || defined(HAVE_LIBC_LOCK_H) || defined(HAVE_BITS_LIBC_LOCK_H)
+#if defined(HAVE_PTHREAD_ATFORK) || defined(HAVE___LIBC_ONCE)
/*
* Prepare for fork(); lock mutex.
*/
@@ -519,7 +519,7 @@
}
#endif /* HAVE_NSSWITCH_H */
-#if defined(HAVE_PTHREAD_ATFORK) || defined(HAVE_LIBC_LOCK_H) || defined(HAVE_BITS_LIBC_LOCK_H)
+#if defined(HAVE_PTHREAD_ATFORK) || defined(HAVE___LIBC_ONCE)
static void
do_atfork_prepare (void)
{
@@ -553,7 +553,7 @@
#ifdef HAVE_PTHREAD_ATFORK
(void) pthread_atfork (do_atfork_prepare, do_atfork_parent,
do_atfork_child);
-#elif defined(HAVE_LIBC_LOCK_H) || defined(HAVE_BITS_LIBC_LOCK_H)
+#elif defined(HAVE___LIBC_ATFORK)
(void) __libc_atfork (do_atfork_prepare, do_atfork_parent, do_atfork_child);
#endif
@@ -1119,7 +1119,7 @@
}
#ifndef HAVE_PTHREAD_ATFORK
-#if defined(HAVE_LIBC_LOCK_H) || defined(HAVE_BITS_LIBC_LOCK_H)
+#if defined(HAVE___LIBC_ONCE)
/*
* This bogosity is necessary because Linux uses different
* PIDs for different threads (like IRIX, which we don't
@@ -1151,7 +1151,7 @@
pid = -1; /* linked against libpthreads, don't care */
#else
pid = getpid ();
-#endif /* HAVE_LIBC_LOCK_H || HAVE_BITS_LIBC_LOCK_H */
+#endif /* HAVE___LIBC_ONCE */
#endif /* HAVE_PTHREAD_ATFORK */
euid = geteuid ();
@@ -1161,7 +1161,7 @@
syslog (LOG_DEBUG,
"nss_ldap: __session.ls_state=%d, __session.ls_conn=%p, __euid=%i, euid=%i",
__session.ls_state, __session.ls_conn, __euid, euid);
-#elif defined(HAVE_LIBC_LOCK_H) || defined(HAVE_BITS_LIBC_LOCK_H)
+#elif defined(HAVE___LIBC_ONCE)
syslog (LOG_DEBUG,
"nss_ldap: libpthreads=%s, __session.ls_state=%d, __session.ls_conn=%p, __pid=%i, pid=%i, __euid=%i, euid=%i",
((__pthread_once == NULL || __pthread_atfork == NULL) ? "FALSE" : "TRUE"),
@@ -1185,11 +1185,11 @@
}
else
#ifndef HAVE_PTHREAD_ATFORK
-#if defined(HAVE_LIBC_LOCK_H) || defined(HAVE_BITS_LIBC_LOCK_H)
+#if defined(HAVE___LIBC_ONCE)
if ((__pthread_once == NULL || __pthread_atfork == NULL) && __pid != pid)
#else
if (__pid != pid)
-#endif /* HAVE_LIBC_LOCK_H || HAVE_BITS_LIBC_LOCK_H */
+#endif /* HAVE___LIBC_ONCE */
{
do_close_no_unbind ();
}
@@ -1250,9 +1250,9 @@
debug ("<== do_init (pthread_once failed)");
return NSS_UNAVAIL;
}
-#elif defined(HAVE_PTHREAD_ATFORK) && ( defined(HAVE_LIBC_LOCK_H) || defined(HAVE_BITS_LIBC_LOCK_H) )
+#elif defined(HAVE_PTHREAD_ATFORK) && defined(HAVE___LIBC_ONCE)
__libc_once (__once, do_atfork_setup);
-#elif defined(HAVE_LIBC_LOCK_H) || defined(HAVE_BITS_LIBC_LOCK_H)
+#elif defined(HAVE___LIBC_ONCE)
/*
* Only install the pthread_atfork() handlers i
* we are linked against libpthreads. Otherwise,
--- ldap-nss.h.orig 2012-10-17 12:33:05.681379283 +0000
+++ ldap-nss.h 2012-10-17 12:34:06.337050753 +0000
@@ -671,7 +671,7 @@
#define NSS_LDAP_LOCK(m) mutex_lock(&m)
#define NSS_LDAP_UNLOCK(m) mutex_unlock(&m)
#define NSS_LDAP_DEFINE_LOCK(m) static mutex_t m = DEFAULTMUTEX
-#elif defined(HAVE_LIBC_LOCK_H) || defined(HAVE_BITS_LIBC_LOCK_H)
+#elif defined(HAVE___LIBC_LOCK_LOCK) && defined(HAVE___LIBC_LOCK_UNLOCK)
#define NSS_LDAP_LOCK(m) __libc_lock_lock(m)
#define NSS_LDAP_UNLOCK(m) __libc_lock_unlock(m)
#define NSS_LDAP_DEFINE_LOCK(m) static pthread_mutex_t m = PTHREAD_MUTEX_INITIALIZER
--- ldap-nss.c.orig 2012-10-17 12:58:20.270783283 +0000
+++ ldap-nss.c 2012-10-17 12:58:43.699267283 +0000
@@ -156,7 +156,7 @@
static FILE *__debugfile;
#endif /* LBER_OPT_LOG_PRINT_FILE */
-#ifndef HAVE_PTHREAD_ATFORK
+#if !defined(HAVE_PTHREAD_ATFORK) || !defined(HAVE___LIBC_ONCE)
/*
* Process ID that opened the session.
*/
--- configure.in.orig 2012-10-17 12:59:31.707235283 +0000
+++ configure.in 2012-10-17 13:00:15.854289283 +0000
@@ -255,6 +255,7 @@
AC_CHECK_FUNCS(pthread_once)
AC_CHECK_FUNCS(ether_aton)
AC_CHECK_FUNCS(ether_ntoa)
+AC_CHECK_FUNCS(__libc_once __libc_atfork __libc_lock_lock __libc_lock_unlock)
AC_MSG_CHECKING(for struct ether_addr)
AC_TRY_COMPILE([#include <sys/types.h>
--- ldap-nss.c.orig 2012-10-17 13:02:01.418010283 +0000
+++ ldap-nss.c 2012-10-17 13:03:25.017240283 +0000
@@ -1102,7 +1102,7 @@
do_init (void)
{
ldap_config_t *cfg;
-#ifndef HAVE_PTHREAD_ATFORK
+#if !defined(HAVE_PTHREAD_ATFORK) || !defined(HAVE___LIBC_ONCE)
pid_t pid;
#endif
uid_t euid;

View File

@@ -0,0 +1,51 @@
{
lib,
stdenv,
fetchurl,
openldap,
perl,
}:
stdenv.mkDerivation rec {
pname = "nss_ldap";
version = "265";
src = fetchurl {
url = "http://www.padl.com/download/nss_ldap-${version}.tar.gz";
sha256 = "1a16q9p97d2blrj0h6vl1xr7dg7i4s8x8namipr79mshby84vdbp";
};
preConfigure = ''
patchShebangs ./vers_string
sed -i s,vers_string,./vers_string, Makefile*
substituteInPlace vers_string --replace "cvslib.pl" "./cvslib.pl"
'';
patches = [ ./crashes.patch ];
postPatch = ''
patch -p0 < ${./nss_ldap-265-glibc-2.16.patch}
'';
preInstall = ''
installFlagsArray=(INST_UID=$(id -u) INST_GID=$(id -g) LIBC_VERS=2.5 NSS_VERS=2 NSS_LDAP_PATH_CONF=$out/etc/ldap.conf)
substituteInPlace Makefile \
--replace '/usr$(libdir)' $TMPDIR \
--replace 'install-data-local:' 'install-data-local-disabled:'
mkdir -p $out/etc
'';
nativeBuildInputs = [
perl # shebang of vers_string
];
buildInputs = [
openldap
];
meta = with lib; {
description = "LDAP module for the Solaris Nameservice Switch (NSS)";
license = licenses.gpl2Plus;
platforms = platforms.linux;
};
}

View File

@@ -0,0 +1,55 @@
{
lib,
stdenv,
fetchurl,
pkg-config,
makeWrapper,
autoreconfHook,
openldap,
python3,
pam,
}:
stdenv.mkDerivation rec {
pname = "nss-pam-ldapd";
version = "0.9.13";
src = fetchurl {
url = "https://arthurdejong.org/nss-pam-ldapd/${pname}-${version}.tar.gz";
sha256 = "sha256-4BeE4Xy1M7tmvQYB4gXnhSY0RcPC33pvkCMqtBMccW0=";
};
nativeBuildInputs = [
pkg-config
makeWrapper
autoreconfHook
];
buildInputs = [
openldap
pam
python3
];
preConfigure = ''
substituteInPlace Makefile.in --replace "install-data-local: " "# install-data-local: "
'';
configureFlags = [
"--with-bindpw-file=/run/nslcd/bindpw"
"--with-nslcd-socket=/run/nslcd/socket"
"--with-nslcd-pidfile=/run/nslcd/nslcd.pid"
"--with-pam-seclib-dir=$(out)/lib/security"
"--enable-kerberos=no"
];
postInstall = ''
wrapProgram $out/sbin/nslcd --prefix LD_LIBRARY_PATH ":" $out/lib
'';
meta = with lib; {
description = "LDAP identity and authentication for NSS/PAM";
homepage = "https://arthurdejong.org/nss-pam-ldapd/";
license = licenses.lgpl21Plus;
platforms = platforms.linux;
};
}

View File

@@ -0,0 +1,31 @@
{
lib,
stdenv,
fetchurl,
cmake,
pkg-config,
}:
stdenv.mkDerivation rec {
pname = "nss_wrapper";
version = "1.1.16";
src = fetchurl {
url = "mirror://samba/cwrap/nss_wrapper-${version}.tar.gz";
sha256 = "sha256-3HmrByd5vkQDtFtgzQRN0TeA1LuWddJ6vxkyrafIqI0=";
};
nativeBuildInputs = [
cmake
pkg-config
];
meta = with lib; {
description = "Wrapper for the user, group and hosts NSS API";
mainProgram = "nss_wrapper.pl";
homepage = "https://git.samba.org/?p=nss_wrapper.git;a=summary;";
license = licenses.bsd3;
platforms = platforms.unix;
broken = stdenv.hostPlatform.isDarwin;
};
}

View File

@@ -0,0 +1,53 @@
{
lib,
autoreconfHook,
pkg-config,
stdenv,
fetchFromGitHub,
}:
stdenv.mkDerivation rec {
pname = "nss-mdns";
version = "0.15.1";
src = fetchFromGitHub {
owner = "avahi";
repo = "nss-mdns";
rev = "v${version}";
hash = "sha256-iRaf9/gu9VkGi1VbGpxvC5q+0M8ivezCz/oAKEg5V1M=";
};
nativeBuildInputs = [
autoreconfHook
pkg-config
];
# Note: Although `nss-mdns' works by talking to `avahi-daemon', it
# doesn't depend on the Avahi libraries. Instead, it contains
# hand-written D-Bus code to talk to the Avahi daemon.
configureFlags = [
# Try to use the Avahi daemon before resolving on our own.
"--enable-avahi"
# Connect to the daemon at `/var/run/avahi-daemon/socket'.
"--localstatedir=/var"
# Read configuration at `/etc/mdns.allow`, not `$out/etc/mdns.allow`.
"--sysconfdir=/etc"
];
meta = {
description = "MDNS Name Service Switch (NSS) plug-in";
longDescription = ''
`nss-mdns' is a plugin for the GNU Name Service Switch (NSS)
functionality of the GNU C Library (glibc) providing host name
resolution via Multicast DNS (mDNS), effectively allowing name
resolution by common Unix/Linux programs in the ad-hoc mDNS
domain `.local'.
'';
homepage = "https://github.com/avahi/nss-mdns/";
license = lib.licenses.lgpl2Plus;
# Supports both the GNU and FreeBSD NSS.
platforms = lib.platforms.gnu ++ lib.platforms.linux ++ lib.platforms.freebsd;
maintainers = [ ];
};
}

View File

@@ -0,0 +1,36 @@
{
fetchFromGitHub,
lib,
stdenv,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "nstool";
version = "1.9.2";
src = fetchFromGitHub {
owner = "jakcron";
repo = "nstool";
tag = "v${finalAttrs.version}";
hash = "sha256-az6AkBCO7Ew5jK/9qKQ65adwAKYf+H7QEvVI6LCXFS0=";
fetchSubmodules = true;
};
preBuild = ''
make deps
'';
installPhase = ''
mkdir -p $out/bin
cp -v bin/nstool $out/bin
'';
meta = {
description = "General purpose reading/extraction tool for Nintendo Switch file formats";
homepage = "https://github.com/jakcron/nstool";
license = lib.licenses.mit;
mainProgram = "nstool";
maintainers = with lib.maintainers; [ diadatp ];
platforms = lib.platforms.unix;
};
})

View File

@@ -0,0 +1,76 @@
{
lib,
stdenv,
fetchFromGitea,
giflib,
imlib2,
libXft,
libexif,
libwebp,
libinotify-kqueue,
conf ? null,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "nsxiv";
version = "33";
src = fetchFromGitea {
domain = "codeberg.org";
owner = "nsxiv";
repo = "nsxiv";
rev = "v${finalAttrs.version}";
hash = "sha256-H1s+pLpHTmoDssdudtAq6Ru0jwZZ55/qamEVgtHTGfk=";
};
outputs = [
"out"
"man"
"doc"
];
buildInputs = [
giflib
imlib2
libXft
libexif
libwebp
]
++ lib.optional stdenv.hostPlatform.isDarwin libinotify-kqueue;
postPatch = lib.optionalString (conf != null) ''
cp ${(builtins.toFile "config.def.h" conf)} config.def.h
'';
env.NIX_LDFLAGS = lib.optionalString stdenv.hostPlatform.isDarwin "-linotify";
makeFlags = [ "CC:=$(CC)" ];
installFlags = [ "PREFIX=$(out)" ];
installTargets = [ "install-all" ];
meta = {
homepage = "https://nsxiv.codeberg.page/";
description = "New Suckless X Image Viewer";
mainProgram = "nsxiv";
longDescription = ''
nsxiv is a fork of now unmaintained sxiv with the purpose of being a
drop-in replacement of sxiv, maintaining it and adding simple, sensible
features, like:
- Basic image operations, e.g. zooming, panning, rotating
- Customizable key and mouse button mappings (in config.h)
- Script-ability via key-handler
- Thumbnail mode: grid of selectable previews of all images
- Ability to cache thumbnails for fast re-loading
- Basic support for animated/multi-frame images (GIF/WebP)
- Display image information in status bar
- Display image name/path in X title
'';
changelog = "https://codeberg.org/nsxiv/nsxiv/src/tag/${finalAttrs.src.rev}/etc/CHANGELOG.md";
license = lib.licenses.gpl2Plus;
maintainers = with lib.maintainers; [ sikmir ];
platforms = lib.platforms.unix;
};
})

View File

@@ -0,0 +1,35 @@
{
stdenv,
lib,
fetchFromGitHub,
cmake,
}:
stdenv.mkDerivation rec {
pname = "nsync";
version = "1.29.2";
src = fetchFromGitHub {
owner = "google";
repo = "nsync";
rev = version;
hash = "sha256-RAwrS8Vz5fZwZRvF4OQfn8Ls11S8OIV2TmJpNrBE4MI=";
};
nativeBuildInputs = [ cmake ];
# Needed for case-insensitive filesystems like on macOS
# because a file named BUILD exists already.
cmakeBuildDir = "build_dir";
meta = {
homepage = "https://github.com/google/nsync";
description = "C library that exports various synchronization primitives";
license = lib.licenses.asl20;
maintainers = with lib.maintainers; [
puffnfresh
Luflosi
];
platforms = lib.platforms.unix;
};
}