Merge staging-next into staging
This commit is contained in:
commit
68af28a926
13 changed files with 235 additions and 107 deletions
|
@ -22,5 +22,6 @@ with pkgs; stdenv.mkDerivation {
|
||||||
docgen lists 'List manipulation functions'
|
docgen lists 'List manipulation functions'
|
||||||
docgen debug 'Debugging functions'
|
docgen debug 'Debugging functions'
|
||||||
docgen options 'NixOS / nixpkgs option handling'
|
docgen options 'NixOS / nixpkgs option handling'
|
||||||
|
docgen sources 'Source filtering functions'
|
||||||
'';
|
'';
|
||||||
}
|
}
|
||||||
|
|
|
@ -25,4 +25,6 @@
|
||||||
<xi:include href="./library/generated/debug.xml" />
|
<xi:include href="./library/generated/debug.xml" />
|
||||||
|
|
||||||
<xi:include href="./library/generated/options.xml" />
|
<xi:include href="./library/generated/options.xml" />
|
||||||
|
|
||||||
|
<xi:include href="./library/generated/sources.xml" />
|
||||||
</section>
|
</section>
|
||||||
|
|
117
lib/sources.nix
117
lib/sources.nix
|
@ -1,6 +1,7 @@
|
||||||
# Functions for copying sources to the Nix store.
|
# Functions for copying sources to the Nix store.
|
||||||
{ lib }:
|
{ lib }:
|
||||||
|
|
||||||
|
# Tested in lib/tests/sources.sh
|
||||||
let
|
let
|
||||||
inherit (builtins)
|
inherit (builtins)
|
||||||
hasContext
|
hasContext
|
||||||
|
@ -11,14 +12,13 @@ let
|
||||||
tryEval
|
tryEval
|
||||||
;
|
;
|
||||||
inherit (lib)
|
inherit (lib)
|
||||||
|
boolToString
|
||||||
filter
|
filter
|
||||||
getAttr
|
getAttr
|
||||||
isString
|
isString
|
||||||
pathExists
|
pathExists
|
||||||
readFile
|
readFile
|
||||||
;
|
;
|
||||||
in
|
|
||||||
rec {
|
|
||||||
|
|
||||||
# Returns the type of a path: regular (for file), symlink, or directory
|
# Returns the type of a path: regular (for file), symlink, or directory
|
||||||
pathType = p: getAttr (baseNameOf p) (readDir (dirOf p));
|
pathType = p: getAttr (baseNameOf p) (readDir (dirOf p));
|
||||||
|
@ -84,16 +84,34 @@ rec {
|
||||||
#
|
#
|
||||||
cleanSourceWith = { filter ? _path: _type: true, src, name ? null }:
|
cleanSourceWith = { filter ? _path: _type: true, src, name ? null }:
|
||||||
let
|
let
|
||||||
isFiltered = src ? _isLibCleanSourceWith;
|
orig = toSourceAttributes src;
|
||||||
origSrc = if isFiltered then src.origSrc else src;
|
in fromSourceAttributes {
|
||||||
filter' = if isFiltered then name: type: filter name type && src.filter name type else filter;
|
inherit (orig) origSrc;
|
||||||
name' = if name != null then name else if isFiltered then src.name else "source";
|
filter = path: type: filter path type && orig.filter path type;
|
||||||
in {
|
name = if name != null then name else orig.name;
|
||||||
inherit origSrc;
|
};
|
||||||
filter = filter';
|
|
||||||
outPath = builtins.path { filter = filter'; path = origSrc; name = name'; };
|
/*
|
||||||
_isLibCleanSourceWith = true;
|
Add logging to a source, for troubleshooting the filtering behavior.
|
||||||
name = name';
|
Type:
|
||||||
|
sources.trace :: sourceLike -> Source
|
||||||
|
*/
|
||||||
|
trace =
|
||||||
|
# Source to debug. The returned source will behave like this source, but also log its filter invocations.
|
||||||
|
src:
|
||||||
|
let
|
||||||
|
attrs = toSourceAttributes src;
|
||||||
|
in
|
||||||
|
fromSourceAttributes (
|
||||||
|
attrs // {
|
||||||
|
filter = path: type:
|
||||||
|
let
|
||||||
|
r = attrs.filter path type;
|
||||||
|
in
|
||||||
|
builtins.trace "${attrs.name}.filter ${path} = ${boolToString r}" r;
|
||||||
|
}
|
||||||
|
) // {
|
||||||
|
satisfiesSubpathInvariant = src ? satisfiesSubpathInvariant && src.satisfiesSubpathInvariant;
|
||||||
};
|
};
|
||||||
|
|
||||||
# Filter sources by a list of regular expressions.
|
# Filter sources by a list of regular expressions.
|
||||||
|
@ -110,14 +128,26 @@ rec {
|
||||||
inherit src;
|
inherit src;
|
||||||
};
|
};
|
||||||
|
|
||||||
# Get all files ending with the specified suffices from the given
|
/*
|
||||||
# directory or its descendants. E.g. `sourceFilesBySuffices ./dir
|
Get all files ending with the specified suffices from the given
|
||||||
# [".xml" ".c"]'.
|
source directory or its descendants, omitting files that do not match
|
||||||
sourceFilesBySuffices = path: exts:
|
any suffix. The result of the example below will include files like
|
||||||
|
`./dir/module.c` and `./dir/subdir/doc.xml` if present.
|
||||||
|
|
||||||
|
Type: sourceLike -> [String] -> Source
|
||||||
|
|
||||||
|
Example:
|
||||||
|
sourceFilesBySuffices ./. [ ".xml" ".c" ]
|
||||||
|
*/
|
||||||
|
sourceFilesBySuffices =
|
||||||
|
# Path or source containing the files to be returned
|
||||||
|
src:
|
||||||
|
# A list of file suffix strings
|
||||||
|
exts:
|
||||||
let filter = name: type:
|
let filter = name: type:
|
||||||
let base = baseNameOf (toString name);
|
let base = baseNameOf (toString name);
|
||||||
in type == "directory" || lib.any (ext: lib.hasSuffix ext base) exts;
|
in type == "directory" || lib.any (ext: lib.hasSuffix ext base) exts;
|
||||||
in cleanSourceWith { inherit filter; src = path; };
|
in cleanSourceWith { inherit filter src; };
|
||||||
|
|
||||||
pathIsGitRepo = path: (tryEval (commitIdFromGitRepo path)).success;
|
pathIsGitRepo = path: (tryEval (commitIdFromGitRepo path)).success;
|
||||||
|
|
||||||
|
@ -177,4 +207,57 @@ rec {
|
||||||
pathHasContext = builtins.hasContext or (lib.hasPrefix storeDir);
|
pathHasContext = builtins.hasContext or (lib.hasPrefix storeDir);
|
||||||
|
|
||||||
canCleanSource = src: src ? _isLibCleanSourceWith || !(pathHasContext (toString src));
|
canCleanSource = src: src ? _isLibCleanSourceWith || !(pathHasContext (toString src));
|
||||||
|
|
||||||
|
# -------------------------------------------------------------------------- #
|
||||||
|
# Internal functions
|
||||||
|
#
|
||||||
|
|
||||||
|
# toSourceAttributes : sourceLike -> SourceAttrs
|
||||||
|
#
|
||||||
|
# Convert any source-like object into a simple, singular representation.
|
||||||
|
# We don't expose this representation in order to avoid having a fifth path-
|
||||||
|
# like class of objects in the wild.
|
||||||
|
# (Existing ones being: paths, strings, sources and x//{outPath})
|
||||||
|
# So instead of exposing internals, we build a library of combinator functions.
|
||||||
|
toSourceAttributes = src:
|
||||||
|
let
|
||||||
|
isFiltered = src ? _isLibCleanSourceWith;
|
||||||
|
in
|
||||||
|
{
|
||||||
|
# The original path
|
||||||
|
origSrc = if isFiltered then src.origSrc else src;
|
||||||
|
filter = if isFiltered then src.filter else _: _: true;
|
||||||
|
name = if isFiltered then src.name else "source";
|
||||||
|
};
|
||||||
|
|
||||||
|
# fromSourceAttributes : SourceAttrs -> Source
|
||||||
|
#
|
||||||
|
# Inverse of toSourceAttributes for Source objects.
|
||||||
|
fromSourceAttributes = { origSrc, filter, name }:
|
||||||
|
{
|
||||||
|
_isLibCleanSourceWith = true;
|
||||||
|
inherit origSrc filter name;
|
||||||
|
outPath = builtins.path { inherit filter name; path = origSrc; };
|
||||||
|
};
|
||||||
|
|
||||||
|
in {
|
||||||
|
inherit
|
||||||
|
pathType
|
||||||
|
pathIsDirectory
|
||||||
|
pathIsRegularFile
|
||||||
|
|
||||||
|
pathIsGitRepo
|
||||||
|
commitIdFromGitRepo
|
||||||
|
|
||||||
|
cleanSource
|
||||||
|
cleanSourceWith
|
||||||
|
cleanSourceFilter
|
||||||
|
pathHasContext
|
||||||
|
canCleanSource
|
||||||
|
|
||||||
|
sourceByRegex
|
||||||
|
sourceFilesBySuffices
|
||||||
|
|
||||||
|
trace
|
||||||
|
;
|
||||||
}
|
}
|
||||||
|
|
|
@ -26,7 +26,11 @@ pkgs.runCommandNoCC "nixpkgs-lib-tests" {
|
||||||
nix-store --init
|
nix-store --init
|
||||||
|
|
||||||
cp -r ${../.} lib
|
cp -r ${../.} lib
|
||||||
|
echo "Running lib/tests/modules.sh"
|
||||||
bash lib/tests/modules.sh
|
bash lib/tests/modules.sh
|
||||||
|
|
||||||
|
echo "Running lib/tests/sources.sh"
|
||||||
|
TEST_LIB=$PWD/lib bash lib/tests/sources.sh
|
||||||
|
|
||||||
touch $out
|
touch $out
|
||||||
''
|
''
|
||||||
|
|
59
lib/tests/sources.sh
Executable file
59
lib/tests/sources.sh
Executable file
|
@ -0,0 +1,59 @@
|
||||||
|
#!/usr/bin/env bash
|
||||||
|
set -euo pipefail
|
||||||
|
|
||||||
|
# Use
|
||||||
|
# || die
|
||||||
|
die() {
|
||||||
|
echo >&2 "test case failed: " "$@"
|
||||||
|
exit 1
|
||||||
|
}
|
||||||
|
|
||||||
|
if test -n "${TEST_LIB:-}"; then
|
||||||
|
export NIX_PATH=nixpkgs="$(dirname "$TEST_LIB")"
|
||||||
|
else
|
||||||
|
export NIX_PATH=nixpkgs="$(cd $(dirname ${BASH_SOURCE[0]})/../..; pwd)"
|
||||||
|
fi
|
||||||
|
|
||||||
|
work="$(mktemp -d)"
|
||||||
|
clean_up() {
|
||||||
|
rm -rf "$work"
|
||||||
|
}
|
||||||
|
trap clean_up EXIT
|
||||||
|
cd $work
|
||||||
|
|
||||||
|
touch {README.md,module.o,foo.bar}
|
||||||
|
|
||||||
|
# nix-instantiate doesn't write out the source, only computing the hash, so
|
||||||
|
# this uses the experimental nix command instead.
|
||||||
|
|
||||||
|
dir="$(nix eval --raw '(with import <nixpkgs/lib>; "${
|
||||||
|
cleanSource ./.
|
||||||
|
}")')"
|
||||||
|
(cd $dir; find) | sort -f | diff -U10 - <(cat <<EOF
|
||||||
|
.
|
||||||
|
./foo.bar
|
||||||
|
./README.md
|
||||||
|
EOF
|
||||||
|
) || die "cleanSource 1"
|
||||||
|
|
||||||
|
|
||||||
|
dir="$(nix eval --raw '(with import <nixpkgs/lib>; "${
|
||||||
|
cleanSourceWith { src = '"$work"'; filter = path: type: ! hasSuffix ".bar" path; }
|
||||||
|
}")')"
|
||||||
|
(cd $dir; find) | sort -f | diff -U10 - <(cat <<EOF
|
||||||
|
.
|
||||||
|
./module.o
|
||||||
|
./README.md
|
||||||
|
EOF
|
||||||
|
) || die "cleanSourceWith 1"
|
||||||
|
|
||||||
|
dir="$(nix eval --raw '(with import <nixpkgs/lib>; "${
|
||||||
|
cleanSourceWith { src = cleanSource '"$work"'; filter = path: type: ! hasSuffix ".bar" path; }
|
||||||
|
}")')"
|
||||||
|
(cd $dir; find) | sort -f | diff -U10 - <(cat <<EOF
|
||||||
|
.
|
||||||
|
./README.md
|
||||||
|
EOF
|
||||||
|
) || die "cleanSourceWith + cleanSource"
|
||||||
|
|
||||||
|
echo >&2 tests ok
|
|
@ -5,8 +5,7 @@ with lib;
|
||||||
{
|
{
|
||||||
options = {
|
options = {
|
||||||
programs.appgate-sdp = {
|
programs.appgate-sdp = {
|
||||||
enable = mkEnableOption
|
enable = mkEnableOption "AppGate SDP VPN client";
|
||||||
"AppGate SDP VPN client";
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -18,6 +17,9 @@ with lib;
|
||||||
packages = [ pkgs.appgate-sdp ];
|
packages = [ pkgs.appgate-sdp ];
|
||||||
# https://github.com/NixOS/nixpkgs/issues/81138
|
# https://github.com/NixOS/nixpkgs/issues/81138
|
||||||
services.appgatedriver.wantedBy = [ "multi-user.target" ];
|
services.appgatedriver.wantedBy = [ "multi-user.target" ];
|
||||||
|
services.appgate-dumb-resolver.path = [ pkgs.e2fsprogs ];
|
||||||
|
services.appgate-resolver.path = [ pkgs.procps pkgs.e2fsprogs ];
|
||||||
|
services.appgatedriver.path = [ pkgs.e2fsprogs ];
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
|
@ -5,13 +5,13 @@
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
pname = "lsp-plugins";
|
pname = "lsp-plugins";
|
||||||
version = "1.1.26";
|
version = "1.1.30";
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "sadko4u";
|
owner = "sadko4u";
|
||||||
repo = pname;
|
repo = pname;
|
||||||
rev = "${pname}-${version}";
|
rev = version;
|
||||||
sha256 = "1apw8zh3a3il4smkjji6bih4vbsymj0hjs10fgkrd4nazqkjvgyd";
|
sha256 = "0g0nx05dyjwz2149v3pj6sa9divr26jyqvg2kk1qk48s2n4najkz";
|
||||||
};
|
};
|
||||||
|
|
||||||
nativeBuildInputs = [ pkg-config php makeWrapper ];
|
nativeBuildInputs = [ pkg-config php makeWrapper ];
|
||||||
|
@ -36,6 +36,8 @@ stdenv.mkDerivation rec {
|
||||||
|
|
||||||
buildFlags = [ "release" ];
|
buildFlags = [ "release" ];
|
||||||
|
|
||||||
|
enableParallelBuilding = true;
|
||||||
|
|
||||||
meta = with lib;
|
meta = with lib;
|
||||||
{ description = "Collection of open-source audio plugins";
|
{ description = "Collection of open-source audio plugins";
|
||||||
longDescription = ''
|
longDescription = ''
|
||||||
|
@ -84,6 +86,8 @@ stdenv.mkDerivation rec {
|
||||||
- Compressor MidSide - Kompressor MidSide
|
- Compressor MidSide - Kompressor MidSide
|
||||||
- Compressor Mono - Kompressor Mono
|
- Compressor Mono - Kompressor Mono
|
||||||
- Compressor Stereo - Kompressor Stereo
|
- Compressor Stereo - Kompressor Stereo
|
||||||
|
- Artistic Delay Mono - Künstlerische Verzögerung
|
||||||
|
- Artistic Delay Stereo - Künstlerische Verzögerung
|
||||||
- Latency Meter - Latenzmessgerät
|
- Latency Meter - Latenzmessgerät
|
||||||
- Loudness Compensator Mono - Lautstärke Kompensator Mono
|
- Loudness Compensator Mono - Lautstärke Kompensator Mono
|
||||||
- Loudness Compensator Stereo - Lautstärke Kompensator Stereo
|
- Loudness Compensator Stereo - Lautstärke Kompensator Stereo
|
||||||
|
@ -99,6 +103,9 @@ stdenv.mkDerivation rec {
|
||||||
- Multiband Compressor MidSide x8 - Multi-band Kompressor MidSide x8
|
- Multiband Compressor MidSide x8 - Multi-band Kompressor MidSide x8
|
||||||
- Multiband Compressor Mono x8 - Multi-band Kompressor Mono x8
|
- Multiband Compressor Mono x8 - Multi-band Kompressor Mono x8
|
||||||
- Multiband Compressor Stereo x8 - Multi-band Kompressor Stereo x8
|
- Multiband Compressor Stereo x8 - Multi-band Kompressor Stereo x8
|
||||||
|
- Oscilloscope x1 - Oscilloscope x1
|
||||||
|
- Oscilloscope x2 - Oscilloscope x2
|
||||||
|
- Oscilloscope x4 - Oscilloscope x4
|
||||||
- Oscillator Mono - Oszillator Mono
|
- Oscillator Mono - Oszillator Mono
|
||||||
- Parametric Equalizer x16 LeftRight - Parametrischer Entzerrer x16 LeftRight
|
- Parametric Equalizer x16 LeftRight - Parametrischer Entzerrer x16 LeftRight
|
||||||
- Parametric Equalizer x16 MidSide - Parametrischer Entzerrer x16 MidSide
|
- Parametric Equalizer x16 MidSide - Parametrischer Entzerrer x16 MidSide
|
||||||
|
|
|
@ -16,6 +16,7 @@
|
||||||
, makeFontsConf
|
, makeFontsConf
|
||||||
, libglvnd
|
, libglvnd
|
||||||
, libxkbcommon
|
, libxkbcommon
|
||||||
|
, wayland
|
||||||
, xorg
|
, xorg
|
||||||
}:
|
}:
|
||||||
rustPlatform.buildRustPackage rec {
|
rustPlatform.buildRustPackage rec {
|
||||||
|
@ -86,7 +87,7 @@ rustPlatform.buildRustPackage rec {
|
||||||
|
|
||||||
postFixup = ''
|
postFixup = ''
|
||||||
wrapProgram $out/bin/neovide \
|
wrapProgram $out/bin/neovide \
|
||||||
--prefix LD_LIBRARY_PATH : ${lib.makeLibraryPath [ libglvnd libxkbcommon xorg.libXcursor xorg.libXext xorg.libXrandr xorg.libXi ]}
|
--prefix LD_LIBRARY_PATH : ${lib.makeLibraryPath [ libglvnd libxkbcommon wayland xorg.libXcursor xorg.libXext xorg.libXrandr xorg.libXi ]}
|
||||||
'';
|
'';
|
||||||
|
|
||||||
postInstall = ''
|
postInstall = ''
|
||||||
|
|
|
@ -2,15 +2,13 @@
|
||||||
, at-spi2-atk
|
, at-spi2-atk
|
||||||
, at-spi2-core
|
, at-spi2-core
|
||||||
, atk
|
, atk
|
||||||
, bash
|
, autoPatchelfHook
|
||||||
, cairo
|
, cairo
|
||||||
, coreutils
|
|
||||||
, cups
|
, cups
|
||||||
, curl
|
, curl
|
||||||
, dbus
|
, dbus
|
||||||
, dnsmasq
|
, dnsmasq
|
||||||
, dpkg
|
, dpkg
|
||||||
, e2fsprogs
|
|
||||||
, expat
|
, expat
|
||||||
, fetchurl
|
, fetchurl
|
||||||
, gdk-pixbuf
|
, gdk-pixbuf
|
||||||
|
@ -20,25 +18,14 @@
|
||||||
, iproute2
|
, iproute2
|
||||||
, krb5
|
, krb5
|
||||||
, lib
|
, lib
|
||||||
, mesa
|
|
||||||
, libdrm
|
, libdrm
|
||||||
, libX11
|
|
||||||
, libXScrnSaver
|
|
||||||
, libXcomposite
|
|
||||||
, libXcursor
|
|
||||||
, libXdamage
|
|
||||||
, libXext
|
|
||||||
, libXfixes
|
|
||||||
, libXi
|
|
||||||
, libXrandr
|
|
||||||
, libXrender
|
|
||||||
, libXtst
|
|
||||||
, libxkbcommon
|
|
||||||
, libsecret
|
, libsecret
|
||||||
, libuuid
|
, libuuid
|
||||||
, libxcb
|
, libxcb
|
||||||
|
, libxkbcommon
|
||||||
, lttng-ust
|
, lttng-ust
|
||||||
, makeWrapper
|
, makeWrapper
|
||||||
|
, mesa
|
||||||
, networkmanager
|
, networkmanager
|
||||||
, nspr
|
, nspr
|
||||||
, nss
|
, nss
|
||||||
|
@ -50,6 +37,7 @@
|
||||||
, stdenv
|
, stdenv
|
||||||
, systemd
|
, systemd
|
||||||
, xdg-utils
|
, xdg-utils
|
||||||
|
, xorg
|
||||||
, zlib
|
, zlib
|
||||||
}:
|
}:
|
||||||
with lib;
|
with lib;
|
||||||
|
@ -69,46 +57,48 @@ let
|
||||||
gtk3
|
gtk3
|
||||||
icu
|
icu
|
||||||
krb5
|
krb5
|
||||||
mesa
|
|
||||||
libdrm
|
libdrm
|
||||||
libX11
|
|
||||||
libXScrnSaver
|
|
||||||
libXcomposite
|
|
||||||
libXcursor
|
|
||||||
libXdamage
|
|
||||||
libXext
|
|
||||||
libXfixes
|
|
||||||
libXi
|
|
||||||
libXrandr
|
|
||||||
libXrender
|
|
||||||
libXtst
|
|
||||||
libxkbcommon
|
|
||||||
libsecret
|
libsecret
|
||||||
libuuid
|
libuuid
|
||||||
libxcb
|
libxcb
|
||||||
|
libxkbcommon
|
||||||
lttng-ust
|
lttng-ust
|
||||||
|
mesa
|
||||||
nspr
|
nspr
|
||||||
nss
|
nss
|
||||||
openssl
|
openssl
|
||||||
pango
|
pango
|
||||||
stdenv.cc.cc
|
stdenv.cc.cc
|
||||||
systemd
|
systemd
|
||||||
|
xorg.libX11
|
||||||
|
xorg.libXScrnSaver
|
||||||
|
xorg.libXcomposite
|
||||||
|
xorg.libXcursor
|
||||||
|
xorg.libXdamage
|
||||||
|
xorg.libXext
|
||||||
|
xorg.libXfixes
|
||||||
|
xorg.libXi
|
||||||
|
xorg.libXrandr
|
||||||
|
xorg.libXrender
|
||||||
|
xorg.libXtst
|
||||||
|
xorg.libxkbfile
|
||||||
|
xorg.libxshmfence
|
||||||
zlib
|
zlib
|
||||||
];
|
];
|
||||||
rpath = lib.makeLibraryPath deps;
|
|
||||||
in
|
in
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
pname = "appgate-sdp";
|
pname = "appgate-sdp";
|
||||||
version = "5.4.2";
|
version = "5.4.2";
|
||||||
|
|
||||||
src = fetchurl {
|
src = fetchurl {
|
||||||
url = "https://bin.appgate-sdp.com/${lib.versions.majorMinor version}/client/appgate-sdp_${version}_amd64.deb";
|
url = "https://bin.appgate-sdp.com/${versions.majorMinor version}/client/appgate-sdp_${version}_amd64.deb";
|
||||||
sha256 = "sha256-wAhcTRO/Cd4MG1lfPNDq92yGcu3NOfymucddy92VaXo=";
|
sha256 = "sha256-wAhcTRO/Cd4MG1lfPNDq92yGcu3NOfymucddy92VaXo=";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
# just patch interpreter
|
||||||
|
autoPatchelfIgnoreMissingDeps = true;
|
||||||
dontConfigure = true;
|
dontConfigure = true;
|
||||||
dontBuild = true;
|
dontBuild = true;
|
||||||
enableParallelBuilding = true;
|
|
||||||
|
|
||||||
buildInputs = [
|
buildInputs = [
|
||||||
python37
|
python37
|
||||||
|
@ -116,6 +106,7 @@ stdenv.mkDerivation rec {
|
||||||
];
|
];
|
||||||
|
|
||||||
nativeBuildInputs = [
|
nativeBuildInputs = [
|
||||||
|
autoPatchelfHook
|
||||||
makeWrapper
|
makeWrapper
|
||||||
dpkg
|
dpkg
|
||||||
];
|
];
|
||||||
|
@ -125,62 +116,39 @@ stdenv.mkDerivation rec {
|
||||||
'';
|
'';
|
||||||
|
|
||||||
installPhase = ''
|
installPhase = ''
|
||||||
mkdir -p $out/bin
|
|
||||||
ln -s "$out/opt/appgate/appgate" "$out/bin/appgate"
|
|
||||||
cp -r $out/usr/share $out/share
|
cp -r $out/usr/share $out/share
|
||||||
|
|
||||||
for file in $out/opt/appgate/linux/appgate-resolver.pre \
|
substituteInPlace $out/lib/systemd/system/appgate-dumb-resolver.service \
|
||||||
$out/opt/appgate/linux/appgate-dumb-resolver.pre
|
--replace "/opt/" "$out/opt/"
|
||||||
do
|
|
||||||
substituteInPlace $file \
|
|
||||||
--replace "/bin/sh" "${bash}/bin/sh" \
|
|
||||||
--replace "cat" "${coreutils}/bin/cat" \
|
|
||||||
--replace "chattr" "${e2fsprogs}/bin/chattr" \
|
|
||||||
--replace "mv " "${coreutils}/bin/mv " \
|
|
||||||
--replace "pkill" "${procps}/bin/pkill"
|
|
||||||
done
|
|
||||||
|
|
||||||
for file in $out/lib/systemd/system/appgatedriver.service \
|
|
||||||
$out/lib/systemd/system/appgate-dumb-resolver.service \
|
|
||||||
$out/lib/systemd/system/appgate-resolver.service
|
|
||||||
do
|
|
||||||
substituteInPlace $file \
|
|
||||||
--replace "/bin/sh" "${bash}/bin/sh" \
|
|
||||||
--replace "/opt/" "$out/opt/" \
|
|
||||||
--replace "chattr" "${e2fsprogs}/bin/chattr" \
|
|
||||||
--replace "mv " "${coreutils}/bin/mv "
|
|
||||||
done
|
|
||||||
|
|
||||||
substituteInPlace $out/lib/systemd/system/appgatedriver.service \
|
substituteInPlace $out/lib/systemd/system/appgatedriver.service \
|
||||||
|
--replace "/opt/" "$out/opt/" \
|
||||||
--replace "InaccessiblePaths=/mnt /srv /boot /media" "InaccessiblePaths=-/mnt -/srv -/boot -/media"
|
--replace "InaccessiblePaths=/mnt /srv /boot /media" "InaccessiblePaths=-/mnt -/srv -/boot -/media"
|
||||||
|
|
||||||
substituteInPlace $out/lib/systemd/system/appgate-resolver.service \
|
substituteInPlace $out/lib/systemd/system/appgate-resolver.service \
|
||||||
|
--replace "/usr/sbin/dnsmasq" "${dnsmasq}/bin/dnsmasq" \
|
||||||
|
--replace "/opt/" "$out/opt/"
|
||||||
|
|
||||||
|
substituteInPlace $out/opt/appgate/linux/nm.py \
|
||||||
--replace "/usr/sbin/dnsmasq" "${dnsmasq}/bin/dnsmasq"
|
--replace "/usr/sbin/dnsmasq" "${dnsmasq}/bin/dnsmasq"
|
||||||
|
|
||||||
substituteInPlace $out/opt/appgate/linux/nm.py --replace "/usr/sbin/dnsmasq" "${dnsmasq}/bin/dnsmasq"
|
substituteInPlace $out/opt/appgate/linux/set_dns \
|
||||||
substituteInPlace $out/opt/appgate/linux/set_dns --replace "/etc/appgate.conf" "$out/etc/appgate.conf"
|
--replace "/etc/appgate.conf" "$out/etc/appgate.conf"
|
||||||
|
|
||||||
'';
|
wrapProgram $out/opt/appgate/service/createdump \
|
||||||
|
--set LD_LIBRARY_PATH "${makeLibraryPath [ stdenv.cc.cc ]}"
|
||||||
|
|
||||||
postFixup = ''
|
wrapProgram $out/opt/appgate/appgate-driver \
|
||||||
find $out -type f -name "*.so" -exec patchelf --set-rpath '$ORIGIN:${rpath}' {} \;
|
--prefix PATH : ${makeBinPath [ iproute2 networkmanager dnsmasq ]} \
|
||||||
for binary in $out/opt/appgate/appgate-driver \
|
--set LD_LIBRARY_PATH $out/opt/appgate/service
|
||||||
$out/opt/appgate/appgate \
|
|
||||||
$out/opt/appgate/service/createdump \
|
|
||||||
$out/opt/appgate/service/appgateservice.bin
|
|
||||||
do
|
|
||||||
patchelf --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" --set-rpath "$ORIGIN:$out/opt/appgate/service/:$out/opt/appgate/:${rpath}" $binary
|
|
||||||
done
|
|
||||||
|
|
||||||
# fail if there are missing dependencies
|
makeWrapper $out/opt/appgate/Appgate $out/bin/appgate \
|
||||||
ldd $out/opt/appgate/appgate | grep -i 'not found' && exit 1
|
--prefix PATH : ${makeBinPath [ xdg-utils ]} \
|
||||||
ldd $out/opt/appgate/service/appgateservice.bin | grep -i 'not found' && exit 1
|
--set LD_LIBRARY_PATH $out/opt/appgate:${makeLibraryPath deps}
|
||||||
ldd $out/opt/appgate/appgate-driver | grep -i 'not found' && exit 1
|
|
||||||
|
|
||||||
wrapProgram $out/opt/appgate/appgate-driver --prefix PATH : ${lib.makeBinPath [ iproute2 networkmanager dnsmasq ]}
|
|
||||||
wrapProgram $out/opt/appgate/linux/set_dns --set PYTHONPATH $PYTHONPATH
|
wrapProgram $out/opt/appgate/linux/set_dns --set PYTHONPATH $PYTHONPATH
|
||||||
wrapProgram $out/bin/appgate --prefix PATH : ${lib.makeBinPath [ xdg-utils ]}
|
|
||||||
'';
|
'';
|
||||||
|
|
||||||
meta = with lib; {
|
meta = with lib; {
|
||||||
description = "Appgate SDP (Software Defined Perimeter) desktop client";
|
description = "Appgate SDP (Software Defined Perimeter) desktop client";
|
||||||
homepage = "https://www.appgate.com/support/software-defined-perimeter-support";
|
homepage = "https://www.appgate.com/support/software-defined-perimeter-support";
|
||||||
|
@ -189,3 +157,4 @@ stdenv.mkDerivation rec {
|
||||||
maintainers = with maintainers; [ ymatsiuk ];
|
maintainers = with maintainers; [ ymatsiuk ];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -12,7 +12,7 @@
|
||||||
|
|
||||||
buildPythonPackage rec {
|
buildPythonPackage rec {
|
||||||
pname = "pytibber";
|
pname = "pytibber";
|
||||||
version = "0.17.1";
|
version = "0.18.0";
|
||||||
|
|
||||||
disabled = pythonOlder "3.7";
|
disabled = pythonOlder "3.7";
|
||||||
|
|
||||||
|
@ -20,7 +20,7 @@ buildPythonPackage rec {
|
||||||
owner = "Danielhiversen";
|
owner = "Danielhiversen";
|
||||||
repo = "pyTibber";
|
repo = "pyTibber";
|
||||||
rev = version;
|
rev = version;
|
||||||
sha256 = "1zda9cvg6hy0n7sr2z71lkyl93n1gnzxrvf56lhz13pcsffshhdk";
|
sha256 = "sha256-612BBDgVcdpOsEl2Hc+oCDFmSPGjHvfmVr7i7zdfB/o=";
|
||||||
};
|
};
|
||||||
|
|
||||||
propagatedBuildInputs = [
|
propagatedBuildInputs = [
|
||||||
|
|
|
@ -8,13 +8,13 @@ else
|
||||||
|
|
||||||
buildDunePackage rec {
|
buildDunePackage rec {
|
||||||
pname = "utop";
|
pname = "utop";
|
||||||
version = "2.7.0";
|
version = "2.8.0";
|
||||||
|
|
||||||
useDune2 = true;
|
useDune2 = true;
|
||||||
|
|
||||||
src = fetchurl {
|
src = fetchurl {
|
||||||
url = "https://github.com/ocaml-community/utop/releases/download/${version}/utop-${version}.tbz";
|
url = "https://github.com/ocaml-community/utop/releases/download/${version}/utop-${version}.tbz";
|
||||||
sha256 = "sha256-4GisU98mfDzA8vabvCBEBPA2LMTmRyofxUfjJqY8P90=";
|
sha256 = "0mi571ifjzq4wcjarn8q1b7yl8nxjm1jfx3afac224lqwn6bhb2d";
|
||||||
};
|
};
|
||||||
|
|
||||||
nativeBuildInputs = [ makeWrapper ];
|
nativeBuildInputs = [ makeWrapper ];
|
||||||
|
|
|
@ -3,16 +3,16 @@
|
||||||
let
|
let
|
||||||
versions = {
|
versions = {
|
||||||
matomo = {
|
matomo = {
|
||||||
version = "4.2.1";
|
version = "4.3.1";
|
||||||
sha256 = "d3ea7572c5b42f2636da89b9c15dd7ae16da1d06dab0cea2ed93304a960277ac";
|
sha256 = "Ve4P1cVV/uZ59BcQaUZLTTOwpjX7veof9jR0l3Y9xOQ=";
|
||||||
};
|
};
|
||||||
|
|
||||||
matomo-beta = {
|
matomo-beta = {
|
||||||
version = "4.2.1";
|
version = "4.3.1";
|
||||||
# `beta` examples: "b1", "rc1", null
|
# `beta` examples: "b1", "rc1", null
|
||||||
# TOOD when updating: use null if stable version is >= latest beta or release candidate
|
# TOOD when updating: use null if stable version is >= latest beta or release candidate
|
||||||
beta = null;
|
beta = null;
|
||||||
sha256 = "d3ea7572c5b42f2636da89b9c15dd7ae16da1d06dab0cea2ed93304a960277ac";
|
sha256 = "Ve4P1cVV/uZ59BcQaUZLTTOwpjX7veof9jR0l3Y9xOQ=";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
common = pname: { version, sha256, beta ? null }:
|
common = pname: { version, sha256, beta ? null }:
|
||||||
|
|
|
@ -12,13 +12,13 @@ let
|
||||||
in
|
in
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
pname = "nix-direnv";
|
pname = "nix-direnv";
|
||||||
version = "1.2.6";
|
version = "1.4.0";
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "nix-community";
|
owner = "nix-community";
|
||||||
repo = "nix-direnv";
|
repo = "nix-direnv";
|
||||||
rev = version;
|
rev = version;
|
||||||
sha256 = "sha256-0dCIHgoyNgpxbrPDv26oLdU+npcIgpCQdpX4HzS0vN0=";
|
sha256 = "sha256-BKiuYvxgY2P7GK59jul5l0kHNrJtD2jmsMGmX0+09hY=";
|
||||||
};
|
};
|
||||||
|
|
||||||
# Substitute instead of wrapping because the resulting file is
|
# Substitute instead of wrapping because the resulting file is
|
||||||
|
|
Loading…
Reference in a new issue