Skip to content

Commit

Permalink
Merge master into staging-next
Browse files Browse the repository at this point in the history
This brings thousands of rebuilds.
Hydra nixpkgs: ?compare=1597944
  • Loading branch information
vcunat committed Jul 4, 2020
2 parents deb7815 + 9f93642 commit e1206a2
Show file tree
Hide file tree
Showing 160 changed files with 4,233 additions and 2,373 deletions.
5 changes: 5 additions & 0 deletions lib/licenses.nix
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,11 @@ lib.mapAttrs (n: v: v // { shortName = n; }) {
fullName = ''BSD 2-clause "Simplified" License'';
};

bsd2Patent = spdx {
spdxId = "BSD-2-Clause-Patent";
fullName = ''BSD-2-Clause Plus Patent License'';
};

bsd3 = spdx {
spdxId = "BSD-3-Clause";
fullName = ''BSD 3-clause "New" or "Revised" License'';
Expand Down
12 changes: 12 additions & 0 deletions maintainers/maintainer-list.nix
Original file line number Diff line number Diff line change
Expand Up @@ -9013,4 +9013,16 @@
github = "cpcloud";
githubId = 417981;
};
davegallant = {
name = "Dave Gallant";
email = "davegallant@gmail.com";
github = "davegallant";
githubId = 4519234;
};
saulecabrera = {
name = "Saúl Cabrera";
email = "saulecabrera@gmail.com";
github = "saulecabrera";
githubId = 1423601;
};
}
1 change: 1 addition & 0 deletions nixos/modules/module-list.nix
Original file line number Diff line number Diff line change
Expand Up @@ -686,6 +686,7 @@
./services/networking/ocserv.nix
./services/networking/ofono.nix
./services/networking/oidentd.nix
./services/networking/onedrive.nix
./services/networking/openfire.nix
./services/networking/openvpn.nix
./services/networking/ostinato.nix
Expand Down
72 changes: 72 additions & 0 deletions nixos/modules/services/networking/onedrive.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
{ config, lib, pkgs, ... }:
let
cfg = config.services.onedrive;

onedriveLauncher = pkgs.writeShellScriptBin
"onedrive-launcher"
''
# XDG_CONFIG_HOME is not recognized in the environment here.
if [ -f $HOME/.config/onedrive-launcher ]
then
# Hopefully using underscore boundary helps locate variables
for _onedrive_config_dirname_ in $(cat $HOME/.config/onedrive-launcher | grep -v '[ \t]*#' )
do
systemctl --user start onedrive@$_onedrive_config_dirname_
done
else
systemctl --user start onedrive@onedrive
fi
''
;

