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:
commit
7f3de60758
@ -973,7 +973,7 @@ stdenv.mkDerivation {
|
|||||||
# the following packages are related to the dependencies of your python
|
# the following packages are related to the dependencies of your python
|
||||||
# project.
|
# project.
|
||||||
# In this particular example the python modules listed in the
|
# 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.
|
# in order to compile any binary extensions they may require.
|
||||||
#
|
#
|
||||||
taglib
|
taglib
|
||||||
|
@ -56,10 +56,10 @@ let
|
|||||||
hasAttr head isAttrs isBool isInt isList isString length
|
hasAttr head isAttrs isBool isInt isList isString length
|
||||||
lessThan listToAttrs pathExists readFile replaceStrings seq
|
lessThan listToAttrs pathExists readFile replaceStrings seq
|
||||||
stringLength sub substring tail;
|
stringLength sub substring tail;
|
||||||
inherit (trivial) id const concat or and boolToString mergeAttrs
|
inherit (trivial) id const concat or and bitAnd bitOr bitXor bitNot
|
||||||
flip mapNullable inNixShell min max importJSON warn info
|
boolToString mergeAttrs flip mapNullable inNixShell min max
|
||||||
nixpkgsVersion version mod compare splitByAndCompare
|
importJSON warn info nixpkgsVersion version mod compare
|
||||||
functionArgs setFunctionArgs isFunction;
|
splitByAndCompare functionArgs setFunctionArgs isFunction;
|
||||||
|
|
||||||
inherit (fixedPoints) fix fix' extends composeExtensions
|
inherit (fixedPoints) fix fix' extends composeExtensions
|
||||||
makeExtensible makeExtensibleWithCustomName;
|
makeExtensible makeExtensibleWithCustomName;
|
||||||
@ -76,7 +76,7 @@ let
|
|||||||
optional optionals toList range partition zipListsWith zipLists
|
optional optionals toList range partition zipListsWith zipLists
|
||||||
reverseList listDfs toposort sort naturalSort compareLists take
|
reverseList listDfs toposort sort naturalSort compareLists take
|
||||||
drop sublist last init crossLists unique intersectLists
|
drop sublist last init crossLists unique intersectLists
|
||||||
subtractLists mutuallyExclusive;
|
subtractLists mutuallyExclusive groupBy groupBy';
|
||||||
inherit (strings) concatStrings concatMapStrings concatImapStrings
|
inherit (strings) concatStrings concatMapStrings concatImapStrings
|
||||||
intersperse concatStringsSep concatMapStringsSep
|
intersperse concatStringsSep concatMapStringsSep
|
||||||
concatImapStringsSep makeSearchPath makeSearchPathOutput
|
concatImapStringsSep makeSearchPath makeSearchPathOutput
|
||||||
|
@ -99,6 +99,16 @@ lib.mapAttrs (n: v: v // { shortName = n; }) rec {
|
|||||||
fullName = ''BSD 4-clause "Original" or "Old" License'';
|
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 {
|
clArtistic = spdx {
|
||||||
spdxId = "ClArtistic";
|
spdxId = "ClArtistic";
|
||||||
fullName = "Clarified Artistic License";
|
fullName = "Clarified Artistic License";
|
||||||
|
@ -250,6 +250,42 @@ rec {
|
|||||||
else { right = t.right; wrong = [h] ++ t.wrong; }
|
else { right = t.right; wrong = [h] ++ t.wrong; }
|
||||||
) { right = []; 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
|
/* 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
|
the merging stops at the shortest. How both lists are merged is defined
|
||||||
by the first argument.
|
by the first argument.
|
||||||
|
@ -170,7 +170,8 @@ rec {
|
|||||||
kernelBaseConfig = "bcm2835_defconfig";
|
kernelBaseConfig = "bcm2835_defconfig";
|
||||||
kernelDTB = true;
|
kernelDTB = true;
|
||||||
kernelArch = "arm";
|
kernelArch = "arm";
|
||||||
kernelAutoModules = false;
|
kernelAutoModules = true;
|
||||||
|
kernelPreferBuiltin = true;
|
||||||
kernelExtraConfig = ''
|
kernelExtraConfig = ''
|
||||||
# Disable OABI to have seccomp_filter (required for systemd)
|
# Disable OABI to have seccomp_filter (required for systemd)
|
||||||
# https://github.com/raspberrypi/firmware/issues/651
|
# https://github.com/raspberrypi/firmware/issues/651
|
||||||
|
@ -45,6 +45,21 @@ runTests {
|
|||||||
expected = true;
|
expected = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
testBitAnd = {
|
||||||
|
expr = (bitAnd 3 10);
|
||||||
|
expected = 2;
|
||||||
|
};
|
||||||
|
|
||||||
|
testBitOr = {
|
||||||
|
expr = (bitOr 3 10);
|
||||||
|
expected = 11;
|
||||||
|
};
|
||||||
|
|
||||||
|
testBitXor = {
|
||||||
|
expr = (bitXor 3 10);
|
||||||
|
expected = 9;
|
||||||
|
};
|
||||||
|
|
||||||
# STRINGS
|
# STRINGS
|
||||||
|
|
||||||
testConcatMapStrings = {
|
testConcatMapStrings = {
|
||||||
|
@ -1,4 +1,41 @@
|
|||||||
{ lib }:
|
{ 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 {
|
rec {
|
||||||
|
|
||||||
/* The identity function
|
/* The identity function
|
||||||
@ -31,6 +68,18 @@ rec {
|
|||||||
/* boolean “and” */
|
/* boolean “and” */
|
||||||
and = x: y: x && y;
|
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.
|
/* Convert a boolean to a string.
|
||||||
Note that toString on a bool returns "1" and "".
|
Note that toString on a bool returns "1" and "".
|
||||||
*/
|
*/
|
||||||
|
@ -393,6 +393,11 @@
|
|||||||
github = "andir";
|
github = "andir";
|
||||||
name = "Andreas Rammhold";
|
name = "Andreas Rammhold";
|
||||||
};
|
};
|
||||||
|
andreabedini = {
|
||||||
|
email = "andrea@kzn.io";
|
||||||
|
github = "andreabedini";
|
||||||
|
name = "Andrea Bedini";
|
||||||
|
};
|
||||||
andres = {
|
andres = {
|
||||||
email = "ksnixos@andres-loeh.de";
|
email = "ksnixos@andres-loeh.de";
|
||||||
github = "kosmikus";
|
github = "kosmikus";
|
||||||
|
@ -178,9 +178,26 @@ $ nix-instantiate -E '(import <nixpkgsunstable> {}).gitFull'
|
|||||||
</listitem>
|
</listitem>
|
||||||
<listitem>
|
<listitem>
|
||||||
<para>
|
<para>
|
||||||
<literal>lib.traceValIfNot</literal> has been deprecated. Use
|
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>.
|
||||||
<literal>if/then/else</literal> and <literal>lib.traceValSeq</literal>
|
</para>
|
||||||
instead.
|
</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.
|
||||||
</para>
|
</para>
|
||||||
</listitem>
|
</listitem>
|
||||||
<listitem>
|
<listitem>
|
||||||
|
@ -5,4 +5,4 @@ export NIXOS_CONFIG=$(dirname $(readlink -f $0))/../../../modules/virtualisation
|
|||||||
export TIMESTAMP=$(date +%Y%m%d%H%M)
|
export TIMESTAMP=$(date +%Y%m%d%H%M)
|
||||||
|
|
||||||
nix-build '<nixpkgs/nixos>' \
|
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
|
||||||
|
@ -26,16 +26,16 @@ with lib;
|
|||||||
|
|
||||||
fonts.fontconfig.enable = false;
|
fonts.fontconfig.enable = false;
|
||||||
|
|
||||||
nixpkgs.config.packageOverrides = pkgs: {
|
nixpkgs.overlays = singleton (const (super: {
|
||||||
dbus = pkgs.dbus.override { x11Support = false; };
|
dbus = super.dbus.override { x11Support = false; };
|
||||||
networkmanager-fortisslvpn = pkgs.networkmanager-fortisslvpn.override { withGnome = false; };
|
networkmanager-fortisslvpn = super.networkmanager-fortisslvpn.override { withGnome = false; };
|
||||||
networkmanager-l2tp = pkgs.networkmanager-l2tp.override { withGnome = false; };
|
networkmanager-l2tp = super.networkmanager-l2tp.override { withGnome = false; };
|
||||||
networkmanager-openconnect = pkgs.networkmanager-openconnect.override { withGnome = false; };
|
networkmanager-openconnect = super.networkmanager-openconnect.override { withGnome = false; };
|
||||||
networkmanager-openvpn = pkgs.networkmanager-openvpn.override { withGnome = false; };
|
networkmanager-openvpn = super.networkmanager-openvpn.override { withGnome = false; };
|
||||||
networkmanager-vpnc = pkgs.networkmanager-vpnc.override { withGnome = false; };
|
networkmanager-vpnc = super.networkmanager-vpnc.override { withGnome = false; };
|
||||||
networkmanager-iodine = pkgs.networkmanager-iodine.override { withGnome = false; };
|
networkmanager-iodine = super.networkmanager-iodine.override { withGnome = false; };
|
||||||
pinentry = pkgs.pinentry_ncurses;
|
pinentry = super.pinentry_ncurses;
|
||||||
gobjectIntrospection = pkgs.gobjectIntrospection.override { x11Support = false; };
|
gobjectIntrospection = super.gobjectIntrospection.override { x11Support = false; };
|
||||||
};
|
}));
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
@ -127,6 +127,7 @@
|
|||||||
./programs/zsh/oh-my-zsh.nix
|
./programs/zsh/oh-my-zsh.nix
|
||||||
./programs/zsh/zsh.nix
|
./programs/zsh/zsh.nix
|
||||||
./programs/zsh/zsh-autoenv.nix
|
./programs/zsh/zsh-autoenv.nix
|
||||||
|
./programs/zsh/zsh-autosuggestions.nix
|
||||||
./programs/zsh/zsh-syntax-highlighting.nix
|
./programs/zsh/zsh-syntax-highlighting.nix
|
||||||
./rename.nix
|
./rename.nix
|
||||||
./security/acme.nix
|
./security/acme.nix
|
||||||
|
60
nixos/modules/programs/zsh/zsh-autosuggestions.nix
Normal file
60
nixos/modules/programs/zsh/zsh-autosuggestions.nix
Normal 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)}
|
||||||
|
'';
|
||||||
|
|
||||||
|
};
|
||||||
|
}
|
@ -87,13 +87,6 @@ in
|
|||||||
type = types.bool;
|
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.enableCompletion "autoload -U compinit && compinit"}
|
||||||
|
|
||||||
${optionalString (cfg.enableAutosuggestions)
|
|
||||||
"source ${pkgs.zsh-autosuggestions}/share/zsh-autosuggestions/zsh-autosuggestions.zsh"
|
|
||||||
}
|
|
||||||
|
|
||||||
${cfge.interactiveShellInit}
|
${cfge.interactiveShellInit}
|
||||||
|
|
||||||
${cfg.interactiveShellInit}
|
${cfg.interactiveShellInit}
|
||||||
|
@ -247,6 +247,8 @@ with lib;
|
|||||||
(mkRenamedOptionModule [ "programs" "zsh" "oh-my-zsh" "custom" ] [ "programs" "zsh" "ohMyZsh" "custom" ])
|
(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" "oh-my-zsh" "plugins" ] [ "programs" "zsh" "ohMyZsh" "plugins" ])
|
||||||
|
|
||||||
|
(mkRenamedOptionModule [ "programs" "zsh" "enableAutosuggestions" ] [ "programs" "zsh" "autosuggestions" "enable" ])
|
||||||
|
|
||||||
# Xen
|
# Xen
|
||||||
(mkRenamedOptionModule [ "virtualisation" "xen" "qemu-package" ] [ "virtualisation" "xen" "package-qemu" ])
|
(mkRenamedOptionModule [ "virtualisation" "xen" "qemu-package" ] [ "virtualisation" "xen" "package-qemu" ])
|
||||||
|
|
||||||
|
@ -38,19 +38,19 @@ let
|
|||||||
# NAT the marked packets.
|
# NAT the marked packets.
|
||||||
${optionalString (cfg.internalInterfaces != []) ''
|
${optionalString (cfg.internalInterfaces != []) ''
|
||||||
iptables -w -t nat -A nixos-nat-post -m mark --mark 1 \
|
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.
|
# NAT packets coming from the internal IPs.
|
||||||
${concatMapStrings (range: ''
|
${concatMapStrings (range: ''
|
||||||
iptables -w -t nat -A nixos-nat-post \
|
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}
|
'') cfg.internalIPs}
|
||||||
|
|
||||||
# NAT from external ports to internal ports.
|
# NAT from external ports to internal ports.
|
||||||
${concatMapStrings (fwd: ''
|
${concatMapStrings (fwd: ''
|
||||||
iptables -w -t nat -A nixos-nat-pre \
|
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} \
|
--dport ${builtins.toString fwd.sourcePort} \
|
||||||
-j DNAT --to-destination ${fwd.destination}
|
-j DNAT --to-destination ${fwd.destination}
|
||||||
|
|
||||||
@ -81,7 +81,7 @@ let
|
|||||||
|
|
||||||
${optionalString (cfg.dmzHost != null) ''
|
${optionalString (cfg.dmzHost != null) ''
|
||||||
iptables -w -t nat -A nixos-nat-pre \
|
iptables -w -t nat -A nixos-nat-pre \
|
||||||
-i ${cfg.externalInterface} -j DNAT \
|
-i ${toString cfg.externalInterface} -j DNAT \
|
||||||
--to-destination ${cfg.dmzHost}
|
--to-destination ${cfg.dmzHost}
|
||||||
''}
|
''}
|
||||||
|
|
||||||
@ -134,7 +134,8 @@ in
|
|||||||
};
|
};
|
||||||
|
|
||||||
networking.nat.externalInterface = mkOption {
|
networking.nat.externalInterface = mkOption {
|
||||||
type = types.str;
|
type = types.nullOr types.str;
|
||||||
|
default = null;
|
||||||
example = "eth1";
|
example = "eth1";
|
||||||
description =
|
description =
|
||||||
''
|
''
|
||||||
@ -236,6 +237,15 @@ in
|
|||||||
{ networking.firewall.extraCommands = mkBefore flushNat; }
|
{ networking.firewall.extraCommands = mkBefore flushNat; }
|
||||||
(mkIf config.networking.nat.enable {
|
(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 ];
|
environment.systemPackages = [ pkgs.iptables ];
|
||||||
|
|
||||||
boot = {
|
boot = {
|
||||||
|
@ -60,7 +60,7 @@ in
|
|||||||
};
|
};
|
||||||
|
|
||||||
interfaces = mkOption {
|
interfaces = mkOption {
|
||||||
default = [ "127.0.0.1" "::1" ];
|
default = [ "127.0.0.1" ] ++ optional config.networking.enableIPv6 "::1";
|
||||||
type = types.listOf types.str;
|
type = types.listOf types.str;
|
||||||
description = "What addresses the server should listen on.";
|
description = "What addresses the server should listen on.";
|
||||||
};
|
};
|
||||||
@ -112,8 +112,8 @@ in
|
|||||||
mkdir -m 0755 -p ${stateDir}/dev/
|
mkdir -m 0755 -p ${stateDir}/dev/
|
||||||
cp ${confFile} ${stateDir}/unbound.conf
|
cp ${confFile} ${stateDir}/unbound.conf
|
||||||
${optionalString cfg.enableRootTrustAnchor ''
|
${optionalString cfg.enableRootTrustAnchor ''
|
||||||
${pkgs.unbound}/bin/unbound-anchor -a ${rootTrustAnchorFile} || echo "Root anchor updated!"
|
${pkgs.unbound}/bin/unbound-anchor -a ${rootTrustAnchorFile} || echo "Root anchor updated!"
|
||||||
chown unbound ${stateDir} ${rootTrustAnchorFile}
|
chown unbound ${stateDir} ${rootTrustAnchorFile}
|
||||||
''}
|
''}
|
||||||
touch ${stateDir}/dev/random
|
touch ${stateDir}/dev/random
|
||||||
${pkgs.utillinux}/bin/mount --bind -n /dev/urandom ${stateDir}/dev/random
|
${pkgs.utillinux}/bin/mount --bind -n /dev/urandom ${stateDir}/dev/random
|
||||||
@ -126,6 +126,8 @@ in
|
|||||||
ProtectSystem = true;
|
ProtectSystem = true;
|
||||||
ProtectHome = true;
|
ProtectHome = true;
|
||||||
PrivateDevices = true;
|
PrivateDevices = true;
|
||||||
|
Restart = "always";
|
||||||
|
RestartSec = "5s";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -110,7 +110,7 @@ in
|
|||||||
webapps = mkOption {
|
webapps = mkOption {
|
||||||
type = types.listOf types.package;
|
type = types.listOf types.package;
|
||||||
default = [ tomcat.webapps ];
|
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";
|
description = "List containing WAR files or directories with WAR files which are web applications to be deployed on Tomcat";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -12,6 +12,7 @@ let
|
|||||||
if [ "$1" = bound ]; then
|
if [ "$1" = bound ]; then
|
||||||
ip address add "$ip/$mask" dev "$interface"
|
ip address add "$ip/$mask" dev "$interface"
|
||||||
if [ -n "$router" ]; then
|
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"
|
ip route add default via "$router" dev "$interface"
|
||||||
fi
|
fi
|
||||||
if [ -n "$dns" ]; then
|
if [ -n "$dns" ]; then
|
||||||
|
@ -2,13 +2,13 @@
|
|||||||
|
|
||||||
with lib;
|
with lib;
|
||||||
let
|
let
|
||||||
diskSize = 30720;
|
diskSize = 2048;
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
system.build.azureImage = import ../../lib/make-disk-image.nix {
|
system.build.azureImage = import ../../lib/make-disk-image.nix {
|
||||||
name = "azure-image";
|
name = "azure-image";
|
||||||
postVM = ''
|
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;
|
configFile = ./azure-config-user.nix;
|
||||||
format = "raw";
|
format = "raw";
|
||||||
|
@ -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
|
|
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
buildGoPackage rec {
|
buildGoPackage rec {
|
||||||
name = "go-ethereum-${version}";
|
name = "go-ethereum-${version}";
|
||||||
version = "1.8.8";
|
version = "1.8.10";
|
||||||
goPackagePath = "github.com/ethereum/go-ethereum";
|
goPackagePath = "github.com/ethereum/go-ethereum";
|
||||||
|
|
||||||
# Fix for usb-related segmentation faults on darwin
|
# Fix for usb-related segmentation faults on darwin
|
||||||
@ -27,7 +27,7 @@ buildGoPackage rec {
|
|||||||
owner = "ethereum";
|
owner = "ethereum";
|
||||||
repo = "go-ethereum";
|
repo = "go-ethereum";
|
||||||
rev = "v${version}";
|
rev = "v${version}";
|
||||||
sha256 = "059nd2jvklziih679dd4cd34xjpj1ci7fha83wv86xjz61awyb16";
|
sha256 = "1n36pz4y3xa4d46mynym98bra79qx5n9lb29chyxfpvi5fmprdg1";
|
||||||
};
|
};
|
||||||
|
|
||||||
meta = with stdenv.lib; {
|
meta = with stdenv.lib; {
|
||||||
|
@ -8,13 +8,13 @@ with stdenv.lib;
|
|||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
|
|
||||||
name = "litecoin" + (toString (optional (!withGui) "d")) + "-" + version;
|
name = "litecoin" + (toString (optional (!withGui) "d")) + "-" + version;
|
||||||
version = "0.15.1";
|
version = "0.16.0";
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "litecoin-project";
|
owner = "litecoin-project";
|
||||||
repo = "litecoin";
|
repo = "litecoin";
|
||||||
rev = "v${version}";
|
rev = "v${version}";
|
||||||
sha256 = "01q0lj0grabyfh67ar984m9lv9xs0rakadkci8jpfbp8xw166r40";
|
sha256 = "1g79sbplkn2bnb17i2kyh1d64bjl3ihbx83n0xssvjaajn56hbzw";
|
||||||
};
|
};
|
||||||
|
|
||||||
nativeBuildInputs = [ pkgconfig autoreconfHook ];
|
nativeBuildInputs = [ pkgconfig autoreconfHook ];
|
||||||
|
@ -13,9 +13,9 @@ let
|
|||||||
sha256Hash = "196yaswbxh2nd83gimjxr8ggr5xkdxq7n3xlh6ax73v59pj4hryq";
|
sha256Hash = "196yaswbxh2nd83gimjxr8ggr5xkdxq7n3xlh6ax73v59pj4hryq";
|
||||||
};
|
};
|
||||||
latestVersion = {
|
latestVersion = {
|
||||||
version = "3.2.0.16"; # "Android Studio 3.2 Canary 17"
|
version = "3.2.0.17"; # "Android Studio 3.2 Canary 18"
|
||||||
build = "181.4823740";
|
build = "181.4830125";
|
||||||
sha256Hash = "04282zd28kn2a4rjsi0ikx4bc9ab668xm7cc87ga60pzyg5gmmgk";
|
sha256Hash = "14yarl1vqhy21ljrn5k2dy8z0y407g9nqw4lqzjbxb7zmascnlx4";
|
||||||
};
|
};
|
||||||
in rec {
|
in rec {
|
||||||
# Old alias
|
# Old alias
|
||||||
|
@ -35,6 +35,8 @@ let
|
|||||||
patchelf --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \
|
patchelf --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \
|
||||||
--set-rpath "${atomEnv.libPath}" \
|
--set-rpath "${atomEnv.libPath}" \
|
||||||
$share/resources/app/apm/bin/node
|
$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
|
dugite=$share/resources/app.asar.unpacked/node_modules/dugite
|
||||||
rm -f $dugite/git/bin/git
|
rm -f $dugite/git/bin/git
|
||||||
@ -53,7 +55,7 @@ let
|
|||||||
homepage = https://atom.io/;
|
homepage = https://atom.io/;
|
||||||
license = licenses.mit;
|
license = licenses.mit;
|
||||||
maintainers = with maintainers; [ offline nequissimus synthetica ysndr ];
|
maintainers = with maintainers; [ offline nequissimus synthetica ysndr ];
|
||||||
platforms = [ "x86_64-linux" ];
|
platforms = platforms.x86_64;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
in stdenv.lib.mapAttrs common {
|
in stdenv.lib.mapAttrs common {
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
{ stdenv, fetchFromGitHub, cmake, gettext, libmsgpack, libtermkey
|
{ stdenv, fetchFromGitHub, cmake, gettext, libmsgpack, libtermkey, libiconv
|
||||||
, libtool, libuv, luaPackages, ncurses, perl, pkgconfig
|
, libtool, libuv, luaPackages, ncurses, perl, pkgconfig
|
||||||
, unibilium, vimUtils, xsel, gperf, callPackage
|
, unibilium, vimUtils, xsel, gperf, callPackage
|
||||||
, libvterm-neovim
|
, libvterm-neovim
|
||||||
@ -11,13 +11,13 @@ let
|
|||||||
|
|
||||||
neovim = stdenv.mkDerivation rec {
|
neovim = stdenv.mkDerivation rec {
|
||||||
name = "neovim-unwrapped-${version}";
|
name = "neovim-unwrapped-${version}";
|
||||||
version = "0.2.2";
|
version = "0.3.0";
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "neovim";
|
owner = "neovim";
|
||||||
repo = "neovim";
|
repo = "neovim";
|
||||||
rev = "v${version}";
|
rev = "v${version}";
|
||||||
sha256 = "1dxr29d0hyag7snbww5s40as90412qb61rgj7gd9rps1iccl9gv4";
|
sha256 = "10c8y309fdwvr3d9n6vm1f2c0k6pzicnhc64l2dvbw1lnabp04vv";
|
||||||
};
|
};
|
||||||
|
|
||||||
enableParallelBuilding = true;
|
enableParallelBuilding = true;
|
||||||
@ -32,6 +32,7 @@ let
|
|||||||
luaPackages.lua
|
luaPackages.lua
|
||||||
gperf
|
gperf
|
||||||
] ++ optional withJemalloc jemalloc
|
] ++ optional withJemalloc jemalloc
|
||||||
|
++ optional stdenv.isDarwin libiconv
|
||||||
++ lualibs;
|
++ lualibs;
|
||||||
|
|
||||||
nativeBuildInputs = [
|
nativeBuildInputs = [
|
||||||
|
@ -12,7 +12,7 @@
|
|||||||
# When the extension is already available in the default extensions set.
|
# When the extension is already available in the default extensions set.
|
||||||
vscodeExtensions = with vscode-extensions; [
|
vscodeExtensions = with vscode-extensions; [
|
||||||
bbenoist.Nix
|
bbenoist.Nix
|
||||||
]
|
]
|
||||||
|
|
||||||
# Concise version from the vscode market place when not available in the default set.
|
# Concise version from the vscode market place when not available in the default set.
|
||||||
++ vscode-utils.extensionsFromVscodeMarketplace [
|
++ vscode-utils.extensionsFromVscodeMarketplace [
|
||||||
@ -26,11 +26,11 @@
|
|||||||
}
|
}
|
||||||
~~~
|
~~~
|
||||||
|
|
||||||
This expression should fetch
|
This expression should fetch
|
||||||
- the *nix* vscode extension from whatever source defined in the
|
- the *nix* vscode extension from whatever source defined in the
|
||||||
default nixpkgs extensions set `vscodeExtensions`.
|
default nixpkgs extensions set `vscodeExtensions`.
|
||||||
|
|
||||||
- the *code-runner* vscode extension from the marketplace using the
|
- the *code-runner* vscode extension from the marketplace using the
|
||||||
following url:
|
following url:
|
||||||
|
|
||||||
~~~
|
~~~
|
||||||
@ -72,6 +72,11 @@ runCommand "${wrappedPkgName}-with-extensions-${wrappedPkgVersion}" {
|
|||||||
meta = vscode.meta;
|
meta = vscode.meta;
|
||||||
} ''
|
} ''
|
||||||
mkdir -p "$out/bin"
|
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
|
${if [] == vscodeExtensions
|
||||||
then ''
|
then ''
|
||||||
ln -sT "${vscode}/bin/${wrappedExeName}" "$out/bin/${exeName}"
|
ln -sT "${vscode}/bin/${wrappedExeName}" "$out/bin/${exeName}"
|
||||||
|
@ -3,11 +3,11 @@
|
|||||||
|
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
name = "chirp-daily-${version}";
|
name = "chirp-daily-${version}";
|
||||||
version = "20180519";
|
version = "20180606";
|
||||||
|
|
||||||
src = fetchurl {
|
src = fetchurl {
|
||||||
url = "https://trac.chirp.danplanet.com/chirp_daily/daily-${version}/${name}.tar.gz";
|
url = "https://trac.chirp.danplanet.com/chirp_daily/daily-${version}/${name}.tar.gz";
|
||||||
sha256 = "1sb4cw95lcj2cdfzzgnwjgmnpk2nqjys4am5qvj4pnh0x447sznv";
|
sha256 = "1v1s02675gyghhxasp4pxjrifkgshc82p99haxph1yzkq7gsf03w";
|
||||||
};
|
};
|
||||||
|
|
||||||
nativeBuildInputs = [ makeWrapper ];
|
nativeBuildInputs = [ makeWrapper ];
|
||||||
|
@ -2,27 +2,30 @@
|
|||||||
|
|
||||||
mkDerivation rec {
|
mkDerivation rec {
|
||||||
name = "cura-${version}";
|
name = "cura-${version}";
|
||||||
version = "3.2.1";
|
version = "3.3.1";
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "Ultimaker";
|
owner = "Ultimaker";
|
||||||
repo = "Cura";
|
repo = "Cura";
|
||||||
rev = version;
|
rev = version;
|
||||||
sha256 = "0yaya0ww92qjm7g31q85m5f95nwdapldjx1kdf1ar4yzwh4r15rp";
|
sha256 = "0a2xxiw1h5cq4nd4pdkq757hap85p2i29msxs57kbfdd78izrjlx";
|
||||||
};
|
};
|
||||||
|
|
||||||
materials = fetchFromGitHub {
|
materials = fetchFromGitHub {
|
||||||
owner = "Ultimaker";
|
owner = "Ultimaker";
|
||||||
repo = "fdm_materials";
|
repo = "fdm_materials";
|
||||||
rev = "3.2.1";
|
rev = "3.3.0";
|
||||||
sha256 = "1kr9ga727x0kazw2ypac9bi6g6lddbsx80qw8fbn0514kg2mr9n3";
|
sha256 = "0vf7s4m14aqhdg4m2yjj87kjxi2gpa46mgx86p0a91jwvkxa8a1q";
|
||||||
};
|
};
|
||||||
|
|
||||||
buildInputs = [ qtbase qtquickcontrols2 ];
|
buildInputs = [ qtbase qtquickcontrols2 ];
|
||||||
propagatedBuildInputs = with python3.pkgs; [ uranium zeroconf pyserial numpy-stl ];
|
propagatedBuildInputs = with python3.pkgs; [ uranium zeroconf pyserial numpy-stl ];
|
||||||
nativeBuildInputs = [ cmake python3.pkgs.wrapPython ];
|
nativeBuildInputs = [ cmake python3.pkgs.wrapPython ];
|
||||||
|
|
||||||
cmakeFlags = [ "-DURANIUM_DIR=${python3.pkgs.uranium.src}" ];
|
cmakeFlags = [
|
||||||
|
"-DURANIUM_DIR=${python3.pkgs.uranium.src}"
|
||||||
|
"-DCURA_VERSION=${version}"
|
||||||
|
];
|
||||||
|
|
||||||
postPatch = ''
|
postPatch = ''
|
||||||
sed -i 's,/python''${PYTHON_VERSION_MAJOR}/dist-packages,/python''${PYTHON_VERSION_MAJOR}.''${PYTHON_VERSION_MINOR}/site-packages,g' CMakeLists.txt
|
sed -i 's,/python''${PYTHON_VERSION_MAJOR}/dist-packages,/python''${PYTHON_VERSION_MAJOR}.''${PYTHON_VERSION_MINOR}/site-packages,g' CMakeLists.txt
|
||||||
|
@ -2,19 +2,19 @@
|
|||||||
|
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
name = "curaengine-${version}";
|
name = "curaengine-${version}";
|
||||||
version = "3.2.1";
|
version = "3.3.0";
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "Ultimaker";
|
owner = "Ultimaker";
|
||||||
repo = "CuraEngine";
|
repo = "CuraEngine";
|
||||||
rev = version;
|
rev = version;
|
||||||
sha256 = "1yqpp6qhixzni3ik11vbk5kcdrhlz2j4ylzmh8f6c86r4d73a0cp";
|
sha256 = "1dj80lk58qb54apdv7n9cmcck4smb00lidgqld21xnndnnqqb4lw";
|
||||||
};
|
};
|
||||||
|
|
||||||
nativeBuildInputs = [ cmake ];
|
nativeBuildInputs = [ cmake ];
|
||||||
buildInputs = [ libarcus ];
|
buildInputs = [ libarcus ];
|
||||||
|
|
||||||
enableParallelBuilding = true;
|
cmakeFlags = [ "-DCURA_ENGINE_VERSION=${version}" ];
|
||||||
|
|
||||||
meta = with stdenv.lib; {
|
meta = with stdenv.lib; {
|
||||||
description = "A powerful, fast and robust engine for processing 3D models into 3D printing instruction";
|
description = "A powerful, fast and robust engine for processing 3D models into 3D printing instruction";
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
, gtk3, keybinder3, libnotify, libutempter, vte }:
|
, gtk3, keybinder3, libnotify, libutempter, vte }:
|
||||||
|
|
||||||
let
|
let
|
||||||
version = "3.2.1";
|
version = "3.2.2";
|
||||||
in python3.pkgs.buildPythonApplication rec {
|
in python3.pkgs.buildPythonApplication rec {
|
||||||
name = "guake-${version}";
|
name = "guake-${version}";
|
||||||
format = "other";
|
format = "other";
|
||||||
@ -11,7 +11,7 @@ in python3.pkgs.buildPythonApplication rec {
|
|||||||
owner = "Guake";
|
owner = "Guake";
|
||||||
repo = "guake";
|
repo = "guake";
|
||||||
rev = version;
|
rev = version;
|
||||||
sha256 = "0qzrkmjizpc3kirvhml62wya1sr3pbig25nfcrfhk1hhr3jxq17s";
|
sha256 = "1wx8vghn0h52xryyn6cf9z1lbwsk766lhff162szbaxlxyl6xsc0";
|
||||||
};
|
};
|
||||||
|
|
||||||
nativeBuildInputs = [ gettext gobjectIntrospection wrapGAppsHook python3.pkgs.pip glibcLocales ];
|
nativeBuildInputs = [ gettext gobjectIntrospection wrapGAppsHook python3.pkgs.pip glibcLocales ];
|
||||||
|
@ -23,12 +23,15 @@ in stdenv.mkDerivation rec {
|
|||||||
};
|
};
|
||||||
|
|
||||||
patches = [
|
patches = [
|
||||||
|
(fetchpatch {
|
||||||
|
# CVE-2018-10289
|
||||||
|
url = "https://bugs.ghostscript.com/attachment.cgi?id=15230";
|
||||||
|
sha256 = "0jmpacxd9930g6k57kda9jrcrbk75whdlv8xwmqg5jwn848qvy4q";
|
||||||
|
})
|
||||||
]
|
]
|
||||||
|
# Use shared libraries to decrease size
|
||||||
# Use shared libraries to decrease size
|
++ stdenv.lib.optional (!stdenv.isDarwin) ./mupdf-1.13-shared_libs-1.patch
|
||||||
++ stdenv.lib.optional (!stdenv.isDarwin) ./mupdf-1.13-shared_libs-1.patch
|
++ stdenv.lib.optional stdenv.isDarwin ./darwin.patch
|
||||||
|
|
||||||
++ stdenv.lib.optional stdenv.isDarwin ./darwin.patch
|
|
||||||
;
|
;
|
||||||
|
|
||||||
postPatch = ''
|
postPatch = ''
|
||||||
|
@ -1,14 +1,19 @@
|
|||||||
{ stdenv, rofi-unwrapped, makeWrapper, theme ? null, lib }:
|
{ stdenv, rofi-unwrapped, makeWrapper, theme ? null, lib }:
|
||||||
|
|
||||||
|
if theme == null then rofi-unwrapped else
|
||||||
stdenv.mkDerivation {
|
stdenv.mkDerivation {
|
||||||
name = "rofi-${rofi-unwrapped.version}";
|
name = "rofi-${rofi-unwrapped.version}";
|
||||||
buildInputs = [ makeWrapper ];
|
buildInputs = [ makeWrapper ];
|
||||||
preferLocalBuild = true;
|
preferLocalBuild = true;
|
||||||
passthru = { unwrapped = rofi-unwrapped; };
|
passthru.unwrapped = rofi-unwrapped;
|
||||||
buildCommand = ''
|
buildCommand = ''
|
||||||
mkdir -p $out/bin
|
mkdir $out
|
||||||
ln -s ${rofi-unwrapped}/bin/rofi $out/bin/rofi
|
ln -s ${rofi-unwrapped}/* $out
|
||||||
${lib.optionalString (theme != null) ''wrapProgram $out/bin/rofi --add-flags "-theme ${theme}"''}
|
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 // {
|
meta = rofi-unwrapped.meta // {
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
{ stdenv, fetchFromGitHub
|
{ stdenv, fetchFromGitHub
|
||||||
, cmake, ninja, pkgconfig, vala, gobjectIntrospection, gettext, wrapGAppsHook
|
, meson, ninja, pkgconfig, vala, gobjectIntrospection, gettext, wrapGAppsHook
|
||||||
, gtk3, glib, granite, libgee, libgda, gtksourceview, libxml2 }:
|
, gtk3, glib, granite, libgee, libgda, gtksourceview, libxml2, libsecret }:
|
||||||
|
|
||||||
|
|
||||||
let
|
let
|
||||||
version = "0.5.4";
|
version = "0.5.5";
|
||||||
sqlGda = libgda.override {
|
sqlGda = libgda.override {
|
||||||
mysqlSupport = true;
|
mysqlSupport = true;
|
||||||
postgresSupport = true;
|
postgresSupport = true;
|
||||||
@ -17,12 +17,17 @@ in stdenv.mkDerivation rec {
|
|||||||
owner = "Alecaddd";
|
owner = "Alecaddd";
|
||||||
repo = "sequeler";
|
repo = "sequeler";
|
||||||
rev = "v${version}";
|
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; {
|
meta = with stdenv.lib; {
|
||||||
description = "Friendly SQL Client";
|
description = "Friendly SQL Client";
|
||||||
|
@ -21,6 +21,7 @@ stdenv.mkDerivation rec {
|
|||||||
MathConvexHullMonotoneChain MathGeometryVoronoi MathPlanePath Moo
|
MathConvexHullMonotoneChain MathGeometryVoronoi MathPlanePath Moo
|
||||||
IOStringy ClassXSAccessor Wx GrowlGNTP NetDBus ImportInto XMLSAX
|
IOStringy ClassXSAccessor Wx GrowlGNTP NetDBus ImportInto XMLSAX
|
||||||
ExtUtilsMakeMaker OpenGL WxGLCanvas ModuleBuild LWP
|
ExtUtilsMakeMaker OpenGL WxGLCanvas ModuleBuild LWP
|
||||||
|
ExtUtilsCppGuess ModuleBuildWithXSpp ExtUtilsTypemapsDefault
|
||||||
];
|
];
|
||||||
|
|
||||||
desktopItem = makeDesktopItem {
|
desktopItem = makeDesktopItem {
|
||||||
|
37
pkgs/applications/misc/unixcw/default.nix
Normal file
37
pkgs/applications/misc/unixcw/default.nix
Normal 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;
|
||||||
|
};
|
||||||
|
}
|
677
pkgs/applications/misc/unixcw/remove-use-of-dlopen.patch
Normal file
677
pkgs/applications/misc/unixcw/remove-use-of-dlopen.patch
Normal 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
|
||||||
|
|
@ -12,13 +12,13 @@ in
|
|||||||
|
|
||||||
stdenv'.mkDerivation rec {
|
stdenv'.mkDerivation rec {
|
||||||
name = "xmr-stak-${version}";
|
name = "xmr-stak-${version}";
|
||||||
version = "2.4.3";
|
version = "2.4.4";
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "fireice-uk";
|
owner = "fireice-uk";
|
||||||
repo = "xmr-stak";
|
repo = "xmr-stak";
|
||||||
rev = "${version}";
|
rev = "${version}";
|
||||||
sha256 = "0plks4yyd9gjnfg7sfsgsvdgczkbghf5xjwb8bzv01f0fndn10r1";
|
sha256 = "1j75466hfs18w05k64yb60pw865ah226vjib46qr1wb1mcd82i5s";
|
||||||
};
|
};
|
||||||
|
|
||||||
NIX_CFLAGS_COMPILE = "-O3";
|
NIX_CFLAGS_COMPILE = "-O3";
|
||||||
|
@ -137,35 +137,18 @@ rec {
|
|||||||
|
|
||||||
in 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 {
|
tor-browser-7-5 = common (rec {
|
||||||
pname = "tor-browser";
|
pname = "tor-browser";
|
||||||
version = "7.5.4";
|
version = "7.5.5";
|
||||||
isTorBrowserLike = true;
|
isTorBrowserLike = true;
|
||||||
|
|
||||||
# FIXME: fetchFromGitHub is not ideal, unpacked source is >900Mb
|
# FIXME: fetchFromGitHub is not ideal, unpacked source is >900Mb
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "SLNOS";
|
owner = "SLNOS";
|
||||||
repo = "tor-browser";
|
repo = "tor-browser";
|
||||||
# branch "tor-browser-52.8.0esr-7.5-1-slnos"
|
# branch "tor-browser-52.8.1esr-7.5-1-slnos"
|
||||||
rev = "dbaabe129d2982bee00a753146fbe610fec0ca50";
|
rev = "08e246847f0ccbee42f61d9449344d461c886cf1";
|
||||||
sha256 = "0j60vz18bwabqbzv0r1id3vcyh3832mzx6cg5r7x5c03s5hn40a4";
|
sha256 = "023k7427g2hqkpdsw1h384djlyy6jyidpssrrwzbs3qv4s13slah";
|
||||||
};
|
};
|
||||||
|
|
||||||
patches = nixpkgsPatches;
|
patches = nixpkgsPatches;
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
{ callPackage, stdenv }:
|
{ callPackage, stdenv }:
|
||||||
|
|
||||||
let
|
let
|
||||||
stableVersion = "2.1.6";
|
stableVersion = "2.1.7";
|
||||||
# Currently there is no preview version.
|
# Currently there is no preview version.
|
||||||
previewVersion = stableVersion;
|
previewVersion = stableVersion;
|
||||||
addVersion = args:
|
addVersion = args:
|
||||||
@ -10,8 +10,8 @@ let
|
|||||||
in args // { inherit version branch; };
|
in args // { inherit version branch; };
|
||||||
mkGui = args: callPackage (import ./gui.nix (addVersion args)) { };
|
mkGui = args: callPackage (import ./gui.nix (addVersion args)) { };
|
||||||
mkServer = args: callPackage (import ./server.nix (addVersion args)) { };
|
mkServer = args: callPackage (import ./server.nix (addVersion args)) { };
|
||||||
guiSrcHash = "0wrh0x5ig2x2pxyyf99z4bfiyxn19akyjic5kgf0pv2snifw2481";
|
guiSrcHash = "10zf429zjzf7v4y9r7mmkp42kh5ppmqinhvwqzb7jmsrpv2cnxj6";
|
||||||
serverSrcHash = "0jy5700bshz54mdsh5qpcb2qrczg9isxhr4y0bmglrl23pywvisc";
|
serverSrcHash = "056swz6ygqdi37asah51v1yy0ky8q0p32vf7dxs697hd7nv78aqj";
|
||||||
in {
|
in {
|
||||||
guiStable = mkGui {
|
guiStable = mkGui {
|
||||||
stable = true;
|
stable = true;
|
||||||
|
@ -4,8 +4,8 @@ let
|
|||||||
mkTelegram = args: qt5.callPackage (import ./generic.nix args) { };
|
mkTelegram = args: qt5.callPackage (import ./generic.nix args) { };
|
||||||
stableVersion = {
|
stableVersion = {
|
||||||
stable = true;
|
stable = true;
|
||||||
version = "1.3.0";
|
version = "1.3.7";
|
||||||
sha256Hash = "1h5zcvd58bjm02b0rfb7fx1nx1gmzdlk1854lm6kg1hd6mqrrb0i";
|
sha256Hash = "1rwnqgla061icvyvw8gxqd7qki1jnq0f46hvyffp74ng5r1b6wjg";
|
||||||
# svn log svn://svn.archlinux.org/community/telegram-desktop/trunk
|
# svn log svn://svn.archlinux.org/community/telegram-desktop/trunk
|
||||||
archPatchesRevision = "310557";
|
archPatchesRevision = "310557";
|
||||||
archPatchesHash = "1v134dal3xiapgh3akfr61vh62j24m9vkb62kckwvap44iqb0hlk";
|
archPatchesHash = "1v134dal3xiapgh3akfr61vh62j24m9vkb62kckwvap44iqb0hlk";
|
||||||
@ -14,7 +14,5 @@ in {
|
|||||||
stable = mkTelegram stableVersion;
|
stable = mkTelegram stableVersion;
|
||||||
preview = mkTelegram (stableVersion // {
|
preview = mkTelegram (stableVersion // {
|
||||||
stable = false;
|
stable = false;
|
||||||
version = "1.3.4";
|
|
||||||
sha256Hash = "17xdzyl7jb5g69a2h6fyk67z7s6h2dqjg8j478px6n0br1n420wk";
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
@ -37,8 +37,9 @@ stdenv.mkDerivation rec {
|
|||||||
buildInputs = [
|
buildInputs = [
|
||||||
boost icu libxml2 libxslt gettext swig isocodes gtk3 glibcLocales
|
boost icu libxml2 libxslt gettext swig isocodes gtk3 glibcLocales
|
||||||
webkit dconf hicolor-icon-theme libofx aqbanking gwenhywfar libdbi
|
webkit dconf hicolor-icon-theme libofx aqbanking gwenhywfar libdbi
|
||||||
libdbiDrivers guile perlWrapper
|
libdbiDrivers guile
|
||||||
];
|
perlWrapper perl
|
||||||
|
] ++ (with perlPackages; [ FinanceQuote DateManip ]);
|
||||||
|
|
||||||
propagatedUserEnvPkgs = [ dconf ];
|
propagatedUserEnvPkgs = [ dconf ];
|
||||||
|
|
||||||
@ -58,6 +59,7 @@ stdenv.mkDerivation rec {
|
|||||||
wrapProgram "$out/bin/gnucash" \
|
wrapProgram "$out/bin/gnucash" \
|
||||||
--prefix XDG_DATA_DIRS : "$GSETTINGS_SCHEMAS_PATH:$out/share/gsettings-schemas/${name}" \
|
--prefix XDG_DATA_DIRS : "$GSETTINGS_SCHEMAS_PATH:$out/share/gsettings-schemas/${name}" \
|
||||||
--prefix XDG_DATA_DIRS : "${hicolor-icon-theme}/share" \
|
--prefix XDG_DATA_DIRS : "${hicolor-icon-theme}/share" \
|
||||||
|
--prefix PERL5LIB ":" "$PERL5LIB" \
|
||||||
--prefix GIO_EXTRA_MODULES : "${stdenv.lib.getLib dconf}/lib/gio/modules"
|
--prefix GIO_EXTRA_MODULES : "${stdenv.lib.getLib dconf}/lib/gio/modules"
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
@ -42,14 +42,14 @@ let
|
|||||||
then "i386"
|
then "i386"
|
||||||
else "amd64";
|
else "amd64";
|
||||||
|
|
||||||
shortVersion = "1.18-stable";
|
shortVersion = "1.19.1-stable";
|
||||||
|
|
||||||
version = "${shortVersion}_${arch}";
|
version = "${shortVersion}_${arch}";
|
||||||
|
|
||||||
url = "http://desktop-download.mendeley.com/download/apt/pool/main/m/mendeleydesktop/mendeleydesktop_${version}.deb";
|
url = "http://desktop-download.mendeley.com/download/apt/pool/main/m/mendeleydesktop/mendeleydesktop_${version}.deb";
|
||||||
sha256 = if stdenv.system == arch32
|
sha256 = if stdenv.system == arch32
|
||||||
then "046v1j4sc6m0bf89f52zsg8riygrhldplyih5p0cjhcsd45q6fx8"
|
then "0fcyl5i8xdgb5j0x1643qc0j74d8p11jczvqmgqkqh0wgid1y1ad"
|
||||||
else "072fppgxhiryb6m1fb4qvq8nbblx88xpknnklygch1sw0lyks69h";
|
else "1dzwa2cnn9xakrhhq159fhh71gw5wlbf017rrikdlia694m8akq6";
|
||||||
|
|
||||||
deps = [
|
deps = [
|
||||||
qtbase
|
qtbase
|
||||||
|
@ -1,11 +1,11 @@
|
|||||||
{stdenv, fetchurl, readline, bison, flex, libX11, libICE, libXaw, libXext, fftw}:
|
{stdenv, fetchurl, readline, bison, flex, libX11, libICE, libXaw, libXext, fftw}:
|
||||||
|
|
||||||
stdenv.mkDerivation {
|
stdenv.mkDerivation {
|
||||||
name = "ngspice-27";
|
name = "ngspice-28";
|
||||||
|
|
||||||
src = fetchurl {
|
src = fetchurl {
|
||||||
url = "mirror://sourceforge/ngspice/ngspice-27.tar.gz";
|
url = "mirror://sourceforge/ngspice/ngspice-28.tar.gz";
|
||||||
sha256 = "15862npsy5sj56z5yd1qiv3y0fgicrzj7wwn8hbcy89fgbawf20c";
|
sha256 = "0rnz2rdgyav16w7wfn3sfrk2lwvvgz1fh0l9107zkcldijklz04l";
|
||||||
};
|
};
|
||||||
|
|
||||||
nativeBuildInputs = [ flex bison ];
|
nativeBuildInputs = [ flex bison ];
|
||||||
|
@ -23,6 +23,8 @@ in buildGoPackage rec {
|
|||||||
inherit rubyEnv;
|
inherit rubyEnv;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
buildInputs = [rubyEnv.wrappedRuby];
|
||||||
|
|
||||||
postInstall = ''
|
postInstall = ''
|
||||||
mkdir -p $ruby
|
mkdir -p $ruby
|
||||||
cp -rv $src/ruby/{bin,lib,vendor} $ruby
|
cp -rv $src/ruby/{bin,lib,vendor} $ruby
|
||||||
|
@ -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"]
|
|
@ -1,25 +1,30 @@
|
|||||||
{ stdenv, fetchFromGitHub, rustPlatform, cmake, libzip }:
|
{ stdenv, fetchFromGitHub, rustPlatform, cmake, libzip, gnupg,
|
||||||
|
# Darwin
|
||||||
|
libiconv, CoreFoundation, Security }:
|
||||||
|
|
||||||
rustPlatform.buildRustPackage rec {
|
rustPlatform.buildRustPackage rec {
|
||||||
name = "sit-${version}";
|
name = "sit-${version}";
|
||||||
version = "0.3.2";
|
version = "0.4.0";
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "sit-it";
|
owner = "sit-fyi";
|
||||||
repo = "sit";
|
repo = "sit";
|
||||||
rev = "v${version}";
|
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; {
|
meta = with stdenv.lib; {
|
||||||
description = "Serverless Information Tracker";
|
description = "Serverless Information Tracker";
|
||||||
homepage = https://sit.sh/;
|
homepage = https://sit.fyi/;
|
||||||
license = with licenses; [ asl20 /* or */ mit ];
|
license = with licenses; [ asl20 /* or */ mit ];
|
||||||
maintainers = with maintainers; [ dywedir yrashk ];
|
maintainers = with maintainers; [ dywedir yrashk ];
|
||||||
platforms = platforms.all;
|
platforms = platforms.all;
|
||||||
|
@ -27,7 +27,7 @@ rec {
|
|||||||
patches = [];
|
patches = [];
|
||||||
});
|
});
|
||||||
|
|
||||||
docker-containerd = containerd.overrideAttrs (oldAttrs: rec {
|
docker-containerd = (containerd.override { inherit go; }).overrideAttrs (oldAttrs: rec {
|
||||||
name = "docker-containerd";
|
name = "docker-containerd";
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "docker";
|
owner = "docker";
|
||||||
|
@ -15,6 +15,7 @@
|
|||||||
, xenSupport ? false, xen
|
, xenSupport ? false, xen
|
||||||
, openGLSupport ? sdlSupport, mesa_noglu, epoxy, libdrm
|
, openGLSupport ? sdlSupport, mesa_noglu, epoxy, libdrm
|
||||||
, virglSupport ? openGLSupport, virglrenderer
|
, virglSupport ? openGLSupport, virglrenderer
|
||||||
|
, smbdSupport ? false, samba
|
||||||
, hostCpuOnly ? false
|
, hostCpuOnly ? false
|
||||||
, nixosTestRunner ? false
|
, nixosTestRunner ? false
|
||||||
}:
|
}:
|
||||||
@ -63,7 +64,8 @@ stdenv.mkDerivation rec {
|
|||||||
++ optionals stdenv.isLinux [ alsaLib libaio libcap_ng libcap attr ]
|
++ optionals stdenv.isLinux [ alsaLib libaio libcap_ng libcap attr ]
|
||||||
++ optionals xenSupport [ xen ]
|
++ optionals xenSupport [ xen ]
|
||||||
++ optionals openGLSupport [ mesa_noglu epoxy libdrm ]
|
++ optionals openGLSupport [ mesa_noglu epoxy libdrm ]
|
||||||
++ optionals virglSupport [ virglrenderer ];
|
++ optionals virglSupport [ virglrenderer ]
|
||||||
|
++ optionals smbdSupport [ samba ];
|
||||||
|
|
||||||
enableParallelBuilding = true;
|
enableParallelBuilding = true;
|
||||||
|
|
||||||
@ -100,8 +102,7 @@ stdenv.mkDerivation rec {
|
|||||||
'';
|
'';
|
||||||
|
|
||||||
configureFlags =
|
configureFlags =
|
||||||
[ "--smbd=smbd" # use `smbd' from $PATH
|
[ "--audio-drv-list=${audio}"
|
||||||
"--audio-drv-list=${audio}"
|
|
||||||
"--sysconfdir=/etc"
|
"--sysconfdir=/etc"
|
||||||
"--localstatedir=/var"
|
"--localstatedir=/var"
|
||||||
]
|
]
|
||||||
@ -117,7 +118,8 @@ stdenv.mkDerivation rec {
|
|||||||
++ optional gtkSupport "--enable-gtk"
|
++ optional gtkSupport "--enable-gtk"
|
||||||
++ optional xenSupport "--enable-xen"
|
++ optional xenSupport "--enable-xen"
|
||||||
++ optional openGLSupport "--enable-opengl"
|
++ optional openGLSupport "--enable-opengl"
|
||||||
++ optional virglSupport "--enable-virglrenderer";
|
++ optional virglSupport "--enable-virglrenderer"
|
||||||
|
++ optional smbdSupport "--smbd=${samba}/bin/smbd";
|
||||||
|
|
||||||
doCheck = false; # tries to access /dev
|
doCheck = false; # tries to access /dev
|
||||||
|
|
||||||
|
36
pkgs/applications/window-managers/dwm/dwm-status.nix
Normal file
36
pkgs/applications/window-managers/dwm/dwm-status.nix
Normal 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;
|
||||||
|
};
|
||||||
|
}
|
@ -9,12 +9,12 @@ assert gestures -> libstroke != null;
|
|||||||
|
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
pname = "fvwm";
|
pname = "fvwm";
|
||||||
version = "2.6.7";
|
version = "2.6.8";
|
||||||
name = "${pname}-${version}";
|
name = "${pname}-${version}";
|
||||||
|
|
||||||
src = fetchurl {
|
src = fetchurl {
|
||||||
url = "https://github.com/fvwmorg/fvwm/releases/download/${version}/${name}.tar.gz";
|
url = "https://github.com/fvwmorg/fvwm/releases/download/${version}/${name}.tar.gz";
|
||||||
sha256 = "01654d5abdcde6dac131cae9befe5cf6f01f9f7524d097c3b0f316e39f84ef73";
|
sha256 = "0hgkkdzcqjnaabvv9cnh0bz90nnjskbhjg9qnzpi2x0mbliwjdpv";
|
||||||
};
|
};
|
||||||
|
|
||||||
nativeBuildInputs = [ pkgconfig ];
|
nativeBuildInputs = [ pkgconfig ];
|
||||||
|
@ -2,20 +2,24 @@ source $stdenv/setup
|
|||||||
|
|
||||||
source $mirrorsFile
|
source $mirrorsFile
|
||||||
|
|
||||||
|
curlVersion=$(curl -V | head -1 | cut -d' ' -f2)
|
||||||
|
|
||||||
# Curl flags to handle redirects, not use EPSV, handle cookies for
|
# Curl flags to handle redirects, not use EPSV, handle cookies for
|
||||||
# servers to need them during redirects, and work on SSL without a
|
# servers to need them during redirects, and work on SSL without a
|
||||||
# certificate (this isn't a security problem because we check the
|
# certificate (this isn't a security problem because we check the
|
||||||
# cryptographic hash of the output anyway).
|
# cryptographic hash of the output anyway).
|
||||||
curl="curl \
|
curl=(
|
||||||
--location --max-redirs 20 \
|
curl
|
||||||
--retry 3 \
|
--location
|
||||||
--disable-epsv \
|
--max-redirs 20
|
||||||
--cookie-jar cookies \
|
--retry 3
|
||||||
--insecure \
|
--disable-epsv
|
||||||
$curlOpts \
|
--cookie-jar cookies
|
||||||
$NIX_CURL_FLAGS"
|
--insecure
|
||||||
|
--user-agent "curl/$curlVersion Nixpkgs/$nixpkgsVersion"
|
||||||
|
$curlOpts
|
||||||
|
$NIX_CURL_FLAGS
|
||||||
|
)
|
||||||
|
|
||||||
downloadedFile="$out"
|
downloadedFile="$out"
|
||||||
if [ -n "$downloadToTemp" ]; then downloadedFile="$TMPDIR/file"; fi
|
if [ -n "$downloadToTemp" ]; then downloadedFile="$TMPDIR/file"; fi
|
||||||
@ -32,7 +36,7 @@ tryDownload() {
|
|||||||
# if we get error code 18, resume partial download
|
# if we get error code 18, resume partial download
|
||||||
while [ $curlexit -eq 18 ]; do
|
while [ $curlexit -eq 18 ]; do
|
||||||
# keep this inside an if statement, since on failure it doesn't abort the script
|
# 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
|
success=1
|
||||||
break
|
break
|
||||||
else
|
else
|
||||||
@ -61,7 +65,7 @@ tryHashedMirrors() {
|
|||||||
|
|
||||||
for mirror in $hashedMirrors; do
|
for mirror in $hashedMirrors; do
|
||||||
url="$mirror/$outputHashAlgo/$outputHash"
|
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" \
|
--fail --silent --show-error --head "$url" \
|
||||||
--write-out "%{http_code}" --output /dev/null > code 2> log; then
|
--write-out "%{http_code}" --output /dev/null > code 2> log; then
|
||||||
tryDownload "$url"
|
tryDownload "$url"
|
||||||
|
@ -92,7 +92,6 @@ in
|
|||||||
assert sha512 != "" -> builtins.compareVersions "1.11" builtins.nixVersion <= 0;
|
assert sha512 != "" -> builtins.compareVersions "1.11" builtins.nixVersion <= 0;
|
||||||
|
|
||||||
let
|
let
|
||||||
|
|
||||||
urls_ =
|
urls_ =
|
||||||
if urls != [] && url == "" then
|
if urls != [] && url == "" then
|
||||||
(if lib.isList urls then urls
|
(if lib.isList urls then urls
|
||||||
@ -107,7 +106,6 @@ let
|
|||||||
else if sha256 != "" then { outputHashAlgo = "sha256"; outputHash = sha256; }
|
else if sha256 != "" then { outputHashAlgo = "sha256"; outputHash = sha256; }
|
||||||
else if sha1 != "" then { outputHashAlgo = "sha1"; outputHash = sha1; }
|
else if sha1 != "" then { outputHashAlgo = "sha1"; outputHash = sha1; }
|
||||||
else throw "fetchurl requires a hash for fixed-output derivation: ${lib.concatStringsSep ", " urls_}";
|
else throw "fetchurl requires a hash for fixed-output derivation: ${lib.concatStringsSep ", " urls_}";
|
||||||
|
|
||||||
in
|
in
|
||||||
|
|
||||||
stdenvNoCC.mkDerivation {
|
stdenvNoCC.mkDerivation {
|
||||||
@ -135,6 +133,8 @@ stdenvNoCC.mkDerivation {
|
|||||||
|
|
||||||
impureEnvVars = impureEnvVars ++ netrcImpureEnvVars;
|
impureEnvVars = impureEnvVars ++ netrcImpureEnvVars;
|
||||||
|
|
||||||
|
nixpkgsVersion = lib.trivial.release;
|
||||||
|
|
||||||
# Doing the download on a remote machine just duplicates network
|
# Doing the download on a remote machine just duplicates network
|
||||||
# traffic, so don't do that.
|
# traffic, so don't do that.
|
||||||
preferLocalBuild = true;
|
preferLocalBuild = true;
|
||||||
|
@ -405,4 +405,12 @@ rec {
|
|||||||
http://repo1.maven.org/maven2/
|
http://repo1.maven.org/maven2/
|
||||||
http://central.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/
|
||||||
|
];
|
||||||
}
|
}
|
||||||
|
22
pkgs/build-support/setup-hooks/prune-libtool-files.sh
Normal file
22
pkgs/build-support/setup-hooks/prune-libtool-files.sh
Normal 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" \;
|
||||||
|
}
|
@ -14,16 +14,6 @@ rec {
|
|||||||
|
|
||||||
qemu = pkgs.qemu_kvm;
|
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 {
|
modulesClosure = makeModulesClosure {
|
||||||
inherit kernel rootModules;
|
inherit kernel rootModules;
|
||||||
firmware = kernel;
|
firmware = kernel;
|
||||||
|
@ -3,17 +3,17 @@
|
|||||||
fetchzip {
|
fetchzip {
|
||||||
name = "fira-mono-3.206";
|
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 = ''
|
postFetch = ''
|
||||||
mkdir -p $out/share/fonts
|
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; {
|
meta = with stdenv.lib; {
|
||||||
homepage = http://www.carrois.com/fira-4-1/;
|
homepage = https://mozilla.github.io/Fira/;
|
||||||
description = "Monospace font for Firefox OS";
|
description = "Monospace font for Firefox OS";
|
||||||
longDescription = ''
|
longDescription = ''
|
||||||
Fira Mono is a monospace font designed by Erik Spiekermann,
|
Fira Mono is a monospace font designed by Erik Spiekermann,
|
||||||
|
@ -3,17 +3,17 @@
|
|||||||
fetchzip rec {
|
fetchzip rec {
|
||||||
name = "fira-4.106";
|
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 = ''
|
postFetch = ''
|
||||||
mkdir -p $out/share/fonts
|
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; {
|
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";
|
description = "Sans-serif font for Firefox OS";
|
||||||
longDescription = ''
|
longDescription = ''
|
||||||
Fira Sans is a sans-serif font designed by Erik Spiekermann,
|
Fira Sans is a sans-serif font designed by Erik Spiekermann,
|
||||||
|
@ -14,7 +14,7 @@ stdenv.mkDerivation rec {
|
|||||||
buildInputs = [ zlib jdk ]
|
buildInputs = [ zlib jdk ]
|
||||||
++ stdenv.lib.optionals stdenv.isDarwin [ CoreServices Foundation ];
|
++ stdenv.lib.optionals stdenv.isDarwin [ CoreServices Foundation ];
|
||||||
|
|
||||||
NIX_CFLAGS_COMPILE = stdenv.lib.optionalString stdenv.cc.isClang "-Wno-error";
|
NIX_CFLAGS_COMPILE = "-Wno-error";
|
||||||
|
|
||||||
postPatch = ''
|
postPatch = ''
|
||||||
substituteInPlace makefile \
|
substituteInPlace makefile \
|
||||||
|
@ -16,7 +16,7 @@
|
|||||||
|
|
||||||
, # If enabled, GHC will be built with the GPL-free but slower integer-simple
|
, # If enabled, GHC will be built with the GPL-free but slower integer-simple
|
||||||
# library instead of the faster but GPLed integer-gmp library.
|
# 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.
|
, # If enabled, use -fPIC when compiling static libs.
|
||||||
enableRelocatedStaticLibs ? targetPlatform != hostPlatform
|
enableRelocatedStaticLibs ? targetPlatform != hostPlatform
|
||||||
@ -30,8 +30,6 @@
|
|||||||
ghcFlavour ? stdenv.lib.optionalString (targetPlatform != hostPlatform) "perf-cross"
|
ghcFlavour ? stdenv.lib.optionalString (targetPlatform != hostPlatform) "perf-cross"
|
||||||
}:
|
}:
|
||||||
|
|
||||||
assert !enableIntegerSimple -> gmp != null;
|
|
||||||
|
|
||||||
let
|
let
|
||||||
inherit (bootPkgs) ghc;
|
inherit (bootPkgs) ghc;
|
||||||
|
|
||||||
|
@ -15,7 +15,7 @@
|
|||||||
|
|
||||||
, # If enabled, GHC will be built with the GPL-free but slower integer-simple
|
, # If enabled, GHC will be built with the GPL-free but slower integer-simple
|
||||||
# library instead of the faster but GPLed integer-gmp library.
|
# 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.
|
, # If enabled, use -fPIC when compiling static libs.
|
||||||
enableRelocatedStaticLibs ? targetPlatform != hostPlatform
|
enableRelocatedStaticLibs ? targetPlatform != hostPlatform
|
||||||
@ -29,8 +29,6 @@
|
|||||||
ghcFlavour ? stdenv.lib.optionalString (targetPlatform != hostPlatform) "perf-cross"
|
ghcFlavour ? stdenv.lib.optionalString (targetPlatform != hostPlatform) "perf-cross"
|
||||||
}:
|
}:
|
||||||
|
|
||||||
assert !enableIntegerSimple -> gmp != null;
|
|
||||||
|
|
||||||
let
|
let
|
||||||
inherit (bootPkgs) ghc;
|
inherit (bootPkgs) ghc;
|
||||||
|
|
||||||
|
@ -16,7 +16,7 @@
|
|||||||
|
|
||||||
, # If enabled, GHC will be built with the GPL-free but slower integer-simple
|
, # If enabled, GHC will be built with the GPL-free but slower integer-simple
|
||||||
# library instead of the faster but GPLed integer-gmp library.
|
# 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.
|
, # If enabled, use -fPIC when compiling static libs.
|
||||||
enableRelocatedStaticLibs ? targetPlatform != hostPlatform
|
enableRelocatedStaticLibs ? targetPlatform != hostPlatform
|
||||||
@ -34,8 +34,6 @@
|
|||||||
deterministicProfiling ? false
|
deterministicProfiling ? false
|
||||||
}:
|
}:
|
||||||
|
|
||||||
assert !enableIntegerSimple -> gmp != null;
|
|
||||||
|
|
||||||
let
|
let
|
||||||
inherit (bootPkgs) ghc;
|
inherit (bootPkgs) ghc;
|
||||||
|
|
||||||
|
@ -15,7 +15,7 @@
|
|||||||
|
|
||||||
, # If enabled, GHC will be built with the GPL-free but slower integer-simple
|
, # If enabled, GHC will be built with the GPL-free but slower integer-simple
|
||||||
# library instead of the faster but GPLed integer-gmp library.
|
# 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.
|
, # If enabled, use -fPIC when compiling static libs.
|
||||||
enableRelocatedStaticLibs ? targetPlatform != hostPlatform
|
enableRelocatedStaticLibs ? targetPlatform != hostPlatform
|
||||||
@ -32,8 +32,6 @@
|
|||||||
ghcFlavour ? stdenv.lib.optionalString (targetPlatform != hostPlatform) "perf-cross"
|
ghcFlavour ? stdenv.lib.optionalString (targetPlatform != hostPlatform) "perf-cross"
|
||||||
}:
|
}:
|
||||||
|
|
||||||
assert !enableIntegerSimple -> gmp != null;
|
|
||||||
|
|
||||||
let
|
let
|
||||||
inherit (bootPkgs) ghc;
|
inherit (bootPkgs) ghc;
|
||||||
|
|
||||||
|
@ -15,7 +15,7 @@
|
|||||||
|
|
||||||
, # If enabled, GHC will be built with the GPL-free but slower integer-simple
|
, # If enabled, GHC will be built with the GPL-free but slower integer-simple
|
||||||
# library instead of the faster but GPLed integer-gmp library.
|
# 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.
|
, # If enabled, use -fPIC when compiling static libs.
|
||||||
enableRelocatedStaticLibs ? targetPlatform != hostPlatform
|
enableRelocatedStaticLibs ? targetPlatform != hostPlatform
|
||||||
@ -33,8 +33,6 @@
|
|||||||
ghcFlavour ? stdenv.lib.optionalString (targetPlatform != hostPlatform) "perf-cross"
|
ghcFlavour ? stdenv.lib.optionalString (targetPlatform != hostPlatform) "perf-cross"
|
||||||
}:
|
}:
|
||||||
|
|
||||||
assert !enableIntegerSimple -> gmp != null;
|
|
||||||
|
|
||||||
let
|
let
|
||||||
inherit (bootPkgs) ghc;
|
inherit (bootPkgs) ghc;
|
||||||
|
|
||||||
|
@ -8,12 +8,22 @@
|
|||||||
* jssecacerts
|
* jssecacerts
|
||||||
* cacerts
|
* 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 = "";
|
String temporaryName = "";
|
||||||
File temporaryFile = null;
|
File temporaryFile = null;
|
||||||
long temporaryTime = 0L;
|
long temporaryTime = 0L;
|
||||||
+ if (storePropName == null){
|
+ if (storePropName == null) {
|
||||||
+ storePropName = System.getenv("JAVAX_NET_SSL_TRUSTSTORE");
|
+ storePropName = jsseDefaultStore;
|
||||||
+ }
|
+ }
|
||||||
if (!"NONE".equals(storePropName)) {
|
if (!"NONE".equals(storePropName)) {
|
||||||
String[] fileNames =
|
String[] fileNames =
|
||||||
|
@ -3,13 +3,13 @@
|
|||||||
|
|
||||||
stdenv.mkDerivation ( rec {
|
stdenv.mkDerivation ( rec {
|
||||||
name = "ponyc-${version}";
|
name = "ponyc-${version}";
|
||||||
version = "0.22.6";
|
version = "0.23.0";
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "ponylang";
|
owner = "ponylang";
|
||||||
repo = "ponyc";
|
repo = "ponyc";
|
||||||
rev = version;
|
rev = version;
|
||||||
sha256 = "05y0qcfdyzv6cgizhbg6yl7rrlbfbkcr0jmxjlzhvhz7dypk20cl";
|
sha256 = "1m0zvl30926652akyzpvy5m7jn35697d5mkg3xbn3yqwbsfk4yhk";
|
||||||
};
|
};
|
||||||
|
|
||||||
buildInputs = [ llvm makeWrapper which ];
|
buildInputs = [ llvm makeWrapper which ];
|
||||||
|
@ -1,16 +1,15 @@
|
|||||||
{ stdenv, fetchzip, fetchFromGitHub, boost, cmake, z3 }:
|
{ stdenv, fetchzip, fetchFromGitHub, boost, cmake, z3 }:
|
||||||
|
|
||||||
let
|
let
|
||||||
version = "0.4.23";
|
version = "0.4.24";
|
||||||
rev = "124ca40dc525a987a88176c6e5170978e82fa290";
|
rev = "e67f0147998a9e3835ed3ce8bf6a0a0c634216c5";
|
||||||
sha256 = "07l8rfqh95yrdmbxc4pfb77s06k5v65dk3rgdqscqmwchkndrmm0";
|
sha256 = "1gy2miv6ia1z98zy6w4y03balwfr964bnvwzyg8v7pn2mayqnaap";
|
||||||
jsoncppURL = https://github.com/open-source-parsers/jsoncpp/archive/1.7.7.tar.gz;
|
jsoncppURL = https://github.com/open-source-parsers/jsoncpp/archive/1.8.4.tar.gz;
|
||||||
jsoncpp = fetchzip {
|
jsoncpp = fetchzip {
|
||||||
url = jsoncppURL;
|
url = jsoncppURL;
|
||||||
sha256 = "0jz93zv17ir7lbxb3dv8ph2n916rajs8i96immwx9vb45pqid3n0";
|
sha256 = "1z0gj7a6jypkijmpknis04qybs1hkd04d1arr3gy89lnxmp6qzlm";
|
||||||
};
|
};
|
||||||
in
|
in
|
||||||
|
|
||||||
stdenv.mkDerivation {
|
stdenv.mkDerivation {
|
||||||
name = "solc-${version}";
|
name = "solc-${version}";
|
||||||
|
|
||||||
@ -21,7 +20,6 @@ stdenv.mkDerivation {
|
|||||||
};
|
};
|
||||||
|
|
||||||
patches = [
|
patches = [
|
||||||
./patches/boost-shared-libs.patch
|
|
||||||
./patches/shared-libs-install.patch
|
./patches/shared-libs-install.patch
|
||||||
];
|
];
|
||||||
|
|
||||||
@ -30,17 +28,23 @@ stdenv.mkDerivation {
|
|||||||
echo >commit_hash.txt "${rev}"
|
echo >commit_hash.txt "${rev}"
|
||||||
substituteInPlace cmake/jsoncpp.cmake \
|
substituteInPlace cmake/jsoncpp.cmake \
|
||||||
--replace "${jsoncppURL}" ${jsoncpp}
|
--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 = [
|
cmakeFlags = [
|
||||||
"-DBoost_USE_STATIC_LIBS=OFF"
|
"-DBoost_USE_STATIC_LIBS=OFF"
|
||||||
"-DBUILD_SHARED_LIBS=ON"
|
"-DBUILD_SHARED_LIBS=ON"
|
||||||
"-DINSTALL_LLLC=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 ];
|
nativeBuildInputs = [ cmake ];
|
||||||
buildInputs = [ boost z3 ];
|
buildInputs = [ boost z3 ];
|
||||||
|
|
||||||
|
@ -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)
|
|
@ -1,11 +1,12 @@
|
|||||||
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
diff --git a/CMakeLists.txt b/CMakeLists.txt
|
||||||
index 4ac56b43..dacf3853 100644
|
index 0c05208f..8893648e 100644
|
||||||
--- a/CMakeLists.txt
|
--- a/CMakeLists.txt
|
||||||
+++ b/CMakeLists.txt
|
+++ b/CMakeLists.txt
|
||||||
@@ -48,6 +48,19 @@ add_subdirectory(libevmasm)
|
@@ -48,6 +48,20 @@ add_subdirectory(libevmasm)
|
||||||
add_subdirectory(libsolidity)
|
add_subdirectory(libsolidity)
|
||||||
add_subdirectory(libsolc)
|
add_subdirectory(libsolc)
|
||||||
|
|
||||||
|
+
|
||||||
+install(DIRECTORY libdevcore/
|
+install(DIRECTORY libdevcore/
|
||||||
+ DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/libdevcore
|
+ DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/libdevcore
|
||||||
+ FILES_MATCHING PATTERN "*.h")
|
+ FILES_MATCHING PATTERN "*.h")
|
||||||
@ -38,7 +39,7 @@ index 86192c1b..e7f15e93 100644
|
|||||||
@@ -3,3 +3,4 @@ file(GLOB headers "*.h")
|
@@ -3,3 +3,4 @@ file(GLOB headers "*.h")
|
||||||
|
|
||||||
add_library(evmasm ${sources} ${headers})
|
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})
|
+install(TARGETS evmasm LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR})
|
||||||
diff --git a/liblll/CMakeLists.txt b/liblll/CMakeLists.txt
|
diff --git a/liblll/CMakeLists.txt b/liblll/CMakeLists.txt
|
||||||
index 4cdc073a..b61f03c7 100644
|
index 4cdc073a..b61f03c7 100644
|
||||||
@ -50,11 +51,10 @@ index 4cdc073a..b61f03c7 100644
|
|||||||
target_link_libraries(lll PUBLIC evmasm devcore)
|
target_link_libraries(lll PUBLIC evmasm devcore)
|
||||||
+install(TARGETS lll LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR})
|
+install(TARGETS lll LIBRARY DESTINATION ${CMAKE_INSTALL_LIBDIR})
|
||||||
diff --git a/libsolidity/CMakeLists.txt b/libsolidity/CMakeLists.txt
|
diff --git a/libsolidity/CMakeLists.txt b/libsolidity/CMakeLists.txt
|
||||||
index 97b01c83..e876177e 100644
|
index 0bdec4b4..e876177e 100644
|
||||||
--- a/libsolidity/CMakeLists.txt
|
--- a/libsolidity/CMakeLists.txt
|
||||||
+++ b/libsolidity/CMakeLists.txt
|
+++ b/libsolidity/CMakeLists.txt
|
||||||
@@ -28,7 +28,8 @@ else()
|
@@ -29,6 +29,7 @@ endif()
|
||||||
endif()
|
|
||||||
|
|
||||||
add_library(solidity ${sources} ${headers})
|
add_library(solidity ${sources} ${headers})
|
||||||
target_link_libraries(solidity PUBLIC evmasm devcore ${Boost_FILESYSTEM_LIBRARY} ${Boost_SYSTEM_LIBRARY})
|
target_link_libraries(solidity PUBLIC evmasm devcore ${Boost_FILESYSTEM_LIBRARY} ${Boost_SYSTEM_LIBRARY})
|
||||||
|
@ -348,7 +348,7 @@ self: super: {
|
|||||||
itanium-abi = dontCheck super.itanium-abi;
|
itanium-abi = dontCheck super.itanium-abi;
|
||||||
katt = dontCheck super.katt;
|
katt = dontCheck super.katt;
|
||||||
language-slice = dontCheck super.language-slice;
|
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;
|
ldap-client = dontCheck super.ldap-client;
|
||||||
lensref = dontCheck super.lensref;
|
lensref = dontCheck super.lensref;
|
||||||
lucid = dontCheck super.lucid; #https://github.com/chrisdone/lucid/issues/25
|
lucid = dontCheck super.lucid; #https://github.com/chrisdone/lucid/issues/25
|
||||||
|
@ -23,13 +23,6 @@ self: super:
|
|||||||
};
|
};
|
||||||
in stage1 // stage2 // {
|
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);
|
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);
|
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);
|
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
|
# triggers an internal pattern match failure in haddock
|
||||||
# https://github.com/haskell/haddock/issues/553
|
# https://github.com/haskell/haddock/issues/553
|
||||||
wai = dontHaddock super.wai;
|
wai = dontHaddock super.wai;
|
||||||
|
|
||||||
|
base-orphans = dontCheck super.base-orphans;
|
||||||
|
distributive = dontCheck super.distributive;
|
||||||
}
|
}
|
||||||
|
@ -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
|
let
|
||||||
# workaround https://github.com/NixOS/nixpkgs/issues/37364
|
# workaround https://github.com/NixOS/nixpkgs/issues/37364
|
||||||
@ -19,12 +19,18 @@ in
|
|||||||
name = "jogl-${version}";
|
name = "jogl-${version}";
|
||||||
|
|
||||||
src = fetchgit {
|
src = fetchgit {
|
||||||
url = http://jogamp.org/srv/scm/jogl.git;
|
url = git://jogamp.org/srv/scm/jogl.git;
|
||||||
rev = "v${version}";
|
rev = "v${version}";
|
||||||
sha256 = "0msi2gxiqm2yqwkmxqbh521xdrimw1fly20g890r357rcgj8fsn3";
|
sha256 = "0msi2gxiqm2yqwkmxqbh521xdrimw1fly20g890r357rcgj8fsn3";
|
||||||
fetchSubmodules = true;
|
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 ];
|
buildInputs = [ jdk-without-symlinks ant git udev xorg.libX11 xorg.libXrandr xorg.libXcursor xorg.libXt xorg.libXxf86vm xorg.libXrender ];
|
||||||
|
|
||||||
buildPhase = ''
|
buildPhase = ''
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
, libuuid, json-glib, meson, gperf, ninja
|
, libuuid, json-glib, meson, gperf, ninja
|
||||||
}:
|
}:
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
name = "appstream-glib-0.7.8";
|
name = "appstream-glib-0.7.9";
|
||||||
|
|
||||||
outputs = [ "out" "dev" "man" "installedTests" ];
|
outputs = [ "out" "dev" "man" "installedTests" ];
|
||||||
outputBin = "dev";
|
outputBin = "dev";
|
||||||
@ -13,7 +13,7 @@ stdenv.mkDerivation rec {
|
|||||||
owner = "hughsie";
|
owner = "hughsie";
|
||||||
repo = "appstream-glib";
|
repo = "appstream-glib";
|
||||||
rev = stdenv.lib.replaceStrings ["." "-"] ["_" "_"] name;
|
rev = stdenv.lib.replaceStrings ["." "-"] ["_" "_"] name;
|
||||||
sha256 = "10hcl3sl3g8ajg9mssq3g4dbzz0d4b2ybimrcq71cpycqrqhilhx";
|
sha256 = "10b32qw7iy0v1jvmf18wqgs8d1cpy52zm5rzw0wv421n90qiyidk";
|
||||||
};
|
};
|
||||||
|
|
||||||
nativeBuildInputs = [
|
nativeBuildInputs = [
|
||||||
|
6
pkgs/development/libraries/asio/1.10.nix
Normal file
6
pkgs/development/libraries/asio/1.10.nix
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
{callPackage, ... } @ args:
|
||||||
|
|
||||||
|
callPackage ./generic.nix (args // {
|
||||||
|
version = "1.10.8";
|
||||||
|
sha256 = "0jgdl4fxw0hwy768rl3lhdc0czz7ak7czf3dg10j21pdpfpfvpi6";
|
||||||
|
})
|
6
pkgs/development/libraries/asio/1.12.nix
Normal file
6
pkgs/development/libraries/asio/1.12.nix
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
{callPackage, ... } @ args:
|
||||||
|
|
||||||
|
callPackage ./generic.nix (args // {
|
||||||
|
version = "1.12.1";
|
||||||
|
sha256 = "0nln45662kg799ykvqx5m9z9qcsmadmgg6r5najryls7x16in2d9";
|
||||||
|
})
|
@ -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;
|
|
||||||
};
|
|
||||||
|
|
||||||
}
|
|
25
pkgs/development/libraries/asio/generic.nix
Normal file
25
pkgs/development/libraries/asio/generic.nix
Normal 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;
|
||||||
|
};
|
||||||
|
}
|
@ -11,7 +11,7 @@ let
|
|||||||
x86_64-linux = "x64/libbass.so";
|
x86_64-linux = "x64/libbass.so";
|
||||||
};
|
};
|
||||||
urlpath = "bass${version}-linux.zip";
|
urlpath = "bass${version}-linux.zip";
|
||||||
sha256 = "1a2z9isabkymz7qmkgklbjpj2wxkvv1cngfp9aj0c9178v97pjd7";
|
sha256 = "0alxx7knkvzwwifqrmzavafwq53flja7s1ckaabk6p2ir2f0j5cp";
|
||||||
};
|
};
|
||||||
|
|
||||||
bass_fx = {
|
bass_fx = {
|
||||||
|
27
pkgs/development/libraries/cctz/default.nix
Normal file
27
pkgs/development/libraries/cctz/default.nix
Normal 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;
|
||||||
|
};
|
||||||
|
}
|
@ -13,7 +13,10 @@ stdenv.mkDerivation rec {
|
|||||||
name = "fftw-${precision}-${version}";
|
name = "fftw-${precision}-${version}";
|
||||||
|
|
||||||
src = fetchurl {
|
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";
|
sha256 = "00z3k8fq561wq2khssqg0kallk0504dzlx989x3vvicjdqpjc4v1";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -75,6 +75,7 @@ let self = stdenv.mkDerivation rec {
|
|||||||
asymptotically faster algorithms.
|
asymptotically faster algorithms.
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
broken = with stdenv.hostPlatform; useAndroidPrebuilt || useiOSPrebuilt;
|
||||||
platforms = platforms.all;
|
platforms = platforms.all;
|
||||||
maintainers = [ maintainers.peti maintainers.vrthra ];
|
maintainers = [ maintainers.peti maintainers.vrthra ];
|
||||||
};
|
};
|
||||||
|
39
pkgs/development/libraries/libblockdev/default.nix
Normal file
39
pkgs/development/libraries/libblockdev/default.nix
Normal 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;
|
||||||
|
};
|
||||||
|
}
|
31
pkgs/development/libraries/libbytesize/default.nix
Normal file
31
pkgs/development/libraries/libbytesize/default.nix
Normal 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;
|
||||||
|
};
|
||||||
|
}
|
@ -1,5 +1,7 @@
|
|||||||
{ stdenv, fetchurl, pkgconfig, libtool, gtk ? null, libcap
|
{ stdenv, lib, fetchurl, fetchpatch, pkgconfig, libtool
|
||||||
, alsaLib, libpulseaudio, gst_all_1, libvorbis }:
|
, gtk ? null
|
||||||
|
, libpulseaudio, gst_all_1, libvorbis, libcap
|
||||||
|
, withAlsa ? stdenv.isLinux, alsaLib }:
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
name = "libcanberra-0.30";
|
name = "libcanberra-0.30";
|
||||||
@ -11,11 +13,20 @@ stdenv.mkDerivation rec {
|
|||||||
|
|
||||||
nativeBuildInputs = [ pkgconfig libtool ];
|
nativeBuildInputs = [ pkgconfig libtool ];
|
||||||
buildInputs = [
|
buildInputs = [
|
||||||
alsaLib libpulseaudio libvorbis gtk libcap
|
libpulseaudio libvorbis gtk
|
||||||
] ++ (with gst_all_1; [ gstreamer gst-plugins-base ]);
|
] ++ (with gst_all_1; [ gstreamer gst-plugins-base ])
|
||||||
|
++ lib.optional stdenv.isLinux libcap
|
||||||
|
++ lib.optional withAlsa alsaLib;
|
||||||
|
|
||||||
configureFlags = "--disable-oss";
|
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 = ''
|
postInstall = ''
|
||||||
for f in $out/lib/*.la; do
|
for f in $out/lib/*.la; do
|
||||||
sed 's|-lltdl|-L${libtool.lib}/lib -lltdl|' -i $f
|
sed 's|-lltdl|-L${libtool.lib}/lib -lltdl|' -i $f
|
||||||
@ -42,6 +53,6 @@ stdenv.mkDerivation rec {
|
|||||||
license = stdenv.lib.licenses.lgpl2Plus;
|
license = stdenv.lib.licenses.lgpl2Plus;
|
||||||
|
|
||||||
maintainers = [ ];
|
maintainers = [ ];
|
||||||
platforms = stdenv.lib.platforms.gnu ++ stdenv.lib.platforms.linux; # arbitrary choice
|
platforms = stdenv.lib.platforms.unix;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
@ -16,7 +16,7 @@ stdenv.mkDerivation rec {
|
|||||||
nativeBuildInputs = [ cmake pkgconfig ];
|
nativeBuildInputs = [ cmake pkgconfig ];
|
||||||
buildInputs = [ libevent openssl ];
|
buildInputs = [ libevent openssl ];
|
||||||
|
|
||||||
doCheck = true;
|
doCheck = (!stdenv.isDarwin);
|
||||||
checkPhase = "ctest";
|
checkPhase = "ctest";
|
||||||
|
|
||||||
meta = with stdenv.lib; {
|
meta = with stdenv.lib; {
|
||||||
|
@ -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
|
let
|
||||||
pname = "libgtop";
|
pname = "libgtop";
|
||||||
version = "2.38.0";
|
version = "2.38.0";
|
||||||
@ -11,8 +11,20 @@ stdenv.mkDerivation rec {
|
|||||||
sha256 = "04mnxgzyb26wqk6qij4iw8cxwl82r8pcsna5dg8vz2j3pdi0wv2g";
|
sha256 = "04mnxgzyb26wqk6qij4iw8cxwl82r8pcsna5dg8vz2j3pdi0wv2g";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
patches = [
|
||||||
|
# Fix darwin build
|
||||||
|
(fetchpatch {
|
||||||
|
url = https://gitlab.gnome.org/GNOME/libgtop/commit/42b049f338363f92c1e93b4549fc944098eae674.patch;
|
||||||
|
sha256 = "0kf9ihgb0wqji6dcvg36s6igkh7b79k6y1n7w7wzsxya84x3hhyn";
|
||||||
|
})
|
||||||
|
];
|
||||||
|
|
||||||
propagatedBuildInputs = [ glib ];
|
propagatedBuildInputs = [ glib ];
|
||||||
nativeBuildInputs = [ pkgconfig perl gettext gobjectIntrospection ];
|
nativeBuildInputs = [ pkgconfig gnome3.gnome-common libtool gtk-doc perl gettext gobjectIntrospection ];
|
||||||
|
|
||||||
|
preConfigure = ''
|
||||||
|
./autogen.sh
|
||||||
|
'';
|
||||||
|
|
||||||
passthru = {
|
passthru = {
|
||||||
updateScript = gnome3.updateScript {
|
updateScript = gnome3.updateScript {
|
||||||
@ -24,6 +36,6 @@ stdenv.mkDerivation rec {
|
|||||||
description = "A library that reads information about processes and the running system";
|
description = "A library that reads information about processes and the running system";
|
||||||
license = licenses.gpl2Plus;
|
license = licenses.gpl2Plus;
|
||||||
maintainers = gnome3.maintainers;
|
maintainers = gnome3.maintainers;
|
||||||
platforms = with platforms; linux ++ darwin;
|
platforms = platforms.unix;
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
40
pkgs/development/libraries/libndctl/default.nix
Normal file
40
pkgs/development/libraries/libndctl/default.nix
Normal 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;
|
||||||
|
};
|
||||||
|
}
|
@ -13,12 +13,12 @@ stdenv.mkDerivation rec {
|
|||||||
|
|
||||||
prePatch = let
|
prePatch = let
|
||||||
debian = fetchurl {
|
debian = fetchurl {
|
||||||
url = http://snapshot.debian.org/archive/debian-debug/20180128T155203Z//pool/main/t/tiff/tiff_4.0.9-3.debian.tar.xz;
|
url = http://http.debian.net/debian/pool/main/t/tiff/tiff_4.0.9-5.debian.tar.xz;
|
||||||
sha256 = "0wya42y7kcq093g3h7ca10cm5sns1mgnkjmdd2qdi59v8arga4y4";
|
sha256 = "15lwcsd46gini27akms2ngyxnwi1hs2yskrv5x2wazs5fw5ii62w";
|
||||||
};
|
};
|
||||||
in ''
|
in ''
|
||||||
tar xf '${debian}'
|
tar xf ${debian}
|
||||||
patches="$patches $(cat debian/patches/series | sed 's|^|debian/patches/|')"
|
patches="$patches $(sed 's|^|debian/patches/|' < debian/patches/series)"
|
||||||
'';
|
'';
|
||||||
|
|
||||||
outputs = [ "bin" "dev" "out" "man" "doc" ];
|
outputs = [ "bin" "dev" "out" "man" "doc" ];
|
||||||
|
44
pkgs/development/libraries/opae/default.nix
Normal file
44
pkgs/development/libraries/opae/default.nix
Normal 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 ];
|
||||||
|
};
|
||||||
|
}
|
@ -19,6 +19,8 @@ in stdenv.mkDerivation rec {
|
|||||||
|
|
||||||
buildInputs = [ systemd ];
|
buildInputs = [ systemd ];
|
||||||
|
|
||||||
|
hardeningDisable = [ "format" ];
|
||||||
|
|
||||||
enableParallelBuilding = true;
|
enableParallelBuilding = true;
|
||||||
|
|
||||||
installPhase = ''
|
installPhase = ''
|
||||||
|
@ -2,13 +2,13 @@
|
|||||||
|
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
name = "libupnp-${version}";
|
name = "libupnp-${version}";
|
||||||
version = "1.6.21";
|
version = "1.8.3";
|
||||||
|
|
||||||
src = fetchFromGitHub {
|
src = fetchFromGitHub {
|
||||||
owner = "mrjimenez";
|
owner = "mrjimenez";
|
||||||
repo = "pupnp";
|
repo = "pupnp";
|
||||||
rev = "release-${version}";
|
rev = "release-${version}";
|
||||||
sha256 = "07ksfhadinaa20542gblrxi9pqz0v6y70a836hp3qr4037id4nm9";
|
sha256 = "1w0kfq1pg3y2wl6gwkm1w872g0qz29w1z9wj08xxmwnk5mkpvsrl";
|
||||||
};
|
};
|
||||||
|
|
||||||
nativeBuildInputs = [ autoreconfHook ];
|
nativeBuildInputs = [ autoreconfHook ];
|
||||||
|
@ -3,11 +3,11 @@
|
|||||||
}:
|
}:
|
||||||
|
|
||||||
stdenv.mkDerivation rec {
|
stdenv.mkDerivation rec {
|
||||||
name = "talloc-2.1.12";
|
name = "talloc-2.1.13";
|
||||||
|
|
||||||
src = fetchurl {
|
src = fetchurl {
|
||||||
url = "mirror://samba/talloc/${name}.tar.gz";
|
url = "mirror://samba/talloc/${name}.tar.gz";
|
||||||
sha256 = "0jv0ri9vj93fczzgl7rn7xvnfgl2kfx4x85cr8h8v52yh7v0qz4q";
|
sha256 = "0iv09iv385x69gfzvassq6m3y0rd8ncylls95dm015xdy3drkww4";
|
||||||
};
|
};
|
||||||
|
|
||||||
nativeBuildInputs = [ pkgconfig ];
|
nativeBuildInputs = [ pkgconfig ];
|
||||||
|
38
pkgs/development/libraries/volume-key/default.nix
Normal file
38
pkgs/development/libraries/volume-key/default.nix
Normal 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;
|
||||||
|
};
|
||||||
|
}
|
@ -1,4 +1,4 @@
|
|||||||
{ lib, buildPythonPackage, fetchPypi, gitdb2, mock, nose, ddt }:
|
{ lib, buildPythonPackage, fetchPypi, git, gitdb2, mock, nose, ddt }:
|
||||||
|
|
||||||
buildPythonPackage rec {
|
buildPythonPackage rec {
|
||||||
version = "2.1.9";
|
version = "2.1.9";
|
||||||
@ -12,6 +12,10 @@ buildPythonPackage rec {
|
|||||||
checkInputs = [ mock nose ddt ];
|
checkInputs = [ mock nose ddt ];
|
||||||
propagatedBuildInputs = [ gitdb2 ];
|
propagatedBuildInputs = [ gitdb2 ];
|
||||||
|
|
||||||
|
postPatch = ''
|
||||||
|
sed -i "s|^refresh()$|refresh(path='${git}/bin/git')|" git/__init__.py
|
||||||
|
'';
|
||||||
|
|
||||||
# Tests require a git repo
|
# Tests require a git repo
|
||||||
doCheck = false;
|
doCheck = false;
|
||||||
|
|
||||||
|
24
pkgs/development/python-modules/ansiconv/default.nix
Normal file
24
pkgs/development/python-modules/ansiconv/default.nix
Normal 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 ];
|
||||||
|
};
|
||||||
|
|
||||||
|
}
|
||||||
|
|
17
pkgs/development/python-modules/astunparse/default.nix
Normal file
17
pkgs/development/python-modules/astunparse/default.nix
Normal 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 ];
|
||||||
|
};
|
||||||
|
}
|
@ -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 ];
|
||||||
|
};
|
||||||
|
}
|
@ -1,4 +1,4 @@
|
|||||||
{ stdenv, buildPythonPackage, fetchPypi, pytest }:
|
{ stdenv, buildPythonPackage, fetchPypi, substituteAll, locale, pytest }:
|
||||||
|
|
||||||
buildPythonPackage rec {
|
buildPythonPackage rec {
|
||||||
pname = "click";
|
pname = "click";
|
||||||
@ -9,6 +9,13 @@ buildPythonPackage rec {
|
|||||||
sha256 = "02qkfpykbq35id8glfgwc38yc430427yd05z1wc5cnld8zgicmgi";
|
sha256 = "02qkfpykbq35id8glfgwc38yc430427yd05z1wc5cnld8zgicmgi";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
patches = [
|
||||||
|
(substituteAll {
|
||||||
|
src = ./fix-paths.patch;
|
||||||
|
locale = "${locale}/bin/locale";
|
||||||
|
})
|
||||||
|
];
|
||||||
|
|
||||||
buildInputs = [ pytest ];
|
buildInputs = [ pytest ];
|
||||||
|
|
||||||
checkPhase = ''
|
checkPhase = ''
|
||||||
|
11
pkgs/development/python-modules/click/fix-paths.patch
Normal file
11
pkgs/development/python-modules/click/fix-paths.patch
Normal 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
|
26
pkgs/development/python-modules/deap/default.nix
Normal file
26
pkgs/development/python-modules/deap/default.nix
Normal 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
Loading…
x
Reference in New Issue
Block a user