Skip to content

Commit

Permalink
Merge master into haskell-updates
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions[bot] authored Oct 2, 2022
2 parents f486658 + ae1d038 commit a0616b9
Show file tree
Hide file tree
Showing 129 changed files with 3,469 additions and 1,166 deletions.
6 changes: 3 additions & 3 deletions lib/generators.nix
Original file line number Diff line number Diff line change
Expand Up @@ -240,10 +240,10 @@ rec {
* to implicit typing rules, so it should work with older
* parsers as well.
*/
toYAML = {}@args: toJSON args;
toYAML = toJSON;

withRecursion =
args@{
{
/* If this option is not null, the given value will stop evaluating at a certain depth */
depthLimit
/* If this option is true, an error will be thrown, if a certain given depth is exceeded */
Expand Down Expand Up @@ -287,7 +287,7 @@ rec {
allowPrettyValues ? false,
/* If this option is true, the output is indented with newlines for attribute sets and lists */
multiline ? true
}@args:
}:
let
go = indent: v: with builtins;
let isPath = v: typeOf v == "path";
Expand Down
10 changes: 1 addition & 9 deletions lib/modules.nix
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@ let
concatStringsSep
elem
filter
findFirst
foldl'
getAttrFromPath
head
Expand All @@ -34,7 +33,6 @@ let
recursiveUpdate
reverseList sort
setAttrByPath
toList
types
warnIf
zipAttrsWith
Expand All @@ -46,7 +44,6 @@ let
showFiles
showOption
unknownModule
literalExpression
;

showDeclPrefix = loc: decl: prefix:
Expand Down Expand Up @@ -604,7 +601,6 @@ rec {
}
else
let
firstNonOption = findFirst (m: !isOption m.options) "" decls;
nonOptions = filter (m: !isOption m.options) decls;
in
throw "The option `${showOption loc}' in module `${(lib.head optionDecls)._file}' would be a parent of the following options, but its type `${(lib.head optionDecls).options.type.description or "<no description>"}' does not support nested options.\n${
Expand Down Expand Up @@ -652,11 +648,7 @@ rec {
'opts' is a list of modules. Each module has an options attribute which
correspond to the definition of 'loc' in 'opt.file'. */
mergeOptionDecls =
let
coerceOption = file: opt:
if isFunction opt then setDefaultModuleLocation file opt
else setDefaultModuleLocation file { options = opt; };
in loc: opts:
loc: opts:
foldl' (res: opt:
let t = res.type;
t' = opt.options.type;
Expand Down
1 change: 0 additions & 1 deletion lib/options.nix
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ let
concatLists
concatMap
concatMapStringsSep
elemAt
filter
foldl'
head
Expand Down
1 change: 0 additions & 1 deletion lib/sources.nix
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
# Tested in lib/tests/sources.sh
let
inherit (builtins)
hasContext
match
readDir
split
Expand Down
1 change: 0 additions & 1 deletion lib/tests/maintainers.nix
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
}:

let
inherit (lib) types;
checkMaintainer = handle: uncheckedAttrs:
let
prefix = [ "lib" "maintainers" handle ];
Expand Down
2 changes: 0 additions & 2 deletions lib/types.nix
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ let
inherit (lib)
elem
flip
functionArgs
isAttrs
isBool
isDerivation
Expand All @@ -16,7 +15,6 @@ let
isList
isString
isStorePath
setFunctionArgs
toDerivation
toList
;
Expand Down
7 changes: 0 additions & 7 deletions nixos/lib/make-multi-disk-zfs-image.nix
Original file line number Diff line number Diff line change
Expand Up @@ -143,13 +143,6 @@ let
properties
);

featuresToProperties = features:
lib.listToAttrs
(builtins.map (feature: {
name = "feature@${feature}";
value = "enabled";
}) features);

createDatasets =
let
datasetlist = lib.mapAttrsToList lib.nameValuePair datasets;
Expand Down
9 changes: 0 additions & 9 deletions nixos/lib/make-single-disk-zfs-image.nix
Original file line number Diff line number Diff line change
Expand Up @@ -131,15 +131,6 @@ let
properties
);

featuresToProperties = features:
lib.listToAttrs
(builtins.map
(feature: {
name = "feature@${feature}";
value = "enabled";
})
features);

createDatasets =
let
datasetlist = lib.mapAttrsToList lib.nameValuePair datasets;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ let
inherit system pkgs;
};

interactiveDriver = (testing.makeTest { inherit nodes; name = "network"; testScript = "start_all(); join_all();"; }).driverInteractive;
interactiveDriver = (testing.makeTest { inherit nodes; name = "network"; testScript = "start_all(); join_all();"; }).test.driverInteractive;
in