in {
### Documentation
# meta.doc = ./onedrive.xml;

### Interface

options.services.onedrive = {
enable = lib.mkOption {
type = lib.types.bool;
default = false;
description = "Enable OneDrive service";
};

package = lib.mkOption {
type = lib.types.package;
default = pkgs.onedrive;
defaultText = "pkgs.onedrive";
example = lib.literalExample "pkgs.onedrive";
description = ''
OneDrive package to use.
'';
};
};
### Implementation

config = lib.mkIf cfg.enable {
environment.systemPackages = [ cfg.package ];

systemd.user.services."onedrive@" = {
description = "Onedrive sync service";

serviceConfig = {
Type = "simple";
ExecStart = ''
${cfg.package}/bin/onedrive --monitor --verbose --confdir=%h/.config/%i
'';
Restart="on-failure";
RestartSec=3;
RestartPreventExitStatus=3;
};
};

systemd.user.services.onedrive-launcher = {
wantedBy = [ "default.target" ];
serviceConfig = {
Type = "oneshot";
ExecStart = "${onedriveLauncher}/bin/onedrive-launcher";
};
};
};
}
34 changes: 34 additions & 0 deletions nixos/modules/services/networking/onedrive.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
<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="onedrive">
<title>Microsoft OneDrive</title>
<para>
Microsoft Onedrive is a popular cloud file-hosting service, used by 85% of Fortune 500 companies. NixOS uses a popular OneDrive client for Linux maintained by github user abraunegg. The Linux client is excellent and allows customization of which files or paths to download, not much unlike the default Windows OneDrive client by Microsoft itself. The client allows syncing with multiple onedrive accounts at the same time, of any type- OneDrive personal, OneDrive business, Office365 and Sharepoint libraries, without any additional charge.
</para>
<para>
For more information, guides and documentation, see <link xlink:href="https://abraunegg.github.io/"/>.
</para>
<para>
To enable OneDrive support, add the following to your <filename>configuration.nix</filename>:
<programlisting>
<xref linkend="opt-services.onedrive.enable"/> = true;
</programlisting>
This installs the <literal>onedrive</literal> package and a service <literal>onedriveLauncher</literal> which will instantiate a <literal>onedrive</literal> service for all your OneDrive accounts. Follow the steps in documentation of the onedrive client to setup your accounts. To use the service with multiple accounts, create a file named <filename>onedrive-launcher</filename> in <filename>~/.config</filename> and add the filename of the config directory, relative to <filename>~/.config</filename>. For example, if you have two OneDrive accounts with configs in <filename>~/.config/onedrive_bob_work</filename> and <filename>~/.config/onedrive_bob_personal</filename>, add the following lines:
<programlisting>
onedrive_bob_work
# Not in use:
# onedrive_bob_office365
onedrive_bob_personal
</programlisting>
No such file needs to be created if you are using only a single OneDrive account with config in the default location <filename>~/.config/onedrive</filename>, in the absence of <filename>~/.config/onedrive-launcher</filename>, only a single service is instantiated, with default config path.
</para>

<para>
If you wish to use a custom OneDrive package, say from another channel, add the following line:
<programlisting>
<xref linkend="opt-services.onedrive.package"/> = pkgs.unstable.onedrive;
</programlisting>
</para>
</chapter>
3 changes: 3 additions & 0 deletions nixos/modules/system/boot/plymouth.nix
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,8 @@ in
systemd.services.plymouth-poweroff.wantedBy = [ "poweroff.target" ];
systemd.services.plymouth-reboot.wantedBy = [ "reboot.target" ];
systemd.services.plymouth-read-write.wantedBy = [ "sysinit.target" ];
systemd.services.systemd-ask-password-plymouth.wantedBy = ["multi-user.target"];
systemd.paths.systemd-ask-password-plymouth.wantedBy = ["multi-user.target"];

