diff options
-rw-r--r-- | README.md | 4 | ||||
-rw-r--r-- | nixos/modules/module-list.nix | 1 | ||||
-rw-r--r-- | nixos/modules/programs/bandwhich.nix | 29 | ||||
-rw-r--r-- | nixos/modules/services/torrent/transmission.nix | 2 | ||||
-rw-r--r-- | nixos/modules/services/web-apps/nextcloud.nix | 2 | ||||
-rw-r--r-- | nixos/modules/virtualisation/containers.nix | 15 | ||||
-rw-r--r-- | pkgs/applications/editors/jetbrains/default.nix | 44 | ||||
-rw-r--r-- | pkgs/applications/misc/ranger/default.nix | 4 | ||||
-rw-r--r-- | pkgs/applications/networking/instant-messengers/rambox/bare.nix | 2 | ||||
-rw-r--r-- | pkgs/applications/networking/p2p/qbittorrent/default.nix | 4 | ||||
-rw-r--r-- | pkgs/applications/office/wpsoffice/default.nix | 4 | ||||
-rw-r--r-- | pkgs/development/tools/analysis/codeql/default.nix | 61 | ||||
-rw-r--r-- | pkgs/tools/networking/bandwhich/default.nix | 32 | ||||
-rw-r--r-- | pkgs/top-level/all-packages.nix | 8 |
14 files changed, 164 insertions, 48 deletions
diff --git a/README.md b/README.md index 15ef4048d900..f5090e023289 100644 --- a/README.md +++ b/README.md @@ -16,7 +16,7 @@ * [NixOS Manual](https://nixos.org/nixos/manual) - how to install, configure, and maintain a purely-functional Linux distribution * [Nixpkgs Manual](https://nixos.org/nixpkgs/manual/) - contributing to Nixpkgs and using programming-language-specific Nix expressions -* [Nix Package Manager Manual](https://nixos.org/nix/manual) - how to write Nix expresssions (programs), and how to use Nix command line tools +* [Nix Package Manager Manual](https://nixos.org/nix/manual) - how to write Nix expressions (programs), and how to use Nix command line tools # Community @@ -27,7 +27,7 @@ # Other Project Repositories -The sources of all offical Nix-related projects are in the [NixOS +The sources of all official Nix-related projects are in the [NixOS organization on GitHub](https://github.com/NixOS/). Here are some of the main ones: diff --git a/nixos/modules/module-list.nix b/nixos/modules/module-list.nix index 11bb900f7bb5..5b21aec51bdd 100644 --- a/nixos/modules/module-list.nix +++ b/nixos/modules/module-list.nix @@ -95,6 +95,7 @@ ./programs/adb.nix ./programs/atop.nix ./programs/autojump.nix + ./programs/bandwhich.nix ./programs/bash/bash.nix ./programs/bcc.nix ./programs/browserpass.nix diff --git a/nixos/modules/programs/bandwhich.nix b/nixos/modules/programs/bandwhich.nix new file mode 100644 index 000000000000..5413044f4614 --- /dev/null +++ b/nixos/modules/programs/bandwhich.nix @@ -0,0 +1,29 @@ +{ config, lib, pkgs, ... }: + +with lib; + +let cfg = config.programs.bandwhich; +in { + meta.maintainers = with maintainers; [ filalex77 ]; + + options = { + programs.bandwhich = { + enable = mkOption { + type = types.bool; + default = false; + description = '' + Whether to add bandwhich to the global environment and configure a + setcap wrapper for it. + ''; + }; + }; + }; + + config = mkIf cfg.enable { + environment.systemPackages = with pkgs; [ bandwhich ]; + security.wrappers.bandwhich = { + source = "${pkgs.bandwhich}/bin/bandwhich"; + capabilities = "cap_net_raw,cap_net_admin+ep"; + }; + }; +} diff --git a/nixos/modules/services/torrent/transmission.nix b/nixos/modules/services/torrent/transmission.nix index f7a88867b616..aa1acdf7d20b 100644 --- a/nixos/modules/services/torrent/transmission.nix +++ b/nixos/modules/services/torrent/transmission.nix @@ -118,7 +118,7 @@ in # 1) Only the "transmission" user and group have access to torrents. # 2) Optionally update/force specific fields into the configuration file. serviceConfig.ExecStartPre = preStart; - serviceConfig.ExecStart = "${pkgs.transmission}/bin/transmission-daemon -f --port ${toString config.services.transmission.port}"; + serviceConfig.ExecStart = "${pkgs.transmission}/bin/transmission-daemon -f --port ${toString config.services.transmission.port} --config-dir ${settingsDir}"; serviceConfig.ExecReload = "${pkgs.coreutils}/bin/kill -HUP $MAINPID"; serviceConfig.User = cfg.user; serviceConfig.Group = cfg.group; diff --git a/nixos/modules/services/web-apps/nextcloud.nix b/nixos/modules/services/web-apps/nextcloud.nix index e3a2db398e62..f1dabadc119a 100644 --- a/nixos/modules/services/web-apps/nextcloud.nix +++ b/nixos/modules/services/web-apps/nextcloud.nix @@ -62,7 +62,7 @@ in { https = mkOption { type = types.bool; default = false; - description = "Enable if there is a TLS terminating proxy in front of nextcloud."; + description = "Use https for generated links."; }; maxUploadSize = mkOption { diff --git a/nixos/modules/virtualisation/containers.nix b/nixos/modules/virtualisation/containers.nix index 09678ce9ea71..02de5801da25 100644 --- a/nixos/modules/virtualisation/containers.nix +++ b/nixos/modules/virtualisation/containers.nix @@ -225,12 +225,6 @@ let fi ${concatStringsSep "\n" (mapAttrsToList renderExtraVeth cfg.extraVeths)} fi - - # Get the leader PID so that we can signal it in - # preStop. We can't use machinectl there because D-Bus - # might be shutting down. FIXME: in systemd 219 we can - # just signal systemd-nspawn to do a clean shutdown. - machinectl show "$INSTANCE" | sed 's/Leader=\(.*\)/\1/;t;d' > "/run/containers/$INSTANCE.pid" '' ); @@ -715,14 +709,7 @@ in postStart = postStartScript dummyConfig; - preStop = - '' - pid="$(cat /run/containers/$INSTANCE.pid)" - if [ -n "$pid" ]; then - kill -RTMIN+4 "$pid" - fi - rm -f "/run/containers/$INSTANCE.pid" - ''; + preStop = "machinectl poweroff $INSTANCE"; restartIfChanged = false; diff --git a/pkgs/applications/editors/jetbrains/default.nix b/pkgs/applications/editors/jetbrains/default.nix index 7f0447833176..3286e3427445 100644 --- a/pkgs/applications/editors/jetbrains/default.nix +++ b/pkgs/applications/editors/jetbrains/default.nix @@ -250,12 +250,12 @@ in clion = buildClion rec { name = "clion-${version}"; - version = "2019.2.5"; /* updated by script */ + version = "2019.3.2"; /* updated by script */ description = "C/C++ IDE. New. Intelligent. Cross-platform"; license = stdenv.lib.licenses.unfree; src = fetchurl { url = "https://download.jetbrains.com/cpp/CLion-${version}.tar.gz"; - sha256 = "0p0shikhf73ayflv5bm212kz06hiy3brww9h9ijjp6lcadxc9pmf"; /* updated by script */ + sha256 = "0aksix22cbbxny68650qxjbbm1fmgbsnp97qix5kl5nx4y4yvlii"; /* updated by script */ }; wmClass = "jetbrains-clion"; update-channel = "CLion RELEASE"; # channel's id as in http://www.jetbrains.com/updates/updates.xml @@ -263,12 +263,12 @@ in datagrip = buildDataGrip rec { name = "datagrip-${version}"; - version = "2019.2.6"; /* updated by script */ + version = "2019.3.1"; /* updated by script */ description = "Your Swiss Army Knife for Databases and SQL"; license = stdenv.lib.licenses.unfree; src = fetchurl { url = "https://download.jetbrains.com/datagrip/${name}.tar.gz"; - sha256 = "0g57njcklyskadxmvwb0r0z3ckq9qmcwh8qd80w396gj8fgbg50g"; /* updated by script */ + sha256 = "1h7va6x625kxc2i22mnya64b1kb4vl5xgjxrv3lqwz725q5hkrxa"; /* updated by script */ }; wmClass = "jetbrains-datagrip"; update-channel = "DataGrip RELEASE"; @@ -276,12 +276,12 @@ in goland = buildGoland rec { name = "goland-${version}"; - version = "2019.2.4"; /* updated by script */ + version = "2019.3.1"; /* updated by script */ description = "Up and Coming Go IDE"; license = stdenv.lib.licenses.unfree; src = fetchurl { url = "https://download.jetbrains.com/go/${name}.tar.gz"; - sha256 = "0rkyw3532qvr6jhr09m3h0ssdy5ilfgfvqqliyf0cacwzw9lfv0p"; /* updated by script */ + sha256 = "1lj5i71nw2m9xwv6q48b86kipiwj927bxiwxppb4isqax2w6250d"; /* updated by script */ }; wmClass = "jetbrains-goland"; update-channel = "GoLand RELEASE"; @@ -289,12 +289,12 @@ in idea-community = buildIdea rec { name = "idea-community-${version}"; - version = "2019.2.4"; /* updated by script */ + version = "2019.3.1"; /* updated by script */ description = "Integrated Development Environment (IDE) by Jetbrains, community edition"; license = stdenv.lib.licenses.asl20; src = fetchurl { url = "https://download.jetbrains.com/idea/ideaIC-${version}.tar.gz"; - sha256 = "012vmclx6kg85gffgc9mr3fp1ffgx20dz7xvafk7c1iynawx8wgq"; /* updated by script */ + sha256 = "0285jdh350dalvk76ajy57mi1yg1g905cnfhcjlb465bsxaw0z5n"; /* updated by script */ }; wmClass = "jetbrains-idea-ce"; update-channel = "IntelliJ IDEA RELEASE"; @@ -302,12 +302,12 @@ in idea-ultimate = buildIdea rec { name = "idea-ultimate-${version}"; - version = "2019.2.4"; /* updated by script */ + version = "2019.3.1"; /* updated by script */ description = "Integrated Development Environment (IDE) by Jetbrains, requires paid license"; license = stdenv.lib.licenses.unfree; src = fetchurl { url = "https://download.jetbrains.com/idea/ideaIU-${version}-no-jbr.tar.gz"; - sha256 = "09mz4dx3zbnqw0vh4iqr8sn2s8mvgr7zvn4k7kqivsiv8f79g90a"; /* updated by script */ + sha256 = "0rb726nh2c7zxnpjcf6fyrpl29y9wgr6qhpb6hjxia2gzxab9jz0"; /* updated by script */ }; wmClass = "jetbrains-idea"; update-channel = "IntelliJ IDEA RELEASE"; @@ -315,12 +315,12 @@ in phpstorm = buildPhpStorm rec { name = "phpstorm-${version}"; - version = "2019.2.4"; /* updated by script */ + version = "2019.3.1"; /* updated by script */ description = "Professional IDE for Web and PHP developers"; license = stdenv.lib.licenses.unfree; src = fetchurl { url = "https://download.jetbrains.com/webide/PhpStorm-${version}.tar.gz"; - sha256 = "1bx8s4hh96pjfyccldwfarwv5fky6kg2kyc0h2arhfzwq1pbaisl"; /* updated by script */ + sha256 = "170ppd0inn3s1yxd5ybspzgx2il78838z900fpg2pznq2hi0rn2h"; /* updated by script */ }; wmClass = "jetbrains-phpstorm"; update-channel = "PhpStorm RELEASE"; @@ -328,12 +328,12 @@ in pycharm-community = buildPycharm rec { name = "pycharm-community-${version}"; - version = "2019.2.4"; /* updated by script */ + version = "2019.3.1"; /* updated by script */ description = "PyCharm Community Edition"; license = stdenv.lib.licenses.asl20; src = fetchurl { url = "https://download.jetbrains.com/python/${name}.tar.gz"; - sha256 = "00dl3yx13lw8qyc23dirw96vm2d8c6zsx73ds1ha8zycfh6hkxf8"; /* updated by script */ + sha256 = "1cph2v7gaxikrvvdaz7ihk17qgdzrn86jamik9fijb8sjli3695v"; /* updated by script */ }; wmClass = "jetbrains-pycharm-ce"; update-channel = "PyCharm RELEASE"; @@ -341,12 +341,12 @@ in pycharm-professional = buildPycharm rec { name = "pycharm-professional-${version}"; - version = "2019.2.4"; /* updated by script */ + version = "2019.3.1"; /* updated by script */ description = "PyCharm Professional Edition"; license = stdenv.lib.licenses.unfree; src = fetchurl { url = "https://download.jetbrains.com/python/${name}.tar.gz"; - sha256 = "14ab1cvypanwwn0k1hrx3rl964av6pvridgc19z49idw5wpgxgw7"; /* updated by script */ + sha256 = "1bjijwc5f1is2920b497d395ckswhpxilmxaljb6pjwq4a2k8yzx"; /* updated by script */ }; wmClass = "jetbrains-pycharm"; update-channel = "PyCharm RELEASE"; @@ -354,12 +354,12 @@ in rider = buildRider rec { name = "rider-${version}"; - version = "2019.2.3"; /* updated by script */ + version = "2019.3.1"; /* updated by script */ description = "A cross-platform .NET IDE based on the IntelliJ platform and ReSharper"; license = stdenv.lib.licenses.unfree; src = fetchurl { url = "https://download.jetbrains.com/rider/JetBrains.Rider-${version}.tar.gz"; - sha256 = "13br6zmqpvi9hcd6wdnalkhj50gzr7cwrdh4v2bpda77iby2pz93"; /* updated by script */ + sha256 = "0cs8fc3h6d2m84ppiqjy0f3xklpc5gf0i6c4bzv04y8ngh0cwgl2"; /* updated by script */ }; wmClass = "jetbrains-rider"; update-channel = "Rider RELEASE"; @@ -367,12 +367,12 @@ in ruby-mine = buildRubyMine rec { name = "ruby-mine-${version}"; - version = "2019.2.4"; /* updated by script */ + version = "2019.3.1"; /* updated by script */ description = "The Most Intelligent Ruby and Rails IDE"; license = stdenv.lib.licenses.unfree; src = fetchurl { url = "https://download.jetbrains.com/ruby/RubyMine-${version}.tar.gz"; - sha256 = "1dqp222zvi8ikqdkprmqihyjxiq90vd0a0zl5935xjg1mzf8ald9"; /* updated by script */ + sha256 = "0xadjx4szd9rk3bl3fqzhnfq744gmkbz9li80j5rqm27qhf4axfx"; /* updated by script */ }; wmClass = "jetbrains-rubymine"; update-channel = "RubyMine RELEASE"; @@ -380,12 +380,12 @@ in webstorm = buildWebStorm rec { name = "webstorm-${version}"; - version = "2019.2.4"; /* updated by script */ + version = "2019.3.1"; /* updated by script */ description = "Professional IDE for Web and JavaScript development"; license = stdenv.lib.licenses.unfree; src = fetchurl { url = "https://download.jetbrains.com/webstorm/WebStorm-${version}.tar.gz"; - sha256 = "0iz9qgrbhn1rxr8n5q1y7klfs27j1f55pw8hqbl2ln4df94zqi5j"; /* updated by script */ + sha256 = "0qjqd1a44mdlpvv3l4sx2n5clirwxialzh6s2dlb0dibx8zvnckp"; /* updated by script */ }; wmClass = "jetbrains-webstorm"; update-channel = "WebStorm RELEASE"; diff --git a/pkgs/applications/misc/ranger/default.nix b/pkgs/applications/misc/ranger/default.nix index 7045228d6a2f..5d66df350ad6 100644 --- a/pkgs/applications/misc/ranger/default.nix +++ b/pkgs/applications/misc/ranger/default.nix @@ -7,13 +7,13 @@ assert imagePreviewSupport -> w3m != null; python3Packages.buildPythonApplication rec { name = "ranger-${version}"; - version = "1.9.2"; + version = "1.9.3"; src = fetchFromGitHub { owner = "ranger"; repo = "ranger"; rev = "v${version}"; - sha256= "1ws6g8z1m1hfp8bv4msvbaa9f7948p687jmc8h69yib4jkv3qyax"; + sha256= "1rygfryczanvqxn43lmlkgs04sbqznbvbb9hlbm3h5qgdcl0xlw8"; }; LC_ALL = "en_US.UTF-8"; diff --git a/pkgs/applications/networking/instant-messengers/rambox/bare.nix b/pkgs/applications/networking/instant-messengers/rambox/bare.nix index a0e91ab2f658..9542cdcebf48 100644 --- a/pkgs/applications/networking/instant-messengers/rambox/bare.nix +++ b/pkgs/applications/networking/instant-messengers/rambox/bare.nix @@ -18,7 +18,7 @@ stdenv.mkDerivation rec { inherit src; nodejs = nodejs-10_x; - sha256 = "0slzw4791nl7v6sca9xlhzx16p91m92ln2agbkbdx4zpgasg4gnq"; + sha256 = "1zw3pjj3z29n9s08xyid41yq765d4c16lgml79m24zw36qaji6h1"; }; patches = [ ./isDev.patch ]; diff --git a/pkgs/applications/networking/p2p/qbittorrent/default.nix b/pkgs/applications/networking/p2p/qbittorrent/default.nix index 173b4f02cdf0..8ab83c8a4ba4 100644 --- a/pkgs/applications/networking/p2p/qbittorrent/default.nix +++ b/pkgs/applications/networking/p2p/qbittorrent/default.nix @@ -10,13 +10,13 @@ with lib; mkDerivation rec { pname = "qbittorrent"; - version = "4.2.0"; + version = "4.2.1"; src = fetchFromGitHub { owner = "qbittorrent"; repo = "qbittorrent"; rev = "release-${version}"; - sha256 = "17vm6aa2k8k1q14z9r2r06c794bcr4m0l0fdsn08wid6mj1zjsbx"; + sha256 = "0bz4l7awkx4qf3gh9c8gj8fab989439zj8qy4x9r36wxdjg5cxil"; }; # NOTE: 2018-05-31: CMake is working but it is not officially supported diff --git a/pkgs/applications/office/wpsoffice/default.nix b/pkgs/applications/office/wpsoffice/default.nix index 6ece55182abc..abc2d1862cbf 100644 --- a/pkgs/applications/office/wpsoffice/default.nix +++ b/pkgs/applications/office/wpsoffice/default.nix @@ -10,8 +10,8 @@ stdenv.mkDerivation rec{ version = "11.1.0.8865"; src = fetchurl { - url = "https://wdl1.cache.wps.cn/wps/download/ep/Linux2019/8865/wps-office_11.1.0.8865_amd64.deb"; - sha256 = "0pxx3j02cm8d08iakg30azjvl3a50y4avyrf08ddgaavqnvkypfj"; + url = "http://wdl1.pcfg.cache.wpscdn.com/wpsdl/wpsoffice/download/linux/8865/wps-office_11.1.0.8865_amd64.deb"; + sha256 = "1hfpj1ayhzlrnnp72yjzrpd60xsbj9y46m345lqysiaj1hnwdbd8"; }; unpackCmd = "dpkg -x $src ."; sourceRoot = "."; diff --git a/pkgs/development/tools/analysis/codeql/default.nix b/pkgs/development/tools/analysis/codeql/default.nix new file mode 100644 index 000000000000..e5770800199a --- /dev/null +++ b/pkgs/development/tools/analysis/codeql/default.nix @@ -0,0 +1,61 @@ +{ stdenv +, fetchzip +, zlib +, xorg +, freetype +, alsaLib +, jdk11 +, curl +, lttng-ust +, autoPatchelfHook +}: + +stdenv.mkDerivation rec { + pname = "codeql"; + version = "2.0.0"; + + dontConfigure = true; + dontBuild = true; + dontStrip = true; + + src = fetchzip { + url = "https://github.com/github/codeql-cli-binaries/releases/download/v${version}/codeql.zip"; + sha256 = "1v6wzjdhfws77fr5r15s03f1ipzc1gh7sl8gvw1fb4pplpa2d08s"; + }; + + nativeBuildInputs = [ + zlib + xorg.libX11 + xorg.libXext + xorg.libXi + xorg.libXtst + xorg.libXrender + freetype + alsaLib + jdk11 + stdenv.cc.cc.lib + curl + lttng-ust + autoPatchelfHook + ]; + + installPhase = '' + # codeql directory should not be top-level, otherwise, + # it'll include /nix/store to resolve extractors. + mkdir -p $out/{codeql,bin} + cp -R * $out/codeql/ + + ln -sf $out/codeql/tools/linux64/lib64trace.so $out/codeql/tools/linux64/libtrace.so + + sed -i 's;"$CODEQL_DIST/tools/$CODEQL_PLATFORM/java/bin/java";"${jdk11}/bin/java";' $out/codeql/codeql + + ln -s $out/codeql/codeql $out/bin/ + ''; + + meta = with stdenv.lib; { + description = "Semantic code analysis engine"; + homepage = "https://semmle.com/codeql"; + maintainers = [ maintainers.dump_stack ]; + license = licenses.unfree; + }; +} diff --git a/pkgs/tools/networking/bandwhich/default.nix b/pkgs/tools/networking/bandwhich/default.nix new file mode 100644 index 000000000000..21253745cb0a --- /dev/null +++ b/pkgs/tools/networking/bandwhich/default.nix @@ -0,0 +1,32 @@ +{ stdenv, fetchFromGitHub, rustPlatform, Security }: + +rustPlatform.buildRustPackage rec { + pname = "bandwhich"; + version = "0.6.0"; + + src = fetchFromGitHub { + owner = "imsnif"; + repo = pname; + rev = version; + sha256 = "0jjqc8sysvw63mwy68z9p16vc1pygrm1wxyll6piwvbbnirpys1y"; + }; + + cargoSha256 = "1rixpljqddwhryddzni5l6m4sjyn1krrj0ig0rzc701am7srhg3a"; + + buildInputs = stdenv.lib.optional stdenv.isDarwin Security; + + meta = with stdenv.lib; { + description = "A CLI utility for displaying current network utilization"; + longDescription = '' + bandwhich sniffs a given network interface and records IP packet size, cross + referencing it with the /proc filesystem on linux or lsof on MacOS. It is + responsive to the terminal window size, displaying less info if there is + no room for it. It will also attempt to resolve ips to their host name in + the background using reverse DNS on a best effort basis. + ''; + homepage = "https://github.com/imsnif/bandwhich"; + license = licenses.mit; + maintainers = with maintainers; [ filalex77 ]; + platforms = platforms.unix; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index f6b914027397..48587be70b57 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -813,6 +813,8 @@ in cloudflare-wrangler = callPackage ../development/tools/cloudflare-wrangler { }; + codeql = callPackage ../development/tools/analysis/codeql { }; + container-linux-config-transpiler = callPackage ../development/tools/container-linux-config-transpiler { }; ccextractor = callPackage ../applications/video/ccextractor { }; @@ -1085,6 +1087,10 @@ in backblaze-b2 = python.pkgs.callPackage ../development/tools/backblaze-b2 { }; + bandwhich = callPackage ../tools/networking/bandwhich { + inherit (darwin.apple_sdk.frameworks) Security; + }; + bar = callPackage ../tools/system/bar {}; base16-shell-preview = callPackage ../misc/base16-shell-preview { }; @@ -16472,7 +16478,7 @@ in virtualbox = pkgs.virtualboxHardened; }; - wireguard = callPackage ../os-specific/linux/wireguard { }; + wireguard = if lib.versionOlder kernel.version "5.6" then callPackage ../os-specific/linux/wireguard { } else null; x86_energy_perf_policy = callPackage ../os-specific/linux/x86_energy_perf_policy { }; |