Skip to content

Commit

Permalink
Merge remote-tracking branch 'upstream/master' into staging
Browse files Browse the repository at this point in the history
Conflicts:
	pkgs/applications/misc/pytrainer/default.nix
	pkgs/development/tools/pew/default.nix
	pkgs/tools/misc/you-get/default.nix
  • Loading branch information
dezgeg committed Feb 28, 2018
2 parents ad17db3 + f1dd205 commit 34f95d9
Show file tree
Hide file tree
Showing 261 changed files with 3,045 additions and 2,049 deletions.
2 changes: 1 addition & 1 deletion doc/meta.xml
Expand Up @@ -53,7 +53,7 @@ $ nix-env -qa hello --json
"x86_64-linux",
"armv5tel-linux",
"armv7l-linux",
"mips64el-linux",
"mips32-linux",
"x86_64-darwin",
"i686-cygwin",
"i686-freebsd",
Expand Down
17 changes: 11 additions & 6 deletions lib/systems/default.nix
Expand Up @@ -23,13 +23,15 @@ rec {
config = parse.tripleFromSystem final.parsed;
# Just a guess, based on `system`
platform = platforms.selectBySystem final.system;
# Derived meta-data
libc =
/**/ if final.isDarwin then "libSystem"
else if final.isMinGW then "msvcrt"
else if final.isMusl then "musl"
else if final.isLinux /* default */ then "glibc"
/**/ if final.isDarwin then "libSystem"
else if final.isMinGW then "msvcrt"
else if final.isMusl then "musl"
else if final.isAndroid then "bionic"
else if final.isLinux /* default */ then "glibc"
# TODO(@Ericson2314) think more about other operating systems
else "native/impure";
else "native/impure";
extensions = {
sharedLibrary =
/**/ if final.isDarwin then ".dylib"
Expand All @@ -39,7 +41,10 @@ rec {
/**/ if final.isWindows then ".exe"
else "";
};
# Misc boolean options
useAndroidPrebuilt = false;
} // mapAttrs (n: v: v final.parsed) inspect.predicates
// args;
in final;
in assert final.useAndroidPrebuilt -> final.isAndroid;
final;
}
2 changes: 1 addition & 1 deletion lib/systems/doubles.nix
Expand Up @@ -9,7 +9,7 @@ let
"aarch64-linux"
"armv5tel-linux" "armv6l-linux" "armv7l-linux"

"mips64el-linux"
"mipsel-linux"

"i686-cygwin" "i686-freebsd" "i686-linux" "i686-netbsd" "i686-openbsd"

Expand Down
9 changes: 8 additions & 1 deletion lib/systems/examples.nix
Expand Up @@ -38,6 +38,13 @@ rec {
platform = platforms.aarch64-multiplatform;
};

aarch64-android-prebuilt = rec {
config = "aarch64-unknown-linux-android";
arch = "aarch64";
platform = platforms.aarch64-multiplatform;
useAndroidPrebuilt = true;
};

scaleway-c1 = armv7l-hf-multiplatform // rec {
platform = platforms.scaleway-c1;
inherit (platform.gcc) fpu;
Expand All @@ -51,7 +58,7 @@ rec {
};

