Merge remote-tracking branch 'upstream/master' into HEAD

This commit is contained in:
Jörg Thalheim 2020-04-28 12:54:51 +01:00
commit d894038d0b
No known key found for this signature in database
GPG Key ID: 003F2096411B5F92
45 changed files with 314 additions and 633 deletions

View File

@ -1,4 +1,13 @@
<!-- Nixpkgs has a lot of new incoming Pull Requests, but not enough people to review this constant stream. Even if you aren't a committer, we would appreciate reviews of other PRs, especially simple ones like package updates. Just testing the relevant package/service and leaving a comment saying what you tested, how you tested it and whether it worked would be great. List of open PRs: <https://github.com/NixOS/nixpkgs/pulls>, for more about reviewing contributions: <https://hydra.nixos.org/job/nixpkgs/trunk/manual/latest/download/1/nixpkgs/manual.html#chap-reviewing-contributions>. Reviewing isn't mandatory, but it would help out a lot and reduce the average time-to-merge for all of us. Thanks a lot if you do! -->
<!--
To help with the large amounts of pull requests, we would appreciate your
reviews of other pull requests, especially simple package updates. Just leave a
comment describing what you have tested in the relevant package/service.
Reviewing helps to reduce the average time-to-merge for everyone.
Thanks a lot if you do!
List of open PRs: https://github.com/NixOS/nixpkgs/pulls
Reviewing guidelines: https://hydra.nixos.org/job/nixpkgs/trunk/manual/latest/download/1/nixpkgs/manual.html#chap-reviewing-contributions
-->
###### Motivation for this change

View File

@ -180,7 +180,7 @@ let
${optionalString (cfg.smtp.passwordFile != null) ''password: "@smtpPassword@",''}
domain: "${cfg.smtp.domain}",
${optionalString (cfg.smtp.authentication != null) "authentication: :${cfg.smtp.authentication},"}
enable_starttls_auto: ${toString cfg.smtp.enableStartTLSAuto},
enable_starttls_auto: ${boolToString cfg.smtp.enableStartTLSAuto},
ca_file: "/etc/ssl/certs/ca-certificates.crt",
openssl_verify_mode: '${cfg.smtp.opensslVerifyMode}'
}

View File

