diff options
38 files changed, 530 insertions, 180 deletions
diff --git a/nixos/modules/module-list.nix b/nixos/modules/module-list.nix index 9957fdbb5c4..b6b41f6a169 100644 --- a/nixos/modules/module-list.nix +++ b/nixos/modules/module-list.nix @@ -281,6 +281,7 @@ ./services/databases/riak.nix ./services/databases/riak-cs.nix ./services/databases/stanchion.nix + ./services/databases/victoriametrics.nix ./services/databases/virtuoso.nix ./services/desktops/accountsservice.nix ./services/desktops/bamf.nix @@ -427,6 +428,7 @@ ./services/misc/exhibitor.nix ./services/misc/felix.nix ./services/misc/folding-at-home.nix + ./services/misc/freeswitch.nix ./services/misc/fstrim.nix ./services/misc/gammu-smsd.nix ./services/misc/geoip-updater.nix diff --git a/nixos/modules/services/databases/victoriametrics.nix b/nixos/modules/services/databases/victoriametrics.nix new file mode 100644 index 00000000000..cb6bf8508fb --- /dev/null +++ b/nixos/modules/services/databases/victoriametrics.nix @@ -0,0 +1,70 @@ +{ config, pkgs, lib, ... }: +let cfg = config.services.victoriametrics; in +{ + options.services.victoriametrics = with lib; { + enable = mkEnableOption "victoriametrics"; + package = mkOption { + type = types.package; + default = pkgs.victoriametrics; + defaultText = "pkgs.victoriametrics"; + description = '' + The VictoriaMetrics distribution to use. + ''; + }; + listenAddress = mkOption { + default = ":8428"; + type = types.str; + description = '' + The listen address for the http interface. + ''; + }; + retentionPeriod = mkOption { + type = types.int; + default = 1; + description = '' + Retention period in months. + ''; + }; + extraOptions = mkOption { + type = types.listOf types.str; + default = []; + description = '' + Extra options to pass to VictoriaMetrics. See the README: <link + xlink:href="https://github.com/VictoriaMetrics/VictoriaMetrics/blob/master/README.md" /> + or <command>victoriametrics -help</command> for more + information. + ''; + }; + }; + config = lib.mkIf cfg.enable { + systemd.services.victoriametrics = { + description = "VictoriaMetrics time series database"; + after = [ "network.target" ]; + serviceConfig = { + Restart = "on-failure"; + RestartSec = 1; + StartLimitBurst = 5; + StateDirectory = "victoriametrics"; + DynamicUser = true; + ExecStart = '' + ${cfg.package}/bin/victoria-metrics \ + -storageDataPath=/var/lib/victoriametrics \ + -httpListenAddr ${cfg.listenAddress} + -retentionPeriod ${toString cfg.retentionPeriod} + ${lib.escapeShellArgs cfg.extraOptions} + ''; + }; + wantedBy = [ "multi-user.target" ]; + + postStart = + let + bindAddr = (lib.optionalString (lib.hasPrefix ":" cfg.listenAddress) "127.0.0.1") + cfg.listenAddress; + in + lib.mkBefore '' + until ${lib.getBin pkgs.curl}/bin/curl -s -o /dev/null http://${bindAddr}/ping; do + sleep 1; + done + ''; + }; + }; +} diff --git a/nixos/modules/services/misc/freeswitch.nix b/nixos/modules/services/misc/freeswitch.nix new file mode 100644 index 00000000000..0de5ba42811 --- /dev/null +++ b/nixos/modules/services/misc/freeswitch.nix @@ -0,0 +1,103 @@ +{ config, lib, pkgs, ...}: +with lib; +let + cfg = config.services.freeswitch; + pkg = cfg.package; + configDirectory = pkgs.runCommand "freeswitch-config-d" { } '' + mkdir -p $out + cp -rT ${cfg.configTemplate} $out + chmod -R +w $out + ${concatStringsSep "\n" (mapAttrsToList (fileName: filePath: '' + mkdir -p $out/$(dirname ${fileName}) + cp ${filePath} $out/${fileName} + '') cfg.configDir)} + ''; + configPath = if cfg.enableReload + then "/etc/freeswitch" + else configDirectory; +in { + options = { + services.freeswitch = { + enable = mkEnableOption "FreeSWITCH"; + enableReload = mkOption { + default = false; + type = types.bool; + description = '' + Issue the <literal>reloadxml</literal> command to FreeSWITCH when configuration directory changes (instead of restart). + See <link xlink:href="https://freeswitch.org/confluence/display/FREESWITCH/Reloading">FreeSWITCH documentation</link> for more info. + The configuration directory is exposed at <filename>/etc/freeswitch</filename>. + See also <literal>systemd.services.*.restartIfChanged</literal>. + ''; + }; + configTemplate = mkOption { + type = types.path; + default = "${config.services.freeswitch.package}/share/freeswitch/conf/vanilla"; + defaultText = literalExample "\${config.services.freeswitch.package}/share/freeswitch/conf/vanilla"; + example = literalExample "\${config.services.freeswitch.package}/share/freeswitch/conf/minimal"; + description = '' + Configuration template to use. + See available templates in <link xlink:href="https://github.com/signalwire/freeswitch/tree/master/conf">FreeSWITCH repository</link>. + You can also set your own configuration directory. + ''; + }; + configDir = mkOption { + type = with types; attrsOf path; + default = { }; + example = literalExample '' + { + "freeswitch.xml" = ./freeswitch.xml; + "dialplan/default.xml" = pkgs.writeText "dialplan-default.xml" ''' + [xml lines] + '''; + } + ''; + description = '' + Override file in FreeSWITCH config template directory. + Each top-level attribute denotes a file path in the configuration directory, its value is the file path. + See <link xlink:href="https://freeswitch.org/confluence/display/FREESWITCH/Default+Configuration">FreeSWITCH documentation</link> for more info. + Also check available templates in <link xlink:href="https://github.com/signalwire/freeswitch/tree/master/conf">FreeSWITCH repository</link>. + ''; + }; + package = mkOption { + type = types.package; + default = pkgs.freeswitch; + defaultText = literalExample "pkgs.freeswitch"; + example = literalExample "pkgs.freeswitch"; + description = '' + FreeSWITCH package. + ''; + }; + }; + }; + config = mkIf cfg.enable { + environment.etc.freeswitch = mkIf cfg.enableReload { + source = configDirectory; + }; + systemd.services.freeswitch-config-reload = mkIf cfg.enableReload { + before = [ "freeswitch.service" ]; + wantedBy = [ "multi-user.target" ]; + restartTriggers = [ configDirectory ]; + serviceConfig = { + ExecStart = "${pkgs.systemd}/bin/systemctl try-reload-or-restart freeswitch.service"; + RemainAfterExit = true; + Type = "oneshot"; + }; + }; + systemd.services.freeswitch = { + description = "Free and open-source application server for real-time communication"; + after = [ "network.target" ]; + wantedBy = [ "multi-user.target" ]; + serviceConfig = { + DynamicUser = true; + StateDirectory = "freeswitch"; + ExecStart = "${pkg}/bin/freeswitch -nf \\ + -mod ${pkg}/lib/freeswitch/mod \\ + -conf ${configPath} \\ + -base /var/lib/freeswitch"; + ExecReload = "${pkg}/bin/fs_cli -x reloadxml"; + Restart = "always"; + RestartSec = "5s"; + }; + }; + }; +} diff --git a/nixos/modules/services/security/bitwarden_rs/default.nix b/nixos/modules/services/security/bitwarden_rs/default.nix index d1817db0755..a63be0ee766 100644 --- a/nixos/modules/services/security/bitwarden_rs/default.nix +++ b/nixos/modules/services/security/bitwarden_rs/default.nix @@ -18,15 +18,33 @@ let else key + toUpper x) "" parts; in if builtins.match "[A-Z0-9_]+" name != null then name else partsToEnvVar parts; - configFile = pkgs.writeText "bitwarden_rs.env" (concatMapStrings (s: s + "\n") ( - (concatLists (mapAttrsToList (name: value: - if value != null then [ "${nameToEnvVar name}=${if isBool value then boolToString value else toString value}" ] else [] - ) cfg.config)))); + # Due to the different naming schemes allowed for config keys, + # we can only check for values consistently after converting them to their corresponding environment variable name. + configEnv = + let + configEnv = listToAttrs (concatLists (mapAttrsToList (name: value: + if value != null then [ (nameValuePair (nameToEnvVar name) (if isBool value then boolToString value else toString value)) ] else [] + ) cfg.config)); + in { DATA_FOLDER = "/var/lib/bitwarden_rs"; } // optionalAttrs (!(configEnv ? WEB_VAULT_ENABLED) || configEnv.WEB_VAULT_ENABLED == "true") { + WEB_VAULT_FOLDER = "${pkgs.bitwarden_rs-vault}/share/bitwarden_rs/vault"; + } // configEnv; + + configFile = pkgs.writeText "bitwarden_rs.env" (concatStrings (mapAttrsToList (name: value: "${name}=${value}\n") configEnv)); + + bitwarden_rs = pkgs.bitwarden_rs.override { inherit (cfg) dbBackend; }; in { options.services.bitwarden_rs = with types; { enable = mkEnableOption "bitwarden_rs"; + dbBackend = mkOption { + type = enum [ "sqlite" "mysql" "postgresql" ]; + default = "sqlite"; + description = '' + Which database backend bitwarden_rs will be using. + ''; + }; + backupDir = mkOption { type = nullOr str; default = null; @@ -56,23 +74,20 @@ in { even though foo2 would have been converted to FOO_2. This allows working around any potential future conflicting naming conventions. - Based on the attributes passed to this config option a environment file will be generated + Based on the attributes passed to this config option an environment file will be generated that is passed to bitwarden_rs's systemd service. The available configuration options can be found in - <link xlink:href="https://github.com/dani-garcia/bitwarden_rs/blob/1.8.0/.env.template">the environment template file</link>. + <link xlink:href="https://github.com/dani-garcia/bitwarden_rs/blob/${bitwarden_rs.version}/.env.template">the environment template file</link>. ''; - apply = config: optionalAttrs config.webVaultEnabled { - webVaultFolder = "${pkgs.bitwarden_rs-vault}/share/bitwarden_rs/vault"; - } // config; }; }; config = mkIf cfg.enable { - services.bitwarden_rs.config = { - dataFolder = "/var/lib/bitwarden_rs"; - webVaultEnabled = mkDefault true; - }; + assertions = [ { + assertion = cfg.backupDir != null -> cfg.dbBackend == "sqlite"; + message = "Backups for database backends other than sqlite will need customization"; + } ]; users.users.bitwarden_rs = { inherit group; @@ -87,7 +102,7 @@ in { User = user; Group = group; EnvironmentFile = configFile; - ExecStart = "${pkgs.bitwarden_rs}/bin/bitwarden_rs"; + ExecStart = "${bitwarden_rs}/bin/bitwarden_rs"; LimitNOFILE = "1048576"; LimitNPROC = "64"; PrivateTmp = "true"; @@ -109,6 +124,7 @@ in { path = with pkgs; [ sqlite ]; serviceConfig = { SyslogIdentifier = "backup-bitwarden_rs"; + Type = "oneshot"; User = mkDefault user; Group = mkDefault group; ExecStart = "${pkgs.bash}/bin/bash ${./backup.sh}"; diff --git a/nixos/modules/virtualisation/lxd.nix b/nixos/modules/virtualisation/lxd.nix index b4934a86cf5..de48d3a780e 100644 --- a/nixos/modules/virtualisation/lxd.nix +++ b/nixos/modules/virtualisation/lxd.nix @@ -7,6 +7,7 @@ with lib; let cfg = config.virtualisation.lxd; + zfsCfg = config.boot.zfs; in @@ -26,11 +27,40 @@ in <command>lxc</command> command line tool, among others. ''; }; + + package = mkOption { + type = types.package; + default = pkgs.lxd; + defaultText = "pkgs.lxd"; + description = '' + The LXD package to use. + ''; + }; + + lxcPackage = mkOption { + type = types.package; + default = pkgs.lxc; + defaultText = "pkgs.lxc"; + description = '' + The LXC package to use with LXD (required for AppArmor profiles). + ''; + }; + + zfsPackage = mkOption { + type = types.package; + default = with pkgs; if zfsCfg.enableUnstable then zfsUnstable else zfs; + defaultText = "pkgs.zfs"; + description = '' + The ZFS package to use with LXD. + ''; + }; + zfsSupport = mkOption { type = types.bool; default = false; description = '' - enables lxd to use zfs as a storage for containers. + Enables lxd to use zfs as a storage for containers. + This option is enabled by default if a zfs pool is configured with nixos. ''; @@ -54,15 +84,15 @@ in config = mkIf cfg.enable { - environment.systemPackages = [ pkgs.lxd ]; + environment.systemPackages = [ cfg.package ]; security.apparmor = { enable = true; profiles = [ - "${pkgs.lxc}/etc/apparmor.d/usr.bin.lxc-start" - "${pkgs.lxc}/etc/apparmor.d/lxc-containers" + "${cfg.lxcPackage}/etc/apparmor.d/usr.bin.lxc-start" + "${cfg.lxcPackage}/etc/apparmor.d/lxc-containers" ]; - packages = [ pkgs.lxc ]; + packages = [ cfg.lxcPackage ]; }; systemd.services.lxd = { @@ -71,14 +101,14 @@ in wantedBy = [ "multi-user.target" ]; after = [ "systemd-udev-settle.service" ]; - path = lib.optional cfg.zfsSupport pkgs.zfs; + path = lib.optional cfg.zfsSupport cfg.zfsPackage; preStart = '' mkdir -m 0755 -p /var/lib/lxc/rootfs ''; serviceConfig = { - ExecStart = "@${pkgs.lxd.bin}/bin/lxd lxd --group lxd"; + ExecStart = "@${cfg.package.bin}/bin/lxd lxd --group lxd"; Type = "simple"; KillMode = "process"; # when stopping, leave the containers alone LimitMEMLOCK = "infinity"; diff --git a/nixos/tests/all-tests.nix b/nixos/tests/all-tests.nix index 8c11464f9d6..2f26bb782c9 100644 --- a/nixos/tests/all-tests.nix +++ b/nixos/tests/all-tests.nix @@ -94,6 +94,7 @@ in flannel = handleTestOn ["x86_64-linux"] ./flannel.nix {}; fluentd = handleTest ./fluentd.nix {}; fontconfig-default-fonts = handleTest ./fontconfig-default-fonts.nix {}; + freeswitch = handleTest ./freeswitch.nix {}; fsck = handleTest ./fsck.nix {}; gotify-server = handleTest ./gotify-server.nix {}; gitea = handleTest ./gitea.nix {}; @@ -293,6 +294,7 @@ in upnp = handleTest ./upnp.nix {}; uwsgi = handleTest ./uwsgi.nix {}; vault = handleTest ./vault.nix {}; + victoriametrics = handleTest ./victoriametrics.nix {}; virtualbox = handleTestOn ["x86_64-linux"] ./virtualbox.nix {}; wireguard = handleTest ./wireguard {}; wireguard-generated = handleTest ./wireguard/generated.nix {}; diff --git a/nixos/tests/freeswitch.nix b/nixos/tests/freeswitch.nix new file mode 100644 index 00000000000..349d0e7bc6f --- /dev/null +++ b/nixos/tests/freeswitch.nix @@ -0,0 +1,29 @@ +import ./make-test-python.nix ({ pkgs, ...} : { + name = "freeswitch"; + meta = with pkgs.stdenv.lib.maintainers; { + maintainers = [ misuzu ]; + }; + nodes = { + node0 = { config, lib, ... }: { + networking.useDHCP = false; + networking.interfaces.eth1 = { + ipv4.addresses = [ + { + address = "192.168.0.1"; + prefixLength = 24; + } + ]; + }; + services.freeswitch = { + enable = true; + enableReload = true; + configTemplate = "${config.services.freeswitch.package}/share/freeswitch/conf/minimal"; + }; + }; + }; + testScript = '' + node0.wait_for_unit("freeswitch.service") + # Wait for SIP port to be open + node0.wait_for_open_port("5060") + ''; +}) diff --git a/nixos/tests/victoriametrics.nix b/nixos/tests/victoriametrics.nix new file mode 100644 index 00000000000..73ef8b72861 --- /dev/null +++ b/nixos/tests/victoriametrics.nix @@ -0,0 +1,31 @@ +# This test runs influxdb and checks if influxdb is up and running + +import ./make-test-python.nix ({ pkgs, ...} : { + name = "victoriametrics"; + meta = with pkgs.stdenv.lib.maintainers; { + maintainers = [ yorickvp ]; + }; + + nodes = { + one = { ... }: { + services.victoriametrics.enable = true; + }; + }; + + testScript = '' + start_all() + + one.wait_for_unit("victoriametrics.service") + + # write some points and run simple query + out = one.succeed( + "curl -d 'measurement,tag1=value1,tag2=value2 field1=123,field2=1.23' -X POST 'http://localhost:8428/write'" + ) + cmd = """curl -s -G 'http://localhost:8428/api/v1/export' -d 'match={__name__!=""}'""" + # data takes a while to appear + one.wait_until_succeeds(f"[[ $({cmd} | wc -l) -ne 0 ]]") + out = one.succeed(cmd) + assert '"values":[123]' in out + assert '"values":[1.23]' in out + ''; +}) diff --git a/pkgs/applications/audio/gpodder/default.nix b/pkgs/applications/audio/gpodder/default.nix index b972aae7de8..1d6bc33cc55 100644 --- a/pkgs/applications/audio/gpodder/default.nix +++ b/pkgs/applications/audio/gpodder/default.nix @@ -5,14 +5,14 @@ python3Packages.buildPythonApplication rec { pname = "gpodder"; - version = "3.10.11"; + version = "3.10.12"; format = "other"; src = fetchFromGitHub { owner = pname; repo = pname; rev = version; - sha256 = "15f5z3cnch9lpzbz73l4wjykv9n74y8djz5db53la2ql4ihaxfz9"; + sha256 = "0q95am079gg01dkivr972mm2k87y8z296a9yf7amzsf9hxfycdra"; }; patches = [ diff --git a/pkgs/applications/blockchains/go-ethereum.nix b/pkgs/applications/blockchains/go-ethereum.nix index 34cfe868c0b..f7f0aaf603e 100644 --- a/pkgs/applications/blockchains/go-ethereum.nix +++ b/pkgs/applications/blockchains/go-ethereum.nix @@ -2,16 +2,16 @@ buildGoModule rec { pname = "go-ethereum"; - version = "1.9.9"; + version = "1.9.10"; src = fetchFromGitHub { owner = "ethereum"; repo = pname; rev = "v${version}"; - sha256 = "00fhqn0b9grqz8iigzbijg7b1va58vccjb15fpy6yfr301z3ib1q"; + sha256 = "0pm8gfr4g7rbax6vzxv6lklpx83mxghah7fyvpk3jqvm1mq299ln"; }; - modSha256 = "1rn1x3qc23wfcx9c61sw1sc6iqwvv2b9pv006lk1az4zbwh09dbm"; + modSha256 = "0zar9nvx2nk6kyijp8df3y2rzxvg0mccj6b3skhzf8y9c27hvrsg"; subPackages = [ "cmd/abigen" diff --git a/pkgs/applications/editors/android-studio/default.nix b/pkgs/applications/editors/android-studio/default.nix index 4bea9188579..60d00b7fbc7 100644 --- a/pkgs/applications/editors/android-studio/default.nix +++ b/pkgs/applications/editors/android-studio/default.nix @@ -13,9 +13,9 @@ let sha256Hash = "1nsm4d3vdx90szqd78a8mjq65xc9m5ipd35cqrlx3c3ny900sqxg"; }; betaVersion = { - version = "3.6.0.18"; # "Android Studio 3.6 RC 1" - build = "192.6071332"; - sha256Hash = "0xpcihr5xxr9l1kv6aflywshs8fww3s7di0g98mz475whhxwzf3q"; + version = "3.6.0.19"; # "Android Studio 3.6 RC 2" + build = "192.6165589"; + sha256Hash = "1d47nfhzb0apfzin4bg5bck4jjid3jipm5s4n36r7fh20lpx93z5"; }; latestVersion = { # canary & dev version = "4.0.0.9"; # "Android Studio 4.0 Canary 9" diff --git a/pkgs/applications/misc/gpxsee/default.nix b/pkgs/applications/misc/gpxsee/default.nix index d3dcdd29e56..d3d732f410f 100644 --- a/pkgs/applications/misc/gpxsee/default.nix +++ b/pkgs/applications/misc/gpxsee/default.nix @@ -1,4 +1,4 @@ -{ mkDerivation, lib, fetchFromGitHub, qmake, qttools }: +{ stdenv, mkDerivation, lib, fetchFromGitHub, qmake, qttools }: mkDerivation rec { pname = "gpxsee"; @@ -18,6 +18,12 @@ mkDerivation rec { lrelease lang/*.ts ''; + postInstall = lib.optionalString stdenv.isDarwin '' + mkdir -p $out/Applications + mv GPXSee.app $out/Applications + wrapQtApp $out/Applications/GPXSee.app/Contents/MacOS/GPXSee + ''; + enableParallelBuilding = true; meta = with lib; { @@ -29,6 +35,6 @@ mkDerivation rec { ''; license = licenses.gpl3; maintainers = with maintainers; [ womfoo sikmir ]; - platforms = platforms.linux; + platforms = with platforms; linux ++ darwin; }; } diff --git a/pkgs/applications/networking/cluster/kops/default.nix b/pkgs/applications/networking/cluster/kops/default.nix index 267f25f8bb5..e3b82152e6f 100644 --- a/pkgs/applications/networking/cluster/kops/default.nix +++ b/pkgs/applications/networking/cluster/kops/default.nix @@ -67,7 +67,7 @@ in rec { }; kops_1_15 = mkKops { - version = "1.15.0"; - sha256 = "0sjas8pn0njl767b1y15g7cci2q3kxkxwmgr0wvs7vi3n1s1sf9d"; + version = "1.15.1"; + sha256 = "0iq2bqq6zv6sk2psar33c3smnz79rk5v623qx4kr5h47wnqvrfvj"; }; } diff --git a/pkgs/applications/networking/instant-messengers/telegram/tdesktop/default.nix b/pkgs/applications/networking/instant-messengers/telegram/tdesktop/default.nix index 75e7b6c98bc..f4ade076726 100644 --- a/pkgs/applications/networking/instant-messengers/telegram/tdesktop/default.nix +++ b/pkgs/applications/networking/instant-messengers/telegram/tdesktop/default.nix @@ -31,6 +31,8 @@ mkDerivation rec { --replace '"appindicator3"' '"${libappindicator-gtk3}/lib/libappindicator3.so"' substituteInPlace Telegram/lib_spellcheck/spellcheck/platform/linux/linux_enchant.cpp \ --replace '"libenchant-2.so.2"' '"${enchant2}/lib/libenchant-2.so.2"' + substituteInPlace Telegram/CMakeLists.txt \ + --replace '"''${TDESKTOP_LAUNCHER_BASENAME}.appdata.xml"' '"''${TDESKTOP_LAUNCHER_BASENAME}.metainfo.xml"' ''; # We want to run wrapProgram manually (with additional parameters) @@ -79,18 +81,6 @@ mkDerivation rec { # Both of these packages are included in this PR (kotatogram-desktop): # https://github.com/NixOS/nixpkgs/pull/75210 - installPhase = '' - install -Dm755 bin/telegram-desktop $out/bin/telegram-desktop - - mkdir -p $out/share/{kservices5,applications,metainfo} - install -m444 "../lib/xdg/telegramdesktop.desktop" "$out/share/applications/telegram-desktop.desktop" - install -m644 "../lib/xdg/telegramdesktop.appdata.xml" "$out/share/metainfo/telegramdesktop.metainfo.xml" - - for icon_size in 16 32 48 64 128 256 512; do - install -Dm644 "../Telegram/Resources/art/icon''${icon_size}.png" "$out/share/icons/hicolor/''${icon_size}x''${icon_size}/apps/telegram.png" - done - ''; - postFixup = '' # This is necessary to run Telegram in a pure environment. # We also use gappsWrapperArgs from wrapGAppsHook. diff --git a/pkgs/applications/networking/newsreaders/quiterss/default.nix b/pkgs/applications/networking/newsreaders/quiterss/default.nix index d54e8eca78e..2333d47d820 100644 --- a/pkgs/applications/networking/newsreaders/quiterss/default.nix +++ b/pkgs/applications/networking/newsreaders/quiterss/default.nix @@ -4,13 +4,13 @@ stdenv.mkDerivation rec { pname = "quiterss"; - version = "0.19.2"; + version = "0.19.3"; src = fetchFromGitHub { owner = "QuiteRSS"; repo = "quiterss"; rev = version; - sha256 = "1dmfag5hmy4jac20nizwgd92w8h2hdl2ch57hvw5hmjyfckn9rpj"; + sha256 = "06m5mhzxvv8q2adaqcrar3sx2c1hc89h2i0qfjxmirfc5z67hdw2"; }; nativeBuildInputs = [ qmake pkgconfig wrapQtAppsHook ]; diff --git a/pkgs/applications/science/biology/seaview/default.nix b/pkgs/applications/science/biology/seaview/default.nix index 69dece88c27..fea8da41d70 100644 --- a/pkgs/applications/science/biology/seaview/default.nix +++ b/pkgs/applications/science/biology/seaview/default.nix @@ -1,12 +1,12 @@ { stdenv, fetchurl, coreutils, fltk, libjpeg }: stdenv.mkDerivation rec { - version = "4.7"; + version = "5.0"; pname = "seaview"; src = fetchurl { url = "ftp://pbil.univ-lyon1.fr/pub/mol_phylogeny/seaview/archive/seaview_${version}.tar.gz"; - sha256 = "0fhyq7dcn0izhwcfin9ajsr7kmmsqm9f1np1rmhzg4digfwqb29n"; + sha256 = "0gzjqf5mm91pa1drwxvz229bv6l995npdggngszh6z6j4pfh8j7c"; }; buildInputs = [ fltk libjpeg ]; diff --git a/pkgs/applications/science/physics/sherpa/default.nix b/pkgs/applications/science/physics/sherpa/default.nix index 045a77cea27..04115399c1a 100644 --- a/pkgs/applications/science/physics/sherpa/default.nix +++ b/pkgs/applications/science/physics/sherpa/default.nix @@ -2,11 +2,11 @@ stdenv.mkDerivation rec { pname = "sherpa"; - version = "2.2.6"; + version = "2.2.8"; src = fetchurl { url = "https://www.hepforge.org/archive/sherpa/SHERPA-MC-${version}.tar.gz"; - sha256 = "1cagkkz1pjl0pdf85w1qkwhx0afi3kxm1vnmfavq1zqhss7fc57i"; + sha256 = "1al1imdrknvbcy8k113xysc14lln4msbv281bf0kx7p73wz59mv3"; }; buildInputs = [ gfortran sqlite lhapdf rivet ]; diff --git a/pkgs/build-support/rust/build-rust-crate/configure-crate.nix b/pkgs/build-support/rust/build-rust-crate/configure-crate.nix index efc538f0fd6..c146ffef5ff 100644 --- a/pkgs/build-support/rust/build-rust-crate/configure-crate.nix +++ b/pkgs/build-support/rust/build-rust-crate/configure-crate.nix @@ -137,16 +137,7 @@ in '' CRATENAME=$(echo ${crateName} | sed -e "s/\(.*\)-sys$/\U\1/") grep -P "^cargo:(?!(rustc-|warning=|rerun-if-changed=|rerun-if-env-changed))" target/build/${crateName}.opt \ | sed -e "s/cargo:\([^=]*\)=\(.*\)/export DEP_$(echo $CRATENAME)_\U\1\E=\2/" > target/env - set -e - if [[ -n "$(ls target/build/${crateName}.out)" ]]; then - - if [[ -e "${libPath}" ]]; then - cp -r target/build/${crateName}.out/* $(dirname ${libPath}) #*/ - else - cp -r target/build/${crateName}.out/* src #*/ - fi - fi fi runHook postConfigure '' diff --git a/pkgs/build-support/rust/build-rust-crate/test/default.nix b/pkgs/build-support/rust/build-rust-crate/test/default.nix index cdffb30d9b3..6aad02992c1 100644 --- a/pkgs/build-support/rust/build-rust-crate/test/default.nix +++ b/pkgs/build-support/rust/build-rust-crate/test/default.nix @@ -199,6 +199,27 @@ let }) ]; }; + # Regression test for https://github.com/NixOS/nixpkgs/issues/74071 + # Whenevever a build.rs file is generating files those should not be overlayed onto the actual source dir + buildRsOutDirOverlay = { + src = symlinkJoin { + name = "buildrs-out-dir-overlay"; + paths = [ + (mkLib "src/lib.rs") + (mkFile "build.rs" '' + use std::env; + use std::ffi::OsString; + use std::fs; + use std::path::Path; + fn main() { + let out_dir = env::var_os("OUT_DIR").expect("OUT_DIR not set"); + let out_file = Path::new(&out_dir).join("lib.rs"); + fs::write(out_file, "invalid rust code!").expect("failed to write lib.rs"); + } + '') + ]; + }; + }; }; brotliCrates = (callPackage ./brotli-crates.nix {}); in lib.mapAttrs (key: value: mkTest (value // lib.optionalAttrs (!value?crateName) { crateName = key; })) cases // { diff --git a/pkgs/data/icons/qogir-icon-theme/default.nix b/pkgs/data/icons/qogir-icon-theme/default.nix index b7ae27aac68..8bfde381633 100644 --- a/pkgs/data/icons/qogir-icon-theme/default.nix +++ b/pkgs/data/icons/qogir-icon-theme/default.nix @@ -2,17 +2,19 @@ stdenv.mkDerivation rec { pname = "qogir-icon-theme"; - version = "2019-09-15"; + version = "2020-01-29"; src = fetchFromGitHub { owner = "vinceliuice"; repo = pname; - rev = "4e1b6c693615bc2c7c7a11df6f4b90f2e6fb67db"; - sha256 = "1vp1wp4fgmy5af8z8nb3m6wgmb6wbwlvx5smf9dxfcn254hdg8g0"; + rev = version; + sha256 = "0g6qiry4gzkr48xn4qi8sdna0hi3982sywskz9adkzqcznir542h"; }; nativeBuildInputs = [ gtk3 ]; + dontDropIconThemeCache = true; + installPhase = '' patchShebangs install.sh mkdir -p $out/share/icons @@ -21,7 +23,7 @@ stdenv.mkDerivation rec { meta = with stdenv.lib; { description = "A colorful design icon theme for linux desktops"; - homepage = https://github.com/vinceliuice/Qogir-icon-theme; + homepage = "https://github.com/vinceliuice/Qogir-icon-theme"; license = with licenses; [ gpl3 ]; platforms = platforms.linux; maintainers = with maintainers; [ romildo ]; diff --git a/pkgs/development/compilers/crystal/default.nix b/pkgs/development/compilers/crystal/default.nix index 03a914695a0..12464344348 100644 --- a/pkgs/development/compilers/crystal/default.nix +++ b/pkgs/development/compilers/crystal/default.nix @@ -58,16 +58,17 @@ let outputs = [ "out" "lib" "bin" ]; - # we are almost able to run the full test suite now postPatch = '' substituteInPlace src/crystal/system/unix/time.cr \ --replace /usr/share/zoneinfo ${tzdata}/share/zoneinfo ln -s spec/compiler spec/std + mkdir /tmp/crystal substituteInPlace spec/std/file_spec.cr \ --replace '/bin/ls' '${coreutils}/bin/ls' \ - --replace '/usr/share' '/tmp/test' + --replace '/usr/share' '/tmp/crystal' \ + --replace '/usr' '/tmp' substituteInPlace spec/std/process_spec.cr \ --replace '/bin/cat' '${coreutils}/bin/cat' \ @@ -76,8 +77,23 @@ let --replace '"env"' '"${coreutils}/bin/env"' \ --replace '"/usr"' '"/tmp"' + substituteInPlace spec/std/socket/tcp_server_spec.cr \ + --replace '{% if flag?(:gnu) %}"listen: "{% else %}"bind: "{% end %}' '"bind: "' + substituteInPlace spec/std/system_spec.cr \ --replace '`hostname`' '`${nettools}/bin/hostname`' + + # See https://github.com/crystal-lang/crystal/pull/8640 + substituteInPlace spec/std/http/cookie_spec.cr \ + --replace '01 Jan 2020' '01 Jan #{Time.utc.year + 2}' + + # See https://github.com/crystal-lang/crystal/issues/8629 + substituteInPlace spec/std/socket/udp_socket_spec.cr \ + --replace 'it "joins and transmits to multicast groups"' 'pending "joins and transmits to multicast groups"' + + # See https://github.com/crystal-lang/crystal/pull/8699 + substituteInPlace spec/std/xml/xml_spec.cr \ + --replace 'it "handles errors"' 'pending "handles errors"' ''; buildInputs = commonBuildInputs extraBuildInputs; @@ -189,6 +205,24 @@ in rec { }; }; + binaryCrystal_0_30 = genericBinary { + version = "0.30.1"; + sha256s = { + x86_64-linux = "1k2mb74jh3ns3m7y73j4wpf571sayn73zbn6d7q81d09r280zrma"; + i686-linux = "0vsq1ayf922spydp2g2mmimc797jmm7nl5nljhfppcclrwygdyk2"; + x86_64-darwin = "1p3s4lwdgykb7h7aysjhrs7vm0zhinzw5d7rfv6jsyin4j8yxhzz"; + }; + }; + + binaryCrystal_0_31 = genericBinary { + version = "0.31.1"; + sha256s = { + x86_64-linux = "0r8salf572xrnr4m6ll9q5hz6jj8q7ff1rljlhmqb1r26a8mi2ih"; + i686-linux = "0hridnis5vvrswflx0q67xfg5hryhz6ivlwrb9n4pryj5d1gwjrr"; + x86_64-darwin = "1dgxgv0s3swkc5cwawzgpbc6bcd2nx4hjxc7iw2h907y1vgmbipz"; + }; + }; + crystal_0_25 = generic { version = "0.25.1"; sha256 = "15xmbkalsdk9qpc6wfpkly3sifgw6a4ai5jzlv78dh3jp7glmgyl"; @@ -228,18 +262,16 @@ in rec { version = "0.31.1"; sha256 = "1dswxa32w16gnc6yjym12xj7ibg0g6zk3ngvl76lwdjqb1h6lwz8"; doCheck = false; # 5 checks are failing now - binary = crystal_0_30; + binary = binaryCrystal_0_30; }; crystal_0_32 = generic { - version = "255bfc5fa925b95b72e34b26ad997fb2b3f83059"; - sha256 = "1dgk36cj5lwhs1c4zp0s1c9hjk0h3vljq6zwhlnzkl1xs7cgzim1"; - doCheck = false; # 5 checks are failing now - binary = crystal_0_31; - extraBuildInputs = [ readline ]; + version = "0.32.1"; + sha256 = "120ndi3nhh2r52hjvhwfb49cdggr1bzdq6b8xg7irzavhjinfza6"; + binary = binaryCrystal_0_31; }; - crystal = crystal_0_31; + crystal = crystal_0_32; crystal2nix = callPackage ./crystal2nix.nix {}; } diff --git a/pkgs/development/python-modules/nest-asyncio/default.nix b/pkgs/development/python-modules/nest-asyncio/default.nix index 0016da922ff..334edd0cf1e 100644 --- a/pkgs/development/python-modules/nest-asyncio/default.nix +++ b/pkgs/development/python-modules/nest-asyncio/default.nix @@ -1,4 +1,4 @@ -{ stdenv +{ lib , buildPythonPackage , fetchPypi , pythonAtLeast @@ -19,10 +19,10 @@ buildPythonPackage rec { doCheck = false; pythonImportsCheck = [ "nest_asyncio" ]; - meta = with stdenv.lib; { - homepage = https://github.com/erdewit/nest_asyncio; + meta = with lib; { description = "Patch asyncio to allow nested event loops"; + homepage = "https://github.com/erdewit/nest_asyncio"; license = licenses.bsdOriginal; - maintainers = [ maintainers.costrouc ]; + maintainers = with maintainers; [ costrouc ]; }; } diff --git a/pkgs/development/python-modules/sympy/default.nix b/pkgs/development/python-modules/sympy/default.nix index 2128be1a3c0..3a03fae154d 100644 --- a/pkgs/development/python-modules/sympy/default.nix +++ b/pkgs/development/python-modules/sympy/default.nix @@ -8,11 +8,11 @@ buildPythonPackage rec { pname = "sympy"; - version = "1.5"; # Upgrades may break sage. Please test or ping @timokau. + version = "1.5.1"; # Upgrades may break sage. Please test or ping @timokau. src = fetchPypi { inherit pname version; - sha256 = "1s4w7q8gndim2ky825a84jmwcf7ryfn10wm8yxz9dw5z2307smii"; + sha256 = "d77901d748287d15281f5ffe5b0fef62dd38f357c2b827c44ff07f35695f4e7e"; }; checkInputs = [ glibcLocales ]; @@ -21,15 +21,16 @@ buildPythonPackage rec { # tests take ~1h doCheck = false; + pythonImportsCheck = [ "sympy" ]; preCheck = '' export LANG="en_US.UTF-8" ''; - meta = { + meta = with lib; { description = "A Python library for symbolic mathematics"; - homepage = https://www.sympy.org/; - license = lib.licenses.bsd3; - maintainers = with lib.maintainers; [ lovek323 timokau ]; + homepage = "https://www.sympy.org/"; + license = licenses.bsd3; + maintainers = with maintainers; [ lovek323 timokau ]; }; } diff --git a/pkgs/development/tools/build-managers/rebar3/default.nix b/pkgs/development/tools/build-managers/rebar3/default.nix index 4ebeb7f0528..792daba791b 100644 --- a/pkgs/development/tools/build-managers/rebar3/default.nix +++ b/pkgs/development/tools/build-managers/rebar3/default.nix @@ -78,6 +78,8 @@ stdenv.mkDerivation rec { sha256 = "0936ix7lfwsamssap58b265zid7x2m97azrr2qpjcln3xysd16lg"; }; + bootstrapper = ./rebar3-nix-bootstrap; + buildInputs = [ erlang tree ]; postPatch = '' diff --git a/pkgs/games/mindustry/default.nix b/pkgs/games/mindustry/default.nix index 6e6d6b56014..3d4f52f2c70 100644 --- a/pkgs/games/mindustry/default.nix +++ b/pkgs/games/mindustry/default.nix @@ -12,6 +12,8 @@ # any build is allowed, so this parameter acts as a simple whitelist. # Takes the package version and returns the build version. , makeBuildVersion ? (v: v) +, enableClient ? true +, enableServer ? true }: let @@ -52,6 +54,9 @@ let pname = "${pname}-deps"; inherit version src postPatch; nativeBuildInputs = [ gradle_5 perl ]; + # Here we build both the server and the client so we only have to specify + # one hash for 'deps'. Deps can be garbage collected after the build, + # so this is not really an issue. buildPhase = '' export GRADLE_USER_HOME=$(mktemp -d) gradle --no-daemon desktop:dist -Pbuildversion=${buildVersion} @@ -68,31 +73,49 @@ let outputHash = "16k058fw9yk89adx8j1708ynfri5yizmmvh49prls9slw4hipffb"; }; -in stdenv.mkDerivation rec { - inherit pname version src postPatch; - - nativeBuildInputs = [ gradle_5 makeWrapper ]; - - buildPhase = '' - export GRADLE_USER_HOME=$(mktemp -d) - # point to offline repo - sed -ie "s#mavenLocal()#mavenLocal(); maven { url '${deps}' }#g" build.gradle + # Separate commands for building and installing the server and the client + buildClient = '' gradle --offline --no-daemon desktop:dist -Pbuildversion=${buildVersion} + ''; + buildServer = '' gradle --offline --no-daemon server:dist -Pbuildversion=${buildVersion} ''; - - installPhase = '' + installClient = '' install -Dm644 desktop/build/libs/Mindustry.jar $out/share/mindustry.jar - install -Dm644 server/build/libs/server-release.jar $out/share/mindustry-server.jar - mkdir $out/bin + mkdir -p $out/bin makeWrapper ${jre}/bin/java $out/bin/mindustry \ --prefix LD_LIBRARY_PATH : ${libpulseaudio}/lib \ --add-flags "-jar $out/share/mindustry.jar" - makeWrapper ${jre}/bin/java $out/bin/mindustry-server \ - --add-flags "-jar $out/share/mindustry-server.jar" install -Dm644 core/assets/icons/icon_64.png $out/share/icons/hicolor/64x64/apps/mindustry.png install -Dm644 ${desktopItem}/share/applications/Mindustry.desktop $out/share/applications/Mindustry.desktop ''; + installServer = '' + install -Dm644 server/build/libs/server-release.jar $out/share/mindustry-server.jar + mkdir -p $out/bin + makeWrapper ${jre}/bin/java $out/bin/mindustry-server \ + --add-flags "-jar $out/share/mindustry-server.jar" + ''; + +in +assert stdenv.lib.assertMsg (enableClient || enableServer) + "mindustry: at least one of 'enableClient' and 'enableServer' must be true"; +stdenv.mkDerivation rec { + inherit pname version src postPatch; + + nativeBuildInputs = [ gradle_5 makeWrapper ]; + + buildPhase = with stdenv.lib; '' + export GRADLE_USER_HOME=$(mktemp -d) + # point to offline repo + sed -ie "s#mavenLocal()#mavenLocal(); maven { url '${deps}' }#g" build.gradle + ${optionalString enableClient buildClient} + ${optionalString enableServer buildServer} + ''; + + installPhase = with stdenv.lib; '' + ${optionalString enableClient installClient} + ${optionalString enableServer installServer} + ''; meta = with stdenv.lib; { homepage = "https://mindustrygame.github.io/"; diff --git a/pkgs/games/scummvm/default.nix b/pkgs/games/scummvm/default.nix index 8ef6e0c8be5..80fa840cc69 100644 --- a/pkgs/games/scummvm/default.nix +++ b/pkgs/games/scummvm/default.nix @@ -4,11 +4,11 @@ stdenv.mkDerivation rec { pname = "scummvm"; - version = "2.1.0"; + version = "2.1.1"; src = fetchurl { url = "http://scummvm.org/frs/scummvm/${version}/${pname}-${version}.tar.xz"; - sha256 = "6b50c6596a1536b52865f556dc05ded20f86b6ffabe4bccbd746b5587b15f727"; + sha256 = "1a6waf1ybp91nwva8g650cljlfb1di4l0jv13vg6yfgkas9pclsp"; }; nativeBuildInputs = [ nasm ]; diff --git a/pkgs/os-specific/linux/bpftool/default.nix b/pkgs/os-specific/linux/bpftool/default.nix index 8b288fc046a..34ddcc3a213 100644 --- a/pkgs/os-specific/linux/bpftool/default.nix +++ b/pkgs/os-specific/linux/bpftool/default.nix @@ -1,15 +1,19 @@ { stdenv , libopcodes, libbfd, libelf , linuxPackages_latest, zlib +, python3 }: stdenv.mkDerivation { pname = "bpftool"; inherit (linuxPackages_latest.kernel) version src; + nativeBuildInputs = [ python3 ]; buildInputs = [ libopcodes libbfd libelf zlib ]; preConfigure = '' + patchShebangs scripts/bpf_helpers_doc.py + cd tools/bpf/bpftool substituteInPlace ./Makefile \ --replace '/usr/local' "$out" \ diff --git a/pkgs/os-specific/linux/kernel/perf.nix b/pkgs/os-specific/linux/kernel/perf.nix index 9f32e3e37dd..07dd8c78f42 100644 --- a/pkgs/os-specific/linux/kernel/perf.nix +++ b/pkgs/os-specific/linux/kernel/perf.nix @@ -36,7 +36,7 @@ stdenv.mkDerivation { # perf refers both to newt and slang nativeBuildInputs = [ asciidoc xmlto docbook_xsl docbook_xml_dtd_45 libxslt - flex bison libiberty audit makeWrapper pkgconfig + flex bison libiberty audit makeWrapper pkgconfig python3 ]; buildInputs = [ elfutils newt slang libunwind libbfd zlib openssl systemtap.stapBuild numactl @@ -54,6 +54,10 @@ stdenv.mkDerivation { "-Wno-error=stringop-truncation" ]; + postPatch = '' + patchShebangs scripts/bpf_helpers_doc.py + ''; + doCheck = false; # requires "sparse" doInstallCheck = false; # same diff --git a/pkgs/os-specific/linux/wireguard/default.nix b/pkgs/os-specific/linux/wireguard/default.nix index e1de74a1855..247fd8ed250 100644 --- a/pkgs/os-specific/linux/wireguard/default.nix +++ b/pkgs/os-specific/linux/wireguard/default.nix @@ -7,11 +7,11 @@ assert stdenv.lib.versionOlder kernel.version "5.6"; stdenv.mkDerivation rec { pname = "wireguard"; - version = "0.0.20200121"; + version = "0.0.20200128"; src = fetchzip { url = "https://git.zx2c4.com/wireguard-linux-compat/snapshot/wireguard-linux-compat-${version}.tar.xz"; - sha256 = "0h8jq8ki998jw4fynb7if4hcgnl0w6lbd5zwiy0xljj3mfqxdxvv"; + sha256 = "05iz0pl0znx5yham8qzpym2ggc9babh36xaa504k99qqvddg8b11"; }; preConfigure = '' diff --git a/pkgs/servers/nosql/victoriametrics/default.nix b/pkgs/servers/nosql/victoriametrics/default.nix new file mode 100644 index 00000000000..45d3d3cc559 --- /dev/null +++ b/pkgs/servers/nosql/victoriametrics/default.nix @@ -0,0 +1,21 @@ +{ lib, buildGoModule, fetchFromGitHub }: + +buildGoModule rec { + pname = "VictoriaMetrics"; + version = "1.32.5"; + + src = fetchFromGitHub { + owner = pname; + repo = pname; + rev = "v${version}"; + sha256 = "1i3l8bkii3x8wnq9a8yn48cchni5h0gy3rrpvg0jgm4kmm5dlq4y"; + }; + + modSha256 = "0696p1hv5z3dvawizvw0yi4xzl41bsmszkdqayzb37nm5cfk8riq"; + meta = with lib; { + homepage = "https://victoriametrics.com/"; + description = "fast, cost-effective and scalable time series database, long-term remote storage for Prometheus"; + license = licenses.asl20; + maintainers = [ maintainers.yorickvp ]; + }; +} diff --git a/pkgs/servers/sip/freeswitch/default.nix b/pkgs/servers/sip/freeswitch/default.nix index aeedf8b30ae..f6791d01088 100644 --- a/pkgs/servers/sip/freeswitch/default.nix +++ b/pkgs/servers/sip/freeswitch/default.nix @@ -111,6 +111,8 @@ stdenv.mkDerivation rec { ++ lib.unique (lib.concatMap (mod: mod.inputs) enabledModules) ++ lib.optionals stdenv.isDarwin [ SystemConfiguration ]; + enableParallelBuilding = true; + NIX_CFLAGS_COMPILE = "-Wno-error"; hardeningDisable = [ "format" ]; @@ -123,6 +125,8 @@ stdenv.mkDerivation rec { postInstall = '' # helper for compiling modules... not generally useful; also pulls in perl dependency rm "$out"/bin/fsxs + # include configuration templates + cp -r conf $out/share/freeswitch/ ''; meta = { diff --git a/pkgs/servers/uftp/default.nix b/pkgs/servers/uftp/default.nix index 0dfec772a18..13e7fb7b93b 100644 --- a/pkgs/servers/uftp/default.nix +++ b/pkgs/servers/uftp/default.nix @@ -2,11 +2,11 @@ stdenv.mkDerivation rec { pname = "uftp"; - version = "4.10"; + version = "4.10.1"; src = fetchurl { url = "mirror://sourceforge/uftp-multicast/source-tar/uftp-${version}.tar.gz"; - sha256 = "14pjhc8a8fgm5cyy93r693nrjinaps6642v00jpwrjf7h2p8mfli"; + sha256 = "1xi2cvn1lxk1h1kilmjiq8ybxln3rrh6m5cd340zg20vpzz56cwh"; }; buildInputs = [ openssl ]; diff --git a/pkgs/tools/networking/whois/default.nix b/pkgs/tools/networking/whois/default.nix index e079f9a881e..2306359addf 100644 --- a/pkgs/tools/networking/whois/default.nix +++ b/pkgs/tools/networking/whois/default.nix @@ -1,14 +1,14 @@ { stdenv, fetchFromGitHub, perl, gettext, pkgconfig, libidn2, libiconv }: stdenv.mkDerivation rec { - version = "5.5.3"; + version = "5.5.5"; pname = "whois"; src = fetchFromGitHub { owner = "rfc1036"; repo = "whois"; rev = "v${version}"; - sha256 = "099yvqng085f69k815961jnwk50nzmiknvhl1wwmji2hl36r160g"; + sha256 = "01gni315lnkyrwd173fqw0c12qrisfb38wy066s2j85nq64a3nqv"; }; nativeBuildInputs = [ perl gettext pkgconfig ]; diff --git a/pkgs/tools/security/bitwarden_rs/cargo-lock-lettre.patch b/pkgs/tools/security/bitwarden_rs/cargo-lock-lettre.patch deleted file mode 100644 index d9f491ca290..00000000000 --- a/pkgs/tools/security/bitwarden_rs/cargo-lock-lettre.patch +++ /dev/null @@ -1,58 +0,0 @@ -diff --git a/Cargo.lock b/Cargo.lock -index 2e0b695..6d23410 100644 ---- a/Cargo.lock -+++ b/Cargo.lock -@@ -114,8 +114,8 @@ dependencies = [ - "handlebars 1.1.0 (registry+https://github.com/rust-lang/crates.io-index)", - "jsonwebtoken 6.0.1 (registry+https://github.com/rust-lang/crates.io-index)", - "lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", -- "lettre 0.9.1 (registry+https://github.com/rust-lang/crates.io-index)", -- "lettre_email 0.9.1 (registry+https://github.com/rust-lang/crates.io-index)", -+ "lettre 0.9.2 (registry+https://github.com/rust-lang/crates.io-index)", -+ "lettre_email 0.9.2 (registry+https://github.com/rust-lang/crates.io-index)", - "libsqlite3-sys 0.12.0 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", - "multipart 0.16.1 (registry+https://github.com/rust-lang/crates.io-index)", -@@ -1007,13 +1007,11 @@ source = "registry+https://github.com/rust-lang/crates.io-index" - - [[package]] - name = "lettre" --version = "0.9.1" -+version = "0.9.2" - source = "registry+https://github.com/rust-lang/crates.io-index" - dependencies = [ - "base64 0.10.1 (registry+https://github.com/rust-lang/crates.io-index)", - "bufstream 0.1.4 (registry+https://github.com/rust-lang/crates.io-index)", -- "failure 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", -- "failure_derive 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", - "fast_chemail 0.9.6 (registry+https://github.com/rust-lang/crates.io-index)", - "hostname 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", - "log 0.4.6 (registry+https://github.com/rust-lang/crates.io-index)", -@@ -1026,14 +1024,12 @@ dependencies = [ - - [[package]] - name = "lettre_email" --version = "0.9.1" -+version = "0.9.2" - source = "registry+https://github.com/rust-lang/crates.io-index" - dependencies = [ - "base64 0.10.1 (registry+https://github.com/rust-lang/crates.io-index)", - "email 0.0.20 (registry+https://github.com/rust-lang/crates.io-index)", -- "failure 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", -- "failure_derive 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)", -- "lettre 0.9.1 (registry+https://github.com/rust-lang/crates.io-index)", -+ "lettre 0.9.2 (registry+https://github.com/rust-lang/crates.io-index)", - "mime 0.3.13 (registry+https://github.com/rust-lang/crates.io-index)", - "time 0.1.42 (registry+https://github.com/rust-lang/crates.io-index)", - "uuid 0.7.4 (registry+https://github.com/rust-lang/crates.io-index)", -@@ -2858,8 +2854,8 @@ dependencies = [ - "checksum language-tags 0.2.2 (registry+https://github.com/rust-lang/crates.io-index)" = "a91d884b6667cd606bb5a69aa0c99ba811a115fc68915e7056ec08a46e93199a" - "checksum lazy_static 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)" = "bc5729f27f159ddd61f4df6228e827e86643d4d3e7c32183cb30a1c08f604a14" - "checksum lazycell 1.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = "b294d6fa9ee409a054354afc4352b0b9ef7ca222c69b8812cbea9e7d2bf3783f" --"checksum lettre 0.9.1 (registry+https://github.com/rust-lang/crates.io-index)" = "646aee0a55545eaffdf0df1ac19b500b51adb3095ec4dfdc704134e56ea23531" --"checksum lettre_email 0.9.1 (registry+https://github.com/rust-lang/crates.io-index)" = "ae1b3d43e4bb7beb9974a359cbb3ea4f93dfba6c1c0c6e9c9f82e538e0f9ab9f" -+"checksum lettre 0.9.2 (registry+https://github.com/rust-lang/crates.io-index)" = "c66afaa5dfadbb81d4e00fd1d1ab057c7cd4c799c5a44e0009386d553587e728" -+"checksum lettre_email 0.9.2 (registry+https://github.com/rust-lang/crates.io-index)" = "bbb68ca999042d965476e47bbdbacd52db0927348b6f8062c44dd04a3b1fd43b" - "checksum libc 0.2.55 (registry+https://github.com/rust-lang/crates.io-index)" = "42914d39aad277d9e176efbdad68acb1d5443ab65afe0e0e4f0d49352a950880" - "checksum libsqlite3-sys 0.12.0 (registry+https://github.com/rust-lang/crates.io-index)" = "fd6457c70bbff456d9fe49deaba35ec47c3e598bf8d7950ff0575ceb7a8a6ad1" - "checksum lock_api 0.1.5 (registry+https://github.com/rust-lang/crates.io-index)" = "62ebf1391f6acad60e5c8b43706dde4582df75c06698ab44511d15016bc2442c" diff --git a/pkgs/tools/security/bitwarden_rs/default.nix b/pkgs/tools/security/bitwarden_rs/default.nix index f04996f1b43..1b262581eb2 100644 --- a/pkgs/tools/security/bitwarden_rs/default.nix +++ b/pkgs/tools/security/bitwarden_rs/default.nix @@ -1,31 +1,43 @@ -{ stdenv, rustPlatform, fetchFromGitHub, pkgconfig, openssl, Security, CoreServices }: +{ stdenv, rustPlatform, fetchFromGitHub +, pkgconfig, openssl +, Security, CoreServices +, dbBackend ? "sqlite", libmysqlclient, postgresql }: -rustPlatform.buildRustPackage rec { +let + featuresFlag = "--features ${dbBackend}"; + +in rustPlatform.buildRustPackage rec { pname = "bitwarden_rs"; - version = "1.9.1"; + version = "1.13.1"; src = fetchFromGitHub { owner = "dani-garcia"; repo = pname; rev = version; - sha256 = "0jfb4b2lp2v01aw615lx0qj1qh73hyrbjn9kva7zqp74wcfw12gp"; + sha256 = "0af8cnpx86a096m59wmszcfyrfgf7adlqr39phbg647mgjfzwcrk"; }; - cargoPatches = [ - # type annotations required: cannot resolve `std::string::String: std::convert::AsRef<_>` - ./cargo-lock-lettre.patch - ]; - nativeBuildInputs = [ pkgconfig ]; - buildInputs = [ openssl ] ++ stdenv.lib.optionals stdenv.isDarwin [ Security CoreServices ]; + buildInputs = with stdenv.lib; [ openssl ] + ++ optionals stdenv.isDarwin [ Security CoreServices ] + ++ optional (dbBackend == "mysql") libmysqlclient + ++ optional (dbBackend == "postgresql") postgresql; RUSTC_BOOTSTRAP = 1; - cargoSha256 = "0p39gqrqdmgqhngp1qyh6jl0sp0ifj5n3bxfqafjbspb4zph3ls4"; + cargoSha256 = "1v6n4aqhd5pyvvhlzhpmq7ykclfxw82wn2bg7n49b53d9p72jwq6"; + cargoBuildFlags = [ featuresFlag ]; + + checkPhase = '' + runHook preCheck + echo "Running cargo cargo test ${featuresFlag} -- ''${checkFlags} ''${checkFlagsArray+''${checkFlagsArray[@]}}" + cargo test ${featuresFlag} -- ''${checkFlags} ''${checkFlagsArray+"''${checkFlagsArray[@]}"} + runHook postCheck + ''; meta = with stdenv.lib; { - description = "An unofficial lightweight implementation of the Bitwarden server API using Rust and SQLite"; - homepage = https://github.com/dani-garcia/bitwarden_rs; + description = "Unofficial Bitwarden compatible server written in Rust"; + homepage = "https://github.com/dani-garcia/bitwarden_rs"; license = licenses.gpl3; maintainers = with maintainers; [ msteen ]; platforms = platforms.all; diff --git a/pkgs/tools/security/bitwarden_rs/vault.nix b/pkgs/tools/security/bitwarden_rs/vault.nix index 51dde99bcf1..9cbf067d40b 100644 --- a/pkgs/tools/security/bitwarden_rs/vault.nix +++ b/pkgs/tools/security/bitwarden_rs/vault.nix @@ -2,11 +2,11 @@ stdenv.mkDerivation rec { pname = "bitwarden_rs-vault"; - version = "2.12.0"; + version = "2.12.0b"; src = fetchurl { url = "https://github.com/dani-garcia/bw_web_builds/releases/download/v${version}/bw_web_v${version}.tar.gz"; - sha256 = "064dxfplqn67grpx03ryzshwmr7s00w4mll0hk0anddviwvd8r1n"; + sha256 = "01jwyhcam9kh8lpxfgzzw7r3nn9sn6jbgmd78a7h8r50z5hy04g5"; }; buildCommand = '' diff --git a/pkgs/tools/typesetting/tex/nix/run-latex.sh b/pkgs/tools/typesetting/tex/nix/run-latex.sh index 3941fdcac4a..7a5767f9c06 100644 --- a/pkgs/tools/typesetting/tex/nix/run-latex.sh +++ b/pkgs/tools/typesetting/tex/nix/run-latex.sh @@ -47,6 +47,7 @@ runLaTeX() { if fgrep -q \ -e "LaTeX Warning: Label(s) may have changed." \ -e "Rerun to get citations correct." \ + -e "Please rerun LaTeX." \ "$tmpFile"; then runNeeded=1 fi diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 9b6f410493a..2feb885ba5d 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -791,6 +791,9 @@ in bitwarden_rs = callPackage ../tools/security/bitwarden_rs { inherit (darwin.apple_sdk.frameworks) Security CoreServices; }; + bitwarden_rs-sqlite = bitwarden_rs; + bitwarden_rs-mysql = bitwarden_rs.override { dbBackend = "mysql"; }; + bitwarden_rs-postgresql = bitwarden_rs.override { dbBackend = "postgresql"; }; bitwarden_rs-vault = callPackage ../tools/security/bitwarden_rs/vault.nix { }; @@ -7887,6 +7890,7 @@ in crystal_0_29 crystal_0_30 crystal_0_31 + crystal_0_32 crystal crystal2nix; @@ -15883,6 +15887,8 @@ in unifiStable; unifi = unifiStable; + victoriametrics = callPackage ../servers/nosql/victoriametrics { }; + virtlyst = libsForQt5.callPackage ../servers/web-apps/virtlyst { }; virtuoso6 = callPackage ../servers/sql/virtuoso/6.x.nix { @@ -23128,6 +23134,11 @@ in mindustry = callPackage ../games/mindustry { }; + mindustry-server = callPackage ../games/mindustry { + enableClient = false; + enableServer = true; + }; + minecraft = callPackage ../games/minecraft { }; minecraft-server = callPackage ../games/minecraft-server { }; |