boot.initrd.extraUtilsCommands = ''
copy_bin_and_libs ${pkgs.plymouth}/bin/plymouthd
Expand Down Expand Up @@ -146,6 +148,7 @@ in
# We use `mkAfter` to ensure that LUKS password prompt would be shown earlier than the splash screen.
boot.initrd.preLVMCommands = mkAfter ''
mkdir -p /etc/plymouth
mkdir -p /run/plymouth
ln -s ${configFile} /etc/plymouth/plymouthd.conf
ln -s $extraUtils/share/plymouth/plymouthd.defaults /etc/plymouth/plymouthd.defaults
ln -s $extraUtils/share/plymouth/logo.png /etc/plymouth/logo.png
Expand Down
25 changes: 20 additions & 5 deletions nixos/modules/tasks/filesystems/zfs.nix
Original file line number Diff line number Diff line change
Expand Up @@ -197,9 +197,7 @@ in
Request encryption keys or passwords for all encrypted datasets on import.
For root pools the encryption key can be supplied via both an
interactive prompt (keylocation=prompt) and from a file
(keylocation=file://). Note that for data pools the encryption key can
be only loaded from a file and not via interactive prompt since the
import is processed in a background systemd service.
(keylocation=file://).
'';
};

Expand Down Expand Up @@ -490,7 +488,11 @@ in
description = "Import ZFS pool \"${pool}\"";
# we need systemd-udev-settle until https://github.com/zfsonlinux/zfs/pull/4943 is merged
requires = [ "systemd-udev-settle.service" ];
after = [ "systemd-udev-settle.service" "systemd-modules-load.service" ];
after = [
"systemd-udev-settle.service"
"systemd-modules-load.service"
"systemd-ask-password-console.service"
];
wantedBy = (getPoolMounts pool) ++ [ "local-fs.target" ];
before = (getPoolMounts pool) ++ [ "local-fs.target" ];
unitConfig = {
Expand All @@ -515,7 +517,20 @@ in
done
poolImported "${pool}" || poolImport "${pool}" # Try one last time, e.g. to import a degraded pool.
if poolImported "${pool}"; then
${optionalString cfgZfs.requestEncryptionCredentials "\"${packages.zfsUser}/sbin/zfs\" load-key -r \"${pool}\""}
${optionalString cfgZfs.requestEncryptionCredentials ''
${packages.zfsUser}/sbin/zfs list -rHo name,keylocation ${pool} | while IFS=$'\t' read ds kl; do
(case "$kl" in
none )
;;
prompt )
${config.systemd.package}/bin/systemd-ask-password "Enter key for $ds:" | ${packages.zfsUser}/sbin/zfs load-key "$ds"
;;
* )
${packages.zfsUser}/sbin/zfs load-key "$ds"
;;
esac) < /dev/null # To protect while read ds kl in case anything reads stdin
done
''}
echo "Successfully imported ${pool}"
else
exit 1
Expand Down
4 changes: 2 additions & 2 deletions pkgs/applications/audio/aeolus/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@