@ -153,6 +153,16 @@ in
'';
};
allowFrom = mkOption {
type = types.listOf types.str;
default = [ "localhost" ];
example = [ "all" ];
apply = concatMapStringsSep "\n" (x: "Allow ${x}");
description = ''
From which hosts to allow unconditional access.
'';
};
bindirCmds = mkOption {
type = types.lines;
internal = true;
@ -403,19 +413,19 @@ in
<Location />
Order allow,deny
Allow localhost
${cfg.allowFrom}
</Location>
<Location /admin>
Order allow,deny
Allow localhost
${cfg.allowFrom}
</Location>
<Location /admin/conf>
AuthType Basic
Require user @SYSTEM
Order allow,deny
Allow localhost
${cfg.allowFrom}
</Location>
<Policy default>

View File

@ -499,7 +499,7 @@ in
# FIXME: Consolidate this one day.
virtualisation.qemu.options = mkMerge [
(mkIf (pkgs.stdenv.isi686 || pkgs.stdenv.isx86_64) [
"-vga std" "-usb" "-device usb-tablet,bus=usb-bus.0"
"-usb" "-device usb-tablet,bus=usb-bus.0"
])
(mkIf (pkgs.stdenv.isAarch32 || pkgs.stdenv.isAarch64) [
"-device virtio-gpu-pci" "-device usb-ehci,id=usb0" "-device usb-kbd" "-device usb-tablet"

View File

@ -99,6 +99,11 @@ in stdenv.mkDerivation rec {
)
'';
# Meson is no longer able to pick up Boost automatically.
# https://github.com/NixOS/nixpkgs/issues/86131
BOOST_INCLUDEDIR = "${stdenv.lib.getDev boost}/include";
BOOST_LIBRARYDIR = "${stdenv.lib.getLib boost}/lib";
meta = with stdenv.lib; {
description = "Limiter, compressor, reverberation, equalizer and auto volume effects for Pulseaudio applications";
homepage = "https://github.com/wwmm/pulseeffects";

View File

@ -1,22 +0,0 @@
{ fetchurl, melpaBuild }:
melpaBuild {
pname = "filesets-plus";
version = "20170222.55";
src = fetchurl {
url = "https://www.emacswiki.org/emacs/download/filesets%2b.el";
sha256 = "0iajkgh0n3pbrwwxx9rmrrwz8dw2m7jsp4mggnhq7zsb20ighs00";
name = "filesets+.el";
};
recipe = fetchurl {
url = "https://raw.githubusercontent.com/milkypostman/melpa/a5d15f875b0080b12ce45cf696c581f6bbf061ba/recipes/filesets-plus+";
sha256 = "1wn99cb53ykds87lg9mrlfpalrmjj177nwskrnp9wglyqs65lk4g";
name = "filesets-plus";
};
meta = {
homepage = "https://melpa.org/#/filesets+";
};
}

View File

@ -1,23 +0,0 @@
{ fetchurl, lib, melpaBuild }:
melpaBuild {
pname = "header2";
version = "20170223.1949";
src = fetchurl {
url = "https://www.emacswiki.org/emacs/download/header2.el";
sha256 = "0cv74cfihr13jrgyqbj4x0na659djfyrhflxni6jdbgbysi4zf6k";
name = "header2.el";
};
recipe = fetchurl {
url = "https://raw.githubusercontent.com/milkypostman/melpa/a5d15f875b0080b12ce45cf696c581f6bbf061ba/recipes/header2";
sha256 = "1dg25krx3wxma2l5vb2ji7rpfp17qbrl62jyjpa52cjfsvyp6v06";
name = "header2";
};
meta = {
homepage = "https://melpa.org/#/header2";
license = lib.licenses.gpl3;
};
}

View File

@ -1,23 +0,0 @@
{ fetchurl, lib, melpaBuild }:
melpaBuild {
pname = "hexrgb";
version = "20170304.1017";
src = fetchurl {
url = "https://www.emacswiki.org/emacs/download/hexrgb.el";
sha256 = "1aj1fsc3wr8174xs45j2wc2mm6f8v6zs40xn0r4qisdw0plmsbsy";
name = "hexrgb.el";
};
recipe = fetchurl {
url = "https://raw.githubusercontent.com/milkypostman/melpa/a5d15f875b0080b12ce45cf696c581f6bbf061ba/recipes/hexrgb";
sha256 = "0mzqslrrf7sc262syj3ja7b7rnbg80dwf2p9bzxdrzx6b8vvsx06";
name = "hexrgb";
};
meta = {
homepage = "https://melpa.org/#/hexrgb";
license = lib.licenses.gpl2Plus;
};
}

View File

@ -1,43 +0,0 @@
{ stdenv, fetchurl, emacs }:
let
modules = [
{ name = "icicles.el"; sha256 = "1744n5g2kmv3r261ipa0fhrgnapl0chxz57bbbls3bp30cnnfrs7"; }
{ name = "icicles-chg.el"; sha256 = "058sxa8wh3vqr3zy677q6m2lfx4n477rnb8921s1p6wgs55v7dp4"; }
{ name = "icicles-cmd1.el"; sha256 = "064hyy8nxvlg298s5qnmk7aczbasfpddhx57jxaldyyzkca3n2h5"; }
{ name = "icicles-cmd2.el"; sha256 = "0a77fx0pxyfrg9nxvqvzz247v6cljjfz9dnfs7lc8qgdvksxs261"; }
{ name = "icicles-doc1.el"; sha256 = "04j5qvj7pqnjh8h2y2sdgi7x55czdp9xn7yysr3bzcmr1rq5p4bz"; }
{ name = "icicles-doc2.el"; sha256 = "1k8vfhi3fa4bzsxr074bw5q6srvq6z6hi61rzlxdw7pah6qf7hcz"; }
{ name = "icicles-face.el"; sha256 = "1pvygqzmh6ag0zhfjn1vhdvlhxybwxzj22ah2pc0ls80dlywhi4l"; }
{ name = "icicles-fn.el"; sha256 = "02vwa9dx9393d7kxrf443r1lj7y9ihkh25cmd418pwfgmw2yd5s7"; }
{ name = "icicles-mac.el"; sha256 = "13nxgg9k5w39lga90jwn1c7v756dqlfln2qh312vfaxfjfijfv9r"; }
{ name = "icicles-mcmd.el"; sha256 = "17d4zlf3r09wmarwyc1cbjv0pyklg4cdhwh3h643d4v8mhs5hnil"; }
{ name = "icicles-mode.el"; sha256 = "1xfv8nryf5y2gygg02naawzm5qhrkba3h84g43518r1xc6rgbpp6"; }
{ name = "icicles-opt.el"; sha256 = "154mgcd1ksnmlyb4ijy2njqq75i8cj4k47phplxsi648pzqnda77"; }
{ name = "icicles-var.el"; sha256 = "0f94299q1z0va4v1s5ijpksaqlaz88ay1qbmlzq0i2wnxnsliys8"; }
];
forAll = f: map f modules;
in
stdenv.mkDerivation rec {
version = "2019-02-22";
pname = "icicles";
srcs = forAll ({name, sha256}: fetchurl { url = "https://www.emacswiki.org/emacs/download/${name}"; inherit sha256; });
buildInputs = [ emacs ];
unpackPhase = "for m in $srcs; do cp $m $(echo $m | cut -d- -f2-); done";
buildPhase = "emacs --batch -L . -f batch-byte-compile *.el";
installPhase = "mkdir -p $out/share/emacs/site-lisp/emacswiki/${pname}-${version}/; cp *.el *.elc $out/share/emacs/site-lisp/emacswiki/${pname}-${version}/";
meta = {
homepage = "https://www.emacswiki.org/emacs/Icicles";
description = "Enhance Emacs minibuffer input with cycling and powerful completion";
license = stdenv.lib.licenses.gpl2Plus;
platforms = emacs.meta.platforms;
maintainers = with stdenv.lib.maintainers; [ scolobb ];
};
}

View File

@ -1,23 +0,0 @@
{ fetchurl, lib, melpaBuild }:
melpaBuild {
pname = "lib-requires";
version = "20170307.757";
src = fetchurl {
url = "https://www.emacswiki.org/emacs/download/lib-requires.el";
sha256 = "04lrkdjrhsgg7vgvw1mkr9a5m9xlyvjvnj2aj6w453bgmnp1mbvv";
name = "lib-requires.el";
};
recipe = fetchurl {
url = "https://raw.githubusercontent.com/milkypostman/melpa/a5d15f875b0080b12ce45cf696c581f6bbf061ba/recipes/lib-requires";
sha256 = "1g22jh56z8rnq0h80wj10gs38yig1rk9xmk3kmhmm5mm6b14iwdx";
name = "lib-requires";
};
meta = {
homepage = "https://melpa.org/#/lib-requires";
license = lib.licenses.gpl2Plus;
};
}

View File

@ -61,8 +61,9 @@ in {
pname = builtins.replaceStrings [ "@" ] [ "at" ] ename;
broken = ! isNull error;
in
lib.nameValuePair ename (if hasSource then (
self.callPackage ({ melpaBuild, fetchurl, ... }@pkgargs:
if hasSource then
lib.nameValuePair ename (
self.callPackage ({ melpaBuild, fetchurl, ... }@pkgargs:
melpaBuild {
inherit pname;
ename = ename;
@ -85,6 +86,8 @@ in {
};
}
) {}
) else null);
)
else
null;
}

View File

@ -68,8 +68,6 @@
ess-R-object-popup =
callPackage ./ess-R-object-popup { };
filesets-plus = callPackage ./filesets-plus { };
font-lock-plus = callPackage ./font-lock-plus { };
ghc-mod = melpaBuild {
@ -109,17 +107,8 @@
};
};
hexrgb = callPackage ./hexrgb { };
header2 = callPackage ./header2 { };
helm-words = callPackage ./helm-words { };
icicles = callPackage ./icicles { };
lib-requires =
callPackage ./lib-requires { };
org-mac-link =
callPackage ./org-mac-link { };
@ -134,12 +123,8 @@
sv-kalender = callPackage ./sv-kalender { };
thingatpt-plus = callPackage ./thingatpt-plus { };
tramp = callPackage ./tramp { };
yaoddmuse = callPackage ./yaoddmuse { };
zeitgeist = callPackage ./zeitgeist { };
# From old emacsPackages (pre emacsPackagesNg)

View File

@ -42,7 +42,9 @@ env NIXPKGS_ALLOW_BROKEN=1 nix-instantiate --show-trace ../../../../ -A emacsPac
}: let
inherit (import ./libgenerated.nix lib self) melpaDerivation;
super = lib.listToAttrs (map (melpaDerivation variant) (lib.importJSON archiveJson));
super = lib.listToAttrs (builtins.filter (s: s != null)
(map (melpaDerivation variant)
(lib.importJSON archiveJson)));
overrides = rec {
shared = rec {
@ -339,10 +341,6 @@ env NIXPKGS_ALLOW_BROKEN=1 nix-instantiate --show-trace ../../../../ -A emacsPac
# Map legacy renames from emacs2nix since code generation was ported to emacs lisp
_0blayout = super."0blayout";
_0xc = super."0xc";
_2048-game = super."2048-game";
_4clojure = super."4clojure";
at = super."@";
desktop-plus = super."desktop+";
ghub-plus = super."ghub+";
git-gutter-plus = super."git-gutter+";
@ -353,10 +351,6 @@ env NIXPKGS_ALLOW_BROKEN=1 nix-instantiate --show-trace ../../../../ -A emacsPac
markdown-mode-plus = super."markdown-mode+";
package-plus = super."package+";
rect-plus = super."rect+";
term-plus = super."term+";
term-plus-key-intercept = super."term+key-intercept";
term-plus-mux = super."term+mux";
xml-plus = super."xml+";
};
stable = shared // {
@ -559,6 +553,16 @@ env NIXPKGS_ALLOW_BROKEN=1 nix-instantiate --show-trace ../../../../ -A emacsPac
# Legacy alias
emacs-libvterm = unstable.vterm;
# Map legacy renames from emacs2nix since code generation was ported to emacs lisp
_0xc = super."0xc";
_2048-game = super."2048-game";
_4clojure = super."4clojure";
at = super."@";
term-plus = super."term+";
term-plus-key-intercept = super."term+key-intercept";
term-plus-mux = super."term+mux";
xml-plus = super."xml+";
w3m = super.w3m.override (args: {
melpaBuild = drv: args.melpaBuild (drv // {
prePatch =

View File

@ -1,23 +0,0 @@
{ fetchurl, lib, melpaBuild }:
melpaBuild {
pname = "thingatpt-plus";
version = "20170307.1539";
src = fetchurl {
url = "https://www.emacswiki.org/emacs/download/thingatpt+.el";
sha256 = "1k9y354315gvhbdk0m9xpjx24w1bwrnzlnfiils8xgdwnw4py99a";
name = "thingatpt+.el";
};
recipe = fetchurl {
url = "https://raw.githubusercontent.com/milkypostman/melpa/a5d15f875b0080b12ce45cf696c581f6bbf061ba/recipes/thingatpt+";
sha256 = "0w031lzjl5phvzsmbbxn2fpziwkmdyxsn08h6b9lxbss1prhx7aa";
name = "thingatpt-plus";
};
meta = {
homepage = "https://melpa.org/#/thingatpt+";
license = lib.licenses.gpl2Plus;
};
}

View File

@ -1,30 +0,0 @@
{stdenv, fetchurl, emacs}:
stdenv.mkDerivation {
name = "yaoddmuse-0.1.2";
src = fetchurl {
url = "http://emacswiki.org/emacs/download/yaoddmuse.el";
sha256 = "0vlllq3xmnlni0ws226pqxj68nshclbl5rgqv6y11i3yvzgiazr6";
};
phases = [ "buildPhase" "installPhase"];
buildInputs = [ emacs ];
buildPhase = ''
cp $src yaoddmuse.el
emacs --batch -f batch-byte-compile yaoddmuse.el
'';
installPhase = ''
install -d $out/share/emacs/site-lisp
install yaoddmuse.el $out/share/emacs/site-lisp
'';
meta = {
description = "Comprehensive Emacs integration with Oddmuse wikis";
homepage = "http://emacswiki.org/emacs/Yaoddmuse";
platforms = stdenv.lib.platforms.all;
};
}

View File

@ -7,7 +7,7 @@
stdenv.mkDerivation rec {
pname = "dbeaver-ce";
version = "7.0.2";
version = "7.0.3";
desktopItem = makeDesktopItem {
name = "dbeaver";
@ -30,7 +30,7 @@ stdenv.mkDerivation rec {
src = fetchurl {
url = "https://dbeaver.io/files/${version}/dbeaver-ce-${version}-linux.gtk.x86_64.tar.gz";
sha256 = "0p75kvs9ng5i5x5cpdqxlf18y3k83pqsvrkab0i1azk3x4lfkzmd";
sha256 = "189rsavmaa7480r61qhpzagia3c8jr3dfcl01ks3nfyq53j08hml";
};
installPhase = ''

View File

@ -92,7 +92,7 @@ in buildFHSUserEnv {
multiPkgs = pkgs: with pkgs; [
# Common
libsndfile libtheora libogg libvorbis libopus libGLU libpcap libpulseaudio
libao libusb libevdev udev libgcrypt libxml2 libusb libpng libmpeg2 libv4l
libao libevdev udev libgcrypt libxml2 libusb libpng libmpeg2 libv4l
libjpeg libxkbcommon libass libcdio libjack2 libsamplerate libzip libmad libaio
libcap libtiff libva libgphoto2 libxslt libsndfile giflib zlib glib
alsaLib zziplib bash dbus keyutils zip cabextract freetype unzip coreutils

View File

@ -1,25 +1,28 @@
{ stdenv, fetchFromGitHub, makeDesktopItem
{ stdenv, lib, fetchgit, makeDesktopItem
, pkgconfig, autoconf213, alsaLib, bzip2, cairo
, dbus, dbus-glib, ffmpeg, file, fontconfig, freetype
, gnome2, gnum4, gtk2, hunspell, libevent, libjpeg
, libnotify, libstartup_notification, makeWrapper
, libGLU, libGL, perl, python, libpulseaudio
, libGLU, libGL, perl, python2, libpulseaudio
, unzip, xorg, wget, which, yasm, zip, zlib
, withGTK3 ? false, gtk3
}:
let
libPath = stdenv.lib.makeLibraryPath [ ffmpeg ];
libPath = lib.makeLibraryPath [ ffmpeg ];
gtkVersion = if withGTK3 then "3" else "2";
in stdenv.mkDerivation rec {
pname = "palemoon";
version = "28.8.4";
version = "28.9.1";
src = fetchFromGitHub {
owner = "MoonchildProductions";
repo = "UXP";
rev = "PM${version}_Release";
sha256 = "1k2j4rlgjwkns3a592pbiwwhrpja3fachvzby1his3d1mhdvyc6f";
src = fetchgit {
url = "https://github.com/MoonchildProductions/Pale-Moon.git";
rev = "${version}_Release";
sha256 = "1772by9r9l1l0wmj4hs89r3zyckcbrq1krb09bn3pxvjjywzvkfl";
fetchSubmodules = true;
};
desktopItem = makeDesktopItem {
@ -29,7 +32,7 @@ in stdenv.mkDerivation rec {
desktopName = "Pale Moon";
genericName = "Web Browser";
categories = "Application;Network;WebBrowser;";
mimeType = stdenv.lib.concatStringsSep ";" [
mimeType = lib.concatStringsSep ";" [
"text/html"
"text/xml"
"application/xhtml+xml"
@ -40,60 +43,75 @@ in stdenv.mkDerivation rec {
];
};
nativeBuildInputs = [
file gnum4 makeWrapper perl pkgconfig python2 wget which
];
buildInputs = [
alsaLib bzip2 cairo dbus dbus-glib ffmpeg file fontconfig freetype
gnome2.GConf gnum4 gtk2 hunspell libevent libjpeg libnotify
libstartup_notification makeWrapper libGLU libGL perl
pkgconfig python libpulseaudio unzip wget which yasm zip zlib
] ++ (with xorg; [
alsaLib bzip2 cairo dbus dbus-glib ffmpeg fontconfig freetype
gnome2.GConf gtk2 hunspell libevent libjpeg libnotify
libstartup_notification libGLU libGL
libpulseaudio unzip yasm zip zlib
]
++ (with xorg; [
libX11 libXext libXft libXi libXrender libXScrnSaver
libXt pixman xorgproto
]);
])
++ lib.optional withGTK3 gtk3;
enableParallelBuilding = true;
configurePhase = ''
export MOZBUILD_STATE_PATH=$(pwd)/mozbuild
export MOZCONFIG=$(pwd)/mozconfig
export MOZ_NOSPAM=1
export builddir=$(pwd)/pmbuild
echo > $MOZCONFIG "
mk_add_options AUTOCLOBBER=1
mk_add_options MOZ_OBJDIR=$builddir
# Keep this similar to the official .mozconfig file,
# only minor changes for portability are permitted with branding.
# https://developer.palemoon.org/build/linux/
echo > $MOZCONFIG '
# Clear this if not a 64bit build
_BUILD_64=${lib.optionalString stdenv.hostPlatform.is64bit "1"}
# Set GTK Version to 2 or 3
_GTK_VERSION=${gtkVersion}
# Standard build options for Pale Moon
ac_add_options --enable-application=palemoon
ac_add_options --enable-optimize="-O2 -w"
ac_add_options --enable-default-toolkit=cairo-gtk$_GTK_VERSION
ac_add_options --enable-jemalloc
ac_add_options --enable-strip
ac_add_options --enable-devtools
ac_add_options --enable-optimize='-O2'
ac_add_options --disable-eme
ac_add_options --disable-webrtc
ac_add_options --disable-gamepad
ac_add_options --disable-tests
ac_add_options --disable-debug
ac_add_options --disable-necko-wifi
ac_add_options --disable-updater
ac_add_options --with-pthreads
# Please see https://www.palemoon.org/redist.shtml for restrictions when using the official branding.
ac_add_options --enable-official-branding
export MOZILLA_OFFICIAL=1
ac_add_options --enable-default-toolkit=cairo-gtk2
ac_add_options --enable-jemalloc
ac_add_options --enable-strip
ac_add_options --with-pthreads
ac_add_options --x-libraries=${lib.makeLibraryPath [ xorg.libX11 ]}
ac_add_options --disable-tests
ac_add_options --disable-eme
ac_add_options --disable-parental-controls
ac_add_options --disable-accessibility
ac_add_options --disable-webrtc
ac_add_options --disable-gamepad
ac_add_options --disable-necko-wifi
ac_add_options --disable-updater
export MOZ_PKG_SPECIAL=gtk$_GTK_VERSION
ac_add_options --x-libraries=${xorg.libX11.out}/lib
#
# NixOS-specific adjustments
#
ac_add_options --prefix=$out
mk_add_options MOZ_MAKE_FLAGS='-j$NIX_BUILD_CORES'
mk_add_options MOZ_MAKE_FLAGS="-j$NIX_BUILD_CORES"
mk_add_options AUTOCONF=${autoconf213}/bin/autoconf
"
'
'';
buildPhase = ''
$src/mach build
'';
buildPhase = "$src/mach build";
installPhase = ''
$src/mach install
@ -104,7 +122,7 @@ in stdenv.mkDerivation rec {
for n in 16 22 24 32 48 256; do
size=$n"x"$n
mkdir -p $out/share/icons/hicolor/$size/apps
cp $src/application/palemoon/branding/official/default$n.png \
cp $src/palemoon/branding/official/default$n.png \
$out/share/icons/hicolor/$size/apps/palemoon.png
done
@ -112,7 +130,7 @@ in stdenv.mkDerivation rec {
--prefix LD_LIBRARY_PATH : "${libPath}"
'';
meta = with stdenv.lib; {
meta = with lib; {
description = "An Open Source, Goanna-based web browser focusing on efficiency and customization";
longDescription = ''
Pale Moon is an Open Source, Goanna-based web browser focusing on

View File

@ -1,45 +0,0 @@
{ stdenv, buildGoPackage, fetchgit, makeWrapper, pkgconfig, qtbase, qtdeclarative, qtwebengine }:
buildGoPackage rec {
pname = "gopherclient";
version = "2016-10-02";
rev = "91c41b5542d08001636708e2a5054521a6004702";
goPackagePath = "github.com/prologic/gopherclient";
src = fetchgit {
inherit rev;
url = "https://github.com/prologic/gopherclient";
sha256 = "0b1gvxhv4zg930hvric9mmbfp0lnww0sqlkkfbzfkif3wz9ni5y9";
};
nativeBuildInputs = [ makeWrapper pkgconfig ];
buildInputs = [ qtbase qtdeclarative qtwebengine ];
preBuild = ''
# Generate gopherclient resources with genqrc.
ln -s ${goPackagePath}/vendor/gopkg.in go/src/
GOBIN="$(pwd)" go install -v gopkg.in/qml.v1/cmd/genqrc
PATH="$(pwd):$PATH" go generate ${goPackagePath}
'';
NIX_CFLAGS_COMPILE = [
# go-qml needs private Qt headers.
"-I${qtbase.dev}/include/QtCore/${qtbase.version}"
];
postInstall = ''
# https://github.com/prologic/gopherclient/#usage
wrapProgram $bin/bin/gopherclient --prefix GODEBUG , cgocheck=0
'';
meta = with stdenv.lib; {
homepage = "https://github.com/prologic/gopherclient";
description = "Gopher Qt GUI client";
license = licenses.mit;
maintainers = with maintainers; [ orivej ];
platforms = platforms.linux;
broken = true;
};
}

View File

@ -1,46 +1,47 @@
{ mkDerivation, stdenv, lib, fetchFromGitHub, cmake
, qtbase, qtquickcontrols, qtkeychain, qtmultimedia, qttools
, libqmatrixclient_0_5
, libsecret
, qtbase, qtquickcontrols, qtquickcontrols2, qtkeychain, qtmultimedia, qttools
, libquotient, libsecret
}:
let
generic = version: sha256: prefix: library: mkDerivation {
pname = "quaternion";
inherit version;
mkDerivation rec {
pname = "quaternion";
version = "0.0.9.4e";
src = fetchFromGitHub {
owner = "QMatrixClient";
repo = "Quaternion";
rev = "${prefix}${version}";
inherit sha256;
};
buildInputs = [ qtbase qtmultimedia qtquickcontrols qtkeychain library libsecret ];
nativeBuildInputs = [ cmake qttools ];
postInstall = if stdenv.isDarwin then ''
mkdir -p $out/Applications
mv $out/bin/quaternion.app $out/Applications
rmdir $out/bin || :
'' else ''
substituteInPlace $out/share/applications/quaternion.desktop \
--replace 'Exec=quaternion' "Exec=$out/bin/quaternion"
'';
meta = with lib; {
description = "Cross-platform desktop IM client for the Matrix protocol";
homepage = "https://matrix.org/docs/projects/client/quaternion.html";
license = licenses.gpl3;
maintainers = with maintainers; [ peterhoeg ];
inherit (qtbase.meta) platforms;
inherit version;
};
src = fetchFromGitHub {
owner = "QMatrixClient";
repo = "Quaternion";
rev = "${version}";
sha256 = "sha256-2yEiILiitRPj2hCodUDM8UNVq8crb9nyX21ebuh5EEM=";
};
in rec {
quaternion = generic "0.0.9.4c" "12mkwiqqbi4774kwl7gha72jyf0jf547acy6rw8ry249zl4lja54" "" libqmatrixclient_0_5;
buildInputs = [
qtbase
qtmultimedia
qtquickcontrols
qtquickcontrols2
qtkeychain
libquotient
libsecret
];
quaternion-git = quaternion;
nativeBuildInputs = [ cmake qttools ];
postInstall = if stdenv.isDarwin then ''
mkdir -p $out/Applications
mv $out/bin/quaternion.app $out/Applications
rmdir $out/bin || :
'' else ''
substituteInPlace $out/share/applications/com.github.quaternion.desktop \
--replace 'Exec=quaternion' "Exec=$out/bin/quaternion"
'';
meta = with lib; {
description =
"Cross-platform desktop IM client for the Matrix protocol";
homepage = "https://matrix.org/docs/projects/client/quaternion.html";
license = licenses.gpl3;
maintainers = with maintainers; [ peterhoeg ];
inherit (qtbase.meta) platforms;
inherit version;
};
}

View File

@ -23,7 +23,7 @@ let
else "");
in stdenv.mkDerivation rec {
pname = "signal-desktop";
version = "1.33.3"; # Please backport all updates to the stable channel.
version = "1.33.4"; # Please backport all updates to the stable channel.
# All releases have a limited lifetime and "expire" 90 days after the release.
# When releases "expire" the application becomes unusable until an update is
# applied. The expiration date for the current release can be extracted with:
@ -33,7 +33,7 @@ in stdenv.mkDerivation rec {
src = fetchurl {
url = "https://updates.signal.org/desktop/apt/pool/main/s/signal-desktop/signal-desktop_${version}_amd64.deb";
sha256 = "1brw1hidmrznb55cb794yvgzin7sf3cxnffivmag4vf2a2vcvf4y";
sha256 = "0mcxia2zaflaazfdl1ngpab0dyhwwzbhad7brc6kwhjxydbnmwcd";
};
nativeBuildInputs = [

View File

@ -1,4 +1,4 @@
{ stdenv, pythonPackages, fetchpatch }:
{ stdenv, pythonPackages, fetchpatch, installShellFiles }:
with pythonPackages;
@ -14,15 +14,21 @@ buildPythonApplication rec {
checkPhase = ''
pytest -vs tests
'';
'';
postInstall = ''
installShellCompletion --bash --name watson watson.completion
installShellCompletion --zsh --name _watson watson.zsh-completion
'';
checkInputs = [ py pytest pytest-datafiles mock pytest-mock pytestrunner ];
propagatedBuildInputs = [ requests click arrow ];
nativeBuildInputs = [ installShellFiles ];
meta = with stdenv.lib; {
homepage = "https://tailordev.github.io/Watson/";
description = "A wonderful CLI to track your time!";
license = licenses.mit;
maintainers = with maintainers; [ mguentner nathyong ] ;
maintainers = with maintainers; [ mguentner nathyong ];
};
}

View File

@ -1,4 +1,4 @@
{ stdenv, makeWrapper, nix, skopeo }:
{ stdenv, makeWrapper, nix, skopeo, jq }:
with stdenv.lib;
@ -12,7 +12,7 @@ stdenv.mkDerivation {
installPhase = ''
install -vD ${./nix-prefetch-docker} $out/bin/$name;
wrapProgram $out/bin/$name \
--prefix PATH : ${makeBinPath [ nix skopeo ]} \
--prefix PATH : ${makeBinPath [ nix skopeo jq ]} \
--set HOME /homeless-shelter
'';

View File

@ -1,38 +0,0 @@
{ stdenv, fetchFromGitHub, cmake
, qtbase, qtmultimedia }:
let
generic = version: sha256: prefix: stdenv.mkDerivation {
pname = "libqmatrixclient";
inherit version;
src = fetchFromGitHub {
owner = "QMatrixClient";
repo = "libqmatrixclient";
rev = "${prefix}${version}";
inherit sha256;
};
postPatch = ''
sed -i -e '/example/Id' CMakeLists.txt
'';
buildInputs = [ qtbase qtmultimedia ];
nativeBuildInputs = [ cmake ];
meta = with stdenv.lib; {
description= "A Qt5 library to write cross-platfrom clients for Matrix";
homepage = "https://matrix.org/docs/projects/sdk/libqmatrixclient.html";
license = licenses.lgpl21;
platforms = with platforms; linux ++ darwin;
maintainers = with maintainers; [ peterhoeg ];
};
};
in rec {
libqmatrixclient_0_4 = generic "0.4.2.1" "056hvp2m74wx72yd8vai18siddj9l8bhrvrkc4ia4cwjsqw02kid" "v";
libqmatrixclient_0_5 = generic "0.5.2" "1bhlqfs7251fss4icx794ka614npr6zyrpp4qwc4q5408ykfm7lr" "";
libqmatrixclient = libqmatrixclient_0_4;
}

View File

@ -0,0 +1,24 @@
{ mkDerivation, lib, fetchFromGitHub, cmake, qtbase, qtmultimedia }:
mkDerivation rec {
pname = "libquotient";
version = "0.5.3.2";
src = fetchFromGitHub {
owner = "quotient-im";
repo = "libQuotient";
rev = version;
sha256 = "0gkwr3yw6k2m0j8cc085b5p2q788rf5nhp1p5hc5d55pc7mci2qs";
};
buildInputs = [ qtbase qtmultimedia ];
nativeBuildInputs = [ cmake ];
meta = with lib; {
description = "A Qt5 library to write cross-platfrom clients for Matrix";
homepage = "https://matrix.org/docs/projects/sdk/quotient";
maintainers = with maintainers; [ colemickens ];
license = licenses.lgpl21;
};
}

View File

@ -2,15 +2,15 @@
buildDunePackage rec {
pname = "angstrom";
version = "0.12.1";
version = "0.13.0";
minimumOCamlVersion = "4.03";
minimumOCamlVersion = "4.04";
src = fetchFromGitHub {
owner = "inhabitedtype";
repo = pname;
rev = version;
sha256 = "0w0wavqzdy2hrh7cjyl9w72ad4vndhwhknwvyacvkwkja5wys5b2";
sha256 = "0vzbwd8j34iv7n6gwqq2mf25q7rqpnpxnifb9ssxhq55p5dd1kp4";
};
checkInputs = [ alcotest ];

View File

@ -1,12 +1,12 @@
{ stdenv, fetchurl, ocaml, findlib, ocamlbuild, topkg, ctypes, result, SDL2, pkgconfig, ocb-stubblr }:
if !stdenv.lib.versionAtLeast ocaml.version "4.02"
if !stdenv.lib.versionAtLeast ocaml.version "4.03"
then throw "tsdl is not available for OCaml ${ocaml.version}"
else
let
pname = "tsdl";
version = "0.9.4";
version = "0.9.7";
webpage = "https://erratique.ch/software/${pname}";
in
@ -15,11 +15,11 @@ stdenv.mkDerivation {
src = fetchurl {
url = "${webpage}/releases/${pname}-${version}.tbz";
sha256 = "13af37w2wybx8yzgjr5zz5l50402ldl614qiwphl1q69hig5mag2";
sha256 = "1zwv0ixkigh1gzk5n49rwvz2f2m62jdkkqg40j7dclg4gri7691f";
};
nativeBuildInputs = [ pkgconfig ];
buildInputs = [ ocaml findlib ocamlbuild topkg result ocb-stubblr ];
buildInputs = [ ocaml findlib ocamlbuild topkg ];
propagatedBuildInputs = [ SDL2 ctypes ];
preConfigure = ''
@ -36,7 +36,7 @@ stdenv.mkDerivation {
meta = with stdenv.lib; {
homepage = webpage;
description = "Thin bindings to the cross-platform SDL library";
license = licenses.bsd3;
license = licenses.isc;
platforms = ocaml.meta.platforms or [];
};
}

View File

@ -1,6 +1,6 @@
{ stdenv, buildPythonPackage, darwin, grpc
, six, protobuf, enum34, futures, isPy27, pkgconfig
, cython}:
, cython, c-ares, openssl, zlib }:
buildPythonPackage rec {
inherit (grpc) src version;
@ -9,11 +9,16 @@ buildPythonPackage rec {
nativeBuildInputs = [ cython pkgconfig ]
++ stdenv.lib.optional stdenv.isDarwin darwin.cctools;
buildInputs = [ c-ares openssl zlib ];
propagatedBuildInputs = [ six protobuf ]
++ stdenv.lib.optionals (isPy27) [ enum34 futures ];
preBuild = stdenv.lib.optionalString stdenv.isDarwin "unset AR";
GRPC_PYTHON_BUILD_SYSTEM_OPENSSL = 1;
GRPC_PYTHON_BUILD_SYSTEM_ZLIB = 1;
GRPC_PYTHON_BUILD_SYSTEM_CARES = 1;
meta = with stdenv.lib; {
description = "HTTP/2-based RPC framework";
license = licenses.asl20;

View File

@ -1,4 +1,4 @@
{ stdenv, fetchPypi, buildPythonPackage, libusb, libusb1 }:
{ stdenv, fetchPypi, buildPythonPackage, libusb1 }:
buildPythonPackage rec {
pname = "pyusb";
@ -17,14 +17,12 @@ buildPythonPackage rec {
sed -i -e "s|find_library=None|find_library=lambda _:\"$libusb\"|" usb/backend/libusb1.py
'';
propagatedBuildInputs = [ libusb ];
# No tests included
doCheck = false;
meta = with stdenv.lib; {
description = "Python USB access module (wraps libusb 1.0)"; # can use other backends
homepage = "http://pyusb.sourceforge.net/";
homepage = "https://pyusb.github.io/pyusb/";
license = licenses.bsd3;
maintainers = with maintainers; [ bjornfor ];
};

View File

@ -2,15 +2,15 @@
buildGoPackage rec {
pname = "jid";
version = "0.7.2";
version = "0.7.6";
goPackagePath = "github.com/simeji/jid";
src = fetchFromGitHub {
owner = "simeji";
repo = "jid";
rev = version;
sha256 = "0p4srp85ilcafrn9d36rzpzg5k5jd7is93p68hamgxqyiiw6a8fi";
rev = "v${version}";
sha256 = "15fgi7cpq5bg2lnpr7rip359xwj2kvlj6j2qzi837c26adnw973x";
};
goDeps = ./deps.nix;

View File

@ -1,12 +1,12 @@
# This file was generated by https://github.com/kamilchm/go2nix v1.2.1
# file generated from go.mod using vgo2nix (https://github.com/adisbladis/vgo2nix)
[
{
goPackagePath = "github.com/bitly/go-simplejson";
fetch = {
type = "git";
url = "https://github.com/bitly/go-simplejson";
rev = "9db4a59bd4d803ae0c173a7d8a538e056cd59d57";
sha256 = "0cbnjzjq55jnzk07zdk7nb96yzgpyawm1r6km3xignn8ih4bnn6g";
rev = "v0.5.0";
sha256 = "0n9f9dz1jn1jx86d48569nznpjn9fmq3knn7r65xpy7jhih284jj";
};
}
{
@ -14,8 +14,26 @@
fetch = {
type = "git";
url = "https://github.com/fatih/color";
rev = "3f9d52f7176a6927daacff70a3e8d1dc2025c53e";
sha256 = "165ww24x6ba47ji4j14mp3f006ksnmi53ws9280pgd2zcw91nbn8";
rev = "v1.7.0";
sha256 = "0v8msvg38r8d1iiq2i5r4xyfx0invhc941kjrsg5gzwvagv55inv";
};
}
{
goPackagePath = "github.com/mattn/go-colorable";
fetch = {
type = "git";
url = "https://github.com/mattn/go-colorable";
rev = "v0.0.9";
sha256 = "1nwjmsppsjicr7anq8na6md7b1z84l9ppnlr045hhxjvbkqwalvx";
};
}
{
goPackagePath = "github.com/mattn/go-isatty";
fetch = {
type = "git";
url = "https://github.com/mattn/go-isatty";
rev = "v0.0.4";
sha256 = "0zs92j2cqaw9j8qx1sdxpv3ap0rgbs0vrvi72m40mg8aa36gd39w";
};
}
{
@ -23,8 +41,8 @@
fetch = {
type = "git";
url = "https://github.com/mattn/go-runewidth";
rev = "c88d7e5f2e24de48a200a2655ac8a0910be9a0f7";
sha256 = "14prmzjlv9z31n6caaaq1kwi4p0mp3x4pv5r7d0575lcampa41jw";
rev = "v0.0.4";
sha256 = "00b3ssm7wiqln3k54z2wcnxr3k3c7m1ybyhb9h8ixzbzspld0qzs";
};
}
{
@ -32,7 +50,7 @@
fetch = {
type = "git";
url = "https://github.com/nsf/termbox-go";
rev = "60ab7e3d12ed91bc1b2486559c4b3a6b62297577";
rev = "60ab7e3d12ed";
sha256 = "040064fh7wzdmv8flw6svi007hiqs1cjk1a3k3gpg7gii3npifsl";
};
}
@ -41,7 +59,7 @@
fetch = {
type = "git";
url = "https://github.com/nwidger/jsoncolor";
rev = "75a6de4340e59be95f0884b9cebdda246e0fdf40";
rev = "75a6de4340e5";
sha256 = "0aiv42xijrqgrxfx6pfyrndpwqv8i1qwsk190jdczyjxlnki2nki";
};
}
@ -50,8 +68,8 @@
fetch = {
type = "git";
url = "https://github.com/pkg/errors";
rev = "059132a15dd08d6704c67711dae0cf35ab991756";
sha256 = "0bxkbh2rq40kdk8i05am5np77cnskx3571v2k300j5mmj1rl1ijg";
rev = "v0.8.0";
sha256 = "001i6n71ghp2l6kdl3qq1v2vmghcz3kicv9a5wgcihrzigm75pp5";
};
}
]

View File

@ -6,7 +6,7 @@ let
, platform ? null
, extraMakeFlags ? []
, extraMeta ? {}
, version ? "2.2"
, version ? "2.3"
, ... } @ args:
stdenv.mkDerivation ({
@ -16,8 +16,8 @@ let
src = fetchFromGitHub {
owner = "ARM-software";
repo = "arm-trusted-firmware";
rev = "refs/tags/v${version}";
sha256 = "03fjl5hy1bqlya6fg553bqz7jrvilzrzpbs87cv6jd04v8qrvry8";
rev = "v${version}";
sha256 = "113mcf1hwwl0i90cqh08lywxs1bfbg0nwqibay9wlkmx1a5v0bnj";
};
depsBuildBuild = [ buildPackages.stdenv.cc ];
@ -51,7 +51,7 @@ let
homepage = "https://github.com/ARM-software/arm-trusted-firmware";
description = "A reference implementation of secure world software for ARMv8-A";
license = licenses.bsd3;
maintainers = [ maintainers.lopsided98 ];
maintainers = with maintainers; [ lopsided98 ];
} // extraMeta;
} // builtins.removeAttrs args [ "extraMeta" ]);

View File

@ -0,0 +1,42 @@
{ stdenv, fetchFromGitHub, numactl, pkgconfig }:
stdenv.mkDerivation rec {
pname = "libpsm2";
version = "11.2.156";
ifs_version = "10_10_2_0_44";
preConfigure= ''
export UDEVDIR=$out/etc/udev
substituteInPlace ./Makefile --replace "udevrulesdir}" "prefix}/etc/udev";
'';
enableParallelBuilding = true;
buildInputs = [ numactl pkgconfig ];
installFlags = [
"DESTDIR=$(out)"
"UDEVDIR=/etc/udev"
"LIBPSM2_COMPAT_CONF_DIR=/etc"
];
src = fetchFromGitHub {
owner = "intel";
repo = "opa-psm2";
rev = "IFS_RELEASE_${ifs_version}";
sha256 = "0ckrfzih1ga9yvximxjdh0z05kn9l858ykqiblv18w6ka3gra1xz";
};
postInstall = ''
mv $out/usr/* $out
rmdir $out/usr
'';
meta = with stdenv.lib; {
homepage = "https://github.com/intel/opa-psm2";
description = "The PSM2 library supports a number of fabric media and stacks";
license = with licenses; [ gpl2 bsd3 ];
platforms = [ "x86_64-linux" ];
maintainers = [ maintainers.bzizou ];
};
}

View File

@ -2,16 +2,16 @@
buildGoModule {
pname = "mautrix-whatsapp-unstable";
version = "2020-04-21";
version = "2020-04-21-1";
src = fetchFromGitHub {
owner = "tulir";
repo = "mautrix-whatsapp";
rev = "53fe1b18184fc0967658805abc8560641f8d2cb0";
sha256 = "0rahj9v7cgvk4w3m41jbs8vnya37dhq5wxyhyg74kwrv8a2nqxra";
rev = "e0aea74abf090bc9dc499332b28bf03640c162f8";
sha256 = "1gayjyh0x0axc1xak38zkdhvx6fy8pwlniqsirqy2mwcgkkll9i5";
};
modSha256 = "0jn88a4hagwfkw9bv8cg12ywsg35znmfkmhi1v7k2qpj5qzi81w6";
modSha256 = "1pddabyyz6q1snx9j7yv7dchasqa1y8nbpb5zrwmrpnwpns8kxl7";
meta = with stdenv.lib; {
homepage = "https://github.com/tulir/mautrix-whatsapp";

View File

@ -2,7 +2,7 @@
buildGoPackage rec {
pname = "kapacitor";
version = "1.5.1";
version = "1.5.4";
goPackagePath = "github.com/influxdata/kapacitor";
@ -10,14 +10,14 @@ buildGoPackage rec {
owner = "influxdata";
repo = "kapacitor";
rev = "v${version}";
sha256 = "17f3my1zmqmcx7qqhdcq8n73l60bsxnnxqgvnw0cnf0xsa5g1yks";
sha256 = "1sd0gwqwa2bk81lshs8cy49mk1nh4azjkk0283rh0rkimy90l0zz";
};
meta = with lib; {
description = "Open source framework for processing, monitoring, and alerting on time series data";
license = licenses.mit;
homepage = "https://influxdata.com/time-series-platform/kapacitor/";
maintainers = with maintainers; [offline];
maintainers = with maintainers; [ offline ];
platforms = with platforms; linux;
};
}

View File

@ -2,7 +2,7 @@
buildGoModule rec {
pname = "telegraf";
version = "1.14.0";
version = "1.14.1";
goPackagePath = "github.com/influxdata/telegraf";
@ -14,7 +14,7 @@ buildGoModule rec {
owner = "influxdata";
repo = "telegraf";
rev = "v${version}";
sha256 = "062j4sm7im4iv5i9afr771724srvwwcqbhkyznlzncaz06mk1sn7";
sha256 = "17lzz0f9vzyfwr3kgwg6i6361hqzq54jnaaw9rdc132xppdx03nr";
};
modSha256 = "1q7il1x1pfyz15z23cs0kk7zyacn6b3y28b1q52bqi30l1x8bdbp";

View File

@ -9,11 +9,11 @@
# Note: when upgrading this package, please run the list-missing-tools.sh script as described below!
python3Packages.buildPythonApplication rec {
pname = "diffoscope";
version = "142";
version = "143";
src = fetchurl {
url = "https://diffoscope.org/archive/diffoscope-${version}.tar.bz2";
sha256 = "0c6lvppghw9ynjg2radr8z3fc6lpgmgwr6kxyih7q4rxqf4gfv6i";
sha256 = "09vvhzsxxgjvdnd48hdfz50i2svacdnwc2idirj4b27czi7c3czb";
};
outputs = [ "out" "man" ];

View File

@ -8,13 +8,13 @@
python3.pkgs.buildPythonApplication rec {
pname = "nixpkgs-review";
version = "2.3.0";
version = "2.3.1";
src = fetchFromGitHub {
owner = "Mic92";
repo = "nixpkgs-review";
rev = version;
sha256 = "0qkvjl4f8a1905yj3ml32rfdr5q76igz21gn3dcya0pfqhrnb28i";
sha256 = "1v988jsxx2r82q6mf3503130cny088hin2as00yi26jzxjkrjcli";
};
makeWrapperArgs = [

View File

@ -2,13 +2,13 @@
stdenv.mkDerivation rec {
pname = "brutespray";
version = "1.6.6";
version = "1.6.8";
src = fetchFromGitHub {
owner = "x90skysn3k";
repo = pname;
rev = "brutespray-${version}";
sha256 = "1rj8fkq1xz4ph1pmldphlsa25mg6xl7i7dranb0qjx00jhfxjxjh";
sha256 = "1pi4d5vcvvjsby39dq995dlhpxdicmfhqsiw23hr25m38ccfm3rh";
};
postPatch = ''

View File

@ -1,7 +1,7 @@
{ stdenv, lib, fetchFromGitHub, openssl }:
stdenv.mkDerivation rec {
pname = "hxcdumptool";
pname = "hcxdumptool";
version = "6.0.5";
src = fetchFromGitHub {

View File

@ -1,175 +0,0 @@
From 37c2b4d2940476555aeec20fe1e5e3fa0492a94e Mon Sep 17 00:00:00 2001
From: Maximilian Bosch <maximilian@mbosch.me>
Date: Sun, 15 Mar 2020 19:58:53 +0100
Subject: [PATCH] Make it possible to run the tests offline
Helpful when developing without network access, also makes sure that
the test actually depend on the API's data like number of breaches
(which will change in time).
---
tests/commons.py | 25 +++++++++++++++++++++++++
tests/test_audit.py | 8 +++++---
tests/test_pass_audit.py | 10 +++++++++-
tests/test_pwned.py | 8 +++++---
4 files changed, 44 insertions(+), 7 deletions(-)
diff --git a/tests/commons.py b/tests/commons.py
index 13c4cb1..4f1ecd8 100644
--- a/tests/commons.py
+++ b/tests/commons.py
@@ -56,3 +56,28 @@ class TestPass(TestBase):
for path in self.store.list(root):
data[path] = self.store.show(path)
return data
+
+
+def mock_request(*args, **kwargs):
+ class MockResponse:
+ def __init__(self):
+ data = [
+ "D5EE0CB1A41071812CCED2F1930E6E1A5D2:2",
+ "2DC183F740EE76F27B78EB39C8AD972A757:52579",
+ "CF164D7A51A1FD864B1BF9E1CE8A3EC171B:4",
+ "D0B910E7A3028703C0B30039795E908CEB2:7",
+ "AD6438836DBE526AA231ABDE2D0EEF74D42:3",
+ "EBAB0A7CE978E0194608B572E4F9404AA21:3",
+ "17727EAB0E800E62A776C76381DEFBC4145:120",
+ "5370372AC65308F03F6ED75EC6068C8E1BE:1386",
+ "1E4C9B93F3F0682250B6CF8331B7EE68FD8:3730471",
+ "437FAA5A7FCE15D1DDCB9EAEAEA377667B8:123422",
+ "944C22589AC652B0F47918D58CA0CDCCB63:411"
+ ]
+
+ self.text = "\r\n".join(data)
+
+ def raise_for_status(self):
+ pass
+
+ return MockResponse()
diff --git a/tests/test_audit.py b/tests/test_audit.py
index d8c7a9a..5e0a9cf 100644
--- a/tests/test_audit.py
+++ b/tests/test_audit.py
@@ -17,12 +17,13 @@
#
from .. import pass_audit
-from tests.commons import TestPass
-
+from tests.commons import TestPass, mock_request
+from unittest import mock
class TestPassAudit(TestPass):
passwords_nb = 7
+ @mock.patch('requests.get', mock_request)
def test_password_notpwned(self):
"""Testing: pass audit for password not breached with K-anonymity method."""
data = self._getdata("Password/notpwned")
@@ -30,9 +31,10 @@ class TestPassAudit(TestPass):
breached = audit.password()
self.assertTrue(len(breached) == 0)
+ @mock.patch('requests.get', mock_request)
def test_password_pwned(self):
"""Testing: pass audit for password breached with K-anonymity method."""
- ref_counts = [51259, 3, 114, 1352, 3645804, 78773, 396]
+ ref_counts = [52579, 3, 120, 1386, 3730471, 123422, 411]
data = self._getdata("Password/pwned")
audit = pass_audit.PassAudit(data)
breached = audit.password()
diff --git a/tests/test_pass_audit.py b/tests/test_pass_audit.py
index 4c10f87..2c949f7 100644
--- a/tests/test_pass_audit.py
+++ b/tests/test_pass_audit.py
@@ -19,7 +19,8 @@
import os
from .. import pass_audit
-from tests.commons import TestPass
+from tests.commons import TestPass, mock_request
+from unittest import mock
class TestPassAuditCMD(TestPass):
@@ -47,6 +48,7 @@ class TestPassAuditCMD(TestPass):
cmd = ['--not-an-option', '-q']
self._passaudit(cmd, 2)
+ @mock.patch('requests.get', mock_request)
def test_pass_audit_StoreNotInitialized(self):
"""Testing: store not initialized."""
cmd = ['Password/', '-v']
@@ -56,6 +58,7 @@ class TestPassAuditCMD(TestPass):
os.rename(os.path.join(self.store.prefix, 'backup.gpg-id'),
os.path.join(self.store.prefix, '.gpg-id'))
+ @mock.patch('requests.get', mock_request)
def test_pass_audit_InvalidID(self):
"""Testing: invalid user ID."""
os.rename(os.path.join(self.store.prefix, '.gpg-id'),
@@ -66,26 +69,31 @@ class TestPassAuditCMD(TestPass):
os.rename(os.path.join(self.store.prefix, 'backup.gpg-id'),
os.path.join(self.store.prefix, '.gpg-id'))
+ @mock.patch('requests.get', mock_request)
def test_pass_audit_NotAFile(self):
"""Testing: pass audit not_a_file."""
cmd = ['not_a_file']
self._passaudit(cmd, 1)
+ @mock.patch('requests.get', mock_request)
def test_pass_audit_passwords_notpwned(self):
"""Testing: pass audit Password/notpwned."""
cmd = ['Password/notpwned']
self._passaudit(cmd)
+ @mock.patch('requests.get', mock_request)
def test_pass_audit_passwords_pwned(self):
"""Testing: pass audit Password/pwned."""
cmd = ['Password/pwned']
self._passaudit(cmd)
+ @mock.patch('requests.get', mock_request)
def test_pass_audit_passwords_good(self):
"""Testing: pass audit Password/good."""
cmd = ['Password/good']
self._passaudit(cmd)
+ @mock.patch('requests.get', mock_request)
def test_pass_audit_passwords_all(self):
"""Testing: pass audit ."""
cmd = ['']
diff --git a/tests/test_pwned.py b/tests/test_pwned.py
index 5ce6bc6..c28939a 100644
--- a/tests/test_pwned.py
+++ b/tests/test_pwned.py
@@ -17,7 +17,8 @@
#
from .. import pass_audit
-from tests.commons import TestPass
+from tests.commons import TestPass, mock_request
+from unittest import mock
class TestPwnedAPI(TestPass):
@@ -25,12 +26,13 @@ class TestPwnedAPI(TestPass):
def setUp(self):
self.api = pass_audit.PwnedAPI()
+ @mock.patch('requests.get', mock_request)
def test_password_range(self):
"""Testing: https://api.haveibeenpwned.com/range API."""
prefix = '21BD1'
Hash = '21BD12DC183F740EE76F27B78EB39C8AD972A757'
hashes, counts = self.api.password_range(prefix)
self.assertIn(Hash, hashes)
- self.assertTrue(counts[hashes.index(Hash)] == 51259)
+ self.assertTrue(counts[hashes.index(Hash)] == 52579)
self.assertTrue(len(hashes) == len(counts))
- self.assertTrue(len(hashes) == 527)
+ self.assertTrue(len(hashes) == 11)
--
2.25.0

View File

@ -5,23 +5,24 @@ let
in stdenv.mkDerivation rec {
pname = "pass-audit";
version = "1.0.1";
version = "1.1";
src = fetchFromGitHub {
owner = "roddhjav";
repo = "pass-audit";
rev = "v${version}";
sha256 = "1mdckw0dwcnv8smp1za96y0zmdnykbkw2606v7mzfnzbz4zjdlwl";
sha256 = "1vapymgpab91kh798mirgs1nb7j9qln0gm2d3321cmsghhb7xs45";
};
patches = [
./0001-Make-it-possible-to-run-the-tests-offline.patch
./0002-Fix-audit.bash-setup.patch
];
postPatch = ''
substituteInPlace audit.bash \
--replace '/usr/bin/env python3' "${pythonEnv}/bin/python3"
--replace 'python3' "${pythonEnv}/bin/python3"
substituteInPlace Makefile \
--replace "install --root" "install --prefix ''' --root"
'';
outputs = [ "out" "man" ];

View File

@ -1,19 +1,19 @@
{ stdenv, fetchFromGitHub, autoconf, automake, libtool
, pkgconfig, dbus, dbus-glib, libxml2 }:
, pkgconfig, dbus, dbus-glib, libxml2, autoconf-archive }:
stdenv.mkDerivation rec {
pname = "thermald";
version = "1.9.1";
version = "2.1";
src = fetchFromGitHub {
owner = "01org";
owner = "intel";
repo = "thermal_daemon";
rev = "v${version}";
sha256 = "0iagc3jqpnh6q2fa1gx4wx6r8qg0556j60xr159zqg95djr4dv99";
sha256 = "1k8svy03k57ld6p5d29i0ccrd1gics6kbyx1bkfmw9fh1bbljyf7";
};
nativeBuildInputs = [ pkgconfig ];
buildInputs = [ autoconf automake libtool dbus dbus-glib libxml2 ];
buildInputs = [ autoconf automake libtool dbus dbus-glib libxml2 autoconf-archive ];
patchPhase = ''sed -e 's/upstartconfdir = \/etc\/init/upstartconfdir = $(out)\/etc\/init/' -i data/Makefile.am'';

View File

@ -250,6 +250,7 @@ mapAliases ({
libtxc_dxtn_s2tc = throw "removed 2020-03-16, now integrated in Mesa";
libudev = udev; # added 2018-04-25
libsexy = throw "libsexy has been removed from nixpkgs, as it's abandoned and no package needed it."; # 2019-12-10
libqmatrixclient = throw "libqmatrixclient was renamed to libquotient"; # added 2020-04-09
links = links2; # added 2016-01-31
linux_rpi0 = linux_rpi1;
linuxPackages_rpi0 = linuxPackages_rpi1;
@ -432,6 +433,7 @@ mapAliases ({
quake3game = ioquake3; # added 2016-01-14
qwt6 = libsForQt5.qwt; # added 2015-12-19
qtpfsgui = throw "Is now luminanceHDR"; # added 2019-06-26
quaternion-git = throw "quaternion-git has been removed in favor of the stable version 'quaternion'"; # added 2020-04-09
rdf4store = throw "rdf4store has been removed from nixpkgs."; # added 2019-12-21
rdiff_backup = rdiff-backup; # added 2014-11-23
rdmd = dtools; # added 2017-08-19

View File

@ -1240,14 +1240,9 @@ in
charles4
;
inherit (libsForQt5.callPackage ../development/libraries/libqmatrixclient { })
libqmatrixclient_0_4
libqmatrixclient_0_5
libqmatrixclient;
libquotient = libsForQt5.callPackage ../development/libraries/libquotient {};
inherit (libsForQt5.callPackage ../applications/networking/instant-messengers/quaternion { })
quaternion
quaternion-git;
quaternion = libsForQt5.callPackage ../applications/networking/instant-messengers/quaternion { };
tensor = libsForQt5.callPackage ../applications/networking/instant-messengers/tensor { };
@ -2089,6 +2084,8 @@ in
xkbd = callPackage ../applications/misc/xkbd { };
libpsm2 = callPackage ../os-specific/linux/libpsm2 { };
optar = callPackage ../tools/graphics/optar {};
obinskit = callPackage ../applications/misc/obinskit {};
@ -19417,8 +19414,6 @@ in
gopher = callPackage ../applications/networking/gopher/gopher { };
gopherclient = libsForQt5.callPackage ../applications/networking/gopher/gopherclient { };
goxel = callPackage ../applications/graphics/goxel { };
gpa = callPackage ../applications/misc/gpa { };