Expand Down
4 changes: 3 additions & 1 deletion nixos/tests/make-test-python.nix
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,6 @@ f: {

with import ../lib/testing-python.nix { inherit system pkgs; };

makeTest (if pkgs.lib.isFunction f then f (args // { inherit pkgs; inherit (pkgs) lib; }) else f)
let testConfig = makeTest (if pkgs.lib.isFunction f then f (args // { inherit pkgs; inherit (pkgs) lib; }) else f);
in testConfig.test # For nix-build
// testConfig # For all-tests.nix
4 changes: 1 addition & 3 deletions nixos/tests/pgadmin4.nix
Original file line number Diff line number Diff line change
Expand Up @@ -107,14 +107,12 @@ import ./make-test-python.nix ({ pkgs, lib, buildDeps ? [ ], pythonEnv ? [ ], ..
)
# Don't bother to test LDAP or kerberos authentification
# For now deactivate change_password API test. Current bug report at https://redmine.postgresql.org/issues/7648
# Password change works from the UI, if email SMTP is configured.
with subtest("run browser test"):
machine.succeed(
'cd ${pgadmin4SrcDir}/pgadmin4-${pkgs.pgadmin4.version}/web \
&& python regression/runtests.py \
--pkg browser \
--exclude browser.tests.test_ldap_login.LDAPLoginTestCase,browser.tests.test_ldap_login,browser.tests.test_kerberos_with_mocking,browser.tests.test_change_password'
--exclude browser.tests.test_ldap_login.LDAPLoginTestCase,browser.tests.test_ldap_login,browser.tests.test_kerberos_with_mocking'
)
# fontconfig is necessary for chromium to run
Expand Down
13 changes: 11 additions & 2 deletions pkgs/applications/audio/tidal-hifi/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
, gdk-pixbuf
, glib
, gtk3
, imagemagick
, libappindicator-gtk3
, libdbusmenu
, libdrm
Expand Down Expand Up @@ -60,6 +61,7 @@ stdenv.mkDerivation rec {
gdk-pixbuf
glib
gtk3
imagemagick
pango
systemd
mesa # for libgbm
Expand Down Expand Up @@ -106,8 +108,15 @@ stdenv.mkDerivation rec {
makeWrapper $out/opt/tidal-hifi/tidal-hifi $out/bin/tidal-hifi \
--prefix LD_LIBRARY_PATH : "${lib.makeLibraryPath buildInputs}" \
"''${gappsWrapperArgs[@]}"
substituteInPlace $out/share/applications/tidal-hifi.desktop --replace \
"/opt/tidal-hifi/tidal-hifi" "tidal-hifi"
substituteInPlace $out/share/applications/tidal-hifi.desktop \
--replace \ "/opt/tidal-hifi/tidal-hifi" "tidal-hifi" \
--replace "/usr/share/icons/hicolor/0x0/apps/tidal-hifi.png" "tidal-hifi.png"
for size in 48 64 128 256 512; do
mkdir -p $out/share/icons/hicolor/''${size}x''${size}/apps/
convert $out/share/icons/hicolor/0x0/apps/tidal-hifi.png \
-resize ''${size}x''${size} $out/share/icons/hicolor/''${size}x''${size}/apps/tidal-hifi.png
done
'';

meta = with lib; {
Expand Down
4 changes: 2 additions & 2 deletions pkgs/applications/audio/yoshimi/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,13 @@

stdenv.mkDerivation rec {
pname = "yoshimi";
version = "2.2.1";
version = "2.2.2.1";

src = fetchFromGitHub {
owner = "Yoshimi";
repo = pname;
rev = version;
hash = "sha256-Uo403vxzmDntmdoQZQqncuLpDXVJ2FdGi4pQ9jE9b/k=";
hash = "sha256-fkN5VNiXRVKCCAyrG6Z2s5qLEtHQNB2874VprhHBhAg=";
};

sourceRoot = "source/src";
Expand Down
2 changes: 1 addition & 1 deletion pkgs/applications/editors/vscode/generic.nix
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ let
gappsWrapperArgs+=(
# Add gio to PATH so that moving files to the trash works when not using a desktop environment
--prefix PATH : ${glib.bin}/bin
--add-flags "\''${NIXOS_OZONE_WL:+\''${WAYLAND_DISPLAY:+--enable-features=UseOzonePlatform --ozone-platform=wayland}}"
--add-flags "\''${NIXOS_OZONE_WL:+\''${WAYLAND_DISPLAY:+--ozone-platform-hint=auto --enable-features=WaylandWindowDecorations}}"
--add-flags ${lib.escapeShellArg commandLineArgs}
)
'';
Expand Down
26 changes: 26 additions & 0 deletions pkgs/applications/misc/jot/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
{ lib
, rustPlatform
, fetchFromGitHub
}:

rustPlatform.buildRustPackage rec {
pname = "jot";
version = "0.1.1";

src = fetchFromGitHub {
owner = "araekiel";
repo = pname;
rev = "v${version}";
sha256 = "sha256-CgS9I05Om4JxAbPN0vxh2Y7dftIkVnZkRP7PY4kOfpw=";
};

cargoSha256 = "sha256-8nRO01/hUKT6Jt7/3Sw2+aLU6hITSNl6nn9UEAvfyJY=";

meta = with lib; {
description = "Rapid note management for the terminal";
homepage = "https://github.com/araekiel/jot";
license = licenses.mit;
maintainers = with maintainers; [ dit7ya ];
mainProgram = "jt";
};
}
70 changes: 52 additions & 18 deletions pkgs/applications/misc/khal/default.nix
Original file line number Diff line number Diff line change
@@ -1,32 +1,71 @@
{ lib, stdenv, pkgs, python3, fetchpatch, glibcLocales, installShellFiles }:
{ lib
, stdenv
, fetchFromGitHub
, fetchpatch
, glibcLocales
, installShellFiles
, python3
}:

with python3.pkgs; buildPythonApplication rec {
python3.pkgs.buildPythonApplication rec {
pname = "khal";
version = "0.10.5";

src = fetchPypi {
inherit pname version;
sha256 = "sha256-Tu+3rDAqJthgbbOSgXWHpO2UwnoVvy6iEWFKRk/PDHY=";
src = fetchFromGitHub {
owner = "pimutils";
repo = pname;
rev = "v${version}";
hash = "sha256-FneJmoAOb7WjSgluCwlspf27IU3MsQZFKryL9OSSsUw=";
};

propagatedBuildInputs = [
SETUPTOOLS_SCM_PRETEND_VERSION = version;

nativeBuildInputs = [
glibcLocales
installShellFiles
] ++ (with python3.pkgs; [
setuptools-scm
sphinx
sphinxcontrib_newsfeed
]);

propagatedBuildInputs = with python3.pkgs;[
atomicwrites
click
click-log
configobj
python-dateutil
freezegun
icalendar
lxml
pkginfo
pkgs.vdirsyncer
python-dateutil
pytz
pyxdg
requests-toolbelt
tzlocal
urwid
pkginfo
];

checkInputs = with python3.pkgs;[
freezegun
hypothesis
packaging
pytestCheckHook
vdirsyncer
];

patches = [
# Tests working with latest pytz version, https://github.com/pimutils/khal/pull/1183
(fetchpatch {
name = "support-later-pytz.patch";
url = "https://github.com/pimutils/khal/commit/53eb8a7426d5c09478c78d809c4df4391438e246.patch";
sha256 = "sha256-drGtvJlQ3qFUdeukRWCFycPSZGWG/FSRqnbwJzFKITc=";
excludes = [
"CHANGELOG.rst"
];
})
];
nativeBuildInputs = [ setuptools-scm sphinx sphinxcontrib_newsfeed installShellFiles ];

postInstall = ''
# shell completions
Expand All @@ -38,19 +77,14 @@ with python3.pkgs; buildPythonApplication rec {
# man page
PATH="${python3.withPackages (ps: with ps; [ sphinx sphinxcontrib_newsfeed ])}/bin:$PATH" \
make -C doc man
install -Dm755 doc/build/man/khal.1 -t $out/share/man/man1
installManPage doc/build/man/khal.1
# desktop
# .desktop file
install -Dm755 misc/khal.desktop -t $out/share/applications
'';

doCheck = !stdenv.isAarch64;

checkInputs = [
glibcLocales
pytestCheckHook
];

LC_ALL = "en_US.UTF-8";

disabledTests = [
Expand All @@ -59,10 +93,10 @@ with python3.pkgs; buildPythonApplication rec {
];

meta = with lib; {
broken = stdenv.isDarwin;
homepage = "http://lostpackets.de/khal/";
description = "CLI calendar application";
homepage = "http://lostpackets.de/khal/";
license = licenses.mit;
maintainers = with maintainers; [ gebner ];
broken = stdenv.isDarwin;
};
}
Loading

0 comments on commit a0616b9

Please sign in to comment.