stdenv.mkDerivation rec {
pname = "aeolus";
version = "0.9.8";
version = "0.9.9";

src = fetchurl {
url = "https://kokkinizita.linuxaudio.org/linuxaudio/downloads/${pname}-${version}.tar.bz2";
sha256 = "1zfr3567mwbqsfybkhg03n5dvmhllk88c9ayb10qzz2nh6d7g2qn";
sha256 = "04y1j36y7vc93bv299vfiawbww4ym6q7avfx8vw6rmxr817zrch3";
};

buildInputs = [
Expand Down
4 changes: 2 additions & 2 deletions pkgs/applications/audio/deadbeef/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -59,13 +59,13 @@ assert remoteSupport -> curl != null;

stdenv.mkDerivation rec {
pname = "deadbeef";
version = "1.8.3";
version = "1.8.4";

src = fetchFromGitHub {
owner = "DeaDBeeF-Player";
repo = "deadbeef";
rev = version;
sha256 = "0n0q7zfl56gnadcqqp5rg7sbh1xvfcmp7cvmh2ax07037b346qig";
sha256 = "161b0ll8v4cjgwwmk137hzvh0jidlkx56vjkpnr70f0x4jzv2nll";
};

buildInputs = with stdenv.lib; [ jansson ]
Expand Down
103 changes: 103 additions & 0 deletions pkgs/applications/blockchains/whirlpool-gui/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,103 @@
{ stdenv, fetchFromGitHub, callPackage, makeWrapper, makeDesktopItem
, nodejs, yarn, electron_7, jre8, tor }:

let
system = stdenv.hostPlatform.system;

in stdenv.mkDerivation rec {
pname = "whirlpool-gui";
version = "0.10.1";

src = fetchFromGitHub {
owner = "Samourai-Wallet";
repo = pname;
rev = version;
sha256 = "ru6WJQRulhnQCPY2E0x9M6xXtFdj/pg2fu4HpQxhImU=";
};

yarnCache = stdenv.mkDerivation {
name = "${pname}-${version}-${system}-yarn-cache";
inherit src;
phases = [ "unpackPhase" "buildPhase" ];
nativeBuildInputs = [ yarn ];
buildPhase = ''
export HOME=$NIX_BUILD_ROOT
yarn config set yarn-offline-mirror $out
yarn --frozen-lockfile --ignore-scripts --ignore-platform \
--ignore-engines --no-progress --non-interactive
'';

outputHashMode = "recursive";
outputHashAlgo = "sha256";
outputHash = {
x86_64-linux = "6fl4cSwHXWgQcYlqxCae0p1Ppcb9fI5fFrxm7y6wxTo=";
}.${system} or (throw "Unsupported platform ${system}");
};

nativeBuildInputs = [ makeWrapper nodejs yarn ];

configurePhase = ''
# Yarn and bundler wants a real home directory to write cache, config, etc to
export HOME=$NIX_BUILD_ROOT
# Make yarn install packages from our offline cache, not the registry
yarn config --offline set yarn-offline-mirror ${yarnCache}
'';

buildPhase = ''
yarn install --offline --ignore-scripts --frozen-lockfile --no-progress --non-interactive
patchShebangs node_modules/
yarn build
'';

installPhase = ''
mkdir -p $out/{bin,share,libexec/whirlpool-gui/app}
# install production dependencies
yarn install \
--offline --frozen-lockfile --ignore-scripts \
--no-progress --non-interactive \
--production --no-bin-links \
--modules-folder $out/libexec/whirlpool-gui/node_modules
# copy application
cp -r app/{dist,app.html,main.prod.js,main.prod.js.map,img} $out/libexec/whirlpool-gui/app
cp -r package.json resources $out/libexec/whirlpool-gui
# make desktop item
ln -s "${desktopItem}/share/applications" "$out/share/applications"
# wrap electron
makeWrapper '${electron_7}/bin/electron' "$out/bin/whirlpool-gui" \
--add-flags "$out/libexec/whirlpool-gui" \
--prefix PATH : "${jre8}/bin:${tor}/bin"
'';

desktopItem = makeDesktopItem {
name = "whirlpool-gui";
exec = "whirlpool-gui";
icon = "whirlpool-gui";
desktopName = "Whirlpool";
genericName = "Whirlpool";
comment = meta.description;
categories = "Network;";
extraEntries = ''
StartupWMClass=whrilpool-gui
'';
};

passthru.prefetchYarnCache = stdenv.lib.overrideDerivation yarnCache (d: {
outputHash = stdenv.lib.fakeSha256;
});

meta = with stdenv.lib; {
description = "Desktop GUI for Whirlpool by Samourai-Wallet";
homepage = https://www.samouraiwallet.com/whirlpool;
license = licenses.unlicense;
maintainers = [ maintainers.offline ];
platforms = [ "x86_64-linux" ];
};
}
4 changes: 2 additions & 2 deletions pkgs/applications/graphics/drawio/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@

stdenv.mkDerivation rec {
pname = "drawio";
version = "13.3.1";
version = "13.3.5";

src = fetchurl {
url = "https://github.com/jgraph/drawio-desktop/releases/download/v${version}/draw.io-x86_64-${version}.rpm";
sha256 = "0zvxmqqbgfxad1n9pa4h99l8hys486wziw5yyndxbv1v80p55p0p";
sha256 = "16pds6sip90davrlrk17a7ms5nh1bs8js5i0hbci1l8gsfyx22i7";
};

nativeBuildInputs = [
Expand Down
2 changes: 2 additions & 0 deletions pkgs/applications/kde/kdenlive.nix
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@
, rttr
, kpurpose
, kdeclarative
, wrapGAppsHook
}:

mkDerivation {
Expand Down Expand Up @@ -69,6 +70,7 @@ mkDerivation {
rttr
kpurpose
kdeclarative
wrapGAppsHook
];
# Both MLT and FFMpeg paths must be set or Kdenlive will complain that it
# doesn't find them. See:
Expand Down

0 comments on commit e1206a2

Please sign in to comment.