-
-
Notifications
You must be signed in to change notification settings - Fork 12.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This brings thousands of rebuilds. Hydra nixpkgs: ?compare=1597944
- Loading branch information
Showing
160 changed files
with
4,233 additions
and
2,373 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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"; | ||
}; | ||
}; | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
103 changes: 103 additions & 0 deletions
103
pkgs/applications/blockchains/whirlpool-gui/default.nix
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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" ]; | ||
}; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.