Merge remote-tracking branch 'ni/master'
This commit is contained in:
commit
d34de27336
@ -8,6 +8,7 @@
|
|||||||
services.ergochat = {
|
services.ergochat = {
|
||||||
enable = true;
|
enable = true;
|
||||||
settings = {
|
settings = {
|
||||||
|
server.name = "irc.r";
|
||||||
server.secure-nets = [
|
server.secure-nets = [
|
||||||
"42::0/16"
|
"42::0/16"
|
||||||
"10.240.0.0/12"
|
"10.240.0.0/12"
|
||||||
|
24
krebs/5pkgs/simple/git-assembler.nix
Normal file
24
krebs/5pkgs/simple/git-assembler.nix
Normal file
@ -0,0 +1,24 @@
|
|||||||
|
{ pkgs, stdenv }:
|
||||||
|
|
||||||
|
stdenv.mkDerivation rec {
|
||||||
|
pname = "git-assembler";
|
||||||
|
version = "1.3";
|
||||||
|
|
||||||
|
src = pkgs.fetchFromGitLab {
|
||||||
|
owner = "wavexx";
|
||||||
|
repo = "git-assembler";
|
||||||
|
rev = "v${version}";
|
||||||
|
hash = "sha256-A+ygt6Fxiu6EkVoQU5L1rhxu2e1HU0nbqJFzLzXzHBo=";
|
||||||
|
};
|
||||||
|
|
||||||
|
buildInputs = [
|
||||||
|
pkgs.python3
|
||||||
|
];
|
||||||
|
|
||||||
|
buildPhase = ":";
|
||||||
|
|
||||||
|
installPhase = ''
|
||||||
|
mkdir -p $out/bin
|
||||||
|
cp git-assembler $out/bin
|
||||||
|
'';
|
||||||
|
}
|
@ -39,6 +39,8 @@ let
|
|||||||
ne = x: y: x != y;
|
ne = x: y: x != y;
|
||||||
mod = x: y: x - y * (x / y);
|
mod = x: y: x - y * (x / y);
|
||||||
|
|
||||||
|
on = b: u: x: y: b (u x) (u y);
|
||||||
|
|
||||||
genid = lib.genid_uint32; # TODO remove
|
genid = lib.genid_uint32; # TODO remove
|
||||||
genid_uint31 = x: ((lib.genid_uint32 x) + 16777216) / 2;
|
genid_uint31 = x: ((lib.genid_uint32 x) + 16777216) / 2;
|
||||||
genid_uint32 = import ./genid.nix { inherit lib; };
|
genid_uint32 = import ./genid.nix { inherit lib; };
|
||||||
@ -185,6 +187,30 @@ let
|
|||||||
in
|
in
|
||||||
filter (x: x != []) ([acc.chunk] ++ acc.chunks);
|
filter (x: x != []) ([acc.chunk] ++ acc.chunks);
|
||||||
|
|
||||||
|
# Filter adjacent duplicate elements.
|
||||||
|
uniq = uniqBy eq;
|
||||||
|
|
||||||
|
# Filter adjacent duplicate elements determined via the given function.
|
||||||
|
uniqBy = cmp: let
|
||||||
|
f = a: s:
|
||||||
|
if length s == 0 then
|
||||||
|
[]
|
||||||
|
else let
|
||||||
|
b = head s;
|
||||||
|
in
|
||||||
|
if cmp a b then
|
||||||
|
f b (tail s)
|
||||||
|
else
|
||||||
|
[b] ++ f b (tail s);
|
||||||
|
in
|
||||||
|
s:
|
||||||
|
if length s == 0 then
|
||||||
|
[]
|
||||||
|
else let
|
||||||
|
b = head s;
|
||||||
|
in
|
||||||
|
[b] ++ f b (tail s);
|
||||||
|
|
||||||
warnOldVersion = oldName: newName:
|
warnOldVersion = oldName: newName:
|
||||||
if compareVersions oldName newName != -1 then
|
if compareVersions oldName newName != -1 then
|
||||||
trace "Upstream `${oldName}' gets overridden by `${newName}'." newName
|
trace "Upstream `${oldName}' gets overridden by `${newName}'." newName
|
||||||
|
@ -39,7 +39,12 @@ rec {
|
|||||||
in
|
in
|
||||||
if parse == null then
|
if parse == null then
|
||||||
(pkgs.writeText name s).overrideAttrs (old: {
|
(pkgs.writeText name s).overrideAttrs (old: {
|
||||||
dependencies = old.dependencies or [] ++ dependencies;
|
dependencies =
|
||||||
|
lib.uniq
|
||||||
|
(lib.sort (lib.on lib.lessThan (lib.getAttr "name"))
|
||||||
|
(filter
|
||||||
|
(lib.ne null)
|
||||||
|
(old.dependencies or [] ++ dependencies)));
|
||||||
})
|
})
|
||||||
|
|
||||||
else
|
else
|
||||||
|
@ -70,8 +70,7 @@ pkgs.symlinkJoin {
|
|||||||
# Install stored configuration if it has changed.
|
# Install stored configuration if it has changed.
|
||||||
# This allows for both declarative updates and runtime modifications.
|
# This allows for both declarative updates and runtime modifications.
|
||||||
${pkgs.coreutils}/bin/mkdir -p "$HOME"
|
${pkgs.coreutils}/bin/mkdir -p "$HOME"
|
||||||
ref=$(${pkgs.coreutils}/bin/cat "$HOME"/ref)
|
if test "$(${pkgs.coreutils}/bin/cat "$HOME"/ref)" != ${config-file}; then
|
||||||
if test "$ref" != ${config-file}; then
|
|
||||||
echo ${config-file} > "$HOME"/ref
|
echo ${config-file} > "$HOME"/ref
|
||||||
${pkgs.coreutils}/bin/cp ${config-file} "$HOME"/.alacritty.yml
|
${pkgs.coreutils}/bin/cp ${config-file} "$HOME"/.alacritty.yml
|
||||||
fi
|
fi
|
||||||
|
Loading…
Reference in New Issue
Block a user