fuloongminipc = rec {
config = "mips64el-unknown-linux-gnu";
config = "mipsel-unknown-linux-gnu";
arch = "mips";
float = "hard";
platform = platforms.fuloong2f_n32;
Expand Down
1 change: 1 addition & 0 deletions lib/systems/inspect.nix
Expand Up @@ -34,6 +34,7 @@ rec {
Cygwin = { kernel = kernels.windows; abi = abis.cygnus; };
MinGW = { kernel = kernels.windows; abi = abis.gnu; };

Android = [ { abi = abis.android; } { abi = abis.androideabi; } ];
Musl = with abis; map (a: { abi = a; }) [ musl musleabi musleabihf ];

Kexecable = map (family: { kernel = kernels.linux; cpu.family = family; })
Expand Down
6 changes: 5 additions & 1 deletion lib/systems/parse.nix
Expand Up @@ -75,7 +75,10 @@ rec {
aarch64 = { bits = 64; significantByte = littleEndian; family = "aarch64"; };
i686 = { bits = 32; significantByte = littleEndian; family = "x86"; };
x86_64 = { bits = 64; significantByte = littleEndian; family = "x86"; };
mips64el = { bits = 32; significantByte = littleEndian; family = "mips"; };
mips = { bits = 32; significantByte = bigEndian; family = "mips"; };
mipsel = { bits = 32; significantByte = littleEndian; family = "mips"; };
mips64 = { bits = 64; significantByte = bigEndian; family = "mips"; };
mips64el = { bits = 64; significantByte = littleEndian; family = "mips"; };
powerpc = { bits = 32; significantByte = bigEndian; family = "power"; };
riscv32 = { bits = 32; significantByte = littleEndian; family = "riscv"; };
riscv64 = { bits = 64; significantByte = littleEndian; family = "riscv"; };
Expand Down Expand Up @@ -173,6 +176,7 @@ rec {
types.abi = enum (attrValues abis);

abis = setTypes types.openAbi {
android = {};
cygnus = {};
gnu = {};
msvc = {};
Expand Down
2 changes: 1 addition & 1 deletion lib/systems/platforms.nix
Expand Up @@ -561,6 +561,6 @@ rec {
"armv6l-linux" = raspberrypi;
"armv7l-linux" = armv7l-hf-multiplatform;
"aarch64-linux" = aarch64-multiplatform;
"mips64el-linux" = fuloong2f_n32;
"mipsel-linux" = fuloong2f_n32;
}.${system} or pcBase;
}
4 changes: 2 additions & 2 deletions lib/tests/systems.nix
Expand Up @@ -16,15 +16,15 @@ in with lib.systems.doubles; lib.runTests {

arm = assertTrue (mseteq arm [ "armv5tel-linux" "armv6l-linux" "armv7l-linux" ]);
i686 = assertTrue (mseteq i686 [ "i686-linux" "i686-freebsd" "i686-netbsd" "i686-openbsd" "i686-cygwin" ]);
mips = assertTrue (mseteq mips [ "mips64el-linux" ]);
mips = assertTrue (mseteq mips [ "mipsel-linux" ]);
x86_64 = assertTrue (mseteq x86_64 [ "x86_64-linux" "x86_64-darwin" "x86_64-freebsd" "x86_64-openbsd" "x86_64-netbsd" "x86_64-cygwin" "x86_64-solaris" ]);

cygwin = assertTrue (mseteq cygwin [ "i686-cygwin" "x86_64-cygwin" ]);
darwin = assertTrue (mseteq darwin [ "x86_64-darwin" ]);
freebsd = assertTrue (mseteq freebsd [ "i686-freebsd" "x86_64-freebsd" ]);
gnu = assertTrue (mseteq gnu (linux /* ++ hurd ++ kfreebsd ++ ... */));
illumos = assertTrue (mseteq illumos [ "x86_64-solaris" ]);
linux = assertTrue (mseteq linux [ "i686-linux" "x86_64-linux" "armv5tel-linux" "armv6l-linux" "armv7l-linux" "aarch64-linux" "mips64el-linux" ]);
linux = assertTrue (mseteq linux [ "i686-linux" "x86_64-linux" "armv5tel-linux" "armv6l-linux" "armv7l-linux" "aarch64-linux" "mipsel-linux" ]);
netbsd = assertTrue (mseteq netbsd [ "i686-netbsd" "x86_64-netbsd" ]);
openbsd = assertTrue (mseteq openbsd [ "i686-openbsd" "x86_64-openbsd" ]);
unix = assertTrue (mseteq unix (linux ++ darwin ++ freebsd ++ openbsd ++ netbsd ++ illumos));
Expand Down
30 changes: 30 additions & 0 deletions nixos/modules/hardware/digitalbitbox.nix
@@ -0,0 +1,30 @@
{ config, lib, pkgs, ... }:

with lib;

let
cfg = config.hardware.digitalbitbox;
in

{
options.hardware.digitalbitbox = {
enable = mkOption {
type = types.bool;
default = false;
description = ''
Enables udev rules for Digital Bitbox devices.
'';
};

package = mkOption {
type = types.package;
default = pkgs.digitalbitbox;
defaultText = "pkgs.digitalbitbox";
description = "The Digital Bitbox package to use. This can be used to install a package with udev rules that differ from the defaults.";
};
};

config = mkIf cfg.enable {
services.udev.packages = [ cfg.package ];
};
}
2 changes: 2 additions & 0 deletions nixos/modules/module-list.nix
Expand Up @@ -31,6 +31,7 @@
./hardware/ckb.nix
./hardware/cpu/amd-microcode.nix
./hardware/cpu/intel-microcode.nix
./hardware/digitalbitbox.nix
./hardware/sensor/iio.nix
./hardware/ksm.nix
./hardware/mcelog.nix
Expand Down Expand Up @@ -78,6 +79,7 @@
./programs/command-not-found/command-not-found.nix
./programs/criu.nix
./programs/dconf.nix
./programs/digitalbitbox/default.nix
./programs/environment.nix
./programs/fish.nix
./programs/freetds.nix
Expand Down
39 changes: 39 additions & 0 deletions nixos/modules/programs/digitalbitbox/default.nix
@@ -0,0 +1,39 @@
{ config, lib, pkgs, ... }:

with lib;

let
cfg = config.programs.digitalbitbox;
in

{
options.programs.digitalbitbox = {
enable = mkOption {
type = types.bool;
default = false;
description = ''
Installs the Digital Bitbox application and enables the complementary hardware module.
'';
};

package = mkOption {
type = types.package;
default = pkgs.digitalbitbox;
defaultText = "pkgs.digitalbitbox";
description = "The Digital Bitbox package to use. This can be used to install a package with udev rules that differ from the defaults.";
};
};

config = mkIf cfg.enable {
environment.systemPackages = [ cfg.package ];
hardware.digitalbitbox = {
enable = true;
package = cfg.package;
};
};

meta = {
doc = ./doc.xml;
maintainers = with stdenv.lib.maintainers; [ vidbina ];
};
}
85 changes: 85 additions & 0 deletions nixos/modules/programs/digitalbitbox/doc.xml
@@ -0,0 +1,85 @@
<chapter xmlns="http://docbook.org/ns/docbook"
xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns:xi="http://www.w3.org/2001/XInclude"
version="5.0"
xml:id="module-programs-digitalbitbox">

<title>Digital Bitbox</title>

<para>
Digital Bitbox is a hardware wallet and second-factor authenticator.
</para>

<para>
The <literal>digitalbitbox</literal> programs module may be
installed by setting <literal>programs.digitalbitbox</literal>
to <literal>true</literal> in a manner similar to

<programlisting>
programs.digitalbitbox.enable = true;
</programlisting>

and bundles the <literal>digitalbitbox</literal> package (see <xref
linkend="sec-digitalbitbox-package" />), which contains the
<literal>dbb-app</literal> and <literal>dbb-cli</literal> binaries,
along with the hardware module (see <xref
linkend="sec-digitalbitbox-hardware-module" />) which sets up the
necessary udev rules to access the device.
</para>

<para>
Enabling the digitalbitbox module is pretty much the easiest way to
get a Digital Bitbox device working on your system.
</para>

<para>
For more information, see
<link xlink:href="https://digitalbitbox.com/start_linux" />.
</para>

<section xml:id="sec-digitalbitbox-package">
<title>Package</title>

<para>
The binaries, <literal>dbb-app</literal> (a GUI tool) and
<literal>dbb-cli</literal> (a CLI tool), are available through the
<literal>digitalbitbox</literal> package which could be installed
as follows:

<programlisting>
environment.systemPackages = [
pkgs.digitalbitbox
];
</programlisting>
</para>
</section>


<section xml:id="sec-digitalbitbox-hardware-module">
<title>Hardware</title>

<para>
The digitalbitbox hardware package enables the udev rules for
Digital Bitbox devices and may be installed as follows:

<programlisting>
hardware.digitalbitbox.enable = true;
</programlisting>
</para>

<para>
In order to alter the udev rules, one may provide different values for
the <literal>udevRule51</literal> and <literal>udevRule52</literal>
attributes by means of overriding as follows:

<programlisting>
programs.digitalbitbox = {
enable = true;
package = pkgs.digitalbitbox.override {
udevRule51 = "something else";
};
};
</programlisting>
</para>
</section>
</chapter>
2 changes: 1 addition & 1 deletion pkgs/applications/audio/a2jmidid/default.nix
Expand Up @@ -28,6 +28,6 @@ in stdenv.mkDerivation rec {
description = "Daemon for exposing legacy ALSA sequencer applications in JACK MIDI system";
license = licenses.gpl2;
maintainers = [ maintainers.goibhniu ];
platforms = platforms.linux;
platforms = [ "i686-linux" "x86_64-linux" ];
};
}
28 changes: 21 additions & 7 deletions pkgs/applications/audio/aacgain/default.nix
@@ -1,4 +1,4 @@
{ stdenv, fetchFromGitHub }:
{ stdenv, fetchFromGitHub, fetchpatch }:

stdenv.mkDerivation {
name = "aacgain-1.9.0";
Expand All @@ -12,7 +12,19 @@ stdenv.mkDerivation {

hardeningDisable = [ "format" ];

postPatch = ''
(
cd mp4v2
patch -p0 < ${fetchpatch {
name = "fix_missing_ptr_deref.patch";
url = "https://aur.archlinux.org/cgit/aur.git/plain/fix_missing_ptr_deref.patch?h=aacgain-cvs&id=e1a19c920f57063e64bab75cb0d8624731f6e3d7";
sha256 = "1cq7r005nvmwdjb25z80grcam7jv6k57jnl2bh349mg3ajmslbq9";
}}
)
'';

configurePhase = ''
runHook preConfigure
cd mp4v2
./configure
Expand All @@ -21,9 +33,11 @@ stdenv.mkDerivation {
cd ..
./configure
runHook postConfigure
'';

buildPhase = ''
runHook preBuild
cd mp4v2
make libmp4v2.la
Expand All @@ -32,18 +46,18 @@ stdenv.mkDerivation {
cd ..
make
runHook postBuild
'';

installPhase = ''
strip -s aacgain/aacgain
install -vD aacgain/aacgain "$out/bin/aacgain"
install -D aacgain/aacgain "$out/bin/aacgain"
'';

meta = {
meta = with stdenv.lib; {
description = "ReplayGain for AAC files";
homepage = https://github.com/mulx/aacgain;
license = stdenv.lib.licenses.gpl2;
platforms = stdenv.lib.platforms.linux;
maintainers = [ stdenv.lib.maintainers.robbinch ];
license = licenses.gpl2;
platforms = platforms.linux;
maintainers = [ maintainers.robbinch ];
};
}
4 changes: 2 additions & 2 deletions pkgs/applications/audio/meterbridge/default.nix
Expand Up @@ -2,12 +2,12 @@
}:

stdenv.mkDerivation rec {
version = "0.9.2";
version = "0.9.3";
name = "meterbridge-${version}";

src = fetchurl {
url = "http://plugin.org.uk/meterbridge/${name}.tar.gz";
sha256 = "0jb6g3kbfyr5yf8mvblnciva2bmc01ijpr51m21r27rqmgi8gj5k";
sha256 = "0s7n3czfpil94vsd7iblv4xrck9c7zvsz4r3yfbkqcv85pjz1viz";
};

patches = [ ./buf_rect.patch ./fix_build_with_gcc-5.patch];
Expand Down

0 comments on commit 34f95d9

Please sign in to comment.