Merge branch 'master' into staging

* master: (161 commits)
  pcsclite: clean up after #41790
  tor: 0.3.3.6 -> 0.3.3.7
  opae: init at 1.0.0
  tinc: 1.0.33 -> 10.0.34
  tinc_pre: 1.1pre15 -> 1.1pre16
  sit: 0.3.2 -> 0.4.0 (#41863)
  platforms/raspberrypi: enable kernelAutoModules
  libupnp: 1.6.21 -> 1.8.3 (#41684)
  androidStudioPackages.{dev,canary}: 3.2.0.16 -> 3.2.0.17
  tdesktop: 1.3.0 -> 1.3.7
  gns3Packages.{server,gui}{Stable,Preview}: 2.1.6 -> 2.1.7
  aws-sam-cli: init at 0.3.0 (#41877)
  nixos/nat: optional networking.nat.externalInterface (#41864)
  linux: 4.17 -> 4.17.1
  linux: 4.16.14 -> 4.16.15
  linux: 4.14.48 -> 4.14.49
  nixos/unbound: add restart (#41885)
  maintainers/create-azure.sh: remove hydra.nixos.org as binary cache (#41883)
  gshogi: init at 0.5.1 (#41840)
  neovim: add missing libiconv
  ...
This commit is contained in:
Orivej Desh 2018-06-12 20:41:41 +00:00
commit 7f3de60758
175 changed files with 5730 additions and 530 deletions

View File

@ -973,7 +973,7 @@ stdenv.mkDerivation {
# the following packages are related to the dependencies of your python
# project.
# In this particular example the python modules listed in the
# requirements.tx require the following packages to be installed locally
# requirements.txt require the following packages to be installed locally
# in order to compile any binary extensions they may require.
#
taglib

View File

@ -56,10 +56,10 @@ let
hasAttr head isAttrs isBool isInt isList isString length
lessThan listToAttrs pathExists readFile replaceStrings seq
stringLength sub substring tail;
inherit (trivial) id const concat or and boolToString mergeAttrs
flip mapNullable inNixShell min max importJSON warn info
nixpkgsVersion version mod compare splitByAndCompare
functionArgs setFunctionArgs isFunction;
inherit (trivial) id const concat or and bitAnd bitOr bitXor bitNot
boolToString mergeAttrs flip mapNullable inNixShell min max
importJSON warn info nixpkgsVersion version mod compare
splitByAndCompare functionArgs setFunctionArgs isFunction;
inherit (fixedPoints) fix fix' extends composeExtensions
makeExtensible makeExtensibleWithCustomName;
@ -76,7 +76,7 @@ let
optional optionals toList range partition zipListsWith zipLists
reverseList listDfs toposort sort naturalSort compareLists take
drop sublist last init crossLists unique intersectLists
subtractLists mutuallyExclusive;
subtractLists mutuallyExclusive groupBy groupBy';
inherit (strings) concatStrings concatMapStrings concatImapStrings
intersperse concatStringsSep concatMapStringsSep
concatImapStringsSep makeSearchPath makeSearchPathOutput

View File

@ -99,6 +99,16 @@ lib.mapAttrs (n: v: v // { shortName = n; }) rec {
fullName = ''BSD 4-clause "Original" or "Old" License'';
};
bsl10 = {
fullName = "Business Source License 1.0";
url = https://mariadb.com/bsl10;
};
bsl11 = {
fullName = "Business Source License 1.1";
url = https://mariadb.com/bsl11;
};
clArtistic = spdx {
spdxId = "ClArtistic";
fullName = "Clarified Artistic License";

View File

@ -250,6 +250,42 @@ rec {
else { right = t.right; wrong = [h] ++ t.wrong; }
) { right = []; wrong = []; });
/* Splits the elements of a list into many lists, using the return value of a predicate.
Predicate should return a string which becomes keys of attrset `groupBy' returns.
`groupBy'' allows to customise the combining function and initial value
Example:
groupBy (x: boolToString (x > 2)) [ 5 1 2 3 4 ]
=> { true = [ 5 3 4 ]; false = [ 1 2 ]; }
groupBy (x: x.name) [ {name = "icewm"; script = "icewm &";}
{name = "xfce"; script = "xfce4-session &";}
{name = "icewm"; script = "icewmbg &";}
{name = "mate"; script = "gnome-session &";}
]
=> { icewm = [ { name = "icewm"; script = "icewm &"; }
{ name = "icewm"; script = "icewmbg &"; } ];
mate = [ { name = "mate"; script = "gnome-session &"; } ];
xfce = [ { name = "xfce"; script = "xfce4-session &"; } ];
}
groupBy' allows to customise the combining function and initial value
Example:
groupBy' builtins.add 0 (x: boolToString (x > 2)) [ 5 1 2 3 4 ]
=> { true = 12; false = 3; }
*/
groupBy' = op: nul: pred: lst:
foldl' (r: e:
let
key = pred e;
in
r // { ${key} = op (r.${key} or nul) e; }
) {} lst;
groupBy = groupBy' (sum: e: sum ++ [e]) [];
/* Merges two lists of the same size together. If the sizes aren't the same
the merging stops at the shortest. How both lists are merged is defined
by the first argument.

View File

@ -170,7 +170,8 @@ rec {
kernelBaseConfig = "bcm2835_defconfig";
kernelDTB = true;
kernelArch = "arm";
kernelAutoModules = false;
kernelAutoModules = true;
kernelPreferBuiltin = true;
kernelExtraConfig = ''
# Disable OABI to have seccomp_filter (required for systemd)
# https://github.com/raspberrypi/firmware/issues/651

View File

@ -45,6 +45,21 @@ runTests {
expected = true;
};
testBitAnd = {
expr = (bitAnd 3 10);
expected = 2;
};
testBitOr = {
expr = (bitOr 3 10);
expected = 11;
};
testBitXor = {
expr = (bitXor 3 10);
expected = 9;
};
# STRINGS
testConcatMapStrings = {

View File

@ -1,4 +1,41 @@
{ lib }:
let
zipIntBits = f: x: y:
let
# (intToBits 6) -> [ 0 1 1 ]
intToBits = x:
if x == 0 || x == -1 then
[]
else
let
headbit = if (x / 2) * 2 != x then 1 else 0; # x & 1
tailbits = if x < 0 then ((x + 1) / 2) - 1 else x / 2; # x >> 1
in
[headbit] ++ (intToBits tailbits);
# (bitsToInt [ 0 1 1 ] 0) -> 6
# (bitsToInt [ 0 1 0 ] 1) -> -6
bitsToInt = l: signum:
if l == [] then
(if signum == 0 then 0 else -1)
else
(builtins.head l) + (2 * (bitsToInt (builtins.tail l) signum));
xsignum = if x < 0 then 1 else 0;
ysignum = if y < 0 then 1 else 0;
zipListsWith' = fst: snd:
if fst==[] && snd==[] then
[]
else if fst==[] then
[(f xsignum (builtins.head snd))] ++ (zipListsWith' [] (builtins.tail snd))
else if snd==[] then
[(f (builtins.head fst) ysignum )] ++ (zipListsWith' (builtins.tail fst) [] )
else
[(f (builtins.head fst) (builtins.head snd))] ++ (zipListsWith' (builtins.tail fst) (builtins.tail snd));
in
assert (builtins.isInt x) && (builtins.isInt y);
bitsToInt (zipListsWith' (intToBits x) (intToBits y)) (f xsignum ysignum);
in
rec {
/* The identity function
@ -31,6 +68,18 @@ rec {
/* boolean and */
and = x: y: x && y;
/* bitwise and */
bitAnd = builtins.bitAnd or zipIntBits (a: b: if a==1 && b==1 then 1 else 0);
/* bitwise or */
bitOr = builtins.bitOr or zipIntBits (a: b: if a==1 || b==1 then 1 else 0);
/* bitwise xor */
bitXor = builtins.bitXor or zipIntBits (a: b: if a!=b then 1 else 0);
/* bitwise not */
bitNot = builtins.sub (-1);
/* Convert a boolean to a string.
Note that toString on a bool returns "1" and "".
*/

View File

@ -393,6 +393,11 @@
github = "andir";
name = "Andreas Rammhold";
};
andreabedini = {
email = "andrea@kzn.io";
github = "andreabedini";
name = "Andrea Bedini";
};
andres = {
email = "ksnixos@andres-loeh.de";
github = "kosmikus";

View File

@ -176,11 +176,28 @@ $ nix-instantiate -E '(import &lt;nixpkgsunstable&gt; {}).gitFull'
<literal>lib.traceValFn (x: str + builtins.toXML x)</literal> instead.
</para>
</listitem>
<listitem>
<para>
The <literal>pkgs</literal> argument to NixOS modules can now be set directly using <literal>nixpkgs.pkgs</literal>. Previously, only the <literal>system</literal>, <literal>config</literal> and <literal>overlays</literal> arguments could be used to influence <literal>pkgs</literal>.
</para>
</listitem>
<listitem>
<para>
A NixOS system can now be constructed more easily based on a preexisting invocation of Nixpkgs. For example:
<programlisting>
inherit (pkgs.nixos {
boot.loader.grub.enable = false;
fileSystems."/".device = "/dev/xvda1";
}) toplevel kernel initialRamdisk manual;
</programlisting>
This benefits evaluation performance, lets you write Nixpkgs packages that depend on NixOS images and is consistent with a deployment architecture that would be centered around Nixpkgs overlays.
</para>
</listitem>
<listitem>
<para>
<literal>lib.traceValIfNot</literal> has been deprecated. Use
<literal>if/then/else</literal> and <literal>lib.traceValSeq</literal>
instead.
<literal>if/then/else</literal> and <literal>lib.traceValSeq</literal> instead.
</para>
</listitem>
<listitem>

View File

@ -5,4 +5,4 @@ export NIXOS_CONFIG=$(dirname $(readlink -f $0))/../../../modules/virtualisation
export TIMESTAMP=$(date +%Y%m%d%H%M)
nix-build '<nixpkgs/nixos>' \
-A config.system.build.azureImage --argstr system x86_64-linux -o azure --option extra-binary-caches https://hydra.nixos.org -j 10
-A config.system.build.azureImage --argstr system x86_64-linux -o azure -j 10

View File

@ -26,16 +26,16 @@ with lib;
fonts.fontconfig.enable = false;
nixpkgs.config.packageOverrides = pkgs: {
dbus = pkgs.dbus.override { x11Support = false; };
networkmanager-fortisslvpn = pkgs.networkmanager-fortisslvpn.override { withGnome = false; };
networkmanager-l2tp = pkgs.networkmanager-l2tp.override { withGnome = false; };
networkmanager-openconnect = pkgs.networkmanager-openconnect.override { withGnome = false; };
networkmanager-openvpn = pkgs.networkmanager-openvpn.override { withGnome = false; };
networkmanager-vpnc = pkgs.networkmanager-vpnc.override { withGnome = false; };
networkmanager-iodine = pkgs.networkmanager-iodine.override { withGnome = false; };
pinentry = pkgs.pinentry_ncurses;
gobjectIntrospection = pkgs.gobjectIntrospection.override { x11Support = false; };
};
nixpkgs.overlays = singleton (const (super: {
dbus = super.dbus.override { x11Support = false; };
networkmanager-fortisslvpn = super.networkmanager-fortisslvpn.override { withGnome = false; };
networkmanager-l2tp = super.networkmanager-l2tp.override { withGnome = false; };
networkmanager-openconnect = super.networkmanager-openconnect.override { withGnome = false; };
networkmanager-openvpn = super.networkmanager-openvpn.override { withGnome = false; };
networkmanager-vpnc = super.networkmanager-vpnc.override { withGnome = false; };
networkmanager-iodine = super.networkmanager-iodine.override { withGnome = false; };
pinentry = super.pinentry_ncurses;
gobjectIntrospection = super.gobjectIntrospection.override { x11Support = false; };
}));
};
}

View File

@ -127,6 +127,7 @@
./programs/zsh/oh-my-zsh.nix
./programs/zsh/zsh.nix
./programs/zsh/zsh-autoenv.nix
./programs/zsh/zsh-autosuggestions.nix
./programs/zsh/zsh-syntax-highlighting.nix
./rename.nix
./security/acme.nix

View File

@ -0,0 +1,60 @@
{ config, pkgs, lib, ... }:
with lib;
let
cfg = config.programs.zsh.autosuggestions;
in
{
options.programs.zsh.autosuggestions = {
enable = mkEnableOption "zsh-autosuggestions";
highlightStyle = mkOption {
type = types.str;
default = "fg=8"; # https://github.com/zsh-users/zsh-autosuggestions/tree/v0.4.3#suggestion-highlight-style
description = "Highlight style for suggestions ({fore,back}ground color)";
example = "fg=cyan";
};
strategy = mkOption {
type = types.enum [ "default" "match_prev_cmd" ];
default = "default";
description = ''
Set ZSH_AUTOSUGGEST_STRATEGY to choose the strategy for generating suggestions.
There are currently two to choose from:
* default: Chooses the most recent match.
* match_prev_cmd: Chooses the most recent match whose preceding history item matches
the most recently executed command (more info). Note that this strategy won't work as
expected with ZSH options that don't preserve the history order such as
HIST_IGNORE_ALL_DUPS or HIST_EXPIRE_DUPS_FIRST.
'';
};
extraConfig = mkOption {
type = with types; attrsOf str;
default = {};
description = "Attribute set with additional configuration values";
example = literalExample ''
{
"ZSH_AUTOSUGGEST_BUFFER_MAX_SIZE" = "20";
}
'';
};
};
config = mkIf cfg.enable {
programs.zsh.interactiveShellInit = ''
source ${pkgs.zsh-autosuggestions}/share/zsh-autosuggestions/zsh-autosuggestions.zsh
export ZSH_AUTOSUGGEST_HIGHLIGHT_STYLE="${cfg.highlightStyle}"
export ZSH_AUTOSUGGEST_STRATEGY="${cfg.strategy}"
${concatStringsSep "\n" (mapAttrsToList (key: value: ''export ${key}="${value}"'') cfg.extraConfig)}
'';
};
}

View File

@ -87,13 +87,6 @@ in
type = types.bool;
};
enableAutosuggestions = mkOption {
default = false;
description = ''
Enable zsh-autosuggestions
'';
type = types.bool;
};
};
};
@ -168,10 +161,6 @@ in
${optionalString cfg.enableCompletion "autoload -U compinit && compinit"}
${optionalString (cfg.enableAutosuggestions)
"source ${pkgs.zsh-autosuggestions}/share/zsh-autosuggestions/zsh-autosuggestions.zsh"
}
${cfge.interactiveShellInit}
${cfg.interactiveShellInit}

View File

@ -247,6 +247,8 @@ with lib;
(mkRenamedOptionModule [ "programs" "zsh" "oh-my-zsh" "custom" ] [ "programs" "zsh" "ohMyZsh" "custom" ])
(mkRenamedOptionModule [ "programs" "zsh" "oh-my-zsh" "plugins" ] [ "programs" "zsh" "ohMyZsh" "plugins" ])
(mkRenamedOptionModule [ "programs" "zsh" "enableAutosuggestions" ] [ "programs" "zsh" "autosuggestions" "enable" ])
# Xen
(mkRenamedOptionModule [ "virtualisation" "xen" "qemu-package" ] [ "virtualisation" "xen" "package-qemu" ])

View File

@ -38,19 +38,19 @@ let
# NAT the marked packets.
${optionalString (cfg.internalInterfaces != []) ''
iptables -w -t nat -A nixos-nat-post -m mark --mark 1 \
-o ${cfg.externalInterface} ${dest}
${optionalString (cfg.externalInterface != null) "-o ${cfg.externalInterface}"} ${dest}
''}
# NAT packets coming from the internal IPs.
${concatMapStrings (range: ''
iptables -w -t nat -A nixos-nat-post \
-s '${range}' -o ${cfg.externalInterface} ${dest}
-s '${range}' ${optionalString (cfg.externalInterface != null) "-o ${cfg.externalInterface}"} ${dest}
'') cfg.internalIPs}
# NAT from external ports to internal ports.
${concatMapStrings (fwd: ''
iptables -w -t nat -A nixos-nat-pre \
-i ${cfg.externalInterface} -p ${fwd.proto} \
-i ${toString cfg.externalInterface} -p ${fwd.proto} \
--dport ${builtins.toString fwd.sourcePort} \
-j DNAT --to-destination ${fwd.destination}
@ -81,7 +81,7 @@ let
${optionalString (cfg.dmzHost != null) ''
iptables -w -t nat -A nixos-nat-pre \
-i ${cfg.externalInterface} -j DNAT \
-i ${toString cfg.externalInterface} -j DNAT \
--to-destination ${cfg.dmzHost}
''}
@ -134,7 +134,8 @@ in
};
networking.nat.externalInterface = mkOption {
type = types.str;
type = types.nullOr types.str;
default = null;
example = "eth1";
description =
''
@ -236,6 +237,15 @@ in
{ networking.firewall.extraCommands = mkBefore flushNat; }
(mkIf config.networking.nat.enable {
assertions = [
{ assertion = (cfg.dmzHost != null) -> (cfg.externalInterface != null);
message = "networking.nat.dmzHost requires networking.nat.externalInterface";
}
{ assertion = (cfg.forwardPorts != []) -> (cfg.externalInterface != null);
message = "networking.nat.forwardPorts requires networking.nat.externalInterface";
}
];
environment.systemPackages = [ pkgs.iptables ];
boot = {

View File

@ -60,7 +60,7 @@ in
};
interfaces = mkOption {
default = [ "127.0.0.1" "::1" ];
default = [ "127.0.0.1" ] ++ optional config.networking.enableIPv6 "::1";
type = types.listOf types.str;
description = "What addresses the server should listen on.";
};
@ -126,6 +126,8 @@ in
ProtectSystem = true;
ProtectHome = true;
PrivateDevices = true;
Restart = "always";
RestartSec = "5s";
};
};

View File

@ -110,7 +110,7 @@ in
webapps = mkOption {
type = types.listOf types.package;
default = [ tomcat.webapps ];
defaultText = "[ tomcat.webapps ]";
defaultText = "[ pkgs.tomcat85.webapps ]";
description = "List containing WAR files or directories with WAR files which are web applications to be deployed on Tomcat";
};

View File

@ -12,6 +12,7 @@ let
if [ "$1" = bound ]; then
ip address add "$ip/$mask" dev "$interface"
if [ -n "$router" ]; then
ip route add "$router" dev "$interface" # just in case if "$router" is not within "$ip/$mask" (e.g. Hetzner Cloud)
ip route add default via "$router" dev "$interface"
fi
if [ -n "$dns" ]; then

View File

@ -2,13 +2,13 @@
with lib;
let
diskSize = 30720;
diskSize = 2048;
in
{
system.build.azureImage = import ../../lib/make-disk-image.nix {
name = "azure-image";
postVM = ''
${pkgs.vmTools.qemu-220}/bin/qemu-img convert -f raw -o subformat=fixed -O vpc $diskImage $out/disk.vhd
${pkgs.vmTools.qemu}/bin/qemu-img convert -f raw -o subformat=fixed,force_size -O vpc $diskImage $out/disk.vhd
'';
configFile = ./azure-config-user.nix;
format = "raw";

View File

@ -1,14 +0,0 @@
diff --git a/Makefile b/Makefile
index d6b9dc1..ce7c493 100644
--- a/Makefile
+++ b/Makefile
@@ -384,8 +384,7 @@ install-confdir:
install-sysconfig: install-datadir install-confdir
$(INSTALL_DATA) $(SRC_PATH)/sysconfigs/target/target-x86_64.conf "$(DESTDIR)$(qemu_confdir)"
-install: all $(if $(BUILD_DOCS),install-doc) install-sysconfig \
-install-datadir install-localstatedir
+install: all $(if $(BUILD_DOCS),install-doc) install-datadir
ifneq ($(TOOLS),)
$(call install-prog,$(TOOLS),$(DESTDIR)$(bindir))
endif

View File

@ -2,7 +2,7 @@
buildGoPackage rec {
name = "go-ethereum-${version}";
version = "1.8.8";
version = "1.8.10";
goPackagePath = "github.com/ethereum/go-ethereum";
# Fix for usb-related segmentation faults on darwin
@ -27,7 +27,7 @@ buildGoPackage rec {
owner = "ethereum";
repo = "go-ethereum";
rev = "v${version}";
sha256 = "059nd2jvklziih679dd4cd34xjpj1ci7fha83wv86xjz61awyb16";
sha256 = "1n36pz4y3xa4d46mynym98bra79qx5n9lb29chyxfpvi5fmprdg1";
};
meta = with stdenv.lib; {

View File

@ -8,13 +8,13 @@ with stdenv.lib;
stdenv.mkDerivation rec {
name = "litecoin" + (toString (optional (!withGui) "d")) + "-" + version;
version = "0.15.1";
version = "0.16.0";
src = fetchFromGitHub {
owner = "litecoin-project";
repo = "litecoin";
rev = "v${version}";
sha256 = "01q0lj0grabyfh67ar984m9lv9xs0rakadkci8jpfbp8xw166r40";
sha256 = "1g79sbplkn2bnb17i2kyh1d64bjl3ihbx83n0xssvjaajn56hbzw";
};
nativeBuildInputs = [ pkgconfig autoreconfHook ];

View File

@ -13,9 +13,9 @@ let
sha256Hash = "196yaswbxh2nd83gimjxr8ggr5xkdxq7n3xlh6ax73v59pj4hryq";
};
latestVersion = {
version = "3.2.0.16"; # "Android Studio 3.2 Canary 17"
build = "181.4823740";
sha256Hash = "04282zd28kn2a4rjsi0ikx4bc9ab668xm7cc87ga60pzyg5gmmgk";
version = "3.2.0.17"; # "Android Studio 3.2 Canary 18"
build = "181.4830125";
sha256Hash = "14yarl1vqhy21ljrn5k2dy8z0y407g9nqw4lqzjbxb7zmascnlx4";
};
in rec {
# Old alias

View File

@ -35,6 +35,8 @@ let
patchelf --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \
--set-rpath "${atomEnv.libPath}" \
$share/resources/app/apm/bin/node
patchelf --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \
$out/share/atom/resources/app.asar.unpacked/node_modules/symbols-view/vendor/ctags-linux
dugite=$share/resources/app.asar.unpacked/node_modules/dugite
rm -f $dugite/git/bin/git
@ -53,7 +55,7 @@ let
homepage = https://atom.io/;
license = licenses.mit;
maintainers = with maintainers; [ offline nequissimus synthetica ysndr ];
platforms = [ "x86_64-linux" ];
platforms = platforms.x86_64;
};
};
in stdenv.lib.mapAttrs common {

View File

@ -1,4 +1,4 @@
{ stdenv, fetchFromGitHub, cmake, gettext, libmsgpack, libtermkey
{ stdenv, fetchFromGitHub, cmake, gettext, libmsgpack, libtermkey, libiconv
, libtool, libuv, luaPackages, ncurses, perl, pkgconfig
, unibilium, vimUtils, xsel, gperf, callPackage
, libvterm-neovim
@ -11,13 +11,13 @@ let
neovim = stdenv.mkDerivation rec {
name = "neovim-unwrapped-${version}";
version = "0.2.2";
version = "0.3.0";
src = fetchFromGitHub {
owner = "neovim";
repo = "neovim";
rev = "v${version}";
sha256 = "1dxr29d0hyag7snbww5s40as90412qb61rgj7gd9rps1iccl9gv4";
sha256 = "10c8y309fdwvr3d9n6vm1f2c0k6pzicnhc64l2dvbw1lnabp04vv";
};
enableParallelBuilding = true;
@ -32,6 +32,7 @@ let
luaPackages.lua
gperf
] ++ optional withJemalloc jemalloc
++ optional stdenv.isDarwin libiconv
++ lualibs;
nativeBuildInputs = [

View File

@ -72,6 +72,11 @@ runCommand "${wrappedPkgName}-with-extensions-${wrappedPkgVersion}" {
meta = vscode.meta;
} ''
mkdir -p "$out/bin"
mkdir -p "$out/share/applications"
mkdir -p "$out/share/pixmaps"
ln -sT "${vscode}/share/applications/code.desktop" "$out/share/applications/code.desktop"
ln -sT "${vscode}/share/pixmaps/code.png" "$out/share/pixmaps/code.png"
${if [] == vscodeExtensions
then ''
ln -sT "${vscode}/bin/${wrappedExeName}" "$out/bin/${exeName}"

View File

@ -3,11 +3,11 @@
stdenv.mkDerivation rec {
name = "chirp-daily-${version}";
version = "20180519";
version = "20180606";
src = fetchurl {
url = "https://trac.chirp.danplanet.com/chirp_daily/daily-${version}/${name}.tar.gz";
sha256 = "1sb4cw95lcj2cdfzzgnwjgmnpk2nqjys4am5qvj4pnh0x447sznv";
sha256 = "1v1s02675gyghhxasp4pxjrifkgshc82p99haxph1yzkq7gsf03w";
};
nativeBuildInputs = [ makeWrapper ];

View File

@ -2,27 +2,30 @@
mkDerivation rec {
name = "cura-${version}";
version = "3.2.1";
version = "3.3.1";
src = fetchFromGitHub {
owner = "Ultimaker";
repo = "Cura";
rev = version;
sha256 = "0yaya0ww92qjm7g31q85m5f95nwdapldjx1kdf1ar4yzwh4r15rp";
sha256 = "0a2xxiw1h5cq4nd4pdkq757hap85p2i29msxs57kbfdd78izrjlx";
};
materials = fetchFromGitHub {
owner = "Ultimaker";
repo = "fdm_materials";
rev = "3.2.1";
sha256 = "1kr9ga727x0kazw2ypac9bi6g6lddbsx80qw8fbn0514kg2mr9n3";
rev = "3.3.0";
sha256 = "0vf7s4m14aqhdg4m2yjj87kjxi2gpa46mgx86p0a91jwvkxa8a1q";
};
buildInputs = [ qtbase qtquickcontrols2 ];
propagatedBuildInputs = with python3.pkgs; [ uranium zeroconf pyserial numpy-stl ];
nativeBuildInputs = [ cmake python3.pkgs.wrapPython ];
cmakeFlags = [ "-DURANIUM_DIR=${python3.pkgs.uranium.src}" ];
cmakeFlags = [
"-DURANIUM_DIR=${python3.pkgs.uranium.src}"
"-DCURA_VERSION=${version}"
];
postPatch = ''
sed -i 's,/python''${PYTHON_VERSION_MAJOR}/dist-packages,/python''${PYTHON_VERSION_MAJOR}.''${PYTHON_VERSION_MINOR}/site-packages,g' CMakeLists.txt

View File

@ -2,19 +2,19 @@
stdenv.mkDerivation rec {
name = "curaengine-${version}";
version = "3.2.1";
version = "3.3.0";
src = fetchFromGitHub {
owner = "Ultimaker";
repo = "CuraEngine";
rev = version;
sha256 = "1yqpp6qhixzni3ik11vbk5kcdrhlz2j4ylzmh8f6c86r4d73a0cp";
sha256 = "1dj80lk58qb54apdv7n9cmcck4smb00lidgqld21xnndnnqqb4lw";
};
nativeBuildInputs = [ cmake ];
buildInputs = [ libarcus ];
enableParallelBuilding = true;
cmakeFlags = [ "-DCURA_ENGINE_VERSION=${version}" ];
meta = with stdenv.lib; {
description = "A powerful, fast and robust engine for processing 3D models into 3D printing instruction";

View File

@ -2,7 +2,7 @@
, gtk3, keybinder3, libnotify, libutempter, vte }:
let
version = "3.2.1";
version = "3.2.2";
in python3.pkgs.buildPythonApplication rec {
name = "guake-${version}";
format = "other";
@ -11,7 +11,7 @@ in python3.pkgs.buildPythonApplication rec {
owner = "Guake";
repo = "guake";
rev = version;
sha256 = "0qzrkmjizpc3kirvhml62wya1sr3pbig25nfcrfhk1hhr3jxq17s";
sha256 = "1wx8vghn0h52xryyn6cf9z1lbwsk766lhff162szbaxlxyl6xsc0";
};
nativeBuildInputs = [ gettext gobjectIntrospection wrapGAppsHook python3.pkgs.pip glibcLocales ];

View File

@ -23,11 +23,14 @@ in stdenv.mkDerivation rec {
};
patches = [
(fetchpatch {
# CVE-2018-10289
url = "https://bugs.ghostscript.com/attachment.cgi?id=15230";
sha256 = "0jmpacxd9930g6k57kda9jrcrbk75whdlv8xwmqg5jwn848qvy4q";
})
]
# Use shared libraries to decrease size
++ stdenv.lib.optional (!stdenv.isDarwin) ./mupdf-1.13-shared_libs-1.patch
++ stdenv.lib.optional stdenv.isDarwin ./darwin.patch
;

View File

@ -1,14 +1,19 @@
{ stdenv, rofi-unwrapped, makeWrapper, theme ? null, lib }:
if theme == null then rofi-unwrapped else
stdenv.mkDerivation {
name = "rofi-${rofi-unwrapped.version}";
buildInputs = [ makeWrapper ];
preferLocalBuild = true;
passthru = { unwrapped = rofi-unwrapped; };
passthru.unwrapped = rofi-unwrapped;
buildCommand = ''
mkdir -p $out/bin
ln -s ${rofi-unwrapped}/bin/rofi $out/bin/rofi
${lib.optionalString (theme != null) ''wrapProgram $out/bin/rofi --add-flags "-theme ${theme}"''}
mkdir $out
ln -s ${rofi-unwrapped}/* $out
rm $out/bin
mkdir $out/bin
ln -s ${rofi-unwrapped}/bin/* $out/bin
rm $out/bin/rofi
makeWrapper ${rofi-unwrapped}/bin/rofi $out/bin/rofi --add-flags "-theme ${theme}"
'';
meta = rofi-unwrapped.meta // {

View File

@ -1,10 +1,10 @@
{ stdenv, fetchFromGitHub
, cmake, ninja, pkgconfig, vala, gobjectIntrospection, gettext, wrapGAppsHook
, gtk3, glib, granite, libgee, libgda, gtksourceview, libxml2 }:
, meson, ninja, pkgconfig, vala, gobjectIntrospection, gettext, wrapGAppsHook
, gtk3, glib, granite, libgee, libgda, gtksourceview, libxml2, libsecret }:
let
version = "0.5.4";
version = "0.5.5";
sqlGda = libgda.override {
mysqlSupport = true;
postgresSupport = true;
@ -17,12 +17,17 @@ in stdenv.mkDerivation rec {
owner = "Alecaddd";
repo = "sequeler";
rev = "v${version}";
sha256 = "05c7y6xdyq3h9bn90pbz03jhy9kabmgpxi4zz0i26q0qphljskbx";
sha256 = "0jv7nx9k1qw2i3cmg0vnahz4qfam03xypas975x40icqd3bhfgj3";
};
nativeBuildInputs = [ cmake ninja pkgconfig vala gobjectIntrospection gettext wrapGAppsHook ];
nativeBuildInputs = [ meson ninja pkgconfig vala gobjectIntrospection gettext wrapGAppsHook ];
buildInputs = [ gtk3 glib granite libgee sqlGda gtksourceview libxml2 ];
buildInputs = [ gtk3 glib granite libgee sqlGda gtksourceview libxml2 libsecret ];
postPatch = ''
chmod +x meson/post_install.py
patchShebangs meson/post_install.py
'';
meta = with stdenv.lib; {
description = "Friendly SQL Client";

View File

@ -21,6 +21,7 @@ stdenv.mkDerivation rec {
MathConvexHullMonotoneChain MathGeometryVoronoi MathPlanePath Moo
IOStringy ClassXSAccessor Wx GrowlGNTP NetDBus ImportInto XMLSAX
ExtUtilsMakeMaker OpenGL WxGLCanvas ModuleBuild LWP
ExtUtilsCppGuess ModuleBuildWithXSpp ExtUtilsTypemapsDefault
];
desktopItem = makeDesktopItem {

View File

@ -0,0 +1,37 @@
{stdenv, fetchurl, libpulseaudio, alsaLib , pkgconfig, qt5}:
stdenv.mkDerivation rec {
name = "unixcw-${version}";
version = "3.5.1";
src = fetchurl {
url = "mirror://sourceforge/unixcw/unixcw_${version}.orig.tar.gz";
sha256 ="5f3aacd8a26e16e6eff437c7ae1e9b389956fb137eeb3de24670ce05de479e7a";
};
patches = [
./remove-use-of-dlopen.patch
];
buildInputs = [libpulseaudio alsaLib pkgconfig qt5.qtbase];
CFLAGS ="-lasound -lpulse-simple";
meta = with stdenv.lib; {
description = "sound characters as Morse code on the soundcard or console speaker";
longDescription = ''
unixcw is a project providing libcw library and a set of programs
using the library: cw, cwgen, cwcp and xcwcp.
The programs are intended for people who want to learn receiving
and sending Morse code.
unixcw is developed and tested primarily on GNU/Linux system.
cw reads characters from an input file, or from standard input,
and sounds each valid character as Morse code on either the system sound card,
or the system console speaker.
After it sounds a character, cw echoes it to standard output.
The input stream can contain embedded command strings.
These change the parameters used when sounding the Morse code.
cw reports any errors in embedded commands
'';
homepage = "http://unixcw.sourceforge.net";
maintainers = [ maintainers.mafo ];
license = licenses.gpl2;
platforms=platforms.linux;
};
}

View File

@ -0,0 +1,677 @@
From e4b91b5a7943a3b54f555ff2e0029b83bd96b131 Mon Sep 17 00:00:00 2001
From: MarcFontaine <MarcFontaine@users.noreply.github.com>
Date: Sat, 9 Jun 2018 11:02:11 +0200
Subject: [PATCH] remove use of dlopen
---
src/libcw/libcw_alsa.c | 215 ++++++++++---------------------------------------
src/libcw/libcw_pa.c | 118 ++++-----------------------
2 files changed, 56 insertions(+), 277 deletions(-)
diff --git a/src/libcw/libcw_alsa.c b/src/libcw/libcw_alsa.c
index a669c6e..17c306d 100644
--- a/src/libcw/libcw_alsa.c
+++ b/src/libcw/libcw_alsa.c
@@ -35,7 +35,6 @@
-#include <dlfcn.h> /* dlopen() and related symbols */
#include <alsa/asoundlib.h>
@@ -65,7 +64,6 @@ static const snd_pcm_format_t CW_ALSA_SAMPLE_FORMAT = SND_PCM_FORMAT_S16; /* "Si
static int cw_alsa_set_hw_params_internal(cw_gen_t *gen, snd_pcm_hw_params_t *params);
-static int cw_alsa_dlsym_internal(void *handle);
static int cw_alsa_write_internal(cw_gen_t *gen);
static int cw_alsa_debug_evaluate_write_internal(cw_gen_t *gen, int rv);
static int cw_alsa_open_device_internal(cw_gen_t *gen);
@@ -80,56 +78,6 @@ static int cw_alsa_print_params_internal(snd_pcm_hw_params_t *hw_params);
-static struct {
- void *handle;
-
- int (* snd_pcm_open)(snd_pcm_t **pcm, const char *name, snd_pcm_stream_t stream, int mode);
- int (* snd_pcm_close)(snd_pcm_t *pcm);
- int (* snd_pcm_prepare)(snd_pcm_t *pcm);
- int (* snd_pcm_drop)(snd_pcm_t *pcm);
- snd_pcm_sframes_t (* snd_pcm_writei)(snd_pcm_t *pcm, const void *buffer, snd_pcm_uframes_t size);
-
- const char *(* snd_strerror)(int errnum);
-
- int (* snd_pcm_hw_params_malloc)(snd_pcm_hw_params_t **ptr);
- int (* snd_pcm_hw_params_any)(snd_pcm_t *pcm, snd_pcm_hw_params_t *params);
- int (* snd_pcm_hw_params_set_format)(snd_pcm_t *pcm, snd_pcm_hw_params_t *params, snd_pcm_format_t val);
- int (* snd_pcm_hw_params_set_rate_near)(snd_pcm_t *pcm, snd_pcm_hw_params_t *params, unsigned int *val, int *dir);
- int (* snd_pcm_hw_params_set_access)(snd_pcm_t *pcm, snd_pcm_hw_params_t *params, snd_pcm_access_t _access);
- int (* snd_pcm_hw_params_set_channels)(snd_pcm_t *pcm, snd_pcm_hw_params_t *params, unsigned int val);
- int (* snd_pcm_hw_params)(snd_pcm_t *pcm, snd_pcm_hw_params_t *params);
- int (* snd_pcm_hw_params_get_periods)(const snd_pcm_hw_params_t *params, unsigned int *val, int *dir);
- int (* snd_pcm_hw_params_get_period_size)(const snd_pcm_hw_params_t *params, snd_pcm_uframes_t *frames, int *dir);
- int (* snd_pcm_hw_params_get_period_size_min)(const snd_pcm_hw_params_t *params, snd_pcm_uframes_t *frames, int *dir);
- int (* snd_pcm_hw_params_get_buffer_size)(const snd_pcm_hw_params_t *params, snd_pcm_uframes_t *val);
-} cw_alsa = {
- .handle = NULL,
-
- .snd_pcm_open = NULL,
- .snd_pcm_close = NULL,
- .snd_pcm_prepare = NULL,
- .snd_pcm_drop = NULL,
- .snd_pcm_writei = NULL,
-
- .snd_strerror = NULL,
-
- .snd_pcm_hw_params_malloc = NULL,
- .snd_pcm_hw_params_any = NULL,
- .snd_pcm_hw_params_set_format = NULL,
- .snd_pcm_hw_params_set_rate_near = NULL,
- .snd_pcm_hw_params_set_access = NULL,
- .snd_pcm_hw_params_set_channels = NULL,
- .snd_pcm_hw_params = NULL,
- .snd_pcm_hw_params_get_periods = NULL,
- .snd_pcm_hw_params_get_period_size = NULL,
- .snd_pcm_hw_params_get_period_size_min = NULL,
- .snd_pcm_hw_params_get_buffer_size = NULL
-};
-
-
-
-
-
/**
\brief Check if it is possible to open ALSA output
@@ -144,34 +92,19 @@ static struct {
*/
bool cw_is_alsa_possible(const char *device)
{
- const char *library_name = "libasound.so.2";
- if (!cw_dlopen_internal(library_name, &(cw_alsa.handle))) {
- cw_debug_msg ((&cw_debug_object), CW_DEBUG_SOUND_SYSTEM, CW_DEBUG_ERROR,
- "cw_alsa: can't access ALSA library \"%s\"", library_name);
- return false;
- }
-
- int rv = cw_alsa_dlsym_internal(cw_alsa.handle);
- if (rv < 0) {
- cw_debug_msg ((&cw_debug_object), CW_DEBUG_SOUND_SYSTEM, CW_DEBUG_ERROR,
- "cw_alsa: failed to resolve ALSA symbol #%d, can't correctly load ALSA library", rv);
- dlclose(cw_alsa.handle);
- return false;
- }
-
- const char *dev = device ? device : CW_DEFAULT_ALSA_DEVICE;
+ int rv;
+ const char *dev = device ? device : CW_DEFAULT_ALSA_DEVICE;
snd_pcm_t *alsa_handle;
- rv = cw_alsa.snd_pcm_open(&alsa_handle,
+ rv = snd_pcm_open(&alsa_handle,
dev, /* name */
SND_PCM_STREAM_PLAYBACK, /* stream (playback/capture) */
0); /* mode, 0 | SND_PCM_NONBLOCK | SND_PCM_ASYNC */
if (rv < 0) {
cw_debug_msg ((&cw_debug_object), CW_DEBUG_SOUND_SYSTEM, CW_DEBUG_ERROR,
"cw_alsa: can't open ALSA device \"%s\"", dev);
- dlclose(cw_alsa.handle);
return false;
} else {
- cw_alsa.snd_pcm_close(alsa_handle);
+ snd_pcm_close(alsa_handle);
return true;
}
}
@@ -204,7 +137,7 @@ int cw_alsa_write_internal(cw_gen_t *gen)
/* Send audio buffer to ALSA.
Size of correct and current data in the buffer is the same as
ALSA's period, so there should be no underruns */
- int rv = cw_alsa.snd_pcm_writei(gen->alsa_data.handle, gen->buffer, gen->buffer_n_samples);
+ int rv = snd_pcm_writei(gen->alsa_data.handle, gen->buffer, gen->buffer_n_samples);
cw_alsa_debug_evaluate_write_internal(gen, rv);
/*
cw_debug_msg ((&cw_debug_object_dev), CW_DEBUG_SOUND_SYSTEM, CW_DEBUG_INFO,
@@ -231,7 +164,7 @@ int cw_alsa_write_internal(cw_gen_t *gen)
*/
int cw_alsa_open_device_internal(cw_gen_t *gen)
{
- int rv = cw_alsa.snd_pcm_open(&gen->alsa_data.handle,
+ int rv = snd_pcm_open(&gen->alsa_data.handle,
gen->audio_device, /* name */
SND_PCM_STREAM_PLAYBACK, /* stream (playback/capture) */
0); /* mode, 0 | SND_PCM_NONBLOCK | SND_PCM_ASYNC */
@@ -251,7 +184,7 @@ int cw_alsa_open_device_internal(cw_gen_t *gen)
/* TODO: move this to cw_alsa_set_hw_params_internal(),
deallocate hw_params */
snd_pcm_hw_params_t *hw_params = NULL;
- rv = cw_alsa.snd_pcm_hw_params_malloc(&hw_params);
+ rv = snd_pcm_hw_params_malloc(&hw_params);
if (rv < 0) {
cw_debug_msg ((&cw_debug_object), CW_DEBUG_SOUND_SYSTEM, CW_DEBUG_ERROR,
"cw_alsa: can't allocate memory for ALSA hw params");
@@ -265,7 +198,7 @@ int cw_alsa_open_device_internal(cw_gen_t *gen)
return CW_FAILURE;
}
- rv = cw_alsa.snd_pcm_prepare(gen->alsa_data.handle);
+ rv = snd_pcm_prepare(gen->alsa_data.handle);
if (rv < 0) {
cw_debug_msg ((&cw_debug_object), CW_DEBUG_SOUND_SYSTEM, CW_DEBUG_ERROR,
"cw_alsa: can't prepare ALSA handler");
@@ -275,7 +208,7 @@ int cw_alsa_open_device_internal(cw_gen_t *gen)
/* Get size for data buffer */
snd_pcm_uframes_t frames; /* period size in frames */
int dir = 1;
- rv = cw_alsa.snd_pcm_hw_params_get_period_size_min(hw_params, &frames, &dir);
+ rv = snd_pcm_hw_params_get_period_size_min(hw_params, &frames, &dir);
cw_debug_msg ((&cw_debug_object_dev), CW_DEBUG_SOUND_SYSTEM, CW_DEBUG_INFO,
"cw_alsa: rv = %d, ALSA buffer size would be %u frames", rv, (unsigned int) frames);
@@ -305,14 +238,11 @@ int cw_alsa_open_device_internal(cw_gen_t *gen)
void cw_alsa_close_device_internal(cw_gen_t *gen)
{
/* "Stop a PCM dropping pending frames. " */
- cw_alsa.snd_pcm_drop(gen->alsa_data.handle);
- cw_alsa.snd_pcm_close(gen->alsa_data.handle);
+ snd_pcm_drop(gen->alsa_data.handle);
+ snd_pcm_close(gen->alsa_data.handle);
gen->audio_device_is_open = false;
- if (cw_alsa.handle) {
- dlclose(cw_alsa.handle);
- }
#if CW_DEV_RAW_SINK
if (gen->dev_raw_sink != -1) {
@@ -332,11 +262,11 @@ int cw_alsa_debug_evaluate_write_internal(cw_gen_t *gen, int rv)
if (rv == -EPIPE) {
cw_debug_msg ((&cw_debug_object), CW_DEBUG_SOUND_SYSTEM, CW_DEBUG_WARNING,
"cw_alsa: underrun");
- cw_alsa.snd_pcm_prepare(gen->alsa_data.handle);
+ snd_pcm_prepare(gen->alsa_data.handle);
} else if (rv < 0) {
cw_debug_msg ((&cw_debug_object), CW_DEBUG_SOUND_SYSTEM, CW_DEBUG_WARNING,
- "cw_alsa: writei: %s", cw_alsa.snd_strerror(rv));
- cw_alsa.snd_pcm_prepare(gen->alsa_data.handle);
+ "cw_alsa: writei: %s", snd_strerror(rv));
+ snd_pcm_prepare(gen->alsa_data.handle);
} else if (rv != gen->buffer_n_samples) {
cw_debug_msg ((&cw_debug_object), CW_DEBUG_SOUND_SYSTEM, CW_DEBUG_WARNING,
"cw_alsa: short write, %d != %d", rv, gen->buffer_n_samples);
@@ -363,19 +293,19 @@ int cw_alsa_debug_evaluate_write_internal(cw_gen_t *gen, int rv)
int cw_alsa_set_hw_params_internal(cw_gen_t *gen, snd_pcm_hw_params_t *hw_params)
{
/* Get current hw configuration. */
- int rv = cw_alsa.snd_pcm_hw_params_any(gen->alsa_data.handle, hw_params);
+ int rv = snd_pcm_hw_params_any(gen->alsa_data.handle, hw_params);
if (rv < 0) {
cw_debug_msg ((&cw_debug_object), CW_DEBUG_SOUND_SYSTEM, CW_DEBUG_ERROR,
- "cw_alsa: get current hw params: %s", cw_alsa.snd_strerror(rv));
+ "cw_alsa: get current hw params: %s", snd_strerror(rv));
return CW_FAILURE;
}
/* Set the sample format */
- rv = cw_alsa.snd_pcm_hw_params_set_format(gen->alsa_data.handle, hw_params, CW_ALSA_SAMPLE_FORMAT);
+ rv = snd_pcm_hw_params_set_format(gen->alsa_data.handle, hw_params, CW_ALSA_SAMPLE_FORMAT);
if (rv < 0) {
cw_debug_msg ((&cw_debug_object), CW_DEBUG_SOUND_SYSTEM, CW_DEBUG_ERROR,
- "cw_alsa: can't set sample format: %s", cw_alsa.snd_strerror(rv));
+ "cw_alsa: can't set sample format: %s", snd_strerror(rv));
return CW_FAILURE;
}
@@ -387,7 +317,7 @@ int cw_alsa_set_hw_params_internal(cw_gen_t *gen, snd_pcm_hw_params_t *hw_params
bool success = false;
for (int i = 0; cw_supported_sample_rates[i]; i++) {
rate = cw_supported_sample_rates[i];
- int rv = cw_alsa.snd_pcm_hw_params_set_rate_near(gen->alsa_data.handle, hw_params, &rate, &dir);
+ int rv = snd_pcm_hw_params_set_rate_near(gen->alsa_data.handle, hw_params, &rate, &dir);
if (!rv) {
if (rate != cw_supported_sample_rates[i]) {
cw_debug_msg ((&cw_debug_object_dev), CW_DEBUG_SOUND_SYSTEM, CW_DEBUG_WARNING, "cw_alsa: imprecise sample rate:");
@@ -402,7 +332,7 @@ int cw_alsa_set_hw_params_internal(cw_gen_t *gen, snd_pcm_hw_params_t *hw_params
if (!success) {
cw_debug_msg ((&cw_debug_object), CW_DEBUG_SOUND_SYSTEM, CW_DEBUG_ERROR,
- "cw_alsa: can't get sample rate: %s", cw_alsa.snd_strerror(rv));
+ "cw_alsa: can't get sample rate: %s", snd_strerror(rv));
return CW_FAILURE;
} else {
cw_debug_msg ((&cw_debug_object_dev), CW_DEBUG_SOUND_SYSTEM, CW_DEBUG_INFO,
@@ -410,18 +340,18 @@ int cw_alsa_set_hw_params_internal(cw_gen_t *gen, snd_pcm_hw_params_t *hw_params
}
/* Set PCM access type */
- rv = cw_alsa.snd_pcm_hw_params_set_access(gen->alsa_data.handle, hw_params, SND_PCM_ACCESS_RW_INTERLEAVED);
+ rv = snd_pcm_hw_params_set_access(gen->alsa_data.handle, hw_params, SND_PCM_ACCESS_RW_INTERLEAVED);
if (rv < 0) {
cw_debug_msg ((&cw_debug_object), CW_DEBUG_SOUND_SYSTEM, CW_DEBUG_ERROR,
- "cw_alsa: can't set access type: %s", cw_alsa.snd_strerror(rv));
+ "cw_alsa: can't set access type: %s", snd_strerror(rv));
return CW_FAILURE;
}
/* Set number of channels */
- rv = cw_alsa.snd_pcm_hw_params_set_channels(gen->alsa_data.handle, hw_params, CW_AUDIO_CHANNELS);
+ rv = snd_pcm_hw_params_set_channels(gen->alsa_data.handle, hw_params, CW_AUDIO_CHANNELS);
if (rv < 0) {
cw_debug_msg ((&cw_debug_object), CW_DEBUG_SOUND_SYSTEM, CW_DEBUG_ERROR,
- "cw_alsa: can't set number of channels: %s", cw_alsa.snd_strerror(rv));
+ "cw_alsa: can't set number of channels: %s", snd_strerror(rv));
return CW_FAILURE;
}
@@ -496,7 +426,7 @@ int cw_alsa_set_hw_params_internal(cw_gen_t *gen, snd_pcm_hw_params_t *hw_params
snd_pcm_uframes_t accepted = 0; /* buffer size in frames */
dir = 0;
for (snd_pcm_uframes_t val = 0; val < 10000; val++) {
- rv = cw_alsa.snd_pcm_hw_params_test_buffer_size(gen->alsa_data.handle, hw_params, val);
+ rv = snd_pcm_hw_params_test_buffer_size(gen->alsa_data.handle, hw_params, val);
if (rv == 0) {
cw_debug_msg ((&cw_debug_object_dev), CW_DEBUG_SOUND_SYSTEM, CW_DEBUG_INFO,
"cw_alsa: accepted buffer size: %u", (unsigned int) accepted);
@@ -507,10 +437,10 @@ int cw_alsa_set_hw_params_internal(cw_gen_t *gen, snd_pcm_hw_params_t *hw_params
}
if (accepted > 0) {
- rv = cw_alsa.snd_pcm_hw_params_set_buffer_size(gen->alsa_data.handle, hw_params, accepted);
+ rv = snd_pcm_hw_params_set_buffer_size(gen->alsa_data.handle, hw_params, accepted);
if (rv < 0) {
cw_debug_msg ((&cw_debug_object), CW_DEBUG_SOUND_SYSTEM, CW_DEBUG_ERROR,
- "cw_alsa: can't set accepted buffer size %u: %s", (unsigned int) accepted, cw_alsa.snd_strerror(rv));
+ "cw_alsa: can't set accepted buffer size %u: %s", (unsigned int) accepted, snd_strerror(rv));
}
} else {
cw_debug_msg ((&cw_debug_object), CW_DEBUG_SOUND_SYSTEM, CW_DEBUG_ERROR,
@@ -526,7 +456,7 @@ int cw_alsa_set_hw_params_internal(cw_gen_t *gen, snd_pcm_hw_params_t *hw_params
/* this limit should be enough, "accepted" on my machine is 8 */
const unsigned int n_periods_max = 30;
for (unsigned int val = 1; val < n_periods_max; val++) {
- rv = cw_alsa.snd_pcm_hw_params_test_periods(gen->alsa_data.handle, hw_params, val, dir);
+ rv = snd_pcm_hw_params_test_periods(gen->alsa_data.handle, hw_params, val, dir);
if (rv == 0) {
accepted = val;
cw_debug_msg ((&cw_debug_object_dev), CW_DEBUG_SOUND_SYSTEM, CW_DEBUG_INFO,
@@ -534,10 +464,10 @@ int cw_alsa_set_hw_params_internal(cw_gen_t *gen, snd_pcm_hw_params_t *hw_params
}
}
if (accepted > 0) {
- rv = cw_alsa.snd_pcm_hw_params_set_periods(gen->alsa_data.handle, hw_params, accepted, dir);
+ rv = snd_pcm_hw_params_set_periods(gen->alsa_data.handle, hw_params, accepted, dir);
if (rv < 0) {
cw_debug_msg ((&cw_debug_object_dev), CW_DEBUG_SOUND_SYSTEM, CW_DEBUG_ERROR,
- "cw_alsa: can't set accepted number of periods %d: %s", accepted, cw_alsa.snd_strerror(rv));
+ "cw_alsa: can't set accepted number of periods %d: %s", accepted, snd_strerror(rv));
}
} else {
cw_debug_msg ((&cw_debug_object), CW_DEBUG_SOUND_SYSTEM, CW_DEBUG_ERROR,
@@ -549,7 +479,7 @@ int cw_alsa_set_hw_params_internal(cw_gen_t *gen, snd_pcm_hw_params_t *hw_params
/* Test period size */
dir = 0;
for (snd_pcm_uframes_t val = 0; val < 100000; val++) {
- rv = cw_alsa.snd_pcm_hw_params_test_period_size(gen->alsa_data.handle, hw_params, val, dir);
+ rv = snd_pcm_hw_params_test_period_size(gen->alsa_data.handle, hw_params, val, dir);
if (rv == 0) {
cw_debug_msg ((&cw_debug_object_dev), CW_DEBUG_SOUND_SYSTEM, CW_DEBUG_INFO,
"cw_alsa: accepted period size: %lu", val);
@@ -562,7 +492,7 @@ int cw_alsa_set_hw_params_internal(cw_gen_t *gen, snd_pcm_hw_params_t *hw_params
/* Test buffer time */
dir = 0;
for (unsigned int val = 0; val < 100000; val++) {
- rv = cw_alsa.snd_pcm_hw_params_test_buffer_time(gen->alsa_data.handle, hw_params, val, dir);
+ rv = snd_pcm_hw_params_test_buffer_time(gen->alsa_data.handle, hw_params, val, dir);
if (rv == 0) {
cw_debug_msg ((&cw_debug_object_dev), CW_DEBUG_SOUND_SYSTEM, CW_DEBUG_INFO,
"cw_alsa: accepted buffer time: %d", val);
@@ -573,10 +503,10 @@ int cw_alsa_set_hw_params_internal(cw_gen_t *gen, snd_pcm_hw_params_t *hw_params
#endif /* #if CW_ALSA_HW_BUFFER_CONFIG */
/* Save hw parameters to device */
- rv = cw_alsa.snd_pcm_hw_params(gen->alsa_data.handle, hw_params);
+ rv = snd_pcm_hw_params(gen->alsa_data.handle, hw_params);
if (rv < 0) {
cw_debug_msg ((&cw_debug_object), CW_DEBUG_SOUND_SYSTEM, CW_DEBUG_ERROR,
- "cw_alsa: can't save hw parameters: %s", cw_alsa.snd_strerror(rv));
+ "cw_alsa: can't save hw parameters: %s", snd_strerror(rv));
return CW_FAILURE;
} else {
return CW_SUCCESS;
@@ -600,30 +530,30 @@ int cw_alsa_print_params_internal(snd_pcm_hw_params_t *hw_params)
unsigned int val = 0;
int dir = 0;
- int rv = cw_alsa.snd_pcm_hw_params_get_periods(hw_params, &val, &dir);
+ int rv = snd_pcm_hw_params_get_periods(hw_params, &val, &dir);
if (rv < 0) {
cw_debug_msg ((&cw_debug_object), CW_DEBUG_SOUND_SYSTEM, CW_DEBUG_ERROR,
- "cw_alsa: can't get 'periods': %s", cw_alsa.snd_strerror(rv));
+ "cw_alsa: can't get 'periods': %s", snd_strerror(rv));
} else {
cw_debug_msg ((&cw_debug_object_dev), CW_DEBUG_SOUND_SYSTEM, CW_DEBUG_INFO,
"cw_alsa: 'periods' = %u", val);
}
snd_pcm_uframes_t period_size = 0;
- rv = cw_alsa.snd_pcm_hw_params_get_period_size(hw_params, &period_size, &dir);
+ rv = snd_pcm_hw_params_get_period_size(hw_params, &period_size, &dir);
if (rv < 0) {
cw_debug_msg ((&cw_debug_object), CW_DEBUG_SOUND_SYSTEM, CW_DEBUG_ERROR,
- "cw_alsa: can't get 'period size': %s", cw_alsa.snd_strerror(rv));
+ "cw_alsa: can't get 'period size': %s", snd_strerror(rv));
} else {
cw_debug_msg ((&cw_debug_object_dev), CW_DEBUG_SOUND_SYSTEM, CW_DEBUG_INFO,
"cw_alsa: 'period size' = %u", (unsigned int) period_size);
}
snd_pcm_uframes_t buffer_size;
- rv = cw_alsa.snd_pcm_hw_params_get_buffer_size(hw_params, &buffer_size);
+ rv = snd_pcm_hw_params_get_buffer_size(hw_params, &buffer_size);
if (rv < 0) {
cw_debug_msg ((&cw_debug_object), CW_DEBUG_SOUND_SYSTEM, CW_DEBUG_ERROR,
- "cw_alsa: can't get buffer size: %s", cw_alsa.snd_strerror(rv));
+ "cw_alsa: can't get buffer size: %s", snd_strerror(rv));
} else {
cw_debug_msg ((&cw_debug_object_dev), CW_DEBUG_SOUND_SYSTEM, CW_DEBUG_INFO,
"cw_alsa: 'buffer size' = %u", (unsigned int) buffer_size);
@@ -642,70 +572,9 @@ int cw_alsa_print_params_internal(snd_pcm_hw_params_t *hw_params)
-/**
- \brief Resolve/get symbols from ALSA library
-
- Function resolves/gets addresses of few ALSA functions used by
- libcw and stores them in cw_alsa global variable.
-
- On failure the function returns negative value, different for every
- symbol that the funciton failed to resolve. Function stops and returns
- on first failure.
-
- \param handle - handle to open ALSA library
-
- \return 0 on success
- \return negative value on failure
-*/
-static int cw_alsa_dlsym_internal(void *handle)
-{
- *(void **) &(cw_alsa.snd_pcm_open) = dlsym(handle, "snd_pcm_open");
- if (!cw_alsa.snd_pcm_open) return -1;
- *(void **) &(cw_alsa.snd_pcm_close) = dlsym(handle, "snd_pcm_close");
- if (!cw_alsa.snd_pcm_close) return -2;
- *(void **) &(cw_alsa.snd_pcm_prepare) = dlsym(handle, "snd_pcm_prepare");
- if (!cw_alsa.snd_pcm_prepare) return -3;
- *(void **) &(cw_alsa.snd_pcm_drop) = dlsym(handle, "snd_pcm_drop");
- if (!cw_alsa.snd_pcm_drop) return -4;
- *(void **) &(cw_alsa.snd_pcm_writei) = dlsym(handle, "snd_pcm_writei");
- if (!cw_alsa.snd_pcm_writei) return -5;
-
- *(void **) &(cw_alsa.snd_strerror) = dlsym(handle, "snd_strerror");
- if (!cw_alsa.snd_strerror) return -10;
-
- *(void **) &(cw_alsa.snd_pcm_hw_params_malloc) = dlsym(handle, "snd_pcm_hw_params_malloc");
- if (!cw_alsa.snd_pcm_hw_params_malloc) return -20;
- *(void **) &(cw_alsa.snd_pcm_hw_params_any) = dlsym(handle, "snd_pcm_hw_params_any");
- if (!cw_alsa.snd_pcm_hw_params_any) return -21;
- *(void **) &(cw_alsa.snd_pcm_hw_params_set_format) = dlsym(handle, "snd_pcm_hw_params_set_format");
- if (!cw_alsa.snd_pcm_hw_params_set_format) return -22;
- *(void **) &(cw_alsa.snd_pcm_hw_params_set_rate_near) = dlsym(handle, "snd_pcm_hw_params_set_rate_near");
- if (!cw_alsa.snd_pcm_hw_params_set_rate_near) return -23;
- *(void **) &(cw_alsa.snd_pcm_hw_params_set_access) = dlsym(handle, "snd_pcm_hw_params_set_access");
- if (!cw_alsa.snd_pcm_hw_params_set_access) return -24;
- *(void **) &(cw_alsa.snd_pcm_hw_params_set_channels) = dlsym(handle, "snd_pcm_hw_params_set_channels");
- if (!cw_alsa.snd_pcm_hw_params_set_channels) return -25;
- *(void **) &(cw_alsa.snd_pcm_hw_params) = dlsym(handle, "snd_pcm_hw_params");
- if (!cw_alsa.snd_pcm_hw_params) return -26;
- *(void **) &(cw_alsa.snd_pcm_hw_params_get_periods) = dlsym(handle, "snd_pcm_hw_params_get_periods");
- if (!cw_alsa.snd_pcm_hw_params_get_periods) return -27;
- *(void **) &(cw_alsa.snd_pcm_hw_params_get_period_size) = dlsym(handle, "snd_pcm_hw_params_get_period_size");
- if (!cw_alsa.snd_pcm_hw_params_get_period_size) return -28;
- *(void **) &(cw_alsa.snd_pcm_hw_params_get_period_size_min) = dlsym(handle, "snd_pcm_hw_params_get_period_size_min");
- if (!cw_alsa.snd_pcm_hw_params_get_period_size_min) return -29;
- *(void **) &(cw_alsa.snd_pcm_hw_params_get_buffer_size) = dlsym(handle, "snd_pcm_hw_params_get_buffer_size");
- if (!cw_alsa.snd_pcm_hw_params_get_buffer_size) return -30;
-
- return 0;
-}
-
-
-
-
-
void cw_alsa_drop(cw_gen_t *gen)
{
- cw_alsa.snd_pcm_drop(gen->alsa_data.handle);
+ snd_pcm_drop(gen->alsa_data.handle);
return;
}
@@ -721,7 +590,7 @@ void cw_alsa_drop(cw_gen_t *gen)
#include <stdbool.h>
-#include "libcw_alsa.h"
+#include "libh"
diff --git a/src/libcw/libcw_pa.c b/src/libcw/libcw_pa.c
index 8269e9d..e190200 100644
--- a/src/libcw/libcw_pa.c
+++ b/src/libcw/libcw_pa.c
@@ -39,7 +39,6 @@
#include <unistd.h>
#include <stdlib.h>
#include <stdbool.h>
-#include <dlfcn.h> /* dlopen() and related symbols */
#include <string.h>
#include <assert.h>
#include <sys/types.h>
@@ -63,39 +62,12 @@ extern cw_debug_t cw_debug_object_dev;
static pa_simple *cw_pa_simple_new_internal(pa_sample_spec *ss, pa_buffer_attr *ba, const char *device, const char *stream_name, int *error);
-static int cw_pa_dlsym_internal(void *handle);
static int cw_pa_open_device_internal(cw_gen_t *gen);
static void cw_pa_close_device_internal(cw_gen_t *gen);
static int cw_pa_write_internal(cw_gen_t *gen);
-static struct {
- void *handle;
-
- pa_simple *(* pa_simple_new)(const char *server, const char *name, pa_stream_direction_t dir, const char *dev, const char *stream_name, const pa_sample_spec *ss, const pa_channel_map *map, const pa_buffer_attr *attr, int *error);
- void (* pa_simple_free)(pa_simple *s);
- int (* pa_simple_write)(pa_simple *s, const void *data, size_t bytes, int *error);
- pa_usec_t (* pa_simple_get_latency)(pa_simple *s, int *error);
- int (* pa_simple_drain)(pa_simple *s, int *error);
-
- size_t (* pa_usec_to_bytes)(pa_usec_t t, const pa_sample_spec *spec);
- char *(* pa_strerror)(int error);
-} cw_pa = {
- .handle = NULL,
-
- .pa_simple_new = NULL,
- .pa_simple_free = NULL,
- .pa_simple_write = NULL,
- .pa_simple_get_latency = NULL,
- .pa_simple_drain = NULL,
-
- .pa_usec_to_bytes = NULL,
- .pa_strerror = NULL
-};
-
-
-
static const pa_sample_format_t CW_PA_SAMPLE_FORMAT = PA_SAMPLE_S16LE; /* Signed 16 bit, Little Endian */
static const int CW_PA_BUFFER_N_SAMPLES = 1024;
@@ -117,21 +89,6 @@ static const int CW_PA_BUFFER_N_SAMPLES = 1024;
*/
bool cw_is_pa_possible(const char *device)
{
- const char *library_name = "libpulse-simple.so";
- if (!cw_dlopen_internal(library_name, &(cw_pa.handle))) {
- cw_debug_msg ((&cw_debug_object), CW_DEBUG_SOUND_SYSTEM, CW_DEBUG_ERROR,
- "libcw_pa: can't access PulseAudio library \"%s\"", library_name);
- return false;
- }
-
- int rv = cw_pa_dlsym_internal(cw_pa.handle);
- if (rv < 0) {
- cw_debug_msg ((&cw_debug_object), CW_DEBUG_SOUND_SYSTEM, CW_DEBUG_ERROR,
- "libcw_pa: failed to resolve PulseAudio symbol #%d, can't correctly load PulseAudio library", rv);
- dlclose(cw_pa.handle);
- return false;
- }
-
const char *dev = (char *) NULL;
if (device && strcmp(device, CW_DEFAULT_PA_DEVICE)) {
dev = device;
@@ -145,13 +102,10 @@ bool cw_is_pa_possible(const char *device)
if (!s) {
cw_debug_msg ((&cw_debug_object), CW_DEBUG_SOUND_SYSTEM, CW_DEBUG_ERROR,
- "libcw_pa: can't connect to PulseAudio server: %s", cw_pa.pa_strerror(error));
- if (cw_pa.handle) {
- dlclose(cw_pa.handle);
- }
+ "libcw_pa: can't connect to PulseAudio server: %s", pa_strerror(error));
return false;
} else {
- cw_pa.pa_simple_free(s);
+ pa_simple_free(s);
s = NULL;
return true;
}
@@ -186,10 +140,10 @@ int cw_pa_write_internal(cw_gen_t *gen)
int error = 0;
size_t n_bytes = sizeof (gen->buffer[0]) * gen->buffer_n_samples;
- int rv = cw_pa.pa_simple_write(gen->pa_data.s, gen->buffer, n_bytes, &error);
+ int rv = pa_simple_write(gen->pa_data.s, gen->buffer, n_bytes, &error);
if (rv < 0) {
cw_debug_msg ((&cw_debug_object), CW_DEBUG_SOUND_SYSTEM, CW_DEBUG_ERROR,
- "libcw_pa: pa_simple_write() failed: %s", cw_pa.pa_strerror(error));
+ "libcw_pa: pa_simple_write() failed: %s", pa_strerror(error));
} else {
//cw_debug_msg ((&cw_debug_object_dev), CW_DEBUG_SOUND_SYSTEM, CW_DEBUG_INFO, "libcw_pa: written %d samples with PulseAudio", gen->buffer_n_samples);
}
@@ -237,13 +191,13 @@ pa_simple *cw_pa_simple_new_internal(pa_sample_spec *ss, pa_buffer_attr *ba, con
}
// http://www.mail-archive.com/pulseaudio-tickets@mail.0pointer.de/msg03295.html
- ba->tlength = cw_pa.pa_usec_to_bytes(50*1000, ss);
- ba->minreq = cw_pa.pa_usec_to_bytes(0, ss);
- ba->maxlength = cw_pa.pa_usec_to_bytes(50*1000, ss);
+ ba->tlength = pa_usec_to_bytes(50*1000, ss);
+ ba->minreq = pa_usec_to_bytes(0, ss);
+ ba->maxlength = pa_usec_to_bytes(50*1000, ss);
/* ba->prebuf = ; */ /* ? */
/* ba->fragsize = sizeof(uint32_t) -1; */ /* not relevant to playback */
- pa_simple *s = cw_pa.pa_simple_new(NULL, /* server name (NULL for default) */
+ pa_simple *s = pa_simple_new(NULL, /* server name (NULL for default) */
"libcw", /* descriptive name of client (application name etc.) */
PA_STREAM_PLAYBACK, /* stream direction */
dev, /* device/sink name (NULL for default) */
@@ -258,47 +212,6 @@ pa_simple *cw_pa_simple_new_internal(pa_sample_spec *ss, pa_buffer_attr *ba, con
-
-
-/**
- \brief Resolve/get symbols from PulseAudio library
-
- Function resolves/gets addresses of few PulseAudio functions used by
- libcw and stores them in cw_pa global variable.
-
- On failure the function returns negative value, different for every
- symbol that the funciton failed to resolve. Function stops and returns
- on first failure.
-
- \param handle - handle to open PulseAudio library
-
- \return 0 on success
- \return negative value on failure
-*/
-int cw_pa_dlsym_internal(void *handle)
-{
- *(void **) &(cw_pa.pa_simple_new) = dlsym(handle, "pa_simple_new");
- if (!cw_pa.pa_simple_new) return -1;
- *(void **) &(cw_pa.pa_simple_free) = dlsym(handle, "pa_simple_free");
- if (!cw_pa.pa_simple_free) return -2;
- *(void **) &(cw_pa.pa_simple_write) = dlsym(handle, "pa_simple_write");
- if (!cw_pa.pa_simple_write) return -3;
- *(void **) &(cw_pa.pa_strerror) = dlsym(handle, "pa_strerror");
- if (!cw_pa.pa_strerror) return -4;
- *(void **) &(cw_pa.pa_simple_get_latency) = dlsym(handle, "pa_simple_get_latency");
- if (!cw_pa.pa_simple_get_latency) return -5;
- *(void **) &(cw_pa.pa_simple_drain) = dlsym(handle, "pa_simple_drain");
- if (!cw_pa.pa_simple_drain) return -6;
- *(void **) &(cw_pa.pa_usec_to_bytes) = dlsym(handle, "pa_usec_to_bytes");
- if (!cw_pa.pa_usec_to_bytes) return -7;
-
- return 0;
-}
-
-
-
-
-
/**
\brief Open PulseAudio output, associate it with given generator
@@ -325,16 +238,16 @@ int cw_pa_open_device_internal(cw_gen_t *gen)
if (!gen->pa_data.s) {
cw_debug_msg ((&cw_debug_object_dev), CW_DEBUG_SOUND_SYSTEM, CW_DEBUG_ERROR,
- "libcw_pa: can't connect to PulseAudio server: %s", cw_pa.pa_strerror(error));
+ "libcw_pa: can't connect to PulseAudio server: %s", pa_strerror(error));
return false;
}
gen->buffer_n_samples = CW_PA_BUFFER_N_SAMPLES;
gen->sample_rate = gen->pa_data.ss.rate;
- if ((gen->pa_data.latency_usecs = cw_pa.pa_simple_get_latency(gen->pa_data.s, &error)) == (pa_usec_t) -1) {
+ if ((gen->pa_data.latency_usecs = pa_simple_get_latency(gen->pa_data.s, &error)) == (pa_usec_t) -1) {
cw_debug_msg ((&cw_debug_object_dev), CW_DEBUG_SOUND_SYSTEM, CW_DEBUG_ERROR,
- "libcw_pa: pa_simple_get_latency() failed: %s", cw_pa.pa_strerror(error));
+ "libcw_pa: pa_simple_get_latency() failed: %s", pa_strerror(error));
}
#if CW_DEV_RAW_SINK
@@ -357,20 +270,17 @@ void cw_pa_close_device_internal(cw_gen_t *gen)
if (gen->pa_data.s) {
/* Make sure that every single sample was played */
int error;
- if (cw_pa.pa_simple_drain(gen->pa_data.s, &error) < 0) {
+ if (pa_simple_drain(gen->pa_data.s, &error) < 0) {
cw_debug_msg ((&cw_debug_object_dev), CW_DEBUG_SOUND_SYSTEM, CW_DEBUG_ERROR,
- "libcw_pa: pa_simple_drain() failed: %s", cw_pa.pa_strerror(error));
+ "libcw_pa: pa_simple_drain() failed: %s", pa_strerror(error));
}
- cw_pa.pa_simple_free(gen->pa_data.s);
+ pa_simple_free(gen->pa_data.s);
gen->pa_data.s = NULL;
} else {
cw_debug_msg ((&cw_debug_object_dev), CW_DEBUG_SOUND_SYSTEM, CW_DEBUG_WARNING,
"libcw_pa: called the function for NULL PA sink");
}
- if (cw_pa.handle) {
- dlclose(cw_pa.handle);
- }
#if CW_DEV_RAW_SINK
if (gen->dev_raw_sink != -1) {
--
2.16.2

View File

@ -12,13 +12,13 @@ in
stdenv'.mkDerivation rec {
name = "xmr-stak-${version}";
version = "2.4.3";
version = "2.4.4";
src = fetchFromGitHub {
owner = "fireice-uk";
repo = "xmr-stak";
rev = "${version}";
sha256 = "0plks4yyd9gjnfg7sfsgsvdgczkbghf5xjwb8bzv01f0fndn10r1";
sha256 = "1j75466hfs18w05k64yb60pw865ah226vjib46qr1wb1mcd82i5s";
};
NIX_CFLAGS_COMPILE = "-O3";

View File

@ -137,35 +137,18 @@ rec {
in rec {
tor-browser-7-0 = common (rec {
pname = "tor-browser";
version = "7.0.1";
isTorBrowserLike = true;
# FIXME: fetchFromGitHub is not ideal, unpacked source is >900Mb
src = fetchFromGitHub {
owner = "SLNOS";
repo = "tor-browser";
# branch "tor-browser-52.5.0esr-7.0-1-slnos";
rev = "830ff8d622ef20345d83f386174f790b0fc2440d";
sha256 = "169mjkr0bp80yv9nzza7kay7y2k03lpnx71h4ybcv9ygxgzdgax5";
};
patches = nixpkgsPatches;
} // commonAttrs) {};
tor-browser-7-5 = common (rec {
pname = "tor-browser";
version = "7.5.4";
version = "7.5.5";
isTorBrowserLike = true;
# FIXME: fetchFromGitHub is not ideal, unpacked source is >900Mb
src = fetchFromGitHub {
owner = "SLNOS";
repo = "tor-browser";
# branch "tor-browser-52.8.0esr-7.5-1-slnos"
rev = "dbaabe129d2982bee00a753146fbe610fec0ca50";
sha256 = "0j60vz18bwabqbzv0r1id3vcyh3832mzx6cg5r7x5c03s5hn40a4";
# branch "tor-browser-52.8.1esr-7.5-1-slnos"
rev = "08e246847f0ccbee42f61d9449344d461c886cf1";
sha256 = "023k7427g2hqkpdsw1h384djlyy6jyidpssrrwzbs3qv4s13slah";
};
patches = nixpkgsPatches;

View File

@ -1,7 +1,7 @@
{ callPackage, stdenv }:
let
stableVersion = "2.1.6";
stableVersion = "2.1.7";
# Currently there is no preview version.
previewVersion = stableVersion;
addVersion = args:
@ -10,8 +10,8 @@ let
in args // { inherit version branch; };
mkGui = args: callPackage (import ./gui.nix (addVersion args)) { };
mkServer = args: callPackage (import ./server.nix (addVersion args)) { };
guiSrcHash = "0wrh0x5ig2x2pxyyf99z4bfiyxn19akyjic5kgf0pv2snifw2481";
serverSrcHash = "0jy5700bshz54mdsh5qpcb2qrczg9isxhr4y0bmglrl23pywvisc";
guiSrcHash = "10zf429zjzf7v4y9r7mmkp42kh5ppmqinhvwqzb7jmsrpv2cnxj6";
serverSrcHash = "056swz6ygqdi37asah51v1yy0ky8q0p32vf7dxs697hd7nv78aqj";
in {
guiStable = mkGui {
stable = true;

View File

@ -4,8 +4,8 @@ let
mkTelegram = args: qt5.callPackage (import ./generic.nix args) { };
stableVersion = {
stable = true;
version = "1.3.0";
sha256Hash = "1h5zcvd58bjm02b0rfb7fx1nx1gmzdlk1854lm6kg1hd6mqrrb0i";
version = "1.3.7";
sha256Hash = "1rwnqgla061icvyvw8gxqd7qki1jnq0f46hvyffp74ng5r1b6wjg";
# svn log svn://svn.archlinux.org/community/telegram-desktop/trunk
archPatchesRevision = "310557";
archPatchesHash = "1v134dal3xiapgh3akfr61vh62j24m9vkb62kckwvap44iqb0hlk";
@ -14,7 +14,5 @@ in {
stable = mkTelegram stableVersion;
preview = mkTelegram (stableVersion // {
stable = false;
version = "1.3.4";
sha256Hash = "17xdzyl7jb5g69a2h6fyk67z7s6h2dqjg8j478px6n0br1n420wk";
});
}

View File

@ -37,8 +37,9 @@ stdenv.mkDerivation rec {
buildInputs = [
boost icu libxml2 libxslt gettext swig isocodes gtk3 glibcLocales
webkit dconf hicolor-icon-theme libofx aqbanking gwenhywfar libdbi
libdbiDrivers guile perlWrapper
];
libdbiDrivers guile
perlWrapper perl
] ++ (with perlPackages; [ FinanceQuote DateManip ]);
propagatedUserEnvPkgs = [ dconf ];
@ -58,6 +59,7 @@ stdenv.mkDerivation rec {
wrapProgram "$out/bin/gnucash" \
--prefix XDG_DATA_DIRS : "$GSETTINGS_SCHEMAS_PATH:$out/share/gsettings-schemas/${name}" \
--prefix XDG_DATA_DIRS : "${hicolor-icon-theme}/share" \
--prefix PERL5LIB ":" "$PERL5LIB" \
--prefix GIO_EXTRA_MODULES : "${stdenv.lib.getLib dconf}/lib/gio/modules"
'';

View File

@ -42,14 +42,14 @@ let
then "i386"
else "amd64";
shortVersion = "1.18-stable";
shortVersion = "1.19.1-stable";
version = "${shortVersion}_${arch}";
url = "http://desktop-download.mendeley.com/download/apt/pool/main/m/mendeleydesktop/mendeleydesktop_${version}.deb";
sha256 = if stdenv.system == arch32
then "046v1j4sc6m0bf89f52zsg8riygrhldplyih5p0cjhcsd45q6fx8"
else "072fppgxhiryb6m1fb4qvq8nbblx88xpknnklygch1sw0lyks69h";
then "0fcyl5i8xdgb5j0x1643qc0j74d8p11jczvqmgqkqh0wgid1y1ad"
else "1dzwa2cnn9xakrhhq159fhh71gw5wlbf017rrikdlia694m8akq6";
deps = [
qtbase

View File

@ -1,11 +1,11 @@
{stdenv, fetchurl, readline, bison, flex, libX11, libICE, libXaw, libXext, fftw}:
stdenv.mkDerivation {
name = "ngspice-27";
name = "ngspice-28";
src = fetchurl {
url = "mirror://sourceforge/ngspice/ngspice-27.tar.gz";
sha256 = "15862npsy5sj56z5yd1qiv3y0fgicrzj7wwn8hbcy89fgbawf20c";
url = "mirror://sourceforge/ngspice/ngspice-28.tar.gz";
sha256 = "0rnz2rdgyav16w7wfn3sfrk2lwvvgz1fh0l9107zkcldijklz04l";
};
nativeBuildInputs = [ flex bison ];

View File

@ -23,6 +23,8 @@ in buildGoPackage rec {
inherit rubyEnv;
};
buildInputs = [rubyEnv.wrappedRuby];
postInstall = ''
mkdir -p $ruby
cp -rv $src/ruby/{bin,lib,vendor} $ruby

View File

@ -1,9 +0,0 @@
diff --git a/.cargo/config b/.cargo/config
new file mode 100644
index 0000000..15e7649
--- /dev/null
+++ b/.cargo/config
@@ -0,0 +1,3 @@
+# https://github.com/rust-lang/rust/issues/50516
+[target.'cfg(all(debug_assertions, target_arch = "aarch64"))']
+rustflags = ["-C", "llvm-args=-fast-isel"]

View File

@ -1,25 +1,30 @@
{ stdenv, fetchFromGitHub, rustPlatform, cmake, libzip }:
{ stdenv, fetchFromGitHub, rustPlatform, cmake, libzip, gnupg,
# Darwin
libiconv, CoreFoundation, Security }:
rustPlatform.buildRustPackage rec {
name = "sit-${version}";
version = "0.3.2";
version = "0.4.0";
src = fetchFromGitHub {
owner = "sit-it";
owner = "sit-fyi";
repo = "sit";
rev = "v${version}";
sha256 = "0lhl4rrfmsi76498mg5si2xagl8l2pi5d92dxhsyzszpwn5jdp57";
sha256 = "10ycs6vc7mfzxnxrki09xn974pcwh196h1pfnsds98x6r87hxkpn";
};
buildInputs = [ cmake libzip ];
buildInputs = [ cmake libzip gnupg ] ++
(if stdenv.isDarwin then [ libiconv CoreFoundation Security ] else []);
cargoSha256 = "102haqix13nwcncng1s8qkw68spn6fhh3vysk2nbahw6f78zczqg";
preCheck = ''
export HOME=$(mktemp -d)
'';
patches = [ ./aarch64-isel.patch ];
cargoSha256 = "023anmnprxbsvqww1b1bdyfhbhjh1ah2kc67cdihvdvi4lqdmbia";
meta = with stdenv.lib; {
description = "Serverless Information Tracker";
homepage = https://sit.sh/;
homepage = https://sit.fyi/;
license = with licenses; [ asl20 /* or */ mit ];
maintainers = with maintainers; [ dywedir yrashk ];
platforms = platforms.all;

View File

@ -27,7 +27,7 @@ rec {
patches = [];
});
docker-containerd = containerd.overrideAttrs (oldAttrs: rec {
docker-containerd = (containerd.override { inherit go; }).overrideAttrs (oldAttrs: rec {
name = "docker-containerd";
src = fetchFromGitHub {
owner = "docker";

View File

@ -15,6 +15,7 @@
, xenSupport ? false, xen
, openGLSupport ? sdlSupport, mesa_noglu, epoxy, libdrm
, virglSupport ? openGLSupport, virglrenderer
, smbdSupport ? false, samba
, hostCpuOnly ? false
, nixosTestRunner ? false
}:
@ -63,7 +64,8 @@ stdenv.mkDerivation rec {
++ optionals stdenv.isLinux [ alsaLib libaio libcap_ng libcap attr ]
++ optionals xenSupport [ xen ]
++ optionals openGLSupport [ mesa_noglu epoxy libdrm ]
++ optionals virglSupport [ virglrenderer ];
++ optionals virglSupport [ virglrenderer ]
++ optionals smbdSupport [ samba ];
enableParallelBuilding = true;
@ -100,8 +102,7 @@ stdenv.mkDerivation rec {
'';
configureFlags =
[ "--smbd=smbd" # use `smbd' from $PATH
"--audio-drv-list=${audio}"
[ "--audio-drv-list=${audio}"
"--sysconfdir=/etc"
"--localstatedir=/var"
]
@ -117,7 +118,8 @@ stdenv.mkDerivation rec {
++ optional gtkSupport "--enable-gtk"
++ optional xenSupport "--enable-xen"
++ optional openGLSupport "--enable-opengl"
++ optional virglSupport "--enable-virglrenderer";
++ optional virglSupport "--enable-virglrenderer"
++ optional smbdSupport "--smbd=${samba}/bin/smbd";
doCheck = false; # tries to access /dev

View File

@ -0,0 +1,36 @@
{ stdenv, lib, rustPlatform, fetchFromGitHub, dbus, gdk_pixbuf, libnotify, makeWrapper, pkgconfig, xorg, alsaUtils }:
let
runtimeDeps = [ xorg.xsetroot ]
++ lib.optional (alsaUtils != null) alsaUtils;
in
rustPlatform.buildRustPackage rec {
name = "dwm-status-${version}";
version = "0.4.0";
src = fetchFromGitHub {
owner = "Gerschtli";
repo = "dwm-status";
rev = version;
sha256 = "0nw0iz78mnrmgpc471yjv7yzsaf7346mwjp6hm5kbsdclvrdq9d7";
};
nativeBuildInputs = [ makeWrapper pkgconfig ];
buildInputs = [ dbus gdk_pixbuf libnotify ];
cargoSha256 = "0169k91pb7ipvi0m71cmkppp1klgp5ghampa7x0fxkyrvrf0dvqg";
postInstall = ''
wrapProgram $out/bin/dwm-status \
--prefix "PATH" : "${stdenv.lib.makeBinPath runtimeDeps}"
'';
meta = with stdenv.lib; {
description = "DWM status service which dynamically updates when needed";
homepage = https://github.com/Gerschtli/dwm-status;
license = with licenses; [ mit ];
maintainers = with maintainers; [ gerschtli ];
platforms = platforms.linux;
};
}

View File

@ -9,12 +9,12 @@ assert gestures -> libstroke != null;
stdenv.mkDerivation rec {
pname = "fvwm";
version = "2.6.7";
version = "2.6.8";
name = "${pname}-${version}";
src = fetchurl {
url = "https://github.com/fvwmorg/fvwm/releases/download/${version}/${name}.tar.gz";
sha256 = "01654d5abdcde6dac131cae9befe5cf6f01f9f7524d097c3b0f316e39f84ef73";
sha256 = "0hgkkdzcqjnaabvv9cnh0bz90nnjskbhjg9qnzpi2x0mbliwjdpv";
};
nativeBuildInputs = [ pkgconfig ];

View File

@ -2,20 +2,24 @@ source $stdenv/setup
source $mirrorsFile
curlVersion=$(curl -V | head -1 | cut -d' ' -f2)
# Curl flags to handle redirects, not use EPSV, handle cookies for
# servers to need them during redirects, and work on SSL without a
# certificate (this isn't a security problem because we check the
# cryptographic hash of the output anyway).
curl="curl \
--location --max-redirs 20 \
--retry 3 \
--disable-epsv \
--cookie-jar cookies \
--insecure \
$curlOpts \
$NIX_CURL_FLAGS"
curl=(
curl
--location
--max-redirs 20
--retry 3
--disable-epsv
--cookie-jar cookies
--insecure
--user-agent "curl/$curlVersion Nixpkgs/$nixpkgsVersion"
$curlOpts
$NIX_CURL_FLAGS
)
downloadedFile="$out"
if [ -n "$downloadToTemp" ]; then downloadedFile="$TMPDIR/file"; fi
@ -32,7 +36,7 @@ tryDownload() {
# if we get error code 18, resume partial download
while [ $curlexit -eq 18 ]; do
# keep this inside an if statement, since on failure it doesn't abort the script
if $curl -C - --fail "$url" --output "$downloadedFile"; then
if "${curl[@]}" -C - --fail "$url" --output "$downloadedFile"; then
success=1
break
else
@ -61,7 +65,7 @@ tryHashedMirrors() {
for mirror in $hashedMirrors; do
url="$mirror/$outputHashAlgo/$outputHash"
if $curl --retry 0 --connect-timeout "${NIX_CONNECT_TIMEOUT:-15}" \
if "${curl[@]}" --retry 0 --connect-timeout "${NIX_CONNECT_TIMEOUT:-15}" \
--fail --silent --show-error --head "$url" \
--write-out "%{http_code}" --output /dev/null > code 2> log; then
tryDownload "$url"

View File

@ -92,7 +92,6 @@ in
assert sha512 != "" -> builtins.compareVersions "1.11" builtins.nixVersion <= 0;
let
urls_ =
if urls != [] && url == "" then
(if lib.isList urls then urls
@ -107,7 +106,6 @@ let
else if sha256 != "" then { outputHashAlgo = "sha256"; outputHash = sha256; }
else if sha1 != "" then { outputHashAlgo = "sha1"; outputHash = sha1; }
else throw "fetchurl requires a hash for fixed-output derivation: ${lib.concatStringsSep ", " urls_}";
in
stdenvNoCC.mkDerivation {
@ -135,6 +133,8 @@ stdenvNoCC.mkDerivation {
impureEnvVars = impureEnvVars ++ netrcImpureEnvVars;
nixpkgsVersion = lib.trivial.release;
# Doing the download on a remote machine just duplicates network
# traffic, so don't do that.
preferLocalBuild = true;

View File

@ -405,4 +405,12 @@ rec {
http://repo1.maven.org/maven2/
http://central.maven.org/maven2/
];
# Alsa Project
alsa = [
ftp://ftp.alsa-project.org/pub/
http://alsa.cybermirror.org/
http://www.mirrorservice.org/sites/ftp.alsa-project.org/pub/
http://alsa.mirror.fr/
];
}

View File

@ -0,0 +1,22 @@
# Clear dependency_libs in libtool files for shared libraries.
# Shared libraries already encode their dependencies with locations. .la
# files do not always encode those locations, and sometimes encode the
# locations in the wrong Nix output. .la files are not needed for shared
# libraries, but without dependency_libs they do not hurt either.
fixupOutputHooks+=(_pruneLibtoolFiles)
_pruneLibtoolFiles() {
if [ "$dontPruneLibtoolFiles" ]; then
return
fi
# Libtool uses "dlname" and "library_names" fields for shared libraries and
# the "old_library" field for static libraries. We are processing only
# those .la files that do not describe static libraries.
find "$prefix" -type f -name '*.la' \
-exec grep -q '^# Generated by libtool' {} \; \
-exec grep -q "^old_library=''" {} \; \
-exec sed -i {} -e "/^dependency_libs='[^']/ c dependency_libs='' #pruned" \;
}

View File

@ -14,16 +14,6 @@ rec {
qemu = pkgs.qemu_kvm;
qemu-220 = lib.overrideDerivation pkgs.qemu_kvm (attrs: rec {
version = "2.2.0";
src = fetchurl {
url = "http://wiki.qemu.org/download/qemu-${version}.tar.bz2";
sha256 = "1703c3scl5n07gmpilg7g2xzyxnr7jczxgx6nn4m8kv9gin9p35n";
};
patches = [ ../../../nixos/modules/virtualisation/azure-qemu-220-no-etc-install.patch ];
});
modulesClosure = makeModulesClosure {
inherit kernel rootModules;
firmware = kernel;

View File

@ -3,17 +3,17 @@
fetchzip {
name = "fira-mono-3.206";
url = http://www.carrois.com/downloads/fira_mono_3_2/FiraMonoFonts3206.zip;
url = https://github.com/mozilla/Fira/archive/4.106.zip;
postFetch = ''
mkdir -p $out/share/fonts
unzip -j $downloadedFile \*.otf -d $out/share/fonts/opentype
unzip -j $downloadedFile Fira-4.106/otf/FiraMono\*.otf -d $out/share/fonts/opentype
'';
sha256 = "0m4kdjh4xjyznybpgh21a0gibv4wsxq0rqyl3wv942zk6mclmgdf";
sha256 = "1ci3fxhdwabvfj4nl16pwcgqnh7s2slp8vblribk8zkpx8cbp1dj";
meta = with stdenv.lib; {
homepage = http://www.carrois.com/fira-4-1/;
homepage = https://mozilla.github.io/Fira/;
description = "Monospace font for Firefox OS";
longDescription = ''
Fira Mono is a monospace font designed by Erik Spiekermann,

View File

@ -3,17 +3,17 @@
fetchzip rec {
name = "fira-4.106";
url = http://www.carrois.com/downloads/fira_4_1/FiraFonts4106.zip;
url = https://github.com/mozilla/Fira/archive/4.106.zip;
postFetch = ''
mkdir -p $out/share/fonts
unzip -j $downloadedFile \*.otf -d $out/share/fonts/opentype
unzip -j $downloadedFile Fira-4.106/otf/FiraSans\*.otf -d $out/share/fonts/opentype
'';
sha256 = "174nwmpvxqg1qjfj6h3yvrphs1s3n6zricdh27iaxilajm0ilbgs";
sha256 = "0c97nmihcq0ki7ywj8zn048a2bgrszc61lb9p0djfi65ar52jab4";
meta = with stdenv.lib; {
homepage = http://www.carrois.com/fira-4-1/;
homepage = https://mozilla.github.io/Fira/;
description = "Sans-serif font for Firefox OS";
longDescription = ''
Fira Sans is a sans-serif font designed by Erik Spiekermann,

View File

@ -14,7 +14,7 @@ stdenv.mkDerivation rec {
buildInputs = [ zlib jdk ]
++ stdenv.lib.optionals stdenv.isDarwin [ CoreServices Foundation ];
NIX_CFLAGS_COMPILE = stdenv.lib.optionalString stdenv.cc.isClang "-Wno-error";
NIX_CFLAGS_COMPILE = "-Wno-error";
postPatch = ''
substituteInPlace makefile \

View File

@ -16,7 +16,7 @@
, # If enabled, GHC will be built with the GPL-free but slower integer-simple
# library instead of the faster but GPLed integer-gmp library.
enableIntegerSimple ? false, gmp ? null
enableIntegerSimple ? !(gmp.meta.available or false), gmp
, # If enabled, use -fPIC when compiling static libs.
enableRelocatedStaticLibs ? targetPlatform != hostPlatform
@ -30,8 +30,6 @@
ghcFlavour ? stdenv.lib.optionalString (targetPlatform != hostPlatform) "perf-cross"
}:
assert !enableIntegerSimple -> gmp != null;
let
inherit (bootPkgs) ghc;

View File

@ -15,7 +15,7 @@
, # If enabled, GHC will be built with the GPL-free but slower integer-simple
# library instead of the faster but GPLed integer-gmp library.
enableIntegerSimple ? false, gmp ? null
enableIntegerSimple ? !(gmp.meta.available or false), gmp
, # If enabled, use -fPIC when compiling static libs.
enableRelocatedStaticLibs ? targetPlatform != hostPlatform
@ -29,8 +29,6 @@
ghcFlavour ? stdenv.lib.optionalString (targetPlatform != hostPlatform) "perf-cross"
}:
assert !enableIntegerSimple -> gmp != null;
let
inherit (bootPkgs) ghc;

View File

@ -16,7 +16,7 @@
, # If enabled, GHC will be built with the GPL-free but slower integer-simple
# library instead of the faster but GPLed integer-gmp library.
enableIntegerSimple ? false, gmp ? null
enableIntegerSimple ? !(gmp.meta.available or false), gmp
, # If enabled, use -fPIC when compiling static libs.
enableRelocatedStaticLibs ? targetPlatform != hostPlatform
@ -34,8 +34,6 @@
deterministicProfiling ? false
}:
assert !enableIntegerSimple -> gmp != null;
let
inherit (bootPkgs) ghc;

View File

@ -15,7 +15,7 @@
, # If enabled, GHC will be built with the GPL-free but slower integer-simple
# library instead of the faster but GPLed integer-gmp library.
enableIntegerSimple ? false, gmp ? null
enableIntegerSimple ? !(gmp.meta.available or false), gmp
, # If enabled, use -fPIC when compiling static libs.
enableRelocatedStaticLibs ? targetPlatform != hostPlatform
@ -32,8 +32,6 @@
ghcFlavour ? stdenv.lib.optionalString (targetPlatform != hostPlatform) "perf-cross"
}:
assert !enableIntegerSimple -> gmp != null;
let
inherit (bootPkgs) ghc;

View File

@ -15,7 +15,7 @@
, # If enabled, GHC will be built with the GPL-free but slower integer-simple
# library instead of the faster but GPLed integer-gmp library.
enableIntegerSimple ? false, gmp ? null
enableIntegerSimple ? !(gmp.meta.available or false), gmp
, # If enabled, use -fPIC when compiling static libs.
enableRelocatedStaticLibs ? targetPlatform != hostPlatform
@ -33,8 +33,6 @@
ghcFlavour ? stdenv.lib.optionalString (targetPlatform != hostPlatform) "perf-cross"
}:
assert !enableIntegerSimple -> gmp != null;
let
inherit (bootPkgs) ghc;

View File

@ -8,12 +8,22 @@
* jssecacerts
* cacerts
*/
@@ -144,6 +145,9 @@
@@ -132,7 +133,8 @@
public TrustStoreDescriptor run() {
// Get the system properties for trust store.
String storePropName = System.getProperty(
- "javax.net.ssl.trustStore", jsseDefaultStore);
+ "javax.net.ssl.trustStore",
+ System.getenv("JAVAX_NET_SSL_TRUSTSTORE"));
String storePropType = System.getProperty(
"javax.net.ssl.trustStoreType",
KeyStore.getDefaultType());
@@ -144,6 +146,9 @@
String temporaryName = "";
File temporaryFile = null;
long temporaryTime = 0L;
+ if (storePropName == null) {
+ storePropName = System.getenv("JAVAX_NET_SSL_TRUSTSTORE");
+ storePropName = jsseDefaultStore;
+ }
if (!"NONE".equals(storePropName)) {
String[] fileNames =

View File

@ -3,13 +3,13 @@
stdenv.mkDerivation ( rec {
name = "ponyc-${version}";
version = "0.22.6";
version = "0.23.0";
src = fetchFromGitHub {
owner = "ponylang";
repo = "ponyc";
rev = version;
sha256 = "05y0qcfdyzv6cgizhbg6yl7rrlbfbkcr0jmxjlzhvhz7dypk20cl";
sha256 = "1m0zvl30926652akyzpvy5m7jn35697d5mkg3xbn3yqwbsfk4yhk";
};
buildInputs = [ llvm makeWrapper which ];

View File

@ -1,16 +1,15 @@
{ stdenv, fetchzip, fetchFromGitHub, boost, cmake, z3 }:
let
version = "0.4.23";
rev = "124ca40dc525a987a88176c6e5170978e82fa290";
sha256 = "07l8rfqh95yrdmbxc4pfb77s06k5v65dk3rgdqscqmwchkndrmm0";
jsoncppURL = https://github.com/open-source-parsers/jsoncpp/archive/1.7.7.tar.gz;
version = "0.4.24";
rev = "e67f0147998a9e3835ed3ce8bf6a0a0c634216c5";
sha256 = "1gy2miv6ia1z98zy6w4y03balwfr964bnvwzyg8v7pn2mayqnaap";
jsoncppURL = https://github.com/open-source-parsers/jsoncpp/archive/1.8.4.tar.gz;
jsoncpp = fetchzip {
url = jsoncppURL;
sha256 = "0jz93zv17ir7lbxb3dv8ph2n916rajs8i96immwx9vb45pqid3n0";
sha256 = "1z0gj7a6jypkijmpknis04qybs1hkd04d1arr3gy89lnxmp6qzlm";
};
in
stdenv.mkDerivation {
name = "solc-${version}";
@ -21,7 +20,6 @@ stdenv.mkDerivation {
};
patches = [
./patches/boost-shared-libs.patch
./patches/shared-libs-install.patch
];
@ -30,17 +28,23 @@ stdenv.mkDerivation {
echo >commit_hash.txt "${rev}"
substituteInPlace cmake/jsoncpp.cmake \
--replace "${jsoncppURL}" ${jsoncpp}
substituteInPlace cmake/EthCompilerSettings.cmake \
--replace "add_compile_options(-Werror)" ""
# To allow non-standard CMAKE_INSTALL_LIBDIR (fixed in upstream, not yet released)
substituteInPlace cmake/jsoncpp.cmake \
--replace "\''${CMAKE_INSTALL_LIBDIR}" "lib" \
--replace "# Build static lib but suitable to be included in a shared lib." "-DCMAKE_INSTALL_LIBDIR=lib"
'';
cmakeFlags = [
"-DBoost_USE_STATIC_LIBS=OFF"
"-DBUILD_SHARED_LIBS=ON"
"-DINSTALL_LLLC=ON"
"-DTESTS=OFF"
];
doCheck = stdenv.hostPlatform.isLinux && stdenv.hostPlatform == stdenv.buildPlatform;
checkPhase = "LD_LIBRARY_PATH=./libsolc:./libsolidity:./liblll:./libevmasm:./libdevcore:$LD_LIBRARY_PATH " +
"./test/soltest -p -- --no-ipc --no-smt --testpath ../test";
nativeBuildInputs = [ cmake ];
buildInputs = [ boost z3 ];

View File

@ -1,24 +0,0 @@
diff --git a/libsolidity/CMakeLists.txt b/libsolidity/CMakeLists.txt
index 97b01c83..0bdec4b4 100644
--- a/libsolidity/CMakeLists.txt
+++ b/libsolidity/CMakeLists.txt
@@ -28,7 +28,7 @@ else()
endif()
add_library(solidity ${sources} ${headers})
-target_link_libraries(solidity PUBLIC evmasm devcore)
+target_link_libraries(solidity PUBLIC evmasm devcore ${Boost_FILESYSTEM_LIBRARY} ${Boost_SYSTEM_LIBRARY})
if (${Z3_FOUND})
target_link_libraries(solidity PUBLIC ${Z3_LIBRARY})
diff --git a/lllc/CMakeLists.txt b/lllc/CMakeLists.txt
index 5c480093..d6538ee2 100644
--- a/lllc/CMakeLists.txt
+++ b/lllc/CMakeLists.txt
@@ -1,5 +1,5 @@
add_executable(lllc main.cpp)
-target_link_libraries(lllc PRIVATE lll)
+target_link_libraries(lllc PRIVATE lll ${Boost_SYSTEM_LIBRARY})
if (INSTALL_LLLC)
include(GNUInstallDirs)

View File

@ -1,11 +1,12 @@
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 4ac56b43..dacf3853 100644
index 0c05208f..8893648e 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -48,6 +48,19 @@ add_subdirectory(libevmasm)
@@ -48,6 +48,20 @@ add_subdirectory(libevmasm)
add_subdirectory(libsolidity)
add_subdirectory(libsolc)
+
+install(DIRECTORY libdevcore/
+ DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/libdevcore
+ FILES_MATCHING PATTERN "*.h")
@ -38,7 +39,7 @@ index 86192c1b..e7f15e93 100644
@@ -3,3 +3,4 @@ file(GLOB headers "*.h")
add_library(evmasm ${sources} ${headers})
target_link_libraries(evmasm PUBLIC jsoncpp devcore)
target_link_libraries(evmasm PUBLIC devcore)
+install(TARGETS evmasm LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR})
diff --git a/liblll/CMakeLists.txt b/liblll/CMakeLists.txt
index 4cdc073a..b61f03c7 100644
@ -50,11 +51,10 @@ index 4cdc073a..b61f03c7 100644
target_link_libraries(lll PUBLIC evmasm devcore)
+install(TARGETS lll LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR})
diff --git a/libsolidity/CMakeLists.txt b/libsolidity/CMakeLists.txt
index 97b01c83..e876177e 100644
index 0bdec4b4..e876177e 100644
--- a/libsolidity/CMakeLists.txt
+++ b/libsolidity/CMakeLists.txt
@@ -28,7 +28,8 @@ else()
endif()
@@ -29,6 +29,7 @@ endif()
add_library(solidity ${sources} ${headers})
target_link_libraries(solidity PUBLIC evmasm devcore ${Boost_FILESYSTEM_LIBRARY} ${Boost_SYSTEM_LIBRARY})

View File

@ -348,7 +348,7 @@ self: super: {
itanium-abi = dontCheck super.itanium-abi;
katt = dontCheck super.katt;
language-slice = dontCheck super.language-slice;
language-nix = overrideCabal super.language-nix (drv: { broken = pkgs.stdenv.isLinux && pkgs.stdenv.isi686; }); # Tests crash on 32-bit linux; see https://github.com/peti/language-nix/issues/4
language-nix = if pkgs.stdenv.isi686 then dontCheck super.language-nix else super.language-nix;
ldap-client = dontCheck super.ldap-client;
lensref = dontCheck super.lensref;
lucid = dontCheck super.lucid; #https://github.com/chrisdone/lucid/issues/25

View File

@ -23,13 +23,6 @@ self: super:
};
in stage1 // stage2 // {
old-time = overrideCabal stage2.old-time (drv: {
postPatch = ''
${pkgs.autoconf}/bin/autoreconf --install --force --verbose
'';
buildTools = pkgs.lib.optional pkgs.stdenv.isDarwin pkgs.darwin.libiconv;
});
network = addBuildTools super.network (pkgs.lib.optional pkgs.stdenv.isDarwin pkgs.darwin.libiconv);
zlib = addBuildTools super.zlib (pkgs.lib.optional pkgs.stdenv.isDarwin pkgs.darwin.libiconv);
unix-compat = addBuildTools super.unix-compat (pkgs.lib.optional pkgs.stdenv.isDarwin pkgs.darwin.libiconv);
@ -201,4 +194,7 @@ self: super:
# triggers an internal pattern match failure in haddock
# https://github.com/haskell/haddock/issues/553
wai = dontHaddock super.wai;
base-orphans = dontCheck super.base-orphans;
distributive = dontCheck super.distributive;
}

View File

@ -1,4 +1,4 @@
{ stdenv, fetchgit, makeWrapper, ant, jdk, openjdk8, zulu8, git, xorg, udev }:
{ stdenv, fetchgit, makeWrapper, ant, jdk, openjdk8, zulu8, git, xorg, udev, libGL, libGLU }:
let
# workaround https://github.com/NixOS/nixpkgs/issues/37364
@ -19,12 +19,18 @@ in
name = "jogl-${version}";
src = fetchgit {
url = http://jogamp.org/srv/scm/jogl.git;
url = git://jogamp.org/srv/scm/jogl.git;
rev = "v${version}";
sha256 = "0msi2gxiqm2yqwkmxqbh521xdrimw1fly20g890r357rcgj8fsn3";
fetchSubmodules = true;
};
postPatch = ''
find . -type f -name '*.java' \
-exec sed -i 's@"libGL.so"@"${libGL}/lib/libGL.so"@' {} \; \
-exec sed -i 's@"libGLU.so"@"${libGLU}/lib/libGLU.so"@' {} \;
'';
buildInputs = [ jdk-without-symlinks ant git udev xorg.libX11 xorg.libXrandr xorg.libXcursor xorg.libXt xorg.libXxf86vm xorg.libXrender ];
buildPhase = ''

View File

@ -4,7 +4,7 @@
, libuuid, json-glib, meson, gperf, ninja
}:
stdenv.mkDerivation rec {
name = "appstream-glib-0.7.8";
name = "appstream-glib-0.7.9";
outputs = [ "out" "dev" "man" "installedTests" ];
outputBin = "dev";
@ -13,7 +13,7 @@ stdenv.mkDerivation rec {
owner = "hughsie";
repo = "appstream-glib";
rev = stdenv.lib.replaceStrings ["." "-"] ["_" "_"] name;
sha256 = "10hcl3sl3g8ajg9mssq3g4dbzz0d4b2ybimrcq71cpycqrqhilhx";
sha256 = "10b32qw7iy0v1jvmf18wqgs8d1cpy52zm5rzw0wv421n90qiyidk";
};
nativeBuildInputs = [

View File

@ -0,0 +1,6 @@
{callPackage, ... } @ args:
callPackage ./generic.nix (args // {
version = "1.10.8";
sha256 = "0jgdl4fxw0hwy768rl3lhdc0czz7ak7czf3dg10j21pdpfpfvpi6";
})

View File

@ -0,0 +1,6 @@
{callPackage, ... } @ args:
callPackage ./generic.nix (args // {
version = "1.12.1";
sha256 = "0nln45662kg799ykvqx5m9z9qcsmadmgg6r5najryls7x16in2d9";
})

View File

@ -1,21 +0,0 @@
{stdenv, fetchurl, boost, openssl}:
stdenv.mkDerivation rec {
name = "asio-1.12.1";
src = fetchurl {
url = "mirror://sourceforge/asio/${name}.tar.bz2";
sha256 = "0nln45662kg799ykvqx5m9z9qcsmadmgg6r5najryls7x16in2d9";
};
propagatedBuildInputs = [ boost ];
buildInputs = [ openssl ];
meta = {
homepage = http://asio.sourceforge.net/;
description = "Cross-platform C++ library for network and low-level I/O programming";
license = stdenv.lib.licenses.boost;
platforms = stdenv.lib.platforms.unix;
};
}

View File

@ -0,0 +1,25 @@
{stdenv, fetchurl, boost, openssl
, version, sha256, ...
}:
with stdenv.lib;
stdenv.mkDerivation {
name = "asio-${version}";
src = fetchurl {
url = "mirror://sourceforge/asio/asio-${version}.tar.bz2";
inherit sha256;
};
propagatedBuildInputs = [ boost ];
buildInputs = [ openssl ];
meta = {
homepage = http://asio.sourceforge.net/;
description = "Cross-platform C++ library for network and low-level I/O programming";
license = licenses.boost;
platforms = platforms.unix;
};
}

View File

@ -11,7 +11,7 @@ let
x86_64-linux = "x64/libbass.so";
};
urlpath = "bass${version}-linux.zip";
sha256 = "1a2z9isabkymz7qmkgklbjpj2wxkvv1cngfp9aj0c9178v97pjd7";
sha256 = "0alxx7knkvzwwifqrmzavafwq53flja7s1ckaabk6p2ir2f0j5cp";
};
bass_fx = {

View File

@ -0,0 +1,27 @@
{ stdenv, fetchFromGitHub }:
stdenv.mkDerivation rec {
name = "cctz-${version}";
version = "2.2";
src = fetchFromGitHub {
owner = "google";
repo = "cctz";
rev = "v${version}";
sha256 = "0liiqz1swfc019rzfaa9y5kavs2hwabs2vnwbn9jfczhyxy34y89";
};
makeFlags = [ "PREFIX=$(out)" ];
installTargets = [ "install_hdrs" "install_shared_lib" ];
enableParallelBuilding = true;
meta = with stdenv.lib; {
homepage = https://github.com/google/cctz;
description = "C++ library for translating between absolute and civil times";
license = licenses.asl20;
maintainers = with maintainers; [ orivej ];
platforms = platforms.all;
};
}

View File

@ -13,7 +13,10 @@ stdenv.mkDerivation rec {
name = "fftw-${precision}-${version}";
src = fetchurl {
url = "ftp://ftp.fftw.org/pub/fftw/fftw-${version}.tar.gz";
urls = [
"http://fftw.org/fftw-${version}.tar.gz"
"ftp://ftp.fftw.org/pub/fftw/fftw-${version}.tar.gz"
];
sha256 = "00z3k8fq561wq2khssqg0kallk0504dzlx989x3vvicjdqpjc4v1";
};

View File

@ -75,6 +75,7 @@ let self = stdenv.mkDerivation rec {
asymptotically faster algorithms.
'';
broken = with stdenv.hostPlatform; useAndroidPrebuilt || useiOSPrebuilt;
platforms = platforms.all;
maintainers = [ maintainers.peti maintainers.vrthra ];
};

View File

@ -0,0 +1,39 @@
{ stdenv, fetchFromGitHub, autoreconfHook, pkgconfig, gtk-doc, libxslt, docbook_xsl
, docbook_xml_dtd_43, python3, gobjectIntrospection, glib, libudev, kmod, parted
, cryptsetup, devicemapper, dmraid, utillinux, libbytesize, libndctl, nss, volume_key
}:
let
version = "2.17";
in stdenv.mkDerivation rec {
name = "libblockdev-${version}";
src = fetchFromGitHub {
owner = "storaged-project";
repo = "libblockdev";
rev = "${version}-1";
sha256 = "14f52cj2qcnm8i2zb57qfpdk3kij2gb3xgqkbvidmf6sjicq84z2";
};
outputs = [ "out" "dev" "devdoc" ];
postPatch = ''
patchShebangs scripts
'';
nativeBuildInputs = [
autoreconfHook pkgconfig gtk-doc libxslt docbook_xsl docbook_xml_dtd_43 python3 gobjectIntrospection
];
buildInputs = [
glib libudev kmod parted cryptsetup devicemapper dmraid utillinux libbytesize libndctl nss volume_key
];
meta = with stdenv.lib; {
description = "A library for manipulating block devices";
homepage = http://storaged.org/libblockdev/;
license = licenses.lgpl2Plus; # lgpl2Plus for the library, gpl2Plus for the utils
maintainers = with maintainers; [];
platforms = platforms.linux;
};
}

View File

@ -0,0 +1,31 @@
{ stdenv, fetchFromGitHub, autoreconfHook, pkgconfig, gettext
, gtk-doc, libxslt, docbook_xml_dtd_43, docbook_xsl
, python3, pcre, gmp, mpfr
}:
let
version = "1.3";
in stdenv.mkDerivation rec {
name = "libbytesize-${version}";
src = fetchFromGitHub {
owner = "storaged-project";
repo = "libbytesize";
rev = version;
sha256 = "1ys5d8rya8x4q34gn1hr96z7797s9gdzah0y0d7g84x5x6k50p30";
};
outputs = [ "out" "dev" "devdoc" ];
nativeBuildInputs = [ autoreconfHook pkgconfig gettext gtk-doc libxslt docbook_xml_dtd_43 docbook_xsl python3 ];
buildInputs = [ pcre gmp mpfr ];
meta = with stdenv.lib; {
description = "A tiny library providing a C class for working with arbitrary big sizes in bytes";
homepage = src.meta.homepage;
license = licenses.lgpl2Plus;
maintainers = with maintainers; [];
platforms = platforms.linux;
};
}

View File

@ -1,5 +1,7 @@
{ stdenv, fetchurl, pkgconfig, libtool, gtk ? null, libcap
, alsaLib, libpulseaudio, gst_all_1, libvorbis }:
{ stdenv, lib, fetchurl, fetchpatch, pkgconfig, libtool
, gtk ? null
, libpulseaudio, gst_all_1, libvorbis, libcap
, withAlsa ? stdenv.isLinux, alsaLib }:
stdenv.mkDerivation rec {
name = "libcanberra-0.30";
@ -11,11 +13,20 @@ stdenv.mkDerivation rec {
nativeBuildInputs = [ pkgconfig libtool ];
buildInputs = [
alsaLib libpulseaudio libvorbis gtk libcap
] ++ (with gst_all_1; [ gstreamer gst-plugins-base ]);
libpulseaudio libvorbis gtk
] ++ (with gst_all_1; [ gstreamer gst-plugins-base ])
++ lib.optional stdenv.isLinux libcap
++ lib.optional withAlsa alsaLib;
configureFlags = "--disable-oss";
patchFlags = "-p0";
patches = stdenv.lib.optional stdenv.isDarwin
(fetchpatch {
url = "https://raw.githubusercontent.com/macports/macports-ports/master/audio/libcanberra/files/patch-configure.diff";
sha256 = "1f7h7ifpqvbfhqygn1b7klvwi80zmpv3538vbmq7ql7bkf1q8h31";
});
postInstall = ''
for f in $out/lib/*.la; do
sed 's|-lltdl|-L${libtool.lib}/lib -lltdl|' -i $f
@ -42,6 +53,6 @@ stdenv.mkDerivation rec {
license = stdenv.lib.licenses.lgpl2Plus;
maintainers = [ ];
platforms = stdenv.lib.platforms.gnu ++ stdenv.lib.platforms.linux; # arbitrary choice
platforms = stdenv.lib.platforms.unix;
};
}

View File

@ -16,7 +16,7 @@ stdenv.mkDerivation rec {
nativeBuildInputs = [ cmake pkgconfig ];
buildInputs = [ libevent openssl ];
doCheck = true;
doCheck = (!stdenv.isDarwin);
checkPhase = "ctest";
meta = with stdenv.lib; {

View File

@ -1,4 +1,4 @@
{ stdenv, fetchurl, glib, pkgconfig, perl, gettext, gobjectIntrospection, libintl, gnome3 }:
{ stdenv, fetchurl, fetchpatch, glib, pkgconfig, perl, gettext, gobjectIntrospection, libintl, libtool, gnome3, gtk-doc }:
let
pname = "libgtop";
version = "2.38.0";
@ -11,8 +11,20 @@ stdenv.mkDerivation rec {
sha256 = "04mnxgzyb26wqk6qij4iw8cxwl82r8pcsna5dg8vz2j3pdi0wv2g";
};
patches = [
# Fix darwin build
(fetchpatch {
url = https://gitlab.gnome.org/GNOME/libgtop/commit/42b049f338363f92c1e93b4549fc944098eae674.patch;
sha256 = "0kf9ihgb0wqji6dcvg36s6igkh7b79k6y1n7w7wzsxya84x3hhyn";
})
];
propagatedBuildInputs = [ glib ];
nativeBuildInputs = [ pkgconfig perl gettext gobjectIntrospection ];
nativeBuildInputs = [ pkgconfig gnome3.gnome-common libtool gtk-doc perl gettext gobjectIntrospection ];
preConfigure = ''
./autogen.sh
'';
passthru = {
updateScript = gnome3.updateScript {
@ -24,6 +36,6 @@ stdenv.mkDerivation rec {
description = "A library that reads information about processes and the running system";
license = licenses.gpl2Plus;
maintainers = gnome3.maintainers;
platforms = with platforms; linux ++ darwin;
platforms = platforms.unix;
};
}

View File

@ -0,0 +1,40 @@
{ stdenv, fetchFromGitHub, autoreconfHook, autoconf, automake, asciidoc, docbook_xsl, docbook_xml_dtd_45, libxslt, xmlto, pkgconfig, json_c, kmod, which, systemd, utillinux
}:
let
version = "60.3";
in stdenv.mkDerivation rec {
name = "libndctl-${version}";
src = fetchFromGitHub {
owner = "pmem";
repo = "ndctl";
rev = "v${version}";
sha256 = "0w19yh6f9skf5zy4bhdjlrn3wdx5xx9cq8j6h04cmw4nla6zj9ar";
};
outputs = [ "out" "man" "dev" ];
nativeBuildInputs = [
autoreconfHook asciidoc pkgconfig xmlto docbook_xml_dtd_45 docbook_xsl libxslt
];
buildInputs = [
json_c kmod systemd utillinux
];
preAutoreconf = ''
substituteInPlace configure.ac --replace "which" "${which}/bin/which"
substituteInPlace git-version --replace /bin/bash ${stdenv.shell}
substituteInPlace git-version-gen --replace /bin/sh ${stdenv.shell}
echo "m4_define([GIT_VERSION], [${version}])" > version.m4;
'';
meta = with stdenv.lib; {
description = "Utility library for managing the libnvdimm (non-volatile memory device) sub-system in the Linux kernel";
homepage = https://github.com/pmem/ndctl;
license = licenses.lgpl21;
maintainers = with maintainers; [];
platforms = platforms.linux;
};
}

View File

@ -13,12 +13,12 @@ stdenv.mkDerivation rec {
prePatch = let
debian = fetchurl {
url = http://snapshot.debian.org/archive/debian-debug/20180128T155203Z//pool/main/t/tiff/tiff_4.0.9-3.debian.tar.xz;
sha256 = "0wya42y7kcq093g3h7ca10cm5sns1mgnkjmdd2qdi59v8arga4y4";
url = http://http.debian.net/debian/pool/main/t/tiff/tiff_4.0.9-5.debian.tar.xz;
sha256 = "15lwcsd46gini27akms2ngyxnwi1hs2yskrv5x2wazs5fw5ii62w";
};
in ''
tar xf '${debian}'
patches="$patches $(cat debian/patches/series | sed 's|^|debian/patches/|')"
tar xf ${debian}
patches="$patches $(sed 's|^|debian/patches/|' < debian/patches/series)"
'';
outputs = [ "bin" "dev" "out" "man" "doc" ];

View File

@ -0,0 +1,44 @@
{ stdenv, fetchFromGitHub, cmake
, libuuid, json_c
, doxygen, perl, python2, python2Packages
}:
stdenv.mkDerivation rec {
name = "opae-${version}";
version = "1.0.0";
# the tag has a silly name for some reason. drop this in the future if
# possible
tver = "${version}-5";
src = fetchFromGitHub {
owner = "opae";
repo = "opae-sdk";
rev = "refs/tags/${tver}";
sha256 = "1dmkpnr9dqxwjhbdzx2r3fdfylvinda421yyg319am5gzlysxwi8";
};
doCheck = false;
nativeBuildInputs = [ cmake doxygen perl python2Packages.sphinx ];
buildInputs = [ libuuid json_c python2 ];
# Set the Epoch to 1980; otherwise the Python wheel/zip code
# gets very angry
preConfigure = ''
find . -type f | while read file; do
touch -d @315532800 $file;
done
'';
cmakeFlags = [ "-DBUILD_ASE=1" ];
enableParallelBuilding = true;
meta = with stdenv.lib; {
description = "Open Programmable Acceleration Engine SDK";
homepage = https://01.org/opae;
license = licenses.bsd3;
platforms = [ "x86_64-linux" ];
maintainers = with maintainers; [ thoughtpolice ];
};
}

View File

@ -19,6 +19,8 @@ in stdenv.mkDerivation rec {
buildInputs = [ systemd ];
hardeningDisable = [ "format" ];
enableParallelBuilding = true;
installPhase = ''

View File

@ -2,13 +2,13 @@
stdenv.mkDerivation rec {
name = "libupnp-${version}";
version = "1.6.21";
version = "1.8.3";
src = fetchFromGitHub {
owner = "mrjimenez";
repo = "pupnp";
rev = "release-${version}";
sha256 = "07ksfhadinaa20542gblrxi9pqz0v6y70a836hp3qr4037id4nm9";
sha256 = "1w0kfq1pg3y2wl6gwkm1w872g0qz29w1z9wj08xxmwnk5mkpvsrl";
};
nativeBuildInputs = [ autoreconfHook ];

View File

@ -3,11 +3,11 @@
}:
stdenv.mkDerivation rec {
name = "talloc-2.1.12";
name = "talloc-2.1.13";
src = fetchurl {
url = "mirror://samba/talloc/${name}.tar.gz";
sha256 = "0jv0ri9vj93fczzgl7rn7xvnfgl2kfx4x85cr8h8v52yh7v0qz4q";
sha256 = "0iv09iv385x69gfzvassq6m3y0rd8ncylls95dm015xdy3drkww4";
};
nativeBuildInputs = [ pkgconfig ];

View File

@ -0,0 +1,38 @@
{ stdenv, fetchgit, fetchpatch, autoreconfHook, pkgconfig, gettext, python2
, swig, glib, utillinux, cryptsetup, nss, gpgme
}:
let
version = "0.3.10";
in stdenv.mkDerivation rec {
name = "volume_key-${version}";
src = fetchgit {
url = https://pagure.io/volume_key.git;
rev = "ece1ce305234da454e330905c615ec474d9781c5";
sha256 = "16qdi5s6ycsh0iyc362gly7ggrwamky8i0zgbd4ajp3ymk9vqdva";
};
outputs = [ "out" "man" "dev" ];
nativeBuildInputs = [ autoreconfHook pkgconfig gettext python2 swig ];
buildInputs = [ glib cryptsetup nss utillinux gpgme ];
patches = [
# Use pkg-config for locating Python.h
# https://pagure.io/volume_key/pull-request/12
(fetchpatch {
url = https://pagure.io/fork/cathay4t/volume_key/c/8eda66d3b734ea335e37cf9d7d173b9e8ebe2fd9.patch;
sha256 = "01lr1zijk0imkk681zynm4w5ad3y6c9vdrmrzaib7w7ima75iczr";
})
];
meta = with stdenv.lib; {
description = "A library for manipulating storage volume encryption keys and storing them separately from volumes to handle forgotten passphrases, and the associated command-line tool";
homepage = https://pagure.io/volume_key/;
license = licenses.gpl2;
maintainers = with maintainers; [];
platforms = platforms.linux;
};
}

View File

@ -1,4 +1,4 @@
{ lib, buildPythonPackage, fetchPypi, gitdb2, mock, nose, ddt }:
{ lib, buildPythonPackage, fetchPypi, git, gitdb2, mock, nose, ddt }:
buildPythonPackage rec {
version = "2.1.9";
@ -12,6 +12,10 @@ buildPythonPackage rec {
checkInputs = [ mock nose ddt ];
propagatedBuildInputs = [ gitdb2 ];
postPatch = ''
sed -i "s|^refresh()$|refresh(path='${git}/bin/git')|" git/__init__.py
'';
# Tests require a git repo
doCheck = false;

View File

@ -0,0 +1,24 @@
{ stdenv, buildPythonPackage, fetchFromGitHub, pytest }:
buildPythonPackage rec {
pname = "ansiconv";
version = "1.0.0";
src = fetchFromGitHub {
owner = "ansible";
repo = pname;
rev = "v${version}";
sha256 = "0ljfpl8x069arzginvpi1v6hlaq4x2qpjqj01qds2ylz33scq8r4";
};
checkInputs = [ pytest ];
meta = with stdenv.lib; {
description = "A module for converting ANSI coded text and converts it to either plain text or HTML";
homepage = https://github.com/ansible/ansiconv;
license = licenses.mit;
maintainers = with maintainers; [ psyanticy ];
};
}

View File

@ -0,0 +1,17 @@
{ stdenv, fetchPypi, buildPythonPackage, six }:
buildPythonPackage rec {
pname = "astunparse";
version = "1.5.0";
src = fetchPypi {
inherit pname version;
sha256 = "1kc9lm2jvfcip3z8snj04dar5a9jh857a704m6lvcv4xclm3rpsm";
};
propagatedBuildInputs = [ six ];
doCheck = false; # no tests
meta = with stdenv.lib; {
description = "This is a factored out version of unparse found in the Python source distribution";
license = licenses.bsd3;
maintainers = with maintainers; [ jyp ];
};
}

View File

@ -0,0 +1,38 @@
{ lib
, buildPythonPackage
, fetchPypi
, isPy3k
, boto3
, enum34
, jsonschema
, six
}:
buildPythonPackage rec {
pname = "aws-sam-translator";
version = "1.5.4";
src = fetchPypi {
inherit pname version;
sha256 = "9d8a25e058c78d2cef5c07aec7f98cbc2070dbfc2eb6a2e102a16beafd14e3ca";
};
# Tests are not included in the PyPI package
doCheck = false;
disabled = isPy3k;
propagatedBuildInputs = [
boto3
enum34
jsonschema
six
];
meta = {
homepage = https://github.com/awslabs/serverless-application-model;
description = "Python library to transform SAM templates into AWS CloudFormation templates";
license = lib.licenses.asl20;
maintainers = [ lib.maintainers.andreabedini ];
};
}

View File

@ -1,4 +1,4 @@
{ stdenv, buildPythonPackage, fetchPypi, pytest }:
{ stdenv, buildPythonPackage, fetchPypi, substituteAll, locale, pytest }:
buildPythonPackage rec {
pname = "click";
@ -9,6 +9,13 @@ buildPythonPackage rec {
sha256 = "02qkfpykbq35id8glfgwc38yc430427yd05z1wc5cnld8zgicmgi";
};
patches = [
(substituteAll {
src = ./fix-paths.patch;
locale = "${locale}/bin/locale";
})
];
buildInputs = [ pytest ];
checkPhase = ''

View File

@ -0,0 +1,11 @@
--- a/click/_unicodefun.py 2018-06-11 15:08:59.369358278 +0200
+++ b/click/_unicodefun.py 2018-06-11 15:09:09.342325998 +0200
@@ -60,7 +60,7 @@
extra = ''
if os.name == 'posix':
import subprocess
- rv = subprocess.Popen(['locale', '-a'], stdout=subprocess.PIPE,
+ rv = subprocess.Popen(['@locale@', '-a'], stdout=subprocess.PIPE,
stderr=subprocess.PIPE).communicate()[0]
good_locales = set()
has_c_utf8 = False

View File

@ -0,0 +1,26 @@
{ stdenv, buildPythonPackage, fetchPypi, python, numpy, matplotlib }:
buildPythonPackage rec {
pname = "deap";
version = "1.2.2";
src = fetchPypi {
inherit pname version;
sha256 = "95c63e66d755ec206c80fdb2908851c0bef420ee8651ad7be4f0578e9e909bcf";
};
propagatedBuildInputs = [ numpy matplotlib ];
checkPhase = ''
${python.interpreter} setup.py nosetests --verbosity=3
'';
meta = with stdenv.lib; {
description = "DEAP is a novel evolutionary computation framework for rapid prototyping and testing of ideas.";
homepage = https://github.com/DEAP/deap;
license = licenses.lgpl3;
maintainers = with maintainers; [ psyanticy ];
};
}

Some files were not shown because too many files have changed in this diff Show More