summary refs log tree commit diff
path: root/pkgs/tools
diff options
context:
space:
mode:
authorJörg Thalheim <joerg@thalheim.io>2020-12-31 07:31:38 +0100
committerJörg Thalheim <joerg@thalheim.io>2020-12-31 07:31:38 +0100
commitf19b7b03a03b7f1d5beb44471eb9298de4b9e186 (patch)
tree2bb5fabe03cff0c2058f69921315ab3ff724f9d0 /pkgs/tools
parent572a864d024b0c91ac39133f35364362b2376c07 (diff)
parent7a580a12196e63eb665de6eb4db8bb3b6da142f5 (diff)
downloadnixpkgs-f19b7b03a03b7f1d5beb44471eb9298de4b9e186.tar
nixpkgs-f19b7b03a03b7f1d5beb44471eb9298de4b9e186.tar.gz
nixpkgs-f19b7b03a03b7f1d5beb44471eb9298de4b9e186.tar.bz2
nixpkgs-f19b7b03a03b7f1d5beb44471eb9298de4b9e186.tar.lz
nixpkgs-f19b7b03a03b7f1d5beb44471eb9298de4b9e186.tar.xz
nixpkgs-f19b7b03a03b7f1d5beb44471eb9298de4b9e186.tar.zst
nixpkgs-f19b7b03a03b7f1d5beb44471eb9298de4b9e186.zip
Merge branch 'master' into staging-next
Diffstat (limited to 'pkgs/tools')
-rw-r--r--pkgs/tools/audio/tts/default.nix13
-rw-r--r--pkgs/tools/security/tor/default.nix18
-rw-r--r--pkgs/tools/typesetting/tex/texlive/bin.nix6
-rw-r--r--pkgs/tools/typesetting/tex/texlive/combine.nix2
-rw-r--r--pkgs/tools/typesetting/tex/texlive/default.nix6
-rw-r--r--pkgs/tools/virtualization/amazon-ec2-utils/default.nix42
-rw-r--r--pkgs/tools/virtualization/ec2-utils/default.nix47
7 files changed, 79 insertions, 55 deletions
diff --git a/pkgs/tools/audio/tts/default.nix b/pkgs/tools/audio/tts/default.nix
index 770e898f2ee..1634bfa5b30 100644
--- a/pkgs/tools/audio/tts/default.nix
+++ b/pkgs/tools/audio/tts/default.nix
@@ -61,6 +61,18 @@ python3Packages.buildPythonApplication rec {
       url = "https://github.com/mozilla/TTS/commit/36fee428b9f3f4ec1914b090a2ec9d785314d9aa.patch";
       sha256 = "sha256-pP0NxiyrsvQ0A7GEleTdT87XO08o7WxPEpb6Bmj66dc=";
     })
+    (fetchpatch {
+      url = "https://github.com/Mic92/TTS/commit/5bf62009e8c19e8c1627d1f7aa54e11bc5fa91d7.patch";
+      sha256 = "sha256-ZxDytieD0zoP0/RXzG0bbVnl0oE+DF8iUVpHb8+2TqM=";
+    })
+    (fetchpatch {
+      url = "https://github.com/mozilla/TTS/commit/3000647e542fce9773f4c5da082630befa5525f1.patch";
+      sha256 = "sha256-dl8Zy0dEw9z4ZZFcuP1WHzCVh2+nn0jDKOncoCK+syM=";
+    })
+    (fetchpatch {
+      url = "https://github.com/mozilla/TTS/commit/fe86a076bb1c7e18078718be0aa36da427f325bd.patch";
+      sha256 = "sha256-cT5HYkLFzmSMwAHLOHgpG+v9HGKIbUxwS8Dt9SKHm+8=";
+    })
   ];
 
   preBuild = ''
@@ -95,6 +107,7 @@ python3Packages.buildPythonApplication rec {
     inflect
     gdown
     pysbd
+    pyworld
   ];
 
   postInstall = ''
diff --git a/pkgs/tools/security/tor/default.nix b/pkgs/tools/security/tor/default.nix
index 04bf598d132..e46fd4790a3 100644
--- a/pkgs/tools/security/tor/default.nix
+++ b/pkgs/tools/security/tor/default.nix
@@ -1,5 +1,6 @@
 { stdenv, fetchurl, pkgconfig, libevent, openssl, zlib, torsocks
 , libseccomp, systemd, libcap, lzma, zstd, scrypt, nixosTests
+, writeShellScript
 
 # for update.nix
 , writeScript
@@ -12,7 +13,21 @@
 , gnused
 , nix
 }:
