summary refs log tree commit diff
path: root/pkgs/tools
diff options
context:
space:
mode:
authorFrederik Rietdijk <fridh@fridh.nl>2019-12-15 16:09:28 +0100
committerFrederik Rietdijk <fridh@fridh.nl>2019-12-15 16:09:28 +0100
commitc20cd71d608985f2d4326968d2265602080844c5 (patch)
treebce8bac4388839cd946354553e374965c7d5ce3a /pkgs/tools
parent1d8ef857eec45bc651d6f5dc7799d1a7656e5deb (diff)
parentad3c49da0e08a9d34e3622f6eaa843368d636ecd (diff)
downloadnixpkgs-c20cd71d608985f2d4326968d2265602080844c5.tar
nixpkgs-c20cd71d608985f2d4326968d2265602080844c5.tar.gz
nixpkgs-c20cd71d608985f2d4326968d2265602080844c5.tar.bz2
nixpkgs-c20cd71d608985f2d4326968d2265602080844c5.tar.lz
nixpkgs-c20cd71d608985f2d4326968d2265602080844c5.tar.xz
nixpkgs-c20cd71d608985f2d4326968d2265602080844c5.tar.zst
nixpkgs-c20cd71d608985f2d4326968d2265602080844c5.zip
Merge master into staging-next
Diffstat (limited to 'pkgs/tools')
-rw-r--r--pkgs/tools/audio/beets/beet-check-tests.patch17
-rw-r--r--pkgs/tools/audio/beets/check-plugin.nix35
-rw-r--r--pkgs/tools/audio/beets/default.nix8
-rw-r--r--pkgs/tools/misc/exa/default.nix11
-rw-r--r--pkgs/tools/misc/pfetch/default.nix28
-rw-r--r--pkgs/tools/misc/tio/default.nix2
-rw-r--r--pkgs/tools/misc/vdirsyncer/default.nix4
-rw-r--r--pkgs/tools/misc/vector/default.nix29
8 files changed, 110 insertions, 24 deletions
diff --git a/pkgs/tools/audio/beets/beet-check-tests.patch b/pkgs/tools/audio/beets/beet-check-tests.patch
new file mode 100644
index 00000000000..2de97b86c8b
--- /dev/null
+++ b/pkgs/tools/audio/beets/beet-check-tests.patch
@@ -0,0 +1,17 @@
+diff --git a/test/cli_test.py b/test/cli_test.py
+index 26df140..2eb913c 100644
+--- a/test/cli_test.py
++++ b/test/cli_test.py
+@@ -372,12 +372,6 @@ class ToolListTest(TestHelper, TestCase):
+         self.assertIn('flac', stdout.getvalue())
+         self.assertIn('oggz-validate', stdout.getvalue())
+ 
+-    def test_found_mp3val(self):
+-        shutil.copy('/bin/echo', os.path.join(self.temp_dir, 'mp3val'))
+-        with captureStdout() as stdout:
+-            beets.ui._raw_main(['check', '--list-tools'])
+-        self.assertRegexpMatches(stdout.getvalue(), r'mp3val *found')
+-
+     def test_oggz_validate_not_found(self):
+         with captureStdout() as stdout:
+             beets.ui._raw_main(['check', '--list-tools'])
diff --git a/pkgs/tools/audio/beets/check-plugin.nix b/pkgs/tools/audio/beets/check-plugin.nix
new file mode 100644
index 00000000000..49ee97ead06
--- /dev/null
+++ b/pkgs/tools/audio/beets/check-plugin.nix
@@ -0,0 +1,35 @@
+{ stdenv, fetchFromGitHub, beets, pythonPackages, flac, liboggz, mp3val }:
+
+pythonPackages.buildPythonApplication rec {
+  name = "beets-check";
+  version = "0.12.0";
+
+  src = fetchFromGitHub {
+    repo = "beets-check";
+    owner = "geigerzaehler";
+    rev = "v${version}";
+    sha256 = "0b2ijjf0gycs6b40sm33ida3sjygjiv4spb5mba52vysc7iwmnjn";
+  };
+
+  nativeBuildInputs = [ beets ];
+  checkInputs = [ pythonPackages.nose flac liboggz mp3val ];
+  propagatedBuildInputs = [ flac liboggz mp3val ];
+
+  # patch out broken tests
+  patches = [ ./beet-check-tests.patch ];
+
+  # patch out futures dependency, it is only needed for Python2 which we don't
+  # support.
+  prePatch = ''
+    sed -i "/futures/d" setup.py
+  '';
+
+  checkPhase = "nosetests";
+
+  meta = with stdenv.lib; {
+    description = "Beets plugin to Verify and store checksums in your library";
+    homepage = https://github.com/geigerzaehler/beets-check;
+    license = licenses.mit;
+    maintainers = with maintainers; [ lovesegfault ];
+  };
+}
diff --git a/pkgs/tools/audio/beets/default.nix b/pkgs/tools/audio/beets/default.nix
index 9509eccabdc..b4dfa71ca96 100644
--- a/pkgs/tools/audio/beets/default.nix
+++ b/pkgs/tools/audio/beets/default.nix
@@ -29,6 +29,7 @@
 
 # External plugins
 , enableAlternatives   ? false
