Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Hydra: ?compare=1430035
- Loading branch information
Showing
196 changed files
with
2,733 additions
and
1,587 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,118 @@ | ||
{ config, lib, pkgs, ... }: | ||
|
||
with lib; | ||
|
||
let | ||
|
||
cfg = config.programs.less; | ||
|
||
configFile = '' | ||
#command | ||
${concatStringsSep "\n" | ||
(mapAttrsToList (command: action: "${command} ${action}") cfg.commands) | ||
} | ||
${if cfg.clearDefaultCommands then "#stop" else ""} | ||
#line-edit | ||
${concatStringsSep "\n" | ||
(mapAttrsToList (command: action: "${command} ${action}") cfg.lineEditingKeys) | ||
} | ||
#env | ||
${concatStringsSep "\n" | ||
(mapAttrsToList (variable: values: "${variable}=${values}") cfg.envVariables) | ||
} | ||
''; | ||
|
||
lessKey = pkgs.runCommand "lesskey" | ||
{ src = pkgs.writeText "lessconfig" configFile; } | ||
"${pkgs.less}/bin/lesskey -o $out $src"; | ||
|
||
in | ||
|
||
{ | ||
options = { | ||
|
||
programs.less = { | ||
|
||
enable = mkEnableOption "less"; | ||
|
||
commands = mkOption { | ||
type = types.attrsOf types.str; | ||
default = {}; | ||
example = { | ||
"h" = "noaction 5\e("; | ||
"l" = "noaction 5\e)"; | ||
}; | ||
description = "Defines new command keys."; | ||
}; | ||
|
||
clearDefaultCommands = mkOption { | ||
type = types.bool; | ||
default = false; | ||
description = '' | ||
Clear all default commands. | ||
You should remember to set the quit key. | ||
Otherwise you will not be able to leave less without killing it. | ||
''; | ||
}; | ||
|
||
lineEditingKeys = mkOption { | ||
type = types.attrsOf types.str; | ||
default = {}; | ||
example = { | ||
"\e" = "abort"; | ||
}; | ||
description = "Defines new line-editing keys."; | ||
}; | ||
|
||
envVariables = mkOption { | ||
type = types.attrsOf types.str; | ||
default = {}; | ||
example = { | ||
LESS = "--quit-if-one-screen"; | ||
}; | ||
description = "Defines environment variables."; | ||
}; | ||
|
||
lessopen = mkOption { | ||
type = types.nullOr types.str; | ||
default = "|${pkgs.lesspipe}/bin/lesspipe.sh %s"; | ||
description = '' | ||
Before less opens a file, it first gives your input preprocessor a chance to modify the way the contents of the file are displayed. | ||
''; | ||
}; | ||
|
||
lessclose = mkOption { | ||
type = types.nullOr types.str; | ||
default = null; | ||
description = '' | ||
When less closes a file opened in such a way, it will call another program, called the input postprocessor, which may perform any desired clean-up action (such as deleting the replacement file created by LESSOPEN). | ||
''; | ||
}; | ||
}; | ||
}; | ||
|
||
config = mkIf cfg.enable { | ||
|
||
environment.systemPackages = [ pkgs.less ]; | ||
|
||
environment.variables = { | ||
"LESSKEY_SYSTEM" = toString lessKey; | ||
} // optionalAttrs (cfg.lessopen != null) { | ||
"LESSOPEN" = cfg.lessopen; | ||
} // optionalAttrs (cfg.lessclose != null) { | ||
"LESSCLOSE" = cfg.lessclose; | ||
}; | ||
|
||
warnings = optional ( | ||
cfg.clearDefaultCommands && (all (x: x != "quit") (attrValues cfg.commands)) | ||
) '' | ||
config.programs.less.clearDefaultCommands clears all default commands of less but there is no alternative binding for exiting. | ||
Consider adding a binding for 'quit'. | ||
''; | ||
}; | ||
|
||
meta.maintainers = with maintainers; [ johnazoidberg ]; | ||
|
||
} |
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
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,21 @@ | ||
import ./make-test.nix ({ pkgs, ...}: { | ||
name = "borgbackup"; | ||
meta = with pkgs.stdenv.lib.maintainers; { | ||
maintainers = [ mic92 ]; | ||
}; | ||
|
||
nodes = { | ||
machine = { config, pkgs, ... }: { | ||
environment.systemPackages = [ pkgs.borgbackup ]; | ||
}; | ||
}; | ||
|
||
testScript = '' | ||
my $borg = "BORG_PASSPHRASE=supersecret borg"; | ||
$machine->succeed("$borg init --encryption=repokey /tmp/backup"); | ||
$machine->succeed("mkdir /tmp/data/ && echo 'data' >/tmp/data/file"); | ||
$machine->succeed("$borg create --stats /tmp/backup::test /tmp/data"); | ||
$machine->succeed("$borg extract /tmp/backup::test"); | ||
$machine->succeed('c=$(cat data/file) && echo "c = $c" >&2 && [[ "$c" == "data" ]]'); | ||
''; | ||
}) |
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,89 @@ | ||
{ stdenv, fetchFromGitHub | ||
, makeWrapper, makeDesktopItem | ||
, qtbase, qmake, qtmultimedia, qttools | ||
, qtgraphicaleffects, qtdeclarative | ||
, qtlocation, qtquickcontrols, qtwebchannel | ||
, qtwebengine, qtx11extras, qtxmlpatterns | ||
, monero, unbound, readline, boost, libunwind | ||
}: | ||
|
||
with stdenv.lib; | ||
|
||
stdenv.mkDerivation rec { | ||
name = "monero-gui-${version}"; | ||
version = "0.11.1.0"; | ||
|
||
src = fetchFromGitHub { | ||
owner = "monero-project"; | ||
repo = "monero-gui"; | ||
rev = "v${version}"; | ||
sha256 = "01d7apwrv8j8bh7plvvhlnll3ransaha3n6rx19nkgvfn319hswq"; | ||
}; | ||
|
||
nativeBuildInputs = [ qmake ]; | ||
|
||
buildInputs = [ | ||
qtbase qtmultimedia qtgraphicaleffects | ||
qtdeclarative qtlocation qtquickcontrols | ||
qtwebchannel qtwebengine qtx11extras | ||
qtxmlpatterns monero unbound readline | ||
boost libunwind makeWrapper | ||
]; | ||
|
||
patches = [ | ||
./move-log-file.patch | ||
./move-translations-dir.patch | ||
]; | ||
|
||
postPatch = '' | ||
echo ' | ||
var GUI_VERSION = "${version}"; | ||
var GUI_MONERO_VERSION = "${getVersion monero}"; | ||
' > version.js | ||
substituteInPlace monero-wallet-gui.pro \ | ||
--replace '$$[QT_INSTALL_BINS]/lrelease' '${getDev qttools}/bin/lrelease' | ||
substituteInPlace src/daemon/DaemonManager.cpp \ | ||
--replace 'QApplication::applicationDirPath() + "' '"${monero}/bin' | ||
''; | ||
|
||
makeFlags = [ "INSTALL_ROOT=$(out)" ]; | ||
|
||
preBuild = '' | ||
sed -i s#/opt/monero-wallet-gui##g Makefile | ||
make -C src/zxcvbn-c | ||
''; | ||
|
||
desktopItem = makeDesktopItem { | ||
name = "monero-wallet-gui"; | ||
exec = "monero-wallet-gui"; | ||
icon = "monero"; | ||
desktopName = "Monero Wallet"; | ||
genericName = "Wallet"; | ||
categories = "Application;Network;Utility;"; | ||
}; | ||
|
||
postInstall = '' | ||
# install desktop entry | ||
mkdir -p $out/share/applications | ||
cp ${desktopItem}/share/applications/* $out/share/applications | ||
# install translations | ||
cp -r release/bin/translations $out/share/ | ||
# install icons | ||
for n in 16 24 32 48 64 96 128 256; do | ||
size=$n"x"$n | ||
mkdir -p $out/share/icons/hicolor/$size/apps | ||
cp $src/images/appicons/$size.png \ | ||
$out/share/icons/hicolor/$size/apps/monero.png | ||
done; | ||
''; | ||
|
||
meta = { | ||
description = "Private, secure, untraceable currency"; | ||
homepage = https://getmonero.org/; | ||
license = licenses.bsd3; | ||
platforms = platforms.all; | ||
maintainers = with maintainers; [ rnhmjoj ]; | ||
}; | ||
} |
Oops, something went wrong.