-
+let
+  tor-client-auth-gen = writeShellScript "tor-client-auth-gen" ''
+    PATH="${stdenv.lib.makeBinPath [coreutils gnugrep openssl]}"
+    pem="$(openssl genpkey -algorithm x25519)"
+
+    printf private_key=descriptor:x25519:
+    echo "$pem" | grep -v " PRIVATE KEY" |
+    base64 -d | tail --bytes=32 | base32 | tr -d =
+
+    printf public_key=descriptor:x25519:
+    echo "$pem" | openssl pkey -in /dev/stdin -pubout |
+    grep -v " PUBLIC KEY" |
+    base64 -d | tail --bytes=32 | base32 | tr -d =
+  '';
+in
 stdenv.mkDerivation rec {
   pname = "tor";
   version = "0.4.4.6";
@@ -52,6 +67,7 @@ stdenv.mkDerivation rec {
     mkdir -p $geoip/share/tor
     mv $out/share/tor/geoip{,6} $geoip/share/tor
     rm -rf $out/share/tor
+    ln -s ${tor-client-auth-gen} $out/bin/tor-client-auth-gen
   '';
 
   passthru = {
diff --git a/pkgs/tools/typesetting/tex/texlive/bin.nix b/pkgs/tools/typesetting/tex/texlive/bin.nix
index 030ac1b43aa..4df486a2511 100644
--- a/pkgs/tools/typesetting/tex/texlive/bin.nix
+++ b/pkgs/tools/typesetting/tex/texlive/bin.nix
@@ -2,7 +2,7 @@
 , texlive
 , zlib, libiconv, libpng, libX11
 , freetype, gd, libXaw, icu, ghostscript, libXpm, libXmu, libXext
-, perl, perlPackages, python2Packages, pkgconfig
+, perl, perlPackages, python3Packages, pkgconfig
 , poppler, libpaper, graphite2, zziplib, harfbuzz, potrace, gmp, mpfr
 , brotli, cairo, pixman, xorg, clisp, biber, woff2, xxHash
 , makeWrapper, shortenPerlShebang
@@ -321,13 +321,13 @@ latexindent = perlPackages.buildPerlPackage rec {
 };
 
 
-pygmentex = python2Packages.buildPythonApplication rec {
+pygmentex = python3Packages.buildPythonApplication rec {
   pname = "pygmentex";
   inherit (src) version;
 
   src = stdenv.lib.head (builtins.filter (p: p.tlType == "run") texlive.pygmentex.pkgs);
 
-  propagatedBuildInputs = with python2Packages; [ pygments chardet ];
+  propagatedBuildInputs = with python3Packages; [ pygments chardet ];
 
   dontBuild = true;
 
diff --git a/pkgs/tools/typesetting/tex/texlive/combine.nix b/pkgs/tools/typesetting/tex/texlive/combine.nix
index 0625fe16090..33633433575 100644
--- a/pkgs/tools/typesetting/tex/texlive/combine.nix
+++ b/pkgs/tools/typesetting/tex/texlive/combine.nix
@@ -27,7 +27,7 @@ let
       [ "de-macro" "pythontex" "dviasm" "texliveonfly" ];
     pkgNeedsRuby = pkg: pkg.tlType == "run" && pkg.pname == "match-parens";
     extraInputs =
-      lib.optional (lib.any pkgNeedsPython splitBin.wrong) python
+      lib.optional (lib.any pkgNeedsPython splitBin.wrong) python3
       ++ lib.optional (lib.any pkgNeedsRuby splitBin.wrong) ruby;
   };
 
diff --git a/pkgs/tools/typesetting/tex/texlive/default.nix b/pkgs/tools/typesetting/tex/texlive/default.nix
index c2e6399ab86..0c7dadc150b 100644
--- a/pkgs/tools/typesetting/tex/texlive/default.nix
+++ b/pkgs/tools/typesetting/tex/texlive/default.nix
@@ -4,7 +4,7 @@
 */
 { stdenv, lib, fetchurl, runCommand, writeText, buildEnv
 , callPackage, ghostscriptX, harfbuzz, poppler_min
-, makeWrapper, python, ruby, perl
+, makeWrapper, python3, ruby, perl
 , useFixedHashes ? true
 , recurseIntoAttrs
 }:
@@ -25,7 +25,7 @@ let
   # function for creating a working environment from a set of TL packages
   combine = import ./combine.nix {
     inherit bin combinePkgs buildEnv lib makeWrapper writeText
-      stdenv python ruby perl;
+      stdenv python3 ruby perl;
     ghostscript = ghostscriptX; # could be without X, probably, but we use X above
   };
 
@@ -110,7 +110,7 @@ let
         #"ftp://tug.org/texlive/historic/2019/tlnet-final/archive"
 
         # Daily snapshots hosted by one of the texlive release managers
-        https://texlive.info/tlnet-archive/2020/10/09/tlnet/archive
+        "https://texlive.info/tlnet-archive/2020/10/09/tlnet/archive"
       ];
 
       src = fetchurl { inherit urls sha512; };
diff --git a/pkgs/tools/virtualization/amazon-ec2-utils/default.nix b/pkgs/tools/virtualization/amazon-ec2-utils/default.nix
new file mode 100644
index 00000000000..d7dd6ad0b1e
--- /dev/null
+++ b/pkgs/tools/virtualization/amazon-ec2-utils/default.nix
@@ -0,0 +1,42 @@
+{ stdenv, lib, fetchFromGitHub, python3, installShellFiles }:
+
+stdenv.mkDerivation rec {
+  pname = "amazon-ec2-utils";
+  version = "1.3";
+
+  src = fetchFromGitHub {
+    owner = "aws";
+    repo = "amazon-ec2-utils";
+    rev = version;
+    sha256 = "sha256-uxKnbdKGhS32kY3mA7YYtDRwKcEjNZPJUYQExZTqtxE=";
+  };
+
+  buildInputs = [ python3 ];
+  # TODO next version will have manpages
+  #nativeBuildInputs = [ installShellFiles ];
+
+  installPhase = ''
+    # https://github.com/aws/amazon-ec2-utils/blob/8eb2effb1aea2280264d66ae58b3e156e6d429f9/amazon-ec2-utils.spec#L74
+    install -D --target $out/etc/udev/rules.d *.rules
+    install -D --target $out/bin ec2-metadata ebsnvme-id ec2udev-vbd ec2udev-vcpu
+    install -D --target $out/lib/udev/ ec2nvme-nsid
+    # TODO next version will have manpages
+    #installManPage doc/*
+  '';
+
+  postFixup = ''
+    for i in $out/etc/udev/rules.d/*.rules; do
+      substituteInPlace "$i" \
+        --replace '/sbin' "$out/bin"
+    done
+    substituteInPlace "$out/etc/udev/rules.d/70-ec2-nvme-devices.rules" \
+      --replace 'ec2nvme-nsid' "$out/lib/udev/ec2nvme-nsid"
+  '';
+
+  meta = {
+    description = "A set of tools for running in EC2";
+    homepage = "https://aws.amazon.com/amazon-linux-ami/";
+    license = lib.licenses.asl20;
+    maintainers = with lib.maintainers; [ thefloweringash ];
+  };
+}
diff --git a/pkgs/tools/virtualization/ec2-utils/default.nix b/pkgs/tools/virtualization/ec2-utils/default.nix
deleted file mode 100644
index 1605bcfa43b..00000000000
--- a/pkgs/tools/virtualization/ec2-utils/default.nix
+++ /dev/null
@@ -1,47 +0,0 @@
-{ stdenv, lib, rpmextract, fetchurl, python2, tree }:
-
-stdenv.mkDerivation {
-  name = "ec2-utils";
-  version = "0.5.1";
-
-  # The url can be determined by booting an "Amazon Linux 2" and running:
-  # > yumdownloader --urls ec2-utils
-  src = fetchurl {
-    url = "http://amazonlinux.ap-northeast-1.amazonaws.com/blobstore/a3b4d2c35c2300518fe10381a05b3bd7936ff5cdd3d351143a11bf84073d9e00/ec2-utils-0.5-1.amzn2.0.1.noarch.rpm";
-    sha256 = "004y7l3q9gqi78a53lykrpsnz4yp7dds1083w67m2013bk1x5d53";
-  };
-
-  nativeBuildInputs = [ rpmextract ];
-
-  buildInputs = [ python2 ];
-
-  unpackPhase = ''
-    mkdir source
-    cd source
-    rpmextract "$src"
-  '';
-
-  installPhase = ''
-    mkdir $out
-
-    mv --target-directory $out \
-      etc sbin usr/bin usr/lib
-  '';
-
-  postFixup = ''
-    for i in $out/etc/udev/rules.d/*.rules; do
-      substituteInPlace "$i" \
-        --replace '/sbin' "$out/bin"
-    done
-
-    substituteInPlace "$out/etc/udev/rules.d/70-ec2-nvme-devices.rules" \
-      --replace 'ec2nvme-nsid' "$out/lib/udev/ec2nvme-nsid"
-  '';
-
-  meta = {
-    description = "A set of tools for running in EC2";
-    homepage = "https://aws.amazon.com/amazon-linux-ami/";
-    license = lib.licenses.asl20;
-    maintainers = with lib.maintainers; [ thefloweringash ];
-  };
-}