+, enableCheck          ? false, liboggz ? null
 , enableCopyArtifacts  ? false
 
 , bashInteractive, bash-completion
@@ -37,6 +38,7 @@
 assert enableAbsubmit    -> essentia-extractor            != null;
 assert enableAcoustid    -> pythonPackages.pyacoustid     != null;
 assert enableBadfiles    -> flac != null && mp3val != null;
+assert enableCheck       -> flac != null && mp3val != null && liboggz != null;
 assert enableConvert     -> ffmpeg != null;
 assert enableDiscogs     -> pythonPackages.discogs_client != null;
 assert enableFetchart    -> pythonPackages.responses      != null;
@@ -106,6 +108,7 @@ let
 
   plugins = {
     alternatives = callPackage ./alternatives-plugin.nix pluginArgs;
+    check = callPackage ./check-plugin.nix pluginArgs;
     copyartifacts = callPackage ./copyartifacts-plugin.nix pluginArgs;
   };
 
@@ -142,6 +145,7 @@ in pythonPackages.buildPythonApplication rec {
               || enableSubsonicupdate
               || enableAcousticbrainz)
                                     pythonPackages.requests
+    ++ optional enableCheck         plugins.check
     ++ optional enableConvert       ffmpeg
     ++ optional enableDiscogs       pythonPackages.discogs_client
     ++ optional enableGmusic        pythonPackages.gmusicapi
