commit
c6dd9fd65d
@ -0,0 +1,101 @@ |
||||
{ config, lib, pkgs, ... }: |
||||
|
||||
with lib; |
||||
let |
||||
nncpCfgFile = "/run/nncp.hjson"; |
||||
programCfg = config.programs.nncp; |
||||
settingsFormat = pkgs.formats.json { }; |
||||
jsonCfgFile = settingsFormat.generate "nncp.json" programCfg.settings; |
||||
pkg = programCfg.package; |
||||
in { |
||||
options.programs.nncp = { |
||||
|
||||
enable = |
||||
mkEnableOption "NNCP (Node to Node copy) utilities and configuration"; |
||||
|
||||
group = mkOption { |
||||
type = types.str; |
||||
default = "uucp"; |
||||
description = '' |
||||
The group under which NNCP files shall be owned. |
||||
Any member of this group may access the secret keys |
||||
of this NNCP node. |
||||
''; |
||||
}; |
||||
|
||||
package = mkOption { |
||||
type = types.package; |
||||
default = pkgs.nncp; |
||||
defaultText = literalExpression "pkgs.nncp"; |
||||
description = "The NNCP package to use system-wide."; |
||||
}; |
||||
|
||||
secrets = mkOption { |
||||
type = with types; listOf str; |
||||
example = [ "/run/keys/nncp.hjson" ]; |
||||
description = '' |
||||
A list of paths to NNCP configuration files that should not be |
||||
in the Nix store. These files are layered on top of the values at |
||||
<xref linkend="opt-programs.nncp.settings"/>. |
||||
''; |
||||
}; |
||||
|
||||
settings = mkOption { |
||||
type = settingsFormat.type; |
||||
description = '' |
||||
NNCP configuration, see |
||||
<link xlink:href="http://www.nncpgo.org/Configuration.html"/>. |
||||
At runtime these settings will be overlayed by the contents of |
||||
<xref linkend="opt-programs.nncp.secrets"/> into the file |
||||
<literal>${nncpCfgFile}</literal>. Node keypairs go in |
||||
<literal>secrets</literal>, do not specify them in |
||||
<literal>settings</literal> as they will be leaked into |
||||
<literal>/nix/store</literal>! |
||||
''; |
||||
default = { }; |
||||
}; |
||||
|
||||
}; |
||||
|
||||
config = mkIf programCfg.enable { |
||||
|
||||
environment = { |
||||
systemPackages = [ pkg ]; |
||||
etc."nncp.hjson".source = nncpCfgFile; |
||||
}; |
||||
|
||||
programs.nncp.settings = { |
||||
spool = mkDefault "/var/spool/nncp"; |
||||
log = mkDefault "/var/spool/nncp/log"; |
||||
}; |
||||
|
||||
systemd.tmpfiles.rules = [ |
||||
"d ${programCfg.settings.spool} 0770 root ${programCfg.group}" |
||||
"f ${programCfg.settings.log} 0770 root ${programCfg.group}" |
||||
]; |
||||
|
||||
systemd.services.nncp-config = { |
||||
path = [ pkg ]; |
||||
description = "Generate NNCP configuration"; |
||||
wantedBy = [ "basic.target" ]; |
||||
serviceConfig.Type = "oneshot"; |
||||
script = '' |
||||
umask u=rw |
||||
nncpCfgDir=$(mktemp --directory nncp.XXX) |
||||
for f in ${jsonCfgFile} ${toString config.programs.nncp.secrets}; do |
||||
tmpdir=$(mktemp --directory nncp.XXX) |
||||
nncp-cfgdir -cfg $f -dump $tmpdir |
||||
find $tmpdir -size 1c -delete |
||||
cp -a $tmpdir/* $nncpCfgDir/ |
||||
rm -rf $tmpdir |
||||
done |
||||
nncp-cfgdir -load $nncpCfgDir > ${nncpCfgFile} |
||||
rm -rf $nncpCfgDir |
||||
chgrp ${programCfg.group} ${nncpCfgFile} |
||||
chmod g+r ${nncpCfgFile} |
||||
''; |
||||
}; |
||||
}; |
||||
|
||||
meta.maintainers = with lib.maintainers; [ ehmry ]; |
||||
} |
@ -0,0 +1,33 @@ |
||||
{ stdenv |
||||
, lib |
||||
, fetchzip |
||||
, SDL |
||||
, pkg-config |
||||
, libSM |
||||
}: |
||||
stdenv.mkDerivation rec { |
||||
pname = "synaesthesia"; |
||||
version = "2.4"; |
||||
|
||||
src = fetchzip { |
||||
url = "https://logarithmic.net/pfh-files/synaesthesia/synaesthesia-${version}.tar.gz"; |
||||
sha256 = "0nzsdxbah0shm2vlziaaw3ilzlizd3d35rridkpg40nfxmq84qnx"; |
||||
}; |
||||
|
||||
nativeBuildInputs = [ |
||||
pkg-config |
||||
]; |
||||
|
||||
buildInputs = [ |
||||
SDL |
||||
libSM |
||||
]; |
||||
|
||||
meta = { |
||||
homepage = "https://logarithmic.net/pfh/synaesthesia"; |
||||
description = "Program for representing sounds visually"; |
||||
license = lib.licenses.gpl2Only; |
||||
platforms = lib.platforms.linux; |
||||
maintainers = [ lib.maintainers.infinisil ]; |
||||
}; |
||||
} |
@ -0,0 +1,56 @@ |
||||
{ lib |
||||
, stdenv |
||||
, maven |
||||
}: |
||||
|
||||
{ src |
||||
, patches ? [] |
||||
, pname |
||||
, version |
||||
, mvnSha256 ? "AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA=" |
||||
, mvnHash ? "sha256-${mvnSha256}" |
||||
, mvnFetchExtraArgs ? {} |
||||
, mvnParameters ? "" |
||||
, ... |
||||
} @args: |
||||
|
||||
# originally extracted from dbeaver |
||||
# created to allow using maven packages in the same style as rust |
||||
|
||||
stdenv.mkDerivation (rec { |
||||
fetchedMavenDeps = stdenv.mkDerivation ({ |
||||
name = "${pname}-${version}-maven-deps"; |
||||
inherit src; |
||||
|
||||
buildInputs = [ |
||||
maven |
||||
]; |
||||
|
||||
buildPhase = '' |
||||
mvn package -Dmaven.repo.local=$out/.m2 ${mvnParameters} |
||||
''; |
||||
|
||||
# keep only *.{pom,jar,sha1,nbm} and delete all ephemeral files with lastModified timestamps inside |
||||
installPhase = '' |
||||
find $out -type f \ |
||||
-name \*.lastUpdated -or \ |
||||
-name resolver-status.properties -or \ |
||||
-name _remote.repositories \ |
||||
-delete |
||||
''; |
||||
|
||||
# don't do any fixup |
||||
dontFixup = true; |
||||
outputHashMode = "recursive"; |
||||
outputHash = mvnHash; |
||||
} // mvnFetchExtraArgs); |
||||
|
||||
buildPhase = '' |
||||
runHook preBuild |
||||
|
||||
mvnDeps=$(cp -dpR ${fetchedMavenDeps}/.m2 ./ && chmod +w -R .m2 && pwd) |
||||
mvn package --offline "-Dmaven.repo.local=$mvnDeps/.m2" -P desktop,all-platforms |
||||
|
||||
runHook postBuild |
||||
''; |
||||
} // args) |
@ -1,36 +1,57 @@ |
||||
{ stdenv, lib, fetchFromGitHub, autoreconfHook, perl, cracklib, python3, fetchpatch }: |
||||
{ stdenv |
||||
, lib |
||||
, fetchFromGitHub |
||||
, autoreconfHook |
||||
, perl |
||||
, cracklib |
||||
, enablePAM ? stdenv.hostPlatform.isLinux |
||||
, pam |
||||
, enablePython ? false |
||||
, python |
||||
}: |
||||
|
||||
# python binding generates a shared library which are unavailable with musl build |
||||
assert enablePython -> !stdenv.hostPlatform.isStatic; |
||||
|
||||
stdenv.mkDerivation rec { |
||||
pname = "libpwquality"; |
||||
version = "1.4.2"; |
||||
version = "1.4.4"; |
||||
|
||||
outputs = [ "out" "dev" "lib" "man" ] ++ lib.optionals enablePython [ "py" ]; |
||||
|
||||
src = fetchFromGitHub { |
||||
owner = "libpwquality"; |
||||
repo = "libpwquality"; |
||||
rev = "${pname}-${version}"; |
||||
sha256 = "0n4pjhm7wfivk0wizggaxq4y4mcxic876wcarjabkp5z9k14y36h"; |
||||
sha256 = "sha256-7gAzrx5VP1fEBwAt6E5zGM8GyuPRR+JxYifYfirY+U8="; |
||||
}; |
||||
|
||||
nativeBuildInputs = [ autoreconfHook perl python3 ]; |
||||
buildInputs = [ cracklib ]; |
||||
|
||||
patches = lib.optional stdenv.hostPlatform.isStatic [ |
||||
(fetchpatch { |
||||
name = "static-build.patch"; |
||||
url = "https://github.com/libpwquality/libpwquality/pull/40.patch"; |
||||
sha256 = "1ypccq437wxwgddd98cvd330jfm7jscdlzlyxgy05g6yzrr68xyk"; |
||||
}) |
||||
patches = [ |
||||
# ensure python site-packages goes in $py output |
||||
./python-binding-prefix.patch |
||||
]; |
||||
|
||||
configureFlags = lib.optional stdenv.hostPlatform.isStatic [ |
||||
# Python binding generates a shared library which are unavailable with musl build |
||||
"--disable-python-bindings" |
||||
]; |
||||
nativeBuildInputs = [ autoreconfHook perl ] ++ lib.optionals enablePython [ python ]; |
||||
buildInputs = [ cracklib ] ++ lib.optionals enablePAM [ pam ]; |
||||
|
||||
configureFlags = lib.optionals (!enablePython) [ "--disable-python-bindings" ]; |
||||
|
||||
meta = with lib; { |
||||
description = "Password quality checking and random password generation library"; |
||||
homepage = "https://github.com/libpwquality/libpwquality"; |
||||
license = licenses.bsd3; |
||||
description = "Password quality checking and random password generation library"; |
||||
longDescription = '' |
||||
The libpwquality library purpose is to provide common functions for |
||||
password quality checking and also scoring them based on their apparent |
||||
randomness. The library also provides a function for generating random |
||||
passwords with good pronounceability. The library supports reading and |
||||
parsing of a configuration file. |
||||
|
||||
In the package there are also very simple utilities that use the library |
||||
function and PAM module that can be used instead of pam_cracklib. The |
||||
module supports all the options of pam_cracklib. |
||||
''; |
||||
license = with licenses; [ bsd3 /* or */ gpl2Plus ]; |
||||
maintainers = with maintainers; [ jk ]; |
||||
platforms = platforms.unix; |
||||
}; |
||||
} |
||||
|
@ -0,0 +1,13 @@ |
||||
diff --git a/python/Makefile.am b/python/Makefile.am
|
||||
index 1d00c0c..0987690 100644
|
||||
--- a/python/Makefile.am
|
||||
+++ b/python/Makefile.am
|
||||
@@ -14,7 +14,7 @@ all-local:
|
||||
CFLAGS="${CFLAGS} -fno-strict-aliasing" @PYTHONBINARY@ setup.py build --build-base py$(PYTHONREV)
|
||||
|
||||
install-exec-local:
|
||||
- CFLAGS="${CFLAGS} -fno-strict-aliasing" @PYTHONBINARY@ setup.py build --build-base py$(PYTHONREV) install --prefix=${DESTDIR}${prefix}
|
||||
+ CFLAGS="${CFLAGS} -fno-strict-aliasing" @PYTHONBINARY@ setup.py build --build-base py$(PYTHONREV) install --prefix=${DESTDIR}${py}
|
||||
|
||||
clean-local:
|
||||
rm -rf py$(PYTHONREV)
|
@ -1,27 +1,52 @@ |
||||
{ lib, buildPythonPackage, fetchPypi, future, python-dateutil, six, pytest, mock, parameterized }: |
||||
{ lib |
||||
, buildPythonPackage |
||||
, fetchPypi |
||||
, future |
||||
, mock |
||||
, parameterized |
||||
, pytestCheckHook |
||||
, python-dateutil |
||||
, pythonOlder |
||||
, six |
||||
}: |
||||
|
||||
buildPythonPackage rec { |
||||
pname = "vertica-python"; |
||||
version = "1.0.3"; |
||||
version = "1.0.4"; |
||||
format = "setuptools"; |
||||
|
||||
disabled = pythonOlder "3.7"; |
||||
|
||||
src = fetchPypi { |
||||
inherit pname version; |
||||
sha256 = "cfe1794c5ba9fdfbd470a55d82f60c2e08e129828367753bf64199a58a539bc2"; |
||||
hash = "sha256-IpdrR9mDG+8cNnXgSXkmXahSEP4EGnEBJqZk5SNu9pA="; |
||||
}; |
||||
|
||||
propagatedBuildInputs = [ future python-dateutil six ]; |
||||
propagatedBuildInputs = [ |
||||
future |
||||
python-dateutil |
||||
six |
||||
]; |
||||
|
||||
checkInputs = [ |
||||
mock |
||||
parameterized |
||||
pytestCheckHook |
||||
]; |
||||
|
||||
checkInputs = [ pytest mock parameterized ]; |
||||
disabledTestPaths = [ |
||||
# Integration tests require an accessible Vertica db |
||||
"vertica_python/tests/integration_tests" |
||||
]; |
||||
|
||||
# Integration tests require an accessible Vertica db |
||||
checkPhase = '' |
||||
pytest --ignore vertica_python/tests/integration_tests |
||||
''; |
||||
pythonImportsCheck = [ |
||||
"vertica_python" |
||||
]; |
||||
|
||||
meta = with lib; { |
||||
description = "Native Python client for Vertica database"; |
||||
homepage = "https://github.com/vertica/vertica-python"; |
||||
license = licenses.asl20; |
||||
maintainers = [ maintainers.arnoldfarkas ]; |
||||
maintainers = with maintainers; [ arnoldfarkas ]; |
||||
}; |
||||
} |
||||
|
@ -0,0 +1,7 @@ |
||||
{ callPackage }: |
||||
|
||||
{ |
||||
scim-for-keycloak = callPackage ./scim-for-keycloak {}; |
||||
keycloak-discord = callPackage ./keycloak-discord {}; |
||||
keycloak-metrics-spi = callPackage ./keycloak-metrics-spi {}; |
||||
} |
@ -0,0 +1,29 @@ |
||||
{ stdenv |
||||
, lib |
||||
, fetchurl |
||||
}: |
||||
|
||||
stdenv.mkDerivation rec { |
||||
pname = "keycloak-discord"; |
||||
version = "0.3.1"; |
||||
|
||||
src = fetchurl { |
||||
url = "https://github.com/wadahiro/keycloak-discord/releases/download/v${version}/keycloak-discord-ear-${version}.ear"; |
||||
sha256 = "0fswhbnxc80dpfqf5y6j29dxk3vcnm4kki6qdk22qliasvpw5n9c"; |
||||
}; |
||||
|
||||
dontUnpack = true; |
||||
dontBuild = true; |
||||
|
||||
installPhase = '' |
||||
mkdir -p "$out" |
||||
install "$src" "$out/${pname}-ear-${version}.ear" |
||||
''; |
||||
|
||||
meta = with lib; { |
||||
homepage = "https://github.com/wadahiro/keycloak-discord"; |
||||
description = "Keycloak Social Login extension for Discord"; |
||||
license = licenses.apsl20; |
||||
maintainers = with maintainers; [ mkg20001 ]; |
||||
}; |
||||
} |
@ -0,0 +1,26 @@ |
||||
{ stdenv, lib, fetchurl }: |
||||
|
||||
stdenv.mkDerivation rec { |
||||
pname = "keycloak-metrics-spi"; |
||||
version = "2.5.3"; |
||||
|
||||
src = fetchurl { |
||||
url = "https://github.com/aerogear/keycloak-metrics-spi/releases/download/${version}/keycloak-metrics-spi-${version}.jar"; |
||||
sha256 = "15lsy8wjw6nlfdfhllc45z9l5474p0lsghrwzzsssvd68bw54gwv"; |
||||
}; |
||||
|
||||
dontUnpack = true; |
||||
dontBuild = true; |
||||
|
||||
installPhase = '' |
||||
mkdir -p $out |
||||
install "$src" "$out" |
||||
''; |
||||
|
||||
meta = with lib; { |
||||
homepage = "https://github.com/aerogear/keycloak-metrics-spi"; |
||||
description = "Keycloak Service Provider that adds a metrics endpoint"; |
||||
license = licenses.apsl20; |
||||
maintainers = with maintainers; [ benley ]; |
||||
}; |
||||
} |
@ -0,0 +1,36 @@ |
||||
{ lib |
||||
, stdenv |
||||
, fetchFromGitHub |
||||
, maven |
||||
, javaPackages |
||||
}: |
||||
|
||||
javaPackages.mavenfod rec { |
||||
pname = "scim-for-keycloak"; |
||||
version = "kc-15-b2"; # When updating also update mvnHash |
||||
|
||||
src = fetchFromGitHub { |
||||
owner = "Captain-P-Goldfish"; |
||||
repo = "scim-for-keycloak"; |
||||
rev = version; |
||||
sha256 = "K34c7xISjEETI3jFkRLdZ0C8pZHTWtPtrrIzwC76Tv0="; |
||||
}; |
||||
|
||||
mvnHash = "sha256-kDYhXTEOAWH/dcRJalKtbwBpoxcD1aX9eqcRKs6ewbE="; |
||||
|
||||
nativeBuildInputs = [ |
||||
maven |
||||
]; |
||||
|
||||
installPhase = '' |
||||
EAR=$(find -iname "*.ear") |
||||
install -D "$EAR" "$out/$(basename $EAR)" |
||||
''; |
||||
|
||||
meta = with lib; { |
||||
homepage = "https://github.com/Captain-P-Goldfish/scim-for-keycloak"; |
||||
description = "A third party module that extends Keycloak with SCIM functionality"; |
||||
license = licenses.bsd3; |
||||
maintainers = with maintainers; [ mkg20001 ]; |
||||
}; |
||||
} |
@ -1,53 +0,0 @@ |
||||
# sets of small configurations: |
||||
# Each configuration |
||||
rec { |
||||
# has 2 arguments pkgs and this. |
||||
configA = pkgs: this: { |
||||
# Can depends on other configuration |
||||
require = configB; |
||||
|
||||
# Defines new options |
||||
optionA = pkgs.lib.mkOption { |
||||
# With default values |
||||
default = false; |
||||
# And merging functions. |
||||
merge = pkgs.lib.mergeEnableOption; |
||||
}; |
||||
|
||||
# Add a new definition to other options. |
||||
optionB = this.optionA; |
||||
}; |
||||
|
||||
# Can be used for option header. |
||||
configB = pkgs: this: { |
||||
# Can depends on more than one configuration. |
||||
require = [ configC configD ]; |
||||
|
||||
optionB = pkgs.lib.mkOption { |
||||
default = false; |
||||
}; |
||||
|
||||
# Is not obliged to define other options. |
||||
}; |
||||
|
||||
configC = pkgs: this: { |
||||
require = [ configA ]; |
||||
|
||||
optionC = pkgs.lib.mkOption { |
||||
default = false; |
||||
}; |
||||
|
||||
# Use the default value if it is not overwritten. |
||||
optionA = this.optionC; |
||||
}; |
||||
|
||||
# Can also be used as option configuration only. |
||||
# without any arguments (backward compatibility) |
||||
configD = { |
||||
# Is not forced to specify the require attribute. |
||||
|
||||
# Is not force to make new options. |
||||
optionA = true; |
||||
optionD = false; |
||||
}; |
||||
} |
@ -1,11 +0,0 @@ |
||||
let |
||||
pkgs = import ../../.. {}; |
||||
config = import ./declare.nix; |
||||
in |
||||
with (pkgs.lib); |
||||
|
||||
finalReferenceOptionSets |
||||
filterOptionSets |
||||
pkgs |
||||
# List of main configurations. |
||||
[ config.configB config.configC ] |
@ -1,57 +0,0 @@ |
||||
<?xml version='1.0' encoding='utf-8'?> |
||||
<expr> |
||||
<attrs> |
||||
<attr name="optionA"> |
||||
<list> |
||||
<attrs> |
||||
<attr name="_type"> |
||||
<string value="option" /> |
||||
</attr> |
||||
<attr name="default"> |
||||
<bool value="false" /> |
||||
</attr> |
||||
<attr name="merge"> |
||||
<unevaluated /> |
||||
</attr> |
||||
<attr name="name"> |
||||
<string value="optionA" /> |
||||
</attr> |
||||
</attrs> |
||||
</list> |
||||
</attr> |
||||
<attr name="optionB"> |
||||
<list> |
||||
<attrs> |
||||
<attr name="_type"> |
||||
<string value="option" /> |
||||
</attr> |
||||
<attr name="default"> |
||||
<bool value="false" /> |
||||
</attr> |
||||
<attr name="name"> |
||||
<string value="optionB" /> |
||||
</attr> |
||||
</attrs> |
||||
</list> |
||||
</attr> |
||||
<attr name="optionC"> |
||||
<list> |
||||
<attrs> |
||||
<attr name="_type"> |
||||
<string value="option" /> |
||||
</attr> |
||||
<attr name="default"> |
||||
<bool value="false" /> |
||||
</attr> |
||||
<attr name="name"> |
||||
<string value="optionC" /> |
||||
</attr> |
||||
</attrs> |
||||
</list> |
||||
</attr> |
||||
<attr name="optionD"> |
||||
<attrs> |
||||
</attrs> |
||||
</attr> |
||||
</attrs> |
||||
</expr> |
@ -1,15 +0,0 @@ |
||||
let |
||||
pkgs = import ../../.. {}; |
||||
config = import ./declare.nix; |
||||
|
||||
# Define the handler of unbound options. |
||||
noOption = name: values: |
||||
builtins.trace "Attribute named '${name}' does not match any option declaration." values; |
||||
in |
||||
with (pkgs.lib); |
||||
|
||||
finalReferenceOptionSets |
||||
(mergeOptionSets noOption) |
||||
pkgs |
||||
# List of main configurations. |
||||
[ config.configB config.configC ] |
@ -1,20 +0,0 @@ |
||||
trace: Str("Attribute named 'optionD' does not match any option declaration.",[]) |
||||
<?xml version='1.0' encoding='utf-8'?> |
||||
<expr> |
||||
<attrs> |
||||
<attr name="optionA"> |
||||
<bool value="true" /> |
||||
</attr> |
||||
<attr name="optionB"> |
||||
<bool value="true" /> |
||||
</attr> |
||||
<attr name="optionC"> |
||||
<bool value="false" /> |
||||
</attr> |
||||
<attr name="optionD"> |
||||
<list> |
||||
<bool value="false" /> |
||||
</list> |
||||
</attr> |
||||
</attrs> |
||||
</expr> |
@ -1,9 +0,0 @@ |
||||
#! /bin/sh -e |
||||
|
||||
echo 1>&2 "Test: Merge of option bindings." |
||||
nix-instantiate merge.nix --eval-only --strict --xml >& merge.out |
||||
diff merge.ref merge.out |
||||
|
||||
echo 1>&2 "Test: Filter of option declarations." |
||||
nix-instantiate keep.nix --eval-only --strict --xml >& keep.out |
||||
diff keep.ref keep.out |
@ -0,0 +1,26 @@ |
||||
{ lib, stdenv, fetchFromGitHub, fuse }: |
||||
|
||||
stdenv.mkDerivation rec { |
||||
pname = "littlefs-fuse"; |
||||
version = "2.4.1"; |
||||
src = fetchFromGitHub { |
||||
owner = "littlefs-project"; |
||||
repo = pname; |
||||
rev = "v${version}"; |
||||
hash = "sha256-+EUZluBtgZiziTEIfXIhkRIBu/Pe78qmL18TQHkfHO4="; |
||||
}; |
||||
buildInputs = [ fuse ]; |
||||
installPhase = '' |
||||
runHook preInstall |
||||
install -D lfs $out/bin/${pname} |
||||
ln -s $out/bin/${pname} $out/bin/mount.littlefs |
||||
ln -s $out/bin $out/sbin |
||||
runHook postInstall |
||||
''; |
||||
meta = src.meta // { |
||||
description = "A FUSE wrapper that puts the littlefs in user-space"; |
||||
license = lib.licenses.bsd3; |
||||
maintainers = with lib.maintainers; [ ehmry ]; |
||||
inherit (fuse.meta) platforms; |
||||
}; |
||||
} |
Loading…
Reference in new issue