diff options
author | Matthew Justin Bauer <mjbauer95@gmail.com> | 2018-05-03 13:33:42 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-05-03 13:33:42 -0500 |
commit | b45ef79b74d267891a11c1775a473c610ecebe78 (patch) | |
tree | 4d64fccd8636a4166de6885dde679962537a5a54 /pkgs/tools | |
parent | 40f809c214d4e83b8cbc8efcd13276cac9237ac8 (diff) | |
parent | 143978a477e4891bd94be6d9fcf257f726b403cd (diff) | |
download | nixlib-b45ef79b74d267891a11c1775a473c610ecebe78.tar nixlib-b45ef79b74d267891a11c1775a473c610ecebe78.tar.gz nixlib-b45ef79b74d267891a11c1775a473c610ecebe78.tar.bz2 nixlib-b45ef79b74d267891a11c1775a473c610ecebe78.tar.lz nixlib-b45ef79b74d267891a11c1775a473c610ecebe78.tar.xz nixlib-b45ef79b74d267891a11c1775a473c610ecebe78.tar.zst nixlib-b45ef79b74d267891a11c1775a473c610ecebe78.zip |
Merge pull request #39907 from matthewbauer/work
Miscellaneous cleanups
Diffstat (limited to 'pkgs/tools')
-rw-r--r-- | pkgs/tools/audio/aucdtect/default.nix | 2 | ||||
-rw-r--r-- | pkgs/tools/filesystems/yandex-disk/default.nix | 5 | ||||
-rw-r--r-- | pkgs/tools/misc/megacli/default.nix | 3 | ||||
-rw-r--r-- | pkgs/tools/misc/pk2cmd/default.nix | 2 | ||||
-rw-r--r-- | pkgs/tools/misc/trash-cli/default.nix | 23 | ||||
-rw-r--r-- | pkgs/tools/misc/trash-cli/nix-paths.patch | 26 | ||||
-rw-r--r-- | pkgs/tools/networking/filegive/default.nix | 2 | ||||
-rw-r--r-- | pkgs/tools/networking/logmein-hamachi/default.nix | 2 | ||||
-rw-r--r-- | pkgs/tools/networking/miniupnpd/default.nix | 2 | ||||
-rw-r--r-- | pkgs/tools/networking/ssmtp/default.nix | 4 | ||||
-rw-r--r-- | pkgs/tools/security/enpass/default.nix | 12 | ||||
-rw-r--r-- | pkgs/tools/system/storebrowse/default.nix | 2 |
12 files changed, 22 insertions, 63 deletions
diff --git a/pkgs/tools/audio/aucdtect/default.nix b/pkgs/tools/audio/aucdtect/default.nix index 244f7b406731..825e1a0cc072 100644 --- a/pkgs/tools/audio/aucdtect/default.nix +++ b/pkgs/tools/audio/aucdtect/default.nix @@ -1,7 +1,5 @@ { stdenv, fetchurl, lib, rpmextract }: -assert stdenv.isLinux; - with lib; stdenv.mkDerivation rec { diff --git a/pkgs/tools/filesystems/yandex-disk/default.nix b/pkgs/tools/filesystems/yandex-disk/default.nix index 77302f3d4a2b..2f7e80dd912c 100644 --- a/pkgs/tools/filesystems/yandex-disk/default.nix +++ b/pkgs/tools/filesystems/yandex-disk/default.nix @@ -1,7 +1,5 @@ { stdenv, fetchurl, writeText, zlib, rpmextract, patchelf, which }: -assert stdenv.isLinux; - let p = if stdenv.is64bit then { arch = "x86_64"; @@ -13,7 +11,7 @@ let gcclib = "${stdenv.cc.cc.lib}/lib"; sha256 = "09h71i3k9d24ki81jdwhnav63fqbc44glbx228s9g3cr4ap41jcx"; }; -in +in stdenv.mkDerivation rec { name = "yandex-disk-${version}"; @@ -64,4 +62,3 @@ stdenv.mkDerivation rec { ''; }; } - diff --git a/pkgs/tools/misc/megacli/default.nix b/pkgs/tools/misc/megacli/default.nix index 5341c9840be8..b91c7d2378bb 100644 --- a/pkgs/tools/misc/megacli/default.nix +++ b/pkgs/tools/misc/megacli/default.nix @@ -1,7 +1,5 @@ { stdenv, rpmextract, ncurses5, patchelf, makeWrapper, requireFile, unzip }: -assert stdenv.system == "x86_64-linux"; - stdenv.mkDerivation rec { name = "megacli-8.07.07"; @@ -31,5 +29,6 @@ stdenv.mkDerivation rec { meta = { description = "CLI program for LSI MegaRAID cards, which also works with some Dell PERC RAID cards"; license = stdenv.lib.licenses.unfree; + platforms = [ "x86_64-linux" ]; }; } diff --git a/pkgs/tools/misc/pk2cmd/default.nix b/pkgs/tools/misc/pk2cmd/default.nix index 2f69517e4bd2..4312aecaacd6 100644 --- a/pkgs/tools/misc/pk2cmd/default.nix +++ b/pkgs/tools/misc/pk2cmd/default.nix @@ -1,7 +1,5 @@ {stdenv, fetchurl, libusb, makeWrapper}: -assert stdenv.isLinux; - stdenv.mkDerivation { name = "pk2cmd-1.20"; src = fetchurl { diff --git a/pkgs/tools/misc/trash-cli/default.nix b/pkgs/tools/misc/trash-cli/default.nix index 77308ecf2ed8..7be2e3fc61d7 100644 --- a/pkgs/tools/misc/trash-cli/default.nix +++ b/pkgs/tools/misc/trash-cli/default.nix @@ -1,7 +1,5 @@ -{ stdenv, fetchFromGitHub, fetchpatch, coreutils -, python3, python3Packages, substituteAll }: - -assert stdenv.isLinux; +{ stdenv, fetchFromGitHub, fetchpatch, python3, python3Packages +, lib, makeWrapper, coreutils }: python3Packages.buildPythonApplication rec { name = "trash-cli-${version}"; @@ -16,12 +14,6 @@ python3Packages.buildPythonApplication rec { }; patches = [ - (substituteAll { - src = ./nix-paths.patch; - df = "${coreutils}/bin/df"; - libc = "${stdenv.cc.libc.out}/lib/libc.so.6"; - }) - # Fix build on Python 3.6. (fetchpatch { url = "https://github.com/andreafrancia/trash-cli/commit/a21b80d1e69783bb09376c3f60dd2f2a10578805.patch"; @@ -30,10 +22,19 @@ python3Packages.buildPythonApplication rec { ]; buildInputs = with python3Packages; [ nose mock ]; + nativeBuildInputs = [ makeWrapper ]; + + preFixup = '' + for bin in $out/bin/*; do + wrapProgram $bin \ + --prefix PATH : ${lib.makeBinPath [ coreutils ]} \ + --prefix DYLD_LIBRARY_PATH : ${lib.makeSearchPath "lib" (lib.optional (stdenv.hostPlatform.libc == "glibc") (lib.getDev stdenv.cc.libc))} + done + ''; checkPhase = "nosetests"; - meta = with stdenv.lib; { + meta = with lib; { homepage = https://github.com/andreafrancia/trash-cli; description = "Command line tool for the desktop trash can"; maintainers = [ maintainers.rycee ]; diff --git a/pkgs/tools/misc/trash-cli/nix-paths.patch b/pkgs/tools/misc/trash-cli/nix-paths.patch deleted file mode 100644 index d7b485eec158..000000000000 --- a/pkgs/tools/misc/trash-cli/nix-paths.patch +++ /dev/null @@ -1,26 +0,0 @@ ---- a/trashcli/list_mount_points.py 2014-12-23 10:10:43.808470486 +0100 -+++ a/trashcli/list_mount_points.py 2014-12-23 10:19:04.954796457 +0100 -@@ -12,7 +12,7 @@ def mount_points_from_getmnt(): - - def mount_points_from_df(): - import subprocess -- df_output = subprocess.Popen(["df", "-P"], stdout=subprocess.PIPE).stdout -+ df_output = subprocess.Popen(["@df@", "-P"], stdout=subprocess.PIPE).stdout - return list(_mount_points_from_df_output(df_output)) - - def _mount_points_from_df_output(df_output): -@@ -46,13 +46,7 @@ def _mounted_filesystems_from_getmnt() : - ("mnt_freq", c_int), # Dump frequency (in days). - ("mnt_passno", c_int)] # Pass number for `fsck'. - -- if sys.platform == "cygwin": -- libc_name = "cygwin1.dll" -- else: -- libc_name = find_library("c") -- -- if libc_name == None : -- libc_name="/lib/libc.so.6" # fix for my Gentoo 4.0 -+ libc_name = "@libc@" - - libc = cdll.LoadLibrary(libc_name) - libc.getmntent.restype = POINTER(mntent_struct) diff --git a/pkgs/tools/networking/filegive/default.nix b/pkgs/tools/networking/filegive/default.nix index 3dfd136ad060..6fef6a9e7fa9 100644 --- a/pkgs/tools/networking/filegive/default.nix +++ b/pkgs/tools/networking/filegive/default.nix @@ -1,7 +1,5 @@ { stdenv, fetchurl, fetchgit, go }: -assert stdenv.isLinux && (stdenv.isi686 || stdenv.isx86_64 || stdenv.isAarch32); - let # Code with BSD license diff --git a/pkgs/tools/networking/logmein-hamachi/default.nix b/pkgs/tools/networking/logmein-hamachi/default.nix index bbee6546b2f4..0b585d10316c 100644 --- a/pkgs/tools/networking/logmein-hamachi/default.nix +++ b/pkgs/tools/networking/logmein-hamachi/default.nix @@ -2,8 +2,6 @@ with stdenv.lib; -assert stdenv.isLinux; - let arch = if stdenv.system == "x86_64-linux" then "x64" diff --git a/pkgs/tools/networking/miniupnpd/default.nix b/pkgs/tools/networking/miniupnpd/default.nix index 99e12084ccb5..3a1bba4ce8c1 100644 --- a/pkgs/tools/networking/miniupnpd/default.nix +++ b/pkgs/tools/networking/miniupnpd/default.nix @@ -1,7 +1,5 @@ { stdenv, fetchurl, iptables, libuuid, pkgconfig }: -assert stdenv.isLinux; - stdenv.mkDerivation rec { name = "miniupnpd-2.0.20180422"; diff --git a/pkgs/tools/networking/ssmtp/default.nix b/pkgs/tools/networking/ssmtp/default.nix index ceac5a58800c..031f32b53626 100644 --- a/pkgs/tools/networking/ssmtp/default.nix +++ b/pkgs/tools/networking/ssmtp/default.nix @@ -4,7 +4,7 @@ assert tlsSupport -> openssl != null; stdenv.mkDerivation { name = "ssmtp-2.64"; - + src = fetchurl { url = mirror://debian/pool/main/s/ssmtp/ssmtp_2.64.orig.tar.bz2; sha256 = "0dps8s87ag4g3jr6dk88hs9zl46h3790marc5c2qw7l71k4pvhr2"; @@ -28,7 +28,7 @@ stdenv.mkDerivation { installFlags = "etcdir=$(out)/etc"; installTargets = [ "install" "install-sendmail" ]; - + buildInputs = stdenv.lib.optional tlsSupport openssl; meta = with stdenv.lib; { diff --git a/pkgs/tools/security/enpass/default.nix b/pkgs/tools/security/enpass/default.nix index 38104b8b213d..f27f9af59c68 100644 --- a/pkgs/tools/security/enpass/default.nix +++ b/pkgs/tools/security/enpass/default.nix @@ -3,15 +3,15 @@ , gtk2, pango, atk, cairo, gdk_pixbuf, jasper, xkeyboardconfig , makeWrapper , makeDesktopItem, python, pythonPackages, lib , libredirect, lsof}: -assert system == "i686-linux" || system == "x86_64-linux"; + let - all_data = (with builtins; fromJSON (readFile ./data.json)); + all_data = builtins.fromJSON (builtins.readFile ./data.json); system_map = { i686-linux = "i386"; x86_64-linux = "amd64"; }; - data = (with builtins; getAttr (getAttr system system_map) all_data); + data = all_data.${system_map.${system} or (throw "Unsupported platform")}; baseUrl = http://repo.sinew.in; @@ -54,7 +54,7 @@ let description = "a well known password manager"; homepage = https://www.enpass.io/; license = lib.licenses.unfree; - platforms = lib.platforms.linux; + platforms = [ "x86_64-linux" "i686-linux"]; }; buildInputs = [makeWrapper dpkg]; @@ -70,8 +70,8 @@ let cp $out/bin/EnpassHelper/EnpassNMHost{,.untampered} sed \ - -i s@/opt/Enpass/bin/runenpass.sh@$out/bin/Enpass@ \ - $out/share/applications/enpass.desktop + -i s@/opt/Enpass/bin/runenpass.sh@$out/bin/Enpass@ \ + $out/share/applications/enpass.desktop for i in $out/bin/{Enpass,EnpassHelper/{EnpassHelper,EnpassNMHost}}; do patchelf --set-interpreter $(cat $NIX_CC/nix-support/dynamic-linker) $i diff --git a/pkgs/tools/system/storebrowse/default.nix b/pkgs/tools/system/storebrowse/default.nix index 179b4cb1a4c0..e56919acc5d5 100644 --- a/pkgs/tools/system/storebrowse/default.nix +++ b/pkgs/tools/system/storebrowse/default.nix @@ -1,7 +1,5 @@ { stdenv, fetchurl, fetchhg, go, sqlite}: -assert stdenv.isLinux && (stdenv.isi686 || stdenv.isx86_64 || stdenv.isAarch32); - stdenv.mkDerivation rec { name = "storebrowse-20130318212204"; |