@@ -246,6 +250,10 @@ in pythonPackages.buildPythonApplication rec {
 
   makeWrapperArgs = [ "--set GI_TYPELIB_PATH \"$GI_TYPELIB_PATH\"" "--set GST_PLUGIN_SYSTEM_PATH_1_0 \"$GST_PLUGIN_SYSTEM_PATH_1_0\"" ];
 
+  passthru = {
+    externalPlugins = plugins;
+  };
+
   meta = {
     description = "Music tagger and library organizer";
     homepage = http://beets.io;
diff --git a/pkgs/tools/misc/exa/default.nix b/pkgs/tools/misc/exa/default.nix
index e05963b6902..0edd8a1b318 100644
--- a/pkgs/tools/misc/exa/default.nix
+++ b/pkgs/tools/misc/exa/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchFromGitHub, rustPlatform, cmake, perl, pkgconfig, zlib
+{ stdenv, fetchFromGitHub, fetchpatch, rustPlatform, cmake, perl, pkgconfig, zlib
 , darwin, libiconv, installShellFiles
 }:
 
@@ -17,6 +17,15 @@ buildRustPackage rec {
     sha256 = "14qlm9zb9v22hxbbi833xaq2b7qsxnmh15s317200vz5f1305hhw";
   };
 
+  patches = [
+    (fetchpatch {
+      # https://github.com/ogham/exa/pull/584
+      name = "fix-panic-on-broken-symlink-in-git-repository.patch";
+      url = "https://github.com/ogham/exa/pull/584/commits/a7a8e99cf3a15992afb2383435da0231917ffb54.patch";
+      sha256 = "0n5q483sz300jkp0sbb350hdinmkw7s6bmigdyr6ypz3fvygd9hx";
+    })
+  ];
+
   nativeBuildInputs = [ cmake pkgconfig perl installShellFiles ];
   buildInputs = [ zlib ]
   ++ stdenv.lib.optionals stdenv.isDarwin [
diff --git a/pkgs/tools/misc/pfetch/default.nix b/pkgs/tools/misc/pfetch/default.nix
new file mode 100644
index 00000000000..491844f26b7
--- /dev/null
+++ b/pkgs/tools/misc/pfetch/default.nix
@@ -0,0 +1,28 @@
+{ stdenv, fetchFromGitHub }:
+
+stdenv.mkDerivation rec {
+  pname = "pfetch";
+  version = "0.4.0";
+
+  src = fetchFromGitHub {
+    owner = "dylanaraps";
+    repo = "pfetch";
+    rev = version;
+    sha256 = "180vvbmvak888vs4dgzlmqk0ss4qfsz09700n4p8s68j7krkxsfq";
+  };
+
+  dontbuild = true;
+
+  installPhase = ''
+    mkdir -p $out/bin
+    cp pfetch $out/bin
+  '';
+
+  meta = with stdenv.lib; {
+    description = "A pretty system information tool written in POSIX sh";
+    homepage = https://github.com/dylanaraps/pfetch;
+    license = licenses.mit;
+    platforms = platforms.all;
+    maintainers = with maintainers; [ equirosa ];
+  };
+}
diff --git a/pkgs/tools/misc/tio/default.nix b/pkgs/tools/misc/tio/default.nix
index 3a8388280d6..9ee9b977ab2 100644
--- a/pkgs/tools/misc/tio/default.nix
+++ b/pkgs/tools/misc/tio/default.nix
@@ -16,6 +16,6 @@ stdenv.mkDerivation rec {
     homepage = https://tio.github.io/;
     license = licenses.gpl2Plus;
     maintainers = with maintainers; [ yegortimoshenko ];
-    platforms = platforms.linux;
+    platforms = platforms.unix;
   };
 }
diff --git a/pkgs/tools/misc/vdirsyncer/default.nix b/pkgs/tools/misc/vdirsyncer/default.nix
index 1cb3920a9c2..328c343ba70 100644
--- a/pkgs/tools/misc/vdirsyncer/default.nix
+++ b/pkgs/tools/misc/vdirsyncer/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, python3Packages, fetchFromGitHub, fetchpatch, rustPlatform, pkgconfig, openssl, Security }:
+{ stdenv, python3Packages, fetchFromGitHub, fetchpatch, rustPlatform, pkgconfig, openssl, CoreServices, Security }:
 
 # Packaging documentation at:
 # https://github.com/untitaker/vdirsyncer/blob/master/docs/packaging.rst
@@ -20,7 +20,7 @@ python3Packages.buildPythonApplication rec {
     inherit src;
     sourceRoot = "source/rust";
     cargoSha256 = "1n1dxq3klsry5mmbfff2jv7ih8mr5zvpncrdgba6qs93wi77qi0y";
-    buildInputs = [ pkgconfig openssl ] ++ stdenv.lib.optional stdenv.isDarwin Security;
+    buildInputs = [ pkgconfig openssl ] ++ stdenv.lib.optionals stdenv.isDarwin [ CoreServices Security ];
   };
 
   propagatedBuildInputs = with python3Packages; [
diff --git a/pkgs/tools/misc/vector/default.nix b/pkgs/tools/misc/vector/default.nix
index b5e34165030..a304873ca1e 100644
--- a/pkgs/tools/misc/vector/default.nix
+++ b/pkgs/tools/misc/vector/default.nix
@@ -4,33 +4,22 @@
 
 , features ?
     (if stdenv.isAarch64
-     then [ "jemallocator" ]
-     else [ "leveldb" "jemallocator" ])
-
-# Unfortunately, buildRustPackage does not really support using overrideAttrs
-# on the underlying fields, because it doesn't pass them to stdenv.mkDerivation
-# as an attr. making it a parameter is the only way to do so. sigh
-
-, version ? "0.5.0"
-
-, srcRef ? {
-    rev    = "refs/tags/v${version}";
-    sha256 = "0niyxlvphn3awrpfh1hbqy767cckgjzyjrkqjxj844czxhh1hhff";
-  }
-
-, cargoSha256 ? "0bdgan891hrah54g6aaysqizkxrfsbidnxihai0i7h7knzq9gsk5"
-, patches ? []
+     then [ "shiplift/unix-socket" "jemallocator" ]
+     else [ "leveldb" "leveldb/leveldb-sys-2" "shiplift/unix-socket" "jemallocator" ])
 }:
 
 rustPlatform.buildRustPackage rec {
   pname = "vector";
-  inherit version cargoSha256 patches;
+  version = "0.6.0";
+
   src = fetchFromGitHub {
-    owner = "timberio";
-    repo  = pname;
-    inherit (srcRef) rev sha256;
+    owner  = "timberio";
+    repo   = pname;
+    rev    = "refs/tags/v${version}";
+    sha256 = "0bb4552nwkdpnxhaq2mn4iz5w92ggqxc1b78jq2vjbh1317sj9hw";
   };
 
+  cargoSha256 = "1akyzrscc6pv7ggb1kna05vvxhfzrf1b4kji4bah1ry3yyqxdjsj";
   buildInputs = [ openssl pkgconfig protobuf ]
                 ++ stdenv.lib.optional stdenv.isDarwin [ Security libiconv ];