Merge staging-next into staging
This commit is contained in:
commit
dc058faf6b
58 changed files with 1057 additions and 167 deletions
|
@ -3,7 +3,7 @@
|
|||
{ lib }:
|
||||
let
|
||||
inherit (lib.strings) toInt;
|
||||
inherit (lib.trivial) compare min;
|
||||
inherit (lib.trivial) compare min id;
|
||||
inherit (lib.attrsets) mapAttrs;
|
||||
in
|
||||
rec {
|
||||
|
@ -180,18 +180,18 @@ rec {
|
|||
else if len != 1 then multiple
|
||||
else head found;
|
||||
|
||||
/* Find the first element in the list matching the specified
|
||||
/* Find the first index in the list matching the specified
|
||||
predicate or return `default` if no such element exists.
|
||||
|
||||
Type: findFirst :: (a -> bool) -> a -> [a] -> a
|
||||
Type: findFirstIndex :: (a -> Bool) -> b -> [a] -> (Int | b)
|
||||
|
||||
Example:
|
||||
findFirst (x: x > 3) 7 [ 1 6 4 ]
|
||||
=> 6
|
||||
findFirst (x: x > 9) 7 [ 1 6 4 ]
|
||||
=> 7
|
||||
findFirstIndex (x: x > 3) null [ 0 6 4 ]
|
||||
=> 1
|
||||
findFirstIndex (x: x > 9) null [ 0 6 4 ]
|
||||
=> null
|
||||
*/
|
||||
findFirst =
|
||||
findFirstIndex =
|
||||
# Predicate
|
||||
pred:
|
||||
# Default value to return
|
||||
|
@ -229,7 +229,33 @@ rec {
|
|||
if resultIndex < 0 then
|
||||
default
|
||||
else
|
||||
elemAt list resultIndex;
|
||||
resultIndex;
|
||||
|
||||
/* Find the first element in the list matching the specified
|
||||
predicate or return `default` if no such element exists.
|
||||
|
||||
Type: findFirst :: (a -> bool) -> a -> [a] -> a
|
||||
|
||||
Example:
|
||||
findFirst (x: x > 3) 7 [ 1 6 4 ]
|
||||
=> 6
|
||||
findFirst (x: x > 9) 7 [ 1 6 4 ]
|
||||
=> 7
|
||||
*/
|
||||
findFirst =
|
||||
# Predicate
|
||||
pred:
|
||||
# Default value to return
|
||||
default:
|
||||
# Input list
|
||||
list:
|
||||
let
|
||||
index = findFirstIndex pred null list;
|
||||
in
|
||||
if index == null then
|
||||
default
|
||||
else
|
||||
elemAt list index;
|
||||
|
||||
/* Return true if function `pred` returns true for at least one
|
||||
element of `list`.
|
||||
|
@ -637,6 +663,32 @@ rec {
|
|||
else if start + count > len then len - start
|
||||
else count);
|
||||
|
||||
/* The common prefix of two lists.
|
||||
|
||||
Type: commonPrefix :: [a] -> [a] -> [a]
|
||||
|
||||
Example:
|
||||
commonPrefix [ 1 2 3 4 5 6 ] [ 1 2 4 8 ]
|
||||
=> [ 1 2 ]
|
||||
commonPrefix [ 1 2 3 ] [ 1 2 3 4 5 ]
|
||||
=> [ 1 2 3 ]
|
||||
commonPrefix [ 1 2 3 ] [ 4 5 6 ]
|
||||
=> [ ]
|
||||
*/
|
||||
commonPrefix =
|
||||
list1:
|
||||
list2:
|
||||
let
|
||||
# Zip the lists together into a list of booleans whether each element matches
|
||||
matchings = zipListsWith (fst: snd: fst != snd) list1 list2;
|
||||
# Find the first index where the elements don't match,
|
||||
# which will then also be the length of the common prefix.
|
||||
# If all elements match, we fall back to the length of the zipped list,
|
||||
# which is the same as the length of the smaller list.
|
||||
commonPrefixLength = findFirstIndex id (length matchings) matchings;
|
||||
in
|
||||
take commonPrefixLength list1;
|
||||
|
||||
/* Return the last element of a list.
|
||||
|
||||
This function throws an error if the list is empty.
|
||||
|
|
|
@ -500,6 +500,39 @@ runTests {
|
|||
expected = { a = [ 2 3 ]; b = [7]; c = [8];};
|
||||
};
|
||||
|
||||
testListCommonPrefixExample1 = {
|
||||
expr = lists.commonPrefix [ 1 2 3 4 5 6 ] [ 1 2 4 8 ];
|
||||
expected = [ 1 2 ];
|
||||
};
|
||||
testListCommonPrefixExample2 = {
|
||||
expr = lists.commonPrefix [ 1 2 3 ] [ 1 2 3 4 5 ];
|
||||
expected = [ 1 2 3 ];
|
||||
};
|
||||
testListCommonPrefixExample3 = {
|
||||
expr = lists.commonPrefix [ 1 2 3 ] [ 4 5 6 ];
|
||||
expected = [ ];
|
||||
};
|
||||
testListCommonPrefixEmpty = {
|
||||
expr = lists.commonPrefix [ ] [ 1 2 3 ];
|
||||
expected = [ ];
|
||||
};
|
||||
testListCommonPrefixSame = {
|
||||
expr = lists.commonPrefix [ 1 2 3 ] [ 1 2 3 ];
|
||||
expected = [ 1 2 3 ];
|
||||
};
|
||||
testListCommonPrefixLazy = {
|
||||
expr = lists.commonPrefix [ 1 ] [ 1 (abort "lib.lists.commonPrefix shouldn't evaluate this")];
|
||||
expected = [ 1 ];
|
||||
};
|
||||
# This would stack overflow if `commonPrefix` were implemented using recursion
|
||||
testListCommonPrefixLong =
|
||||
let
|
||||
longList = genList (n: n) 100000;
|
||||
in {
|
||||
expr = lists.commonPrefix longList longList;
|
||||
expected = longList;
|
||||
};
|
||||
|
||||
testSort = {
|
||||
expr = sort builtins.lessThan [ 40 2 30 42 ];
|
||||
expected = [2 30 40 42];
|
||||
|
@ -530,45 +563,55 @@ runTests {
|
|||
expected = false;
|
||||
};
|
||||
|
||||
testFindFirstExample1 = {
|
||||
expr = findFirst (x: x > 3) 7 [ 1 6 4 ];
|
||||
expected = 6;
|
||||
testFindFirstIndexExample1 = {
|
||||
expr = lists.findFirstIndex (x: x > 3) (abort "index found, so a default must not be evaluated") [ 1 6 4 ];
|
||||
expected = 1;
|
||||
};
|
||||
|
||||
testFindFirstExample2 = {
|
||||
expr = findFirst (x: x > 9) 7 [ 1 6 4 ];
|
||||
expected = 7;
|
||||
testFindFirstIndexExample2 = {
|
||||
expr = lists.findFirstIndex (x: x > 9) "a very specific default" [ 1 6 4 ];
|
||||
expected = "a very specific default";
|
||||
};
|
||||
|
||||
testFindFirstEmpty = {
|
||||
expr = findFirst (abort "when the list is empty, the predicate is not needed") null [];
|
||||
testFindFirstIndexEmpty = {
|
||||
expr = lists.findFirstIndex (abort "when the list is empty, the predicate is not needed") null [];
|
||||
expected = null;
|
||||
};
|
||||
|
||||
testFindFirstSingleMatch = {
|
||||
expr = findFirst (x: x == 5) null [ 5 ];
|
||||
expected = 5;
|
||||
testFindFirstIndexSingleMatch = {
|
||||
expr = lists.findFirstIndex (x: x == 5) null [ 5 ];
|
||||
expected = 0;
|
||||
};
|
||||
|
||||
testFindFirstSingleDefault = {
|
||||
expr = findFirst (x: false) null [ (abort "if the predicate doesn't access the value, it must not be evaluated") ];
|
||||
testFindFirstIndexSingleDefault = {
|
||||
expr = lists.findFirstIndex (x: false) null [ (abort "if the predicate doesn't access the value, it must not be evaluated") ];
|
||||
expected = null;
|
||||
};
|
||||
|
||||
testFindFirstNone = {
|
||||
expr = builtins.tryEval (findFirst (x: x == 2) null [ 1 (throw "the last element must be evaluated when there's no match") ]);
|
||||
testFindFirstIndexNone = {
|
||||
expr = builtins.tryEval (lists.findFirstIndex (x: x == 2) null [ 1 (throw "the last element must be evaluated when there's no match") ]);
|
||||
expected = { success = false; value = false; };
|
||||
};
|
||||
|
||||
# Makes sure that the implementation doesn't cause a stack overflow
|
||||
testFindFirstBig = {
|
||||
expr = findFirst (x: x == 1000000) null (range 0 1000000);
|
||||
testFindFirstIndexBig = {
|
||||
expr = lists.findFirstIndex (x: x == 1000000) null (range 0 1000000);
|
||||
expected = 1000000;
|
||||
};
|
||||
|
||||
testFindFirstLazy = {
|
||||
expr = findFirst (x: x == 1) 7 [ 1 (abort "list elements after the match must not be evaluated") ];
|
||||
expected = 1;
|
||||
testFindFirstIndexLazy = {
|
||||
expr = lists.findFirstIndex (x: x == 1) null [ 1 (abort "list elements after the match must not be evaluated") ];
|
||||
expected = 0;
|
||||
};
|
||||
|
||||
testFindFirstExample1 = {
|
||||
expr = lists.findFirst (x: x > 3) 7 [ 1 6 4 ];
|
||||
expected = 6;
|
||||
};
|
||||
|
||||
testFindFirstExample2 = {
|
||||
expr = lists.findFirst (x: x > 9) 7 [ 1 6 4 ];
|
||||
expected = 7;
|
||||
};
|
||||
|
||||
# ATTRSETS
|
||||
|
|
|
@ -34,6 +34,7 @@
|
|||
|
||||
- [ebusd](https://ebusd.eu), a daemon for handling communication with eBUS devices connected to a 2-wire bus system (“energy bus” used by numerous heating systems). Available as [services.ebusd](#opt-services.ebusd.enable).
|
||||
|
||||
- [systemd-sysupdate](https://www.freedesktop.org/software/systemd/man/systemd-sysupdate.html), atomically updates the host OS, container images, portable service images or other sources. Available as [systemd.sysupdate](opt-systemd.sysupdate).
|
||||
|
||||
## Backward Incompatibilities {#sec-release-23.11-incompatibilities}
|
||||
|
||||
|
@ -141,6 +142,8 @@ The module update takes care of the new config syntax and the data itself (user
|
|||
|
||||
- `programs.gnupg.agent.pinentryFlavor` is now set in `/etc/gnupg/gpg-agent.conf`, and will no longer take precedence over a `pinentry-program` set in `~/.gnupg/gpg-agent.conf`.
|
||||
|
||||
- `wrapHelm` now exposes `passthru.pluginsDir` which can be passed to `helmfile`. For convenience, a top-level package `helmfile-wrapped` has been added, which inherits `passthru.pluginsDir` from `kubernetes-helm-wrapped`. See [#217768](https://github.com/NixOS/nixpkgs/issues/217768) for details.
|
||||
|
||||
## Nixpkgs internals {#sec-release-23.11-nixpkgs-internals}
|
||||
|
||||
- The `qemu-vm.nix` module by default now identifies block devices via
|
||||
|
|
|
@ -1398,6 +1398,7 @@
|
|||
./system/boot/systemd/oomd.nix
|
||||
./system/boot/systemd/repart.nix
|
||||
./system/boot/systemd/shutdown.nix
|
||||
./system/boot/systemd/sysupdate.nix
|
||||
./system/boot/systemd/tmpfiles.nix
|
||||
./system/boot/systemd/user.nix
|
||||
./system/boot/systemd/userdbd.nix
|
||||
|
|
|
@ -176,7 +176,7 @@ in
|
|||
description = lib.mdDoc ''
|
||||
Extra paperless config options.
|
||||
|
||||
See [the documentation](https://paperless-ngx.readthedocs.io/en/latest/configuration.html)
|
||||
See [the documentation](https://docs.paperless-ngx.com/configuration/)
|
||||
for available options.
|
||||
|
||||
Note that some options such as `PAPERLESS_CONSUMER_IGNORE_PATTERN` expect JSON values. Use `builtins.toJSON` to ensure proper quoting.
|
||||
|
|
142
nixos/modules/system/boot/systemd/sysupdate.nix
Normal file
142
nixos/modules/system/boot/systemd/sysupdate.nix
Normal file
|
@ -0,0 +1,142 @@
|
|||
{ config, lib, pkgs, utils, ... }:
|
||||
|
||||
let
|
||||
cfg = config.systemd.sysupdate;
|
||||
|
||||
format = pkgs.formats.ini { };
|
||||
|
||||
listOfDefinitions = lib.mapAttrsToList
|
||||
(name: format.generate "${name}.conf")
|
||||
(lib.filterAttrs (k: _: !(lib.hasPrefix "_" k)) cfg.transfers);
|
||||
|
||||
definitionsDirectory = pkgs.runCommand "sysupdate.d" { } ''
|
||||
mkdir -p $out
|
||||
${(lib.concatStringsSep "\n"
|
||||
(map (pkg: "cp ${pkg} $out/${pkg.name}") listOfDefinitions)
|
||||
)}
|
||||
'';
|
||||
in
|
||||
{
|
||||
options.systemd.sysupdate = {
|
||||
|
||||
enable = lib.mkEnableOption (lib.mdDoc "systemd-sysupdate") // {
|
||||
description = lib.mdDoc ''
|
||||
Atomically update the host OS, container images, portable service
|
||||
images or other sources.
|
||||
|
||||
If enabled, updates are triggered in regular intervals via a
|
||||
`systemd.timer` unit.
|
||||
|
||||
Please see
|
||||
<https://www.freedesktop.org/software/systemd/man/systemd-sysupdate.html>
|
||||
for more details.
|
||||
'';
|
||||
};
|
||||
|
||||
timerConfig = utils.systemdUtils.unitOptions.timerOptions.options.timerConfig // {
|
||||
default = { };
|
||||
description = lib.mdDoc ''
|
||||
The timer configuration for performing the update.
|
||||
|
||||
By default, the upstream configuration is used:
|
||||
<https://github.com/systemd/systemd/blob/main/units/systemd-sysupdate.timer>
|
||||
'';
|
||||
};
|
||||
|
||||
reboot = {
|
||||
enable = lib.mkEnableOption (lib.mdDoc "automatically rebooting after an update") // {
|
||||
description = lib.mdDoc ''
|
||||
Whether to automatically reboot after an update.
|
||||
|
||||
If set to `true`, the system will automatically reboot via a
|
||||
`systemd.timer` unit but only after a new version was installed.
|
||||
|
||||
This uses a unit completely separate from the one performing the
|
||||
update because it is typically advisable to download updates
|
||||
regularly while the system is up, but delay reboots until the
|
||||
appropriate time (i.e. typically at night).
|
||||
|
||||
Set this to `false` if you do not want to reboot after an update. This
|
||||
is useful when you update a container image or another source where
|
||||
rebooting is not necessary in order to finalize the update.
|
||||
'';
|
||||
};
|
||||
|
||||
timerConfig = utils.systemdUtils.unitOptions.timerOptions.options.timerConfig // {
|
||||
default = { };
|
||||
description = lib.mdDoc ''
|
||||
The timer configuration for rebooting after an update.
|
||||
|
||||
By default, the upstream configuration is used:
|
||||
<https://github.com/systemd/systemd/blob/main/units/systemd-sysupdate-reboot.timer>
|
||||
'';
|
||||
};
|
||||
};
|
||||
|
||||
transfers = lib.mkOption {
|
||||
type = with lib.types; attrsOf format.type;
|
||||
default = { };
|
||||
example = {
|
||||
"10-uki.conf" = {
|
||||
Transfer = {
|
||||
ProtectVersion = "%A";
|
||||
};
|
||||
|
||||
Source = {
|
||||
Type = "url-file";
|
||||
Path = "https://download.example.com/";
|
||||
MatchPattern = "nixos_@v.efi.xz";
|
||||
};
|
||||
|
||||
Target = {
|
||||
Type = "regular-file";
|
||||
Path = "/EFI/Linux";
|
||||
PathRelativeTo = "boot";
|
||||
MatchPattern = ''
|
||||
nixos_@v+@l-@d.efi"; \
|
||||
nixos_@v+@l.efi \
|
||||
nixos_@v.efi
|
||||
'';
|
||||
Mode = "0444";
|
||||
TriesLeft = 3;
|
||||
TriesDone = 0;
|
||||
InstancesMax = 2;
|
||||
};
|
||||
};
|
||||
};
|
||||
description = lib.mdDoc ''
|
||||
Specify transfers as a set of the names of the transfer files as the
|
||||
key and the configuration as its value. The configuration can use all
|
||||
upstream options. See
|
||||
<https://www.freedesktop.org/software/systemd/man/sysupdate.d.html>
|
||||
for all available options.
|
||||
'';
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
|
||||
systemd.additionalUpstreamSystemUnits = [
|
||||
"systemd-sysupdate.service"
|
||||
"systemd-sysupdate.timer"
|
||||
"systemd-sysupdate-reboot.service"
|
||||
"systemd-sysupdate-reboot.timer"
|
||||
];
|
||||
|
||||
systemd.timers = {
|
||||
"systemd-sysupdate" = {
|
||||
wantedBy = [ "timers.target" ];
|
||||
timerConfig = cfg.timerConfig;
|
||||
};
|
||||
"systemd-sysupdate-reboot" = lib.mkIf cfg.reboot.enable {
|
||||
wantedBy = [ "timers.target" ];
|
||||
timerConfig = cfg.reboot.timerConfig;
|
||||
};
|
||||
};
|
||||
|
||||
environment.etc."sysupdate.d".source = definitionsDirectory;
|
||||
};
|
||||
|
||||
meta.maintainers = with lib.maintainers; [ nikstur ];
|
||||
}
|
|
@ -772,6 +772,7 @@ in {
|
|||
systemd-portabled = handleTest ./systemd-portabled.nix {};
|
||||
systemd-repart = handleTest ./systemd-repart.nix {};
|
||||
systemd-shutdown = handleTest ./systemd-shutdown.nix {};
|
||||
systemd-sysupdate = runTest ./systemd-sysupdate.nix;
|
||||
systemd-timesyncd = handleTest ./systemd-timesyncd.nix {};
|
||||
systemd-user-tmpfiles-rules = handleTest ./systemd-user-tmpfiles-rules.nix {};
|
||||
systemd-misc = handleTest ./systemd-misc.nix {};
|
||||
|
|
21
nixos/tests/common/gpg-keyring.nix
Normal file
21
nixos/tests/common/gpg-keyring.nix
Normal file
|
@ -0,0 +1,21 @@
|
|||
{ pkgs, ... }:
|
||||
|
||||
pkgs.runCommand "gpg-keyring" { nativeBuildInputs = [ pkgs.gnupg ]; } ''
|
||||
mkdir -p $out
|
||||
export GNUPGHOME=$out
|
||||
cat > foo <<EOF
|
||||
%echo Generating a basic OpenPGP key
|
||||
%no-protection
|
||||
Key-Type: EdDSA
|
||||
Key-Curve: ed25519
|
||||
Name-Real: Bob Foobar
|
||||
Name-Email: bob@foo.bar
|
||||
Expire-Date: 0
|
||||
# Do a commit here, so that we can later print "done"
|
||||
%commit
|
||||
%echo done
|
||||
EOF
|
||||
gpg --batch --generate-key foo
|
||||
rm $out/S.gpg-agent $out/S.gpg-agent.*
|
||||
gpg --export bob@foo.bar -a > $out/pubkey.gpg
|
||||
''
|
|
@ -1,26 +1,6 @@
|
|||
import ./make-test-python.nix ({pkgs, lib, ...}:
|
||||
let
|
||||
gpgKeyring = (pkgs.runCommand "gpg-keyring" { buildInputs = [ pkgs.gnupg ]; } ''
|
||||
mkdir -p $out
|
||||
export GNUPGHOME=$out
|
||||
cat > foo <<EOF
|
||||
%echo Generating a basic OpenPGP key
|
||||
%no-protection
|
||||
Key-Type: DSA
|
||||
Key-Length: 1024
|
||||
Subkey-Type: ELG-E
|
||||
Subkey-Length: 1024
|
||||
Name-Real: Bob Foobar
|
||||
Name-Email: bob@foo.bar
|
||||
Expire-Date: 0
|
||||
# Do a commit here, so that we can later print "done"
|
||||
%commit
|
||||
%echo done
|
||||
EOF
|
||||
gpg --batch --generate-key foo
|
||||
rm $out/S.gpg-agent $out/S.gpg-agent.*
|
||||
gpg --export bob@foo.bar -a > $out/pubkey.gpg
|
||||
'');
|
||||
gpgKeyring = import ./common/gpg-keyring.nix { inherit pkgs; };
|
||||
|
||||
nspawnImages = (pkgs.runCommand "localhost" { buildInputs = [ pkgs.coreutils pkgs.gnupg ]; } ''
|
||||
mkdir -p $out
|
||||
|
|
66
nixos/tests/systemd-sysupdate.nix
Normal file
66
nixos/tests/systemd-sysupdate.nix
Normal file
|
@ -0,0 +1,66 @@
|
|||
# Tests downloading a signed update aritfact from a server to a target machine.
|
||||
# This test does not rely on the `systemd.timer` units provided by the
|
||||
# `systemd-sysupdate` module but triggers the `systemd-sysupdate` service
|
||||
# manually to make the test more robust.
|
||||
|
||||
{ lib, pkgs, ... }:
|
||||
|
||||
let
|
||||
gpgKeyring = import ./common/gpg-keyring.nix { inherit pkgs; };
|
||||
in
|
||||
{
|
||||
name = "systemd-sysupdate";
|
||||
|
||||
meta.maintainers = with lib.maintainers; [ nikstur ];
|
||||
|
||||
nodes = {
|
||||
server = { pkgs, ... }: {
|
||||
networking.firewall.enable = false;
|
||||
services.nginx = {
|
||||
enable = true;
|
||||
virtualHosts."server" = {
|
||||
root = pkgs.runCommand "sysupdate-artifacts" { buildInputs = [ pkgs.gnupg ]; } ''
|
||||
mkdir -p $out
|
||||
cd $out
|
||||
|
||||
echo "nixos" > nixos_1.efi
|
||||
sha256sum nixos_1.efi > SHA256SUMS
|
||||
|
||||
export GNUPGHOME="$(mktemp -d)"
|
||||
cp -R ${gpgKeyring}/* $GNUPGHOME
|
||||
|
||||
gpg --batch --sign --detach-sign --output SHA256SUMS.gpg SHA256SUMS
|
||||
'';
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
target = {
|
||||
systemd.sysupdate = {
|
||||
enable = true;
|
||||
transfers = {
|
||||
"uki" = {
|
||||
Source = {
|
||||
Type = "url-file";
|
||||
Path = "http://server/";
|
||||
MatchPattern = "nixos_@v.efi";
|
||||
};
|
||||
Target = {
|
||||
Path = "/boot/EFI/Linux";
|
||||
MatchPattern = "nixos_@v.efi";
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
environment.etc."systemd/import-pubring.gpg".source = "${gpgKeyring}/pubkey.gpg";
|
||||
};
|
||||
};
|
||||
|
||||
testScript = ''
|
||||
server.wait_for_unit("nginx.service")
|
||||
|
||||
target.succeed("systemctl start systemd-sysupdate")
|
||||
assert "nixos" in target.wait_until_succeeds("cat /boot/EFI/Linux/nixos_1.efi", timeout=5)
|
||||
'';
|
||||
}
|
|
@ -5,13 +5,13 @@
|
|||
|
||||
buildGoModule rec {
|
||||
pname = "taproot-assets";
|
||||
version = "0.2.2";
|
||||
version = "0.2.3";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "lightninglabs";
|
||||
repo = "taproot-assets";
|
||||
rev = "v${version}";
|
||||
hash = "sha256-DOtCnPnS5Oq5B4xaYmNCXxMYJ9fhPZ11OfPKXH7eKUg=";
|
||||
hash = "sha256-nTgIoYajpnlEvyXPcwXbm/jOfG+C83TTZiPmoB2kK24=";
|
||||
};
|
||||
|
||||
vendorHash = "sha256-fc++0M7Mnn1nJOkV2gzAVRQCp3vOqsO2OQNlOKaMmB4=";
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
{
|
||||
"stable": {
|
||||
"version": "115.0.5790.102",
|
||||
"sha256": "0sxhhsrn4cg9akpnb2qpn7kkgp286rh8y2mmypm2409s5grf1xh6",
|
||||
"sha256bin64": "18n7xqbvcdd68856wmbrxx1f5lqj61g9cyiir9dzlfmf0a9wxvml",
|
||||
"version": "115.0.5790.110",
|
||||
"sha256": "0wgp44qnvmdqf2kk870ndm51rcvar36li2qq632ay4n8gfpbrm79",
|
||||
"sha256bin64": "1w2jl92x78s4vxv4p1imkz7qaq51yvs0wiz2bclbjz0hjlw9akr3",
|
||||
"deps": {
|
||||
"gn": {
|
||||
"version": "2023-05-19",
|
||||
|
@ -19,15 +19,15 @@
|
|||
}
|
||||
},
|
||||
"beta": {
|
||||
"version": "115.0.5790.98",
|
||||
"sha256": "1wbasmwdqkg5jcmzpidvzjsq2n2dr73bxz85pr8a5j4grw767gpz",
|
||||
"sha256bin64": "0xbizb3d539h1cw1kj9ahd8azmkcdfjdmqb5bpp8cr21bh2qbqp5",
|
||||
"version": "116.0.5845.50",
|
||||
"sha256": "0r5m2bcrh2zpl2m8wnzyl4afh8s0dh2m2fnfjf50li94694vy4jz",
|
||||
"sha256bin64": "047wsszg4c23vxq93a335iymiqpy7lw5izzz4f0zk1a4sijafd59",
|
||||
"deps": {
|
||||
"gn": {
|
||||
"version": "2023-05-19",
|
||||
"version": "2023-06-09",
|
||||
"url": "https://gn.googlesource.com/gn",
|
||||
"rev": "e9e83d9095d3234adf68f3e2866f25daf766d5c7",
|
||||
"sha256": "0y07c18xskq4mclqiz3a63fz8jicz2kqridnvdhqdf75lhp61f8a"
|
||||
"rev": "4bd1a77e67958fb7f6739bd4542641646f264e5d",
|
||||
"sha256": "14h9jqspb86sl5lhh6q0kk2rwa9zcak63f8drp7kb3r4dx08vzsw"
|
||||
}
|
||||
}
|
||||
},
|
||||
|
|
|
@ -12,4 +12,6 @@
|
|||
|
||||
helm-secrets = callPackage ./helm-secrets.nix { };
|
||||
|
||||
helm-unittest = callPackage ./helm-unittest.nix { };
|
||||
|
||||
}
|
||||
|
|
|
@ -0,0 +1,34 @@
|
|||
{ buildGoModule, fetchFromGitHub, lib }:
|
||||
|
||||
buildGoModule rec {
|
||||
pname = "helm-unittest";
|
||||
version = "0.3.3";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = pname;
|
||||
repo = pname;
|
||||
rev = "v${version}";
|
||||
hash = "sha256-11rgARUfTbr8FkmR2lI4uoIqzi9cRuVPalUOsxsnO3E=";
|
||||
};
|
||||
|
||||
vendorHash = "sha256-E9HSP8c/rGG+PLbnT8V5GflpnFItCeXyeLGiqDj4tRI=";
|
||||
|
||||
# NOTE: Remove the install and upgrade hooks.
|
||||
postPatch = ''
|
||||
sed -i '/^hooks:/,+2 d' plugin.yaml
|
||||
'';
|
||||
|
||||
postInstall = ''
|
||||
install -dm755 $out/${pname}
|
||||
mv $out/bin/helm-unittest $out/${pname}/untt
|
||||
rmdir $out/bin
|
||||
install -m644 -Dt $out/${pname} plugin.yaml
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "BDD styled unit test framework for Kubernetes Helm charts as a Helm plugin";
|
||||
homepage = "https://github.com/helm-unittest/helm-unittest";
|
||||
license = licenses.mit;
|
||||
maintainers = with maintainers; [ yurrriq ];
|
||||
};
|
||||
}
|
|
@ -31,7 +31,10 @@ in
|
|||
preferLocalBuild = true;
|
||||
|
||||
nativeBuildInputs = [ makeWrapper ];
|
||||
passthru = { unwrapped = helm; };
|
||||
passthru = {
|
||||
inherit pluginsDir;
|
||||
unwrapped = helm;
|
||||
};
|
||||
|
||||
meta = helm.meta // {
|
||||
# To prevent builds on hydra
|
||||
|
|
|
@ -1,4 +1,10 @@
|
|||
{ lib, buildGoModule, fetchFromGitHub, installShellFiles }:
|
||||
{ lib
|
||||
, buildGoModule
|
||||
, fetchFromGitHub
|
||||
, installShellFiles
|
||||
, makeWrapper
|
||||
, pluginsDir ? null
|
||||
}:
|
||||
|
||||
buildGoModule rec {
|
||||
pname = "helmfile";
|
||||
|
@ -19,9 +25,14 @@ buildGoModule rec {
|
|||
|
||||
ldflags = [ "-s" "-w" "-X go.szostok.io/version.version=v${version}" ];
|
||||
|
||||
nativeBuildInputs = [ installShellFiles ];
|
||||
nativeBuildInputs =
|
||||
[ installShellFiles ] ++
|
||||
lib.optional (pluginsDir != null) makeWrapper;
|
||||
|
||||
postInstall = ''
|
||||
postInstall = lib.optionalString (pluginsDir != null) ''
|
||||
wrapProgram $out/bin/helmfile \
|
||||
--set HELM_PLUGINS "${pluginsDir}"
|
||||
'' + ''
|
||||
installShellCompletion --cmd helmfile \
|
||||
--bash <($out/bin/helmfile completion bash) \
|
||||
--fish <($out/bin/helmfile completion fish) \
|
||||
|
|
|
@ -4,13 +4,13 @@
|
|||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "abc-verifier";
|
||||
version = "unstable-2023-02-23";
|
||||
version = "unstable-2023-06-28";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "yosyshq";
|
||||
repo = "abc";
|
||||
rev = "2c1c83f75b8078ced51f92c697da3e712feb3ac3";
|
||||
hash = "sha256-THcyEifIp9v1bOofFVm9NFPqgI6NfKKys+Ea2KyNpv8=";
|
||||
rev = "bb64142b07794ee685494564471e67365a093710";
|
||||
hash = "sha256-Qkk61Lh84ervtehWskSB9GKh+JPB7mI1IuG32OSZMdg=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ cmake ];
|
||||
|
|
80
pkgs/applications/science/logic/egglog/Cargo.lock
generated
80
pkgs/applications/science/logic/egglog/Cargo.lock
generated
|
@ -249,6 +249,7 @@ name = "egglog"
|
|||
version = "0.1.0"
|
||||
dependencies = [
|
||||
"clap",
|
||||
"egraph-serialize",
|
||||
"env_logger",
|
||||
"glob",
|
||||
"hashbrown 0.14.0",
|
||||
|
@ -265,12 +266,25 @@ dependencies = [
|
|||
"ordered-float",
|
||||
"regex",
|
||||
"rustc-hash",
|
||||
"serde_json",
|
||||
"smallvec",
|
||||
"symbol_table",
|
||||
"symbolic_expressions",
|
||||
"thiserror",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "egraph-serialize"
|
||||
version = "0.1.0"
|
||||
source = "git+https://github.com/egraphs-good/egraph-serialize?rev=54b1a4f1e2f2135846b084edcb495cd159839540#54b1a4f1e2f2135846b084edcb495cd159839540"
|
||||
dependencies = [
|
||||
"indexmap 2.0.0",
|
||||
"once_cell",
|
||||
"ordered-float",
|
||||
"serde",
|
||||
"serde_json",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "either"
|
||||
version = "1.8.1"
|
||||
|
@ -404,6 +418,7 @@ checksum = "d5477fe2230a79769d8dc68e0eabf5437907c0457a5614a9e8dddb67f65eb65d"
|
|||
dependencies = [
|
||||
"equivalent",
|
||||
"hashbrown 0.14.0",
|
||||
"serde",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
@ -438,6 +453,12 @@ dependencies = [
|
|||
"either",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "itoa"
|
||||
version = "1.0.9"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "af150ab688ff2122fcef229be89cb50dd66af9e01a4ff320cc137eecc9bacc38"
|
||||
|
||||
[[package]]
|
||||
name = "js-sys"
|
||||
version = "0.3.64"
|
||||
|
@ -607,6 +628,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
|||
checksum = "2fc2dbde8f8a79f2102cc474ceb0ad68e3b80b85289ea62389b60e66777e4213"
|
||||
dependencies = [
|
||||
"num-traits",
|
||||
"rand",
|
||||
"serde",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
|
@ -681,6 +704,25 @@ dependencies = [
|
|||
"proc-macro2",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "rand"
|
||||
version = "0.8.5"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404"
|
||||
dependencies = [
|
||||
"rand_core",
|
||||
"serde",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "rand_core"
|
||||
version = "0.6.4"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c"
|
||||
dependencies = [
|
||||
"serde",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "redox_syscall"
|
||||
version = "0.2.16"
|
||||
|
@ -764,12 +806,50 @@ version = "1.0.13"
|
|||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "dc31bd9b61a32c31f9650d18add92aa83a49ba979c143eefd27fe7177b05bd5f"
|
||||
|
||||
[[package]]
|
||||
name = "ryu"
|
||||
version = "1.0.15"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "1ad4cc8da4ef723ed60bced201181d83791ad433213d8c24efffda1eec85d741"
|
||||
|
||||
[[package]]
|
||||
name = "scopeguard"
|
||||
version = "1.1.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "d29ab0c6d3fc0ee92fe66e2d99f700eab17a8d57d1c1d3b748380fb20baa78cd"
|
||||
|
||||
[[package]]
|
||||
name = "serde"
|
||||
version = "1.0.171"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "30e27d1e4fd7659406c492fd6cfaf2066ba8773de45ca75e855590f856dc34a9"
|
||||
dependencies = [
|
||||
"serde_derive",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "serde_derive"
|
||||
version = "1.0.171"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "389894603bd18c46fa56231694f8d827779c0951a667087194cf9de94ed24682"
|
||||
dependencies = [
|
||||
"proc-macro2",
|
||||
"quote",
|
||||
"syn",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "serde_json"
|
||||
version = "1.0.103"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "d03b412469450d4404fe8499a268edd7f8b79fecb074b0d812ad64ca21f4031b"
|
||||
dependencies = [
|
||||
"indexmap 2.0.0",
|
||||
"itoa",
|
||||
"ryu",
|
||||
"serde",
|
||||
]
|
||||
|
||||
[[package]]
|
||||
name = "siphasher"
|
||||
version = "0.3.10"
|
||||
|
|
|
@ -5,18 +5,19 @@
|
|||
|
||||
rustPlatform.buildRustPackage {
|
||||
pname = "egglog";
|
||||
version = "unstable-2023-07-11";
|
||||
version = "unstable-2023-07-19";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "egraphs-good";
|
||||
repo = "egglog";
|
||||
rev = "14a6fc6060c09541728ae460e0a92909fabf508f";
|
||||
hash = "sha256-1osdjd86xZHUAwvPBNxWYlkX6tKt+jI05AEVYr77YSQ=";
|
||||
rev = "9fe03ad35a2a975a2c9140a641ba91266b7a72ce";
|
||||
hash = "sha256-9JeJJdZW8ecogReJzQrp3hFkK/pp/+pLxJMNREWuiyI=";
|
||||
};
|
||||
|
||||
cargoLock = {
|
||||
lockFile = ./Cargo.lock;
|
||||
outputHashes = {
|
||||
"egraph-serialize-0.1.0" = "sha256-1lDaoR/1TNFW+uaf3UdfDZgXlxyAb37Ij7yky16xCG8=";
|
||||
"symbol_table-0.2.0" = "sha256-f9UclMOUig+N5L3ibBXou0pJ4S/CQqtaji7tnebVbis=";
|
||||
"symbolic_expressions-5.0.3" = "sha256-mSxnhveAItlTktQC4hM8o6TYjgtCUgkdZj7i6MR4Oeo=";
|
||||
};
|
||||
|
|
|
@ -2,13 +2,13 @@
|
|||
|
||||
stdenvNoCC.mkDerivation rec {
|
||||
pname = "numix-icon-theme-circle";
|
||||
version = "23.07.08";
|
||||
version = "23.07.21";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "numixproject";
|
||||
repo = pname;
|
||||
rev = version;
|
||||
sha256 = "sha256-JToou95HIrfqdT0IVh0colgGFXq3GR2D3FQU0Qc57Y4=";
|
||||
sha256 = "sha256-QwbjJ38fWRkzd1nmsPWcwUQ7p96S/tGEvIfhLsOX1bg=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ gtk3 ];
|
||||
|
|
|
@ -3,12 +3,12 @@
|
|||
let
|
||||
generator = pkgsBuildBuild.buildGoModule rec {
|
||||
pname = "v2ray-domain-list-community";
|
||||
version = "20230717050659";
|
||||
version = "20230725085751";
|
||||
src = fetchFromGitHub {
|
||||
owner = "v2fly";
|
||||
repo = "domain-list-community";
|
||||
rev = version;
|
||||
hash = "sha256-HmP5V02TUL48vlQ9bFRePV5l1J0ECszVzQ48UENDvuQ=";
|
||||
hash = "sha256-4D975ASoDoXjEi0kkwsUIIT6nwOE3ggBzNUVp0ojsbQ=";
|
||||
};
|
||||
vendorHash = "sha256-dYaGR5ZBORANKAYuPAi9i+KQn2OAGDGTZxdyVjkcVi8=";
|
||||
meta = with lib; {
|
||||
|
|
|
@ -138,7 +138,7 @@ backendStdenv.mkDerivation rec {
|
|||
(ucx.override { enableCuda = false; }) # Avoid infinite recursion
|
||||
xorg.libxshmfence
|
||||
xorg.libxkbfile
|
||||
] ++ (lib.optionals (lib.versionAtLeast version "12.1") (map lib.getLib ([
|
||||
] ++ (lib.optionals (lib.versionAtLeast version "12") (map lib.getLib ([
|
||||
# Used by `/target-linux-x64/CollectX/clx` and `/target-linux-x64/CollectX/libclx_api.so` for:
|
||||
# - `libcurl.so.4`
|
||||
curlMinimal
|
||||
|
@ -183,7 +183,9 @@ backendStdenv.mkDerivation rec {
|
|||
"libcom_err.so.2"
|
||||
];
|
||||
|
||||
preFixup = ''
|
||||
preFixup = if lib.versionOlder version "11" then ''
|
||||
patchelf $out/targets/*/lib/libnvrtc.so --add-needed libnvrtc-builtins.so
|
||||
'' else ''
|
||||
patchelf $out/lib64/libnvrtc.so --add-needed libnvrtc-builtins.so
|
||||
'';
|
||||
|
||||
|
|
|
@ -71,13 +71,13 @@ let
|
|||
|
||||
in stdenv.mkDerivation rec {
|
||||
pname = "yosys";
|
||||
version = "0.30";
|
||||
version = "0.31";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "YosysHQ";
|
||||
repo = "yosys";
|
||||
rev = "${pname}-${version}";
|
||||
hash = "sha256-qhMcXJFEuBPl7vh+gYTu7PnSWi+L3YMLrBMQyYqfc0w=";
|
||||
hash = "sha256-BGeqI0U2AdKgsQQw3f/C0l1ENPTlQ3Eoa8TaLRE+aWI=";
|
||||
};
|
||||
|
||||
enableParallelBuilding = true;
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
self: super: with self;
|
||||
self: dontUse: with self;
|
||||
|
||||
let
|
||||
pythonInterpreter = super.python.pythonForBuild.interpreter;
|
||||
pythonSitePackages = super.python.sitePackages;
|
||||
pythonCheckInterpreter = super.python.interpreter;
|
||||
pythonInterpreter = python.pythonForBuild.interpreter;
|
||||
pythonSitePackages = python.sitePackages;
|
||||
pythonCheckInterpreter = python.interpreter;
|
||||
setuppy = ../run_setup.py;
|
||||
in {
|
||||
makePythonHook = args: pkgs.makeSetupHook ({passthru.provides.setupHook = true; } // args);
|
||||
|
|
|
@ -47,12 +47,13 @@
|
|||
selfTargetTarget = pythonOnTargetForTarget.pkgs or {}; # There is no Python TargetTarget.
|
||||
};
|
||||
hooks = import ./hooks/default.nix;
|
||||
keep = lib.extends hooks pythonPackagesFun;
|
||||
keep = self: hooks self {};
|
||||
extra = _: {};
|
||||
optionalExtensions = cond: as: lib.optionals cond as;
|
||||
pythonExtension = import ../../../top-level/python-packages.nix;
|
||||
python2Extension = import ../../../top-level/python2-packages.nix;
|
||||
extensions = lib.composeManyExtensions ([
|
||||
hooks
|
||||
pythonExtension
|
||||
] ++ (optionalExtensions (!self.isPy3k) [
|
||||
python2Extension
|
||||
|
@ -64,7 +65,7 @@
|
|||
otherSplices
|
||||
keep
|
||||
extra
|
||||
(lib.extends (lib.composeExtensions aliases extensions) keep))
|
||||
(lib.extends (lib.composeExtensions aliases extensions) pythonPackagesFun))
|
||||
{
|
||||
overrides = packageOverrides;
|
||||
python = self;
|
||||
|
|
|
@ -40,19 +40,13 @@ stdenv.mkDerivation rec {
|
|||
"-DBUILD_SHARED_LIBS=ON"
|
||||
"-DBUILD_OBJECT_LIBS=OFF"
|
||||
"-DJSONCPP_WITH_CMAKE_PACKAGE=ON"
|
||||
"-DBUILD_STATIC_LIBS=${if enableStatic then "ON" else "OFF"}"
|
||||
]
|
||||
# the test's won't compile if secureMemory is used because there is no
|
||||
# comparison operators and conversion functions between
|
||||
# std::basic_string<..., Json::SecureAllocator<char>> vs.
|
||||
# std::basic_string<..., [default allocator]>
|
||||
++ lib.optional ((stdenv.buildPlatform != stdenv.hostPlatform) || secureMemory) "-DJSONCPP_WITH_TESTS=OFF"
|
||||
++ lib.optional (!enableStatic) "-DBUILD_STATIC_LIBS=OFF";
|
||||
|
||||
# this is fixed and no longer necessary in 1.9.5 but there they use
|
||||
# memset_s without switching to a different c++ standard in the cmake files
|
||||
postInstall = lib.optionalString enableStatic ''
|
||||
(cd $out/lib && ln -sf libjsoncpp_static.a libjsoncpp.a)
|
||||
'';
|
||||
++ lib.optional ((stdenv.buildPlatform != stdenv.hostPlatform) || secureMemory) "-DJSONCPP_WITH_TESTS=OFF";
|
||||
|
||||
meta = with lib; {
|
||||
homepage = "https://github.com/open-source-parsers/jsoncpp";
|
||||
|
|
|
@ -20,6 +20,8 @@ stdenv.mkDerivation rec {
|
|||
})
|
||||
];
|
||||
|
||||
configureFlags = lib.optional (!sslSupport) "--disable-openssl";
|
||||
|
||||
preConfigure = lib.optionalString (lib.versionAtLeast stdenv.hostPlatform.darwinMinVersion "11") ''
|
||||
MACOSX_DEPLOYMENT_TARGET=10.16
|
||||
'';
|
||||
|
|
|
@ -94,6 +94,7 @@ in
|
|||
# Without --add-needed autoPatchelf forgets $ORIGIN on cuda>=8.0.5.
|
||||
postFixup = strings.optionalString (strings.versionAtLeast versionTriple "8.0.5") ''
|
||||
patchelf $out/lib/libcudnn.so --add-needed libcudnn_cnn_infer.so
|
||||
patchelf $out/lib/libcudnn_ops_infer.so --add-needed libcublas.so --add-needed libcublasLt.so
|
||||
'';
|
||||
|
||||
passthru = {
|
||||
|
|
48
pkgs/development/libraries/tclap/1.4.nix
Normal file
48
pkgs/development/libraries/tclap/1.4.nix
Normal file
|
@ -0,0 +1,48 @@
|
|||
{ lib
|
||||
, stdenv
|
||||
, fetchgit
|
||||
, cmake
|
||||
, doxygen
|
||||
, python3
|
||||
}:
|
||||
stdenv.mkDerivation {
|
||||
pname = "tclap";
|
||||
|
||||
# This version is slightly newer than 1.4.0-rc1:
|
||||
# See https://github.com/mirror/tclap/compare/1.4.0-rc1..3feeb7b2499b37d9cb80890cadaf7c905a9a50c6
|
||||
version = "1.4-3feeb7b";
|
||||
|
||||
src = fetchgit {
|
||||
url = "git://git.code.sf.net/p/tclap/code";
|
||||
rev = "3feeb7b2499b37d9cb80890cadaf7c905a9a50c6"; # 1.4 branch
|
||||
hash = "sha256-byLianB6Vf+I9ABMmsmuoGU2o5RO9c5sMckWW0F+GDM=";
|
||||
};
|
||||
|
||||
postPatch = ''
|
||||
substituteInPlace CMakeLists.txt \
|
||||
--replace '$'{CMAKE_INSTALL_LIBDIR_ARCHIND} '$'{CMAKE_INSTALL_LIBDIR}
|
||||
substituteInPlace packaging/pkgconfig.pc.in \
|
||||
--replace '$'{prefix}/@CMAKE_INSTALL_INCLUDEDIR@ @CMAKE_INSTALL_FULL_INCLUDEDIR@
|
||||
'';
|
||||
|
||||
nativeBuildInputs = [
|
||||
cmake
|
||||
doxygen
|
||||
python3
|
||||
];
|
||||
|
||||
# Installing docs is broken in this package+version so we stub out some files
|
||||
preInstall = ''
|
||||
touch docs/manual.html
|
||||
'';
|
||||
|
||||
doCheck = true;
|
||||
|
||||
meta = with lib; {
|
||||
description = "Templatized C++ Command Line Parser Library (v1.4)";
|
||||
homepage = "https://tclap.sourceforge.net/";
|
||||
license = licenses.mit;
|
||||
maintainers = teams.deshaw.members;
|
||||
platforms = platforms.all;
|
||||
};
|
||||
}
|
65
pkgs/development/python-modules/aiogram/default.nix
Normal file
65
pkgs/development/python-modules/aiogram/default.nix
Normal file
|
@ -0,0 +1,65 @@
|
|||
{ lib
|
||||
, buildPythonPackage
|
||||
, fetchFromGitHub
|
||||
, pythonOlder
|
||||
, pytestCheckHook
|
||||
, aiohttp
|
||||
, aiohttp-socks
|
||||
, aioredis
|
||||
, aresponses
|
||||
, babel
|
||||
, certifi
|
||||
, magic-filter
|
||||
, pytest-asyncio
|
||||
, pytest-lazy-fixture
|
||||
, redis
|
||||
}:
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "aiogram";
|
||||
version = "2.25.1";
|
||||
format = "setuptools";
|
||||
|
||||
disabled = pythonOlder "3.7";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "aiogram";
|
||||
repo = "aiogram";
|
||||
rev = "v${version}";
|
||||
hash = "sha256-g8nuvna7DpXElvjBehnGKHUsrf+nyQcoKNnyR59RALo=";
|
||||
};
|
||||
|
||||
postPatch = ''
|
||||
substituteInPlace setup.py \
|
||||
--replace "aiohttp>=3.8.0,<3.9.0" "aiohttp" \
|
||||
--replace "Babel>=2.9.1,<2.10.0" "Babel" \
|
||||
--replace "magic-filter>=1.0.9" "magic-filter"
|
||||
'';
|
||||
|
||||
propagatedBuildInputs = [
|
||||
aiohttp
|
||||
babel
|
||||
certifi
|
||||
magic-filter
|
||||
];
|
||||
|
||||
nativeCheckInputs = [
|
||||
aiohttp-socks
|
||||
aioredis
|
||||
aresponses
|
||||
pytest-asyncio
|
||||
pytest-lazy-fixture
|
||||
pytestCheckHook
|
||||
redis
|
||||
];
|
||||
|
||||
pythonImportsCheck = [ "aiogram" ];
|
||||
|
||||
meta = with lib; {
|
||||
description = "Modern and fully asynchronous framework for Telegram Bot API";
|
||||
homepage = "https://github.com/aiogram/aiogram";
|
||||
changelog = "https://github.com/aiogram/aiogram/releases/tag/v${version}";
|
||||
license = licenses.mit;
|
||||
maintainers = with maintainers; [ sikmir ];
|
||||
};
|
||||
}
|
|
@ -65,7 +65,7 @@
|
|||
}:
|
||||
let
|
||||
pname = "argilla";
|
||||
version = "1.12.0";
|
||||
version = "1.13.2";
|
||||
optional-dependencies = {
|
||||
server = [
|
||||
fastapi
|
||||
|
@ -125,8 +125,8 @@ buildPythonPackage {
|
|||
src = fetchFromGitHub {
|
||||
owner = "argilla-io";
|
||||
repo = pname;
|
||||
rev = "v${version}";
|
||||
hash = "sha256-NImtS2bbCfbhbrw12xhGdZp/JVfrB6cHnUHYX3xJ7tw=";
|
||||
rev = "refs/tags/v${version}";
|
||||
hash = "sha256-FCPlEbgViWZEyXpdtaa6pJxpgbSXmcfJX/1RUFF7Zs4=";
|
||||
};
|
||||
|
||||
pythonRelaxDeps = [
|
||||
|
|
|
@ -15,14 +15,14 @@
|
|||
|
||||
buildPythonPackage rec {
|
||||
pname = "faster-whisper";
|
||||
version = "0.7.0";
|
||||
version = "0.7.1";
|
||||
format = "setuptools";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "guillaumekln";
|
||||
repo = "faster-whisper";
|
||||
rev = "v${version}";
|
||||
hash = "sha256-p8BJ+Bdvn+AQSUS6b2GeYNh2l4KXfPx3o0kImu7xVgw=";
|
||||
hash = "sha256-NTk0S+dMChygnC7Wix62AFO4NNSPJuKXyqoEyWiQhII=";
|
||||
};
|
||||
|
||||
postPatch = ''
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
|
||||
buildPythonPackage rec {
|
||||
pname = "flux-led";
|
||||
version = "1.0.0";
|
||||
version = "1.0.1";
|
||||
format = "setuptools";
|
||||
|
||||
disabled = pythonOlder "3.7";
|
||||
|
@ -18,7 +18,7 @@ buildPythonPackage rec {
|
|||
owner = "Danielhiversen";
|
||||
repo = "flux_led";
|
||||
rev = "refs/tags/${version}";
|
||||
hash = "sha256-QQz4wWfCMqNzu2QMoF0nfAKcMyvUHKTMsNVGt+7zkpE=";
|
||||
hash = "sha256-+eklvdmlWrwvdI6IwNyAIEI0kDlzIYh7bzNY94dzA+E=";
|
||||
};
|
||||
|
||||
propagatedBuildInputs = [
|
||||
|
|
40
pkgs/development/python-modules/magic-filter/default.nix
Normal file
40
pkgs/development/python-modules/magic-filter/default.nix
Normal file
|
@ -0,0 +1,40 @@
|
|||
{ lib
|
||||
, buildPythonPackage
|
||||
, fetchFromGitHub
|
||||
, pythonOlder
|
||||
, pytestCheckHook
|
||||
, hatchling
|
||||
}:
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "magic-filter";
|
||||
version = "1.0.10";
|
||||
format = "pyproject";
|
||||
|
||||
disabled = pythonOlder "3.7";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "aiogram";
|
||||
repo = "magic-filter";
|
||||
rev = "v${version}";
|
||||
hash = "sha256-mHqq/ci8uMACNutwmxKX1nrl3nTSnSyU2x1VxzWxqzM=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [
|
||||
hatchling
|
||||
];
|
||||
|
||||
nativeCheckInputs = [
|
||||
pytestCheckHook
|
||||
];
|
||||
|
||||
pythonImportsCheck = [ "magic_filter" ];
|
||||
|
||||
meta = with lib; {
|
||||
description = "Magic filter based on dynamic attribute getter";
|
||||
homepage = "https://github.com/aiogram/magic-filter";
|
||||
changelog = "https://github.com/aiogram/magic-filter/releases/tag/v${version}";
|
||||
license = licenses.mit;
|
||||
maintainers = with maintainers; [ sikmir ];
|
||||
};
|
||||
}
|
|
@ -11,7 +11,7 @@
|
|||
|
||||
buildPythonPackage rec {
|
||||
pname = "opower";
|
||||
version = "0.0.14";
|
||||
version = "0.0.15";
|
||||
format = "pyproject";
|
||||
|
||||
disabled = pythonOlder "3.7";
|
||||
|
@ -20,7 +20,7 @@ buildPythonPackage rec {
|
|||
owner = "tronikos";
|
||||
repo = "opower";
|
||||
rev = "refs/tags/v${version}";
|
||||
hash = "sha256-eTlFb/v88jaEzx5H8ofHMNkqPunDvXcXGvg5ThripeA=";
|
||||
hash = "sha256-hSwKdxtWgxJCdKk9tw7iCBC7I4buxbRfx4GRwyym6rg=";
|
||||
};
|
||||
|
||||
pythonRemoveDeps = [
|
||||
|
|
|
@ -11,7 +11,7 @@
|
|||
|
||||
buildPythonPackage rec {
|
||||
pname = "pydeps";
|
||||
version = "1.12.12";
|
||||
version = "1.12.13";
|
||||
format = "setuptools";
|
||||
|
||||
disabled = pythonOlder "3.7";
|
||||
|
@ -20,7 +20,7 @@ buildPythonPackage rec {
|
|||
owner = "thebjorn";
|
||||
repo = pname;
|
||||
rev = "refs/tags/v${version}";
|
||||
hash = "sha256-upqlLEGxetkFiwHuwwf7c2wbqrXQcRSamRszYUTsyNk=";
|
||||
hash = "sha256-n4FmMqpCqxPmGJokfaxnruG9d5oodv6Yfg80Y1EIr34=";
|
||||
};
|
||||
|
||||
buildInputs = [
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
|
||||
buildPythonPackage rec {
|
||||
pname = "python-otbr-api";
|
||||
version = "2.2.0";
|
||||
version = "2.3.0";
|
||||
format = "pyproject";
|
||||
|
||||
disabled = pythonOlder "3.9";
|
||||
|
@ -21,7 +21,7 @@ buildPythonPackage rec {
|
|||
owner = "home-assistant-libs";
|
||||
repo = pname;
|
||||
rev = "refs/tags/${version}";
|
||||
hash = "sha256-jozMYrmXHSykv5npboyySuVDs1Lamlee15ZPYI4zmO4=";
|
||||
hash = "sha256-oLqgjTuC5rpAzXTJO+KFn+uQ0TV7rNPWHOAJtRI4otk=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [
|
||||
|
|
|
@ -31,7 +31,7 @@
|
|||
|
||||
buildPythonPackage rec {
|
||||
pname = "pyunifiprotect";
|
||||
version = "4.10.5";
|
||||
version = "4.10.6";
|
||||
format = "pyproject";
|
||||
|
||||
disabled = pythonOlder "3.9";
|
||||
|
@ -40,7 +40,7 @@ buildPythonPackage rec {
|
|||
owner = "briis";
|
||||
repo = pname;
|
||||
rev = "refs/tags/v${version}";
|
||||
hash = "sha256-BrdffDuPTn/uFKT9F0pF1+0/MraIPRwsN64DdseQdQA=";
|
||||
hash = "sha256-vO60QMr+J3tE7ZIU7fZP27jMuPeCJH56Hbhjek5ZfXI=";
|
||||
};
|
||||
|
||||
postPatch = ''
|
||||
|
|
|
@ -6,13 +6,13 @@
|
|||
|
||||
buildPythonPackage rec {
|
||||
pname = "types-pyopenssl";
|
||||
version = "23.2.0.1";
|
||||
version = "23.2.0.2";
|
||||
format = "setuptools";
|
||||
|
||||
src = fetchPypi {
|
||||
pname = "types-pyOpenSSL";
|
||||
inherit version;
|
||||
hash = "sha256-vutdInBMYloeS23HVjVcW0rwuYATi3AqnZ+TKs8CCQM=";
|
||||
hash = "sha256-agENrJ7NQrWC190sw+nkBIa3mztkuy//uhR0/5avkG0=";
|
||||
};
|
||||
|
||||
propagatedBuildInputs = [
|
||||
|
|
|
@ -12,7 +12,7 @@
|
|||
|
||||
buildPythonPackage rec {
|
||||
pname = "xknx";
|
||||
version = "2.11.1";
|
||||
version = "2.11.2";
|
||||
format = "pyproject";
|
||||
|
||||
disabled = pythonOlder "3.8";
|
||||
|
@ -21,7 +21,7 @@ buildPythonPackage rec {
|
|||
owner = "XKNX";
|
||||
repo = pname;
|
||||
rev = "refs/tags/${version}";
|
||||
hash = "sha256-9H5LQX6uXWr9pQ/WosNl1LrcbR+MAwVtZv8Cdb+WFvg=";
|
||||
hash = "sha256-rKvHb0wkWVuZO8M8uIQdOiY1N6DmGSpqUgz4YYbUfSM=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [
|
||||
|
|
|
@ -1,26 +0,0 @@
|
|||
{ lib
|
||||
, buildPythonPackage
|
||||
, fetchPypi
|
||||
, zope_interface
|
||||
}:
|
||||
|
||||
buildPythonPackage rec {
|
||||
pname = "zope.broken";
|
||||
version = "3.6.0";
|
||||
|
||||
src = fetchPypi {
|
||||
inherit pname version;
|
||||
extension = "zip";
|
||||
sha256 = "b9b8776002da4f7b6b12dfcce77eb642ae62b39586dbf60e1d9bdc992c9f2999";
|
||||
};
|
||||
|
||||
buildInputs = [ zope_interface ];
|
||||
|
||||
meta = with lib; {
|
||||
homepage = "http://pypi.python.org/pypi/zope.broken";
|
||||
description = "Zope Broken Object Interfaces";
|
||||
license = licenses.zpl20;
|
||||
maintainers = with maintainers; [ goibhniu ];
|
||||
};
|
||||
|
||||
}
|
|
@ -1,21 +1,21 @@
|
|||
{
|
||||
"version": "1.0.1",
|
||||
"version": "1.0.2",
|
||||
"assets": {
|
||||
"aarch64-darwin": {
|
||||
"asset": "scala-cli-aarch64-apple-darwin.gz",
|
||||
"sha256": "0n6jlxbfw21ck1qg2xzkrp0p4hlvr21cxfp3p27svp01104n6ig8"
|
||||
"sha256": "0a1gsrzavflyp6vk7qghb7az9ki1mq4vkncsbjwq0b5hrmy4mxry"
|
||||
},
|
||||
"aarch64-linux": {
|
||||
"asset": "scala-cli-aarch64-pc-linux.gz",
|
||||
"sha256": "05rmxi7nwxkvx6as6sbfvrsyll2lp06iq77z22glkkv8y1dd6334"
|
||||
"sha256": "0six9qcrihshn4sbiyzkbxdnkflqq5az166fdi5wz4rq0l4jj02z"
|
||||
},
|
||||
"x86_64-darwin": {
|
||||
"asset": "scala-cli-x86_64-apple-darwin.gz",
|
||||
"sha256": "1vsjp3sdnclx5w4bv1kzkk23q848374phlx3ix0qln04ih821q0l"
|
||||
"sha256": "1c6dsidgcjscqzknvn1sl66kjvjbg400dxxb9lp134zm2sn8r3r2"
|
||||
},
|
||||
"x86_64-linux": {
|
||||
"asset": "scala-cli-x86_64-pc-linux.gz",
|
||||
"sha256": "1904f2z3hvkl2rmj0czk5qkw9327zqf5m8i4ad0bzyrri5q7q4ki"
|
||||
"sha256": "1a35xhkvri5nlk65ms0rwlcgsbl8264j6c60665ds2h9dwph06n7"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -2,13 +2,13 @@
|
|||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "lua-language-server";
|
||||
version = "3.6.24";
|
||||
version = "3.6.25";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "luals";
|
||||
repo = "lua-language-server";
|
||||
rev = version;
|
||||
sha256 = "sha256-PjJUoh2wqXUhYNNYIu5PLk3WZoWxBvwf3NA36xEYb2I=";
|
||||
sha256 = "sha256-fERsqOjuZSIPpTEAQbKZ/ZYzQENxJi8Gibb6Oi073pA=";
|
||||
fetchSubmodules = true;
|
||||
};
|
||||
|
||||
|
|
|
@ -5,16 +5,16 @@
|
|||
|
||||
rustPlatform.buildRustPackage {
|
||||
pname = "complgen";
|
||||
version = "unstable-2023-07-10";
|
||||
version = "unstable-2023-07-20";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "adaszko";
|
||||
repo = "complgen";
|
||||
rev = "6b1fbc50d56061c74e3324362b23ba5211aaff25";
|
||||
hash = "sha256-y94DOMW3w+/YJ4uNvEM4y/dZXZuwFPYhDuh2TOyBn8U=";
|
||||
rev = "18ad7e5def8e9b9701a79511a23a2091baad8a9e";
|
||||
hash = "sha256-1nNxcYi7HrA2vcggiLC5UPTX3dmM5xgjubnX7WtCq/A=";
|
||||
};
|
||||
|
||||
cargoHash = "sha256-fzLM1vxY1FBpw/5JDp4+VO9SVfCQCH8Et5a0WTYSHwk=";
|
||||
cargoHash = "sha256-rR9wj34QUmIn5HE0k2nOa7HHO5DI+w6BbCgJ4Aelt44=";
|
||||
|
||||
meta = with lib; {
|
||||
description = "Generate {bash,fish,zsh} completions from a single EBNF-like grammar";
|
||||
|
|
|
@ -25,13 +25,13 @@ let
|
|||
in
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "prismlauncher-unwrapped";
|
||||
version = "7.1";
|
||||
version = "7.2";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "PrismLauncher";
|
||||
repo = "PrismLauncher";
|
||||
rev = version;
|
||||
sha256 = "sha256-ri4oaeJKmvjJapUASPX10nl4JcLPjA3SgTp2EyaEPWg=";
|
||||
sha256 = "sha256-RArg60S91YKp1Mt97a5JNfBEOf2cmuX4pK3VAx2WfqM=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ extra-cmake-modules cmake jdk17 ninja ];
|
||||
|
@ -46,7 +46,10 @@ stdenv.mkDerivation rec {
|
|||
|
||||
hardeningEnable = [ "pie" ];
|
||||
|
||||
cmakeFlags = lib.optionals (msaClientID != null) [ "-DLauncher_MSA_CLIENT_ID=${msaClientID}" ]
|
||||
cmakeFlags = [
|
||||
# downstream branding
|
||||
"-DLauncher_BUILD_PLATFORM=nixpkgs"
|
||||
] ++ lib.optionals (msaClientID != null) [ "-DLauncher_MSA_CLIENT_ID=${msaClientID}" ]
|
||||
++ lib.optionals (lib.versionOlder qtbase.version "6") [ "-DLauncher_QT_VERSION_MAJOR=5" ];
|
||||
|
||||
postUnpack = ''
|
||||
|
|
147
pkgs/os-specific/linux/dcgm/default.nix
Normal file
147
pkgs/os-specific/linux/dcgm/default.nix
Normal file
|
@ -0,0 +1,147 @@
|
|||
{ lib
|
||||
, callPackage
|
||||
, gcc11Stdenv
|
||||
, fetchFromGitHub
|
||||
, addOpenGLRunpath
|
||||
, catch2
|
||||
, cmake
|
||||
, cudaPackages_10_2
|
||||
, cudaPackages_11_8
|
||||
, cudaPackages_12
|
||||
, fmt_9
|
||||
, git
|
||||
, jsoncpp
|
||||
, libevent
|
||||
, plog
|
||||
, python3
|
||||
, symlinkJoin
|
||||
, tclap_1_4
|
||||
, yaml-cpp
|
||||
}:
|
||||
let
|
||||
# Flags copied from DCGM's libevent build script
|
||||
libevent-nossl = libevent.override { sslSupport = false; };
|
||||
libevent-nossl-static = libevent-nossl.overrideAttrs (super: {
|
||||
CFLAGS = "-Wno-cast-function-type -Wno-implicit-fallthrough -fPIC";
|
||||
CXXFLAGS = "-Wno-cast-function-type -Wno-implicit-fallthrough -fPIC";
|
||||
configureFlags = super.configureFlags ++ [ "--disable-shared" "--with-pic" ];
|
||||
});
|
||||
|
||||
jsoncpp-static = jsoncpp.override { enableStatic = true; };
|
||||
|
||||
# DCGM depends on 3 different versions of CUDA at the same time.
|
||||
# The runtime closure, thankfully, is quite small because most things
|
||||
# are statically linked.
|
||||
cudaPackageSetByVersion = [
|
||||
{
|
||||
version = "10";
|
||||
# Nixpkgs cudaPackages_10 doesn't have redist packages broken out.
|
||||
pkgSet = [
|
||||
cudaPackages_10_2.cudatoolkit
|
||||
cudaPackages_10_2.cudatoolkit.lib
|
||||
];
|
||||
}
|
||||
{
|
||||
version = "11";
|
||||
pkgSet = getCudaPackages cudaPackages_11_8;
|
||||
}
|
||||
{
|
||||
version = "12";
|
||||
pkgSet = getCudaPackages cudaPackages_12;
|
||||
}
|
||||
];
|
||||
|
||||
# Select needed redist packages from cudaPackages
|
||||
# C.f. https://github.com/NVIDIA/DCGM/blob/7e1012302679e4bb7496483b32dcffb56e528c92/dcgmbuild/scripts/0080_cuda.sh#L24-L39
|
||||
getCudaPackages = p: with p; [
|
||||
cuda_cccl
|
||||
cuda_cudart
|
||||
cuda_nvcc
|
||||
cuda_nvml_dev
|
||||
libcublas
|
||||
libcufft
|
||||
libcurand
|
||||
];
|
||||
|
||||
# Builds CMake code to add CUDA paths for include and lib.
|
||||
mkAppendCudaPaths = { version, pkgSet }:
|
||||
let
|
||||
# The DCGM CMake assumes that the folder containing cuda.h contains all headers, so we must
|
||||
# combine everything together for headers to work.
|
||||
# It would be more convenient to use symlinkJoin on *just* the include subdirectories
|
||||
# of each package, but not all of them have an include directory and making that work
|
||||
# is more effort than it's worth for this temporary, build-time package.
|
||||
combined = symlinkJoin {
|
||||
name = "cuda-combined-${version}";
|
||||
paths = pkgSet;
|
||||
};
|
||||
# The combined package above breaks the build for some reason so we just configure
|
||||
# each package's library path.
|
||||
libs = lib.concatMapStringsSep " " (x: ''"${x}/lib"'') pkgSet;
|
||||
in ''
|
||||
list(APPEND Cuda${version}_INCLUDE_PATHS "${combined}/include")
|
||||
list(APPEND Cuda${version}_LIB_PATHS ${libs})
|
||||
'';
|
||||
|
||||
# gcc11 is required by DCGM's very particular build system
|
||||
# C.f. https://github.com/NVIDIA/DCGM/blob/7e1012302679e4bb7496483b32dcffb56e528c92/dcgmbuild/build.sh#L22
|
||||
in gcc11Stdenv.mkDerivation rec {
|
||||
pname = "dcgm";
|
||||
version = "3.1.8";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "NVIDIA";
|
||||
repo = "DCGM";
|
||||
rev = "refs/tags/v${version}";
|
||||
hash = "sha256-OXqXkP2ZUNPzafGIgJ0MKa39xB84keVFFYl+JsHgnks=";
|
||||
};
|
||||
|
||||
# Add our paths to the CUDA paths so FindCuda.cmake can find them.
|
||||
EXTRA_CUDA_PATHS = lib.concatMapStringsSep "\n" mkAppendCudaPaths cudaPackageSetByVersion;
|
||||
prePatch = ''
|
||||
echo "$EXTRA_CUDA_PATHS"$'\n'"$(cat cmake/FindCuda.cmake)" > cmake/FindCuda.cmake
|
||||
'';
|
||||
|
||||
hardeningDisable = [ "all" ];
|
||||
|
||||
nativeBuildInputs = [
|
||||
addOpenGLRunpath
|
||||
cmake
|
||||
git
|
||||
python3
|
||||
|
||||
jsoncpp-static
|
||||
jsoncpp-static.dev
|
||||
libevent-nossl-static
|
||||
libevent-nossl-static.dev
|
||||
plog.dev # header-only
|
||||
tclap_1_4 # header-only
|
||||
];
|
||||
|
||||
buildInputs = [
|
||||
catch2
|
||||
fmt_9
|
||||
yaml-cpp
|
||||
];
|
||||
|
||||
# libcuda.so must be found at runtime because it is supplied by the NVIDIA
|
||||
# driver. autoAddOpenGLRunpathHook breaks on the statically linked exes.
|
||||
postFixup = ''
|
||||
find "$out/bin" "$out/lib" -type f -executable -print0 | while IFS= read -r -d "" f; do
|
||||
if isELF "$f" && [[ $(patchelf --print-needed "$f" || true) == *libcuda.so* ]]; then
|
||||
addOpenGLRunpath "$f"
|
||||
fi
|
||||
done
|
||||
'';
|
||||
|
||||
disallowedReferences = lib.concatMap (x: x.pkgSet) cudaPackageSetByVersion;
|
||||
|
||||
meta = with lib; {
|
||||
description = "Data Center GPU Manager (DCGM) is a daemon that allows users to monitor NVIDIA data-center GPUs.";
|
||||
homepage = "https://developer.nvidia.com/dcgm";
|
||||
license = licenses.asl20;
|
||||
maintainers = teams.deshaw.members;
|
||||
mainProgram = "dcgmi";
|
||||
platforms = platforms.linux;
|
||||
};
|
||||
}
|
66
pkgs/servers/monitoring/prometheus/dcgm-exporter/default.nix
Normal file
66
pkgs/servers/monitoring/prometheus/dcgm-exporter/default.nix
Normal file
|
@ -0,0 +1,66 @@
|
|||
{ lib
|
||||
, buildGoModule
|
||||
, fetchFromGitHub
|
||||
, cudaPackages
|
||||
, dcgm
|
||||
, linuxPackages
|
||||
}:
|
||||
buildGoModule rec {
|
||||
pname = "dcgm-exporter";
|
||||
version = "3.1.8-3.1.5";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "NVIDIA";
|
||||
repo = pname;
|
||||
rev = "refs/tags/${version}";
|
||||
hash = "sha256-Jzv3cU3gmGIXV+DV3wV/1zSWwz18s3Jax6JC7WZW7Z4=";
|
||||
};
|
||||
|
||||
# Upgrade to go 1.17 during the vendoring FOD build because it fails otherwise.
|
||||
overrideModAttrs = _: {
|
||||
preBuild = ''
|
||||
substituteInPlace go.mod --replace 'go 1.16' 'go 1.17'
|
||||
go mod tidy
|
||||
'';
|
||||
postInstall = ''
|
||||
cp go.mod "$out/go.mod"
|
||||
'';
|
||||
};
|
||||
|
||||
CGO_LDFLAGS = "-ldcgm";
|
||||
|
||||
buildInputs = [
|
||||
dcgm
|
||||
];
|
||||
|
||||
# gonvml and go-dcgm do not work with ELF BIND_NOW hardening because not all
|
||||
# symbols are available on startup.
|
||||
hardeningDisable = [ "bindnow" ];
|
||||
|
||||
# Copy the modified go.mod we got from the vendoring process.
|
||||
preBuild = ''
|
||||
cp vendor/go.mod go.mod
|
||||
'';
|
||||
|
||||
vendorHash = "sha256-KMCV79kUY1sNYysH0MmB7pVU98r7v+DpLIoYHxyyG4U=";
|
||||
|
||||
nativeBuildInputs = [
|
||||
cudaPackages.autoAddOpenGLRunpathHook
|
||||
];
|
||||
|
||||
# Tests try to interact with running DCGM service.
|
||||
doCheck = false;
|
||||
|
||||
postFixup = ''
|
||||
patchelf --add-needed libnvidia-ml.so "$out/bin/dcgm-exporter"
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "NVIDIA GPU metrics exporter for Prometheus leveraging DCGM";
|
||||
homepage = "https://github.com/NVIDIA/dcgm-exporter";
|
||||
license = licenses.asl20;
|
||||
maintainers = teams.deshaw.members;
|
||||
mainProgram = "dcgm-exporter";
|
||||
platforms = platforms.linux;
|
||||
};
|
||||
}
|
|
@ -321,4 +321,54 @@
|
|||
echo "tested $binCount binCount: $ignoredCount ignored, $brokenCount broken, $failedCount failed"
|
||||
[[ $failedCount = 0 ]]
|
||||
'';
|
||||
|
||||
# verify that the precomputed licensing information in default.nix
|
||||
# does indeed match the metadata of the individual packages.
|
||||
#
|
||||
# This is part of the test suite (and not the normal evaluation) to save
|
||||
# time for "normal" evaluations. To be more in line with the other tests, this
|
||||
# also builds a derivation, even though it is essentially an eval-time assertion.
|
||||
licenses =
|
||||
let
|
||||
concatLicenses = builtins.foldl' (acc: el: if builtins.elem el acc then acc else acc ++ [ el ]);
|
||||
# converts a license to its attribute name in lib.licenses
|
||||
licenseToAttrName = license:
|
||||
builtins.head (builtins.attrNames
|
||||
(lib.filterAttrs (n: v: license == v) lib.licenses));
|
||||
lt = (a: b: a < b);
|
||||
|
||||
savedLicenses = scheme: scheme.meta.license;
|
||||
savedLicensesAttrNames = scheme: map licenseToAttrName (savedLicenses scheme);
|
||||
|
||||
correctLicenses = scheme: builtins.foldl'
|
||||
(acc: pkg: concatLicenses acc (lib.toList (pkg.meta.license or [])))
|
||||
[]
|
||||
scheme.passthru.packages;
|
||||
correctLicensesAttrNames = scheme:
|
||||
lib.sort lt
|
||||
(map licenseToAttrName (correctLicenses scheme));
|
||||
|
||||
hasLicenseMismatch = scheme:
|
||||
(lib.isDerivation scheme) &&
|
||||
(savedLicensesAttrNames scheme) != (correctLicensesAttrNames scheme);
|
||||
incorrectSchemes = lib.filterAttrs
|
||||
(n: hasLicenseMismatch)
|
||||
texlive.combined;
|
||||
prettyPrint = name: scheme:
|
||||
''
|
||||
license info for ${name} is incorrect! Note that order is enforced.
|
||||
saved: [ ${lib.concatStringsSep " " (savedLicensesAttrNames scheme)} ]
|
||||
correct: [ ${lib.concatStringsSep " " (correctLicensesAttrNames scheme)} ]
|
||||
'';
|
||||
errorText = lib.concatStringsSep "\n\n" (lib.mapAttrsToList prettyPrint incorrectSchemes);
|
||||
in
|
||||
runCommand "texlive-test-license" {
|
||||
inherit errorText;
|
||||
}
|
||||
(if (incorrectSchemes == {})
|
||||
then "echo everything is fine! > $out"
|
||||
else ''
|
||||
echo "$errorText"
|
||||
false
|
||||
'');
|
||||
}
|
||||
|
|
|
@ -2,14 +2,14 @@
|
|||
|
||||
rustPlatform.buildRustPackage rec {
|
||||
pname = "ripdrag";
|
||||
version = "0.3.1";
|
||||
version = "0.3.2";
|
||||
|
||||
src = fetchCrate {
|
||||
inherit pname version;
|
||||
hash = "sha256-SSH/HCvrUvWNIqlx7F6eNMM1eGxGGg5eel/X/q1Um1g=";
|
||||
hash = "sha256-vxAAAFLTIfLqYD7E/nwsHgFLhzMRF7DspIaWqAMZcXk=";
|
||||
};
|
||||
|
||||
cargoHash = "sha256-FvStPBmyETjCaBqQK/KYHpwtqNCiY6n484E5bumdRzk=";
|
||||
cargoHash = "sha256-6GKLBnG1p6iaFvnEQgfNlGpZwEG93tI256DCMLuJjOU=";
|
||||
|
||||
nativeBuildInputs = [ pkg-config wrapGAppsHook4 ];
|
||||
|
||||
|
|
|
@ -6,11 +6,11 @@
|
|||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "babeld";
|
||||
version = "1.13";
|
||||
version = "1.13.1";
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://www.irif.fr/~jch/software/files/${pname}-${version}.tar.gz";
|
||||
hash = "sha256-0IXMzPsGoR1/pbVMUdnEEPXzsKk4n1hJUTNv8Xjyk7g=";
|
||||
hash = "sha256-FfJNJtoMz8Bzq83vAwnygeRoTyqnESb4JlcsTIRejdk=";
|
||||
};
|
||||
|
||||
outputs = [
|
||||
|
|
|
@ -11,16 +11,16 @@
|
|||
|
||||
rustPlatform.buildRustPackage rec {
|
||||
pname = "sequoia-chameleon-gnupg";
|
||||
version = "0.3.1";
|
||||
version = "0.3.2";
|
||||
|
||||
src = fetchFromGitLab {
|
||||
owner = "sequoia-pgp";
|
||||
repo = pname;
|
||||
rev = "v${version}";
|
||||
hash = "sha256-sxjWd02INP2Dr5RQR7+dHHIQkGoCx6CZmvrq9x9zVC8=";
|
||||
hash = "sha256-Qe9KKZh0Zim/BdPn2aMxkH6FBOBB6zijkp5ft9YfzzU=";
|
||||
};
|
||||
|
||||
cargoHash = "sha256-+0MLfq2Gjs4oh9bC8OEQsx0RHxlzB/HlIgyXtwzvGUY=";
|
||||
cargoHash = "sha256-KuVSpbAfLVIy5YJ/8qb+Rfw1TgZkWfR+Ai9gDcf4EQ4=";
|
||||
|
||||
nativeBuildInputs = [
|
||||
rustPlatform.bindgenHook
|
||||
|
|
|
@ -7,13 +7,13 @@
|
|||
|
||||
buildGoModule rec {
|
||||
pname = "gtree";
|
||||
version = "1.9.2";
|
||||
version = "1.9.3";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "ddddddO";
|
||||
repo = "gtree";
|
||||
rev = "v${version}";
|
||||
hash = "sha256-RBGbFC+MOteCImPwzn2WYq5LTYF6rZEpTt1hlfHvUBw=";
|
||||
hash = "sha256-cQO34m78lvgfbDf+Ok0Yo3rnou8ndGfegeIy1Z8xuPU=";
|
||||
};
|
||||
|
||||
vendorHash = "sha256-QxcDa499XV43p8fstENOtfe3iZ176R5/Ub5iovXlYIM=";
|
||||
|
|
|
@ -72,6 +72,23 @@ CTAN and the various mirrors) and that the build recipe continues to produce
|
|||
the same output. Should those assumptions not hold, remove the previous fixed
|
||||
hashes for the relevant package, or for all packages.
|
||||
|
||||
### Updating the licensing information
|
||||
|
||||
The license of each package in texlive is automatically extracted from texlive's
|
||||
texlive.tlpdb into tlpdb.nix. The combined licenses of the schemes is stored
|
||||
separately in `default.nix` and must be kept in sync with the licenses of the
|
||||
actual contents of these schemes. Whether this is the case can be verified with the
|
||||
`pkgs.tests.texlive.licenses` test. In case of a mismatch, copy the “correct”
|
||||
license lists reported by the test into `default.nix`.
|
||||
|
||||
### Running the testsuite
|
||||
|
||||
There are a some other useful tests that haven't been mentioned before. Build them with
|
||||
```
|
||||
nix-build ../../../../.. -A tests.texlive --no-out-link
|
||||
```
|
||||
|
||||
|
||||
### Commit changes
|
||||
|
||||
Commit the updated `tlpdb.nix` and `fixed-hashes.nix` to the repository with
|
||||
|
|
|
@ -43,6 +43,7 @@ let
|
|||
# it seems to need it to transform fonts
|
||||
xdvi.deps = (orig.xdvi.deps or []) ++ [ "metafont" ];
|
||||
|
||||
# TODO: remove when updating to texlive-2023, metadata has been corrected in the TeX catalogue
|
||||
# tlpdb lists license as "unknown", but the README says lppl13: http://mirrors.ctan.org/language/arabic/arabi-add/README
|
||||
arabi-add.license = [ "lppl13c" ];
|
||||
|
||||
|
@ -254,13 +255,38 @@ in
|
|||
|
||||
# Pre-defined combined packages for TeX Live schemes,
|
||||
# to make nix-env usage more comfortable and build selected on Hydra.
|
||||
combined = with lib; recurseIntoAttrs (
|
||||
combined = with lib;
|
||||
let
|
||||
# these license lists should be the sorted union of the licenses of the packages the schemes contain.
|
||||
# The correctness of this collation is tested by tests.texlive.licenses
|
||||
licenses = with lib.licenses; {
|
||||
scheme-basic = [ free gfl gpl1Only gpl2 gpl2Plus knuth lgpl21 lppl1 lppl13c mit ofl publicDomain ];
|
||||
scheme-context = [ bsd2 bsd3 cc-by-sa-40 free gfl gfsl gpl1Only gpl2 gpl2Plus gpl3 gpl3Plus knuth lgpl2 lgpl21
|
||||
lppl1 lppl13c mit ofl publicDomain x11 ];
|
||||
scheme-full = [ artistic1 artistic1-cl8 asl20 bsd2 bsd3 bsdOriginal cc-by-10 cc-by-40 cc-by-sa-10 cc-by-sa-20
|
||||
cc-by-sa-30 cc-by-sa-40 cc0 fdl13Only free gfl gfsl gpl1Only gpl1Plus gpl2 gpl2Plus gpl3 gpl3Plus isc knuth
|
||||
lgpl2 lgpl21 lgpl3 lppl1 lppl12 lppl13a lppl13c mit ofl publicDomain x11 ];
|
||||
scheme-gust = [ artistic1-cl8 asl20 bsd2 bsd3 cc-by-40 cc-by-sa-40 cc0 fdl13Only free gfl gfsl gpl1Only gpl2
|
||||
gpl2Plus gpl3 gpl3Plus knuth lgpl2 lgpl21 lppl1 lppl12 lppl13a lppl13c mit ofl publicDomain x11 ];
|
||||
scheme-infraonly = [ gpl2 lgpl21 ];
|
||||
scheme-medium = [ artistic1-cl8 asl20 bsd2 bsd3 cc-by-40 cc-by-sa-20 cc-by-sa-30 cc-by-sa-40 cc0 fdl13Only
|
||||
free gfl gpl1Only gpl2 gpl2Plus gpl3 gpl3Plus isc knuth lgpl2 lgpl21 lgpl3 lppl1 lppl12 lppl13a lppl13c mit ofl
|
||||
publicDomain x11 ];
|
||||
scheme-minimal = [ free gpl1Only gpl2 gpl2Plus knuth lgpl21 lppl1 lppl13c mit ofl publicDomain ];
|
||||
scheme-small = [ asl20 cc-by-40 cc-by-sa-40 cc0 fdl13Only free gfl gpl1Only gpl2 gpl2Plus gpl3 gpl3Plus knuth
|
||||
lgpl2 lgpl21 lppl1 lppl12 lppl13a lppl13c mit ofl publicDomain x11 ];
|
||||
scheme-tetex = [ artistic1-cl8 asl20 bsd2 bsd3 cc-by-40 cc-by-sa-10 cc-by-sa-20 cc-by-sa-30 cc-by-sa-40 cc0
|
||||
fdl13Only free gfl gpl1Only gpl2 gpl2Plus gpl3 gpl3Plus isc knuth lgpl2 lgpl21 lgpl3 lppl1 lppl12 lppl13a
|
||||
lppl13c mit ofl publicDomain x11];
|
||||
};
|
||||
in recurseIntoAttrs (
|
||||
mapAttrs
|
||||
(pname: attrs:
|
||||
addMetaAttrs rec {
|
||||
description = "TeX Live environment for ${pname}";
|
||||
platforms = lib.platforms.all;
|
||||
maintainers = with lib.maintainers; [ veprbl ];
|
||||
license = licenses.${pname};
|
||||
}
|
||||
(combine {
|
||||
${pname} = attrs;
|
||||
|
|
|
@ -555,6 +555,8 @@ with pkgs;
|
|||
|
||||
dbip-country-lite = callPackage ../data/misc/dbip-country-lite { };
|
||||
|
||||
dcgm = callPackage ../os-specific/linux/dcgm { };
|
||||
|
||||
dhallDirectoryToNix = callPackage ../build-support/dhall/directory-to-nix.nix { };
|
||||
|
||||
dhallPackageToNix = callPackage ../build-support/dhall/package-to-nix.nix { };
|
||||
|
@ -25017,7 +25019,11 @@ with pkgs;
|
|||
|
||||
taskflow = callPackage ../development/libraries/taskflow { };
|
||||
|
||||
tclap = callPackage ../development/libraries/tclap { };
|
||||
tclap = tclap_1_2;
|
||||
|
||||
tclap_1_2 = callPackage ../development/libraries/tclap/1.2.nix { };
|
||||
|
||||
tclap_1_4 = callPackage ../development/libraries/tclap/1.4.nix { };
|
||||
|
||||
tcllib = callPackage ../development/libraries/tcllib { };
|
||||
|
||||
|
@ -26847,6 +26853,7 @@ with pkgs;
|
|||
prometheus-cloudflare-exporter = callPackage ../servers/monitoring/prometheus/cloudflare-exporter.nix { };
|
||||
prometheus-collectd-exporter = callPackage ../servers/monitoring/prometheus/collectd-exporter.nix { };
|
||||
prometheus-consul-exporter = callPackage ../servers/monitoring/prometheus/consul-exporter.nix { };
|
||||
prometheus-dcgm-exporter = callPackage ../servers/monitoring/prometheus/dcgm-exporter { };
|
||||
prometheus-dnsmasq-exporter = callPackage ../servers/monitoring/prometheus/dnsmasq-exporter.nix { };
|
||||
prometheus-dovecot-exporter = callPackage ../servers/monitoring/prometheus/dovecot-exporter.nix { };
|
||||
prometheus-domain-exporter = callPackage ../servers/monitoring/prometheus/domain-exporter.nix { };
|
||||
|
@ -39928,6 +39935,10 @@ with pkgs;
|
|||
|
||||
helmfile = callPackage ../applications/networking/cluster/helmfile { };
|
||||
|
||||
helmfile-wrapped = callPackage ../applications/networking/cluster/helmfile {
|
||||
inherit (kubernetes-helm-wrapped.passthru) pluginsDir;
|
||||
};
|
||||
|
||||
helm-dashboard = callPackage ../applications/networking/cluster/helm-dashboard { };
|
||||
|
||||
helmsman = callPackage ../applications/networking/cluster/helmsman { };
|
||||
|
|
|
@ -377,4 +377,5 @@ mapAliases ({
|
|||
zake = throw "zake has been removed because it is abandoned"; # added 2023-06-20
|
||||
zc-buildout221 = zc-buildout; # added 2021-07-21
|
||||
zc_buildout_nix = throw "zc_buildout_nix was pinned to a version no longer compatible with other modules";
|
||||
zope_broken = throw "zope_broken has been removed because it is obsolete and not needed in zodb>=3.10"; # added 2023-07-26
|
||||
})
|
||||
|
|
|
@ -194,6 +194,8 @@ self: super: with self; {
|
|||
|
||||
aiogithubapi = callPackage ../development/python-modules/aiogithubapi { };
|
||||
|
||||
aiogram = callPackage ../development/python-modules/aiogram { };
|
||||
|
||||
aioharmony = callPackage ../development/python-modules/aioharmony { };
|
||||
|
||||
aiohomekit = callPackage ../development/python-modules/aiohomekit { };
|
||||
|
@ -6183,6 +6185,8 @@ self: super: with self; {
|
|||
|
||||
magicgui = callPackage ../development/python-modules/magicgui { };
|
||||
|
||||
magic-filter = callPackage ../development/python-modules/magic-filter { };
|
||||
|
||||
magic-wormhole = callPackage ../development/python-modules/magic-wormhole { };
|
||||
|
||||
magic-wormhole-mailbox-server = callPackage ../development/python-modules/magic-wormhole-mailbox-server { };
|
||||
|
@ -13889,8 +13893,6 @@ self: super: with self; {
|
|||
|
||||
zodbpickle = callPackage ../development/python-modules/zodbpickle { };
|
||||
|
||||
zope_broken = callPackage ../development/python-modules/zope_broken { };
|
||||
|
||||
zope-cachedescriptors = callPackage ../development/python-modules/zope-cachedescriptors { };
|
||||
|
||||
zope_component = callPackage ../development/python-modules/zope_component { };
|
||||
|
|
Loading…
Reference in a new issue