Skip to content
This repository was archived by the owner on Apr 12, 2021. It is now read-only.
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: NixOS/nixpkgs-channels
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 97464d087ec4
Choose a base ref
...
head repository: NixOS/nixpkgs-channels
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: dc988c0bd667
Choose a head ref
  • 5 commits
  • 9 files changed
  • 5 contributors

Commits on Mar 7, 2019

  1. Copy the full SHA
    a593753 View commit details
  2. Merge pull request #56995 from aanderse/super-tux-kart

    superTuxKart: fix broken build
    markuskowa authored Mar 7, 2019
    Copy the full SHA
    b161cd9 View commit details
  3. yoda: fix sha hash of the tarball

    Tarball was replaced upstream. The files are the same, changes are meta
    only (appear to be timestamps).
    
    (cherry picked from commit cf1de3c)
    veprbl committed Mar 7, 2019
    Copy the full SHA
    a9d6158 View commit details
  4. Merge #57015: lua packages: fix some bugs

    (cherry picked from commit 2dc7486)
    In particular, lua*Packages.luuid now builds.
    Mic92 authored and vcunat committed Mar 7, 2019
    Copy the full SHA
    8ad811b View commit details
  5. module system: revert "remove types.optionSet", just deprecate (#56857)

    The explicit remove helped to uncover some hidden uses of `optionSet`
    in NixOps. However it makes life harder for end-users of NixOps - it will
    be impossible to deploy 19.03 systems with old NixOps, but there is no
    new release of NixOps with `optionSet` fixes.
    
    Also, "deprecation" process isn't well defined. Even that `optionSet` was
    declared "deprecated" for many years, it was never announced. Hence, I
    leave "deprecation" announce. Then, 3 releases after announce,
    we can announce removal of this feature.
    
    This type has to be removed, not `throw`-ed in runtime, because it makes
    some perfectly fine code to fail. For example:
    ```
    $ nix-instantiate --eval -E '(import <nixpkgs/lib>).types' --strict
    trace: `types.list` is deprecated; use `types.listOf` instead
    error: types.optionSet is deprecated; use types.submodule instead
    (use '--show-trace' to show detailed location information)
    ```
    danbst committed Mar 7, 2019
    Copy the full SHA
    dc988c0 View commit details
18 changes: 16 additions & 2 deletions lib/modules.nix
Original file line number Diff line number Diff line change
@@ -476,8 +476,22 @@ rec {
optionSet to options of type submodule. FIXME: remove
eventually. */
fixupOptionType = loc: opt:
if opt.type.getSubModules or null == null
then opt // { type = opt.type or types.unspecified; }
let
options = opt.options or
(throw "Option `${showOption loc'}' has type optionSet but has no option attribute, in ${showFiles opt.declarations}.");
f = tp:
let optionSetIn = type: (tp.name == type) && (tp.functor.wrapped.name == "optionSet");
in
if tp.name == "option set" || tp.name == "submodule" then
throw "The option ${showOption loc} uses submodules without a wrapping type, in ${showFiles opt.declarations}."
else if optionSetIn "attrsOf" then types.attrsOf (types.submodule options)
else if optionSetIn "loaOf" then types.loaOf (types.submodule options)
else if optionSetIn "listOf" then types.listOf (types.submodule options)
else if optionSetIn "nullOr" then types.nullOr (types.submodule options)
else tp;
in
if opt.type.getSubModules or null == null
then opt // { type = f (opt.type or types.unspecified); }
else opt // { type = opt.type.substSubModules opt.options; options = []; };


2 changes: 2 additions & 0 deletions lib/options.nix
Original file line number Diff line number Diff line change
@@ -48,6 +48,8 @@ rec {
visible ? null,
# Whether the option can be set only once
readOnly ? null,
# Deprecated, used by types.optionSet.
options ? null
} @ attrs:
attrs // { _type = "option"; };

6 changes: 4 additions & 2 deletions lib/types.nix
Original file line number Diff line number Diff line change
@@ -469,8 +469,10 @@ rec {
# Obsolete alternative to configOf. It takes its option
# declarations from the ‘options’ attribute of containing option
# declaration.
optionSet = builtins.throw "types.optionSet is deprecated; use types.submodule instead" "optionSet";

optionSet = mkOptionType {
name = builtins.trace "types.optionSet is deprecated; use types.submodule instead" "optionSet";
description = "option set";
};
# Augment the given type with an additional type check function.
addCheck = elemType: check: elemType // { check = x: elemType.check x && check x; };

4 changes: 2 additions & 2 deletions nixos/doc/manual/release-notes/rl-1903.xml
Original file line number Diff line number Diff line change
@@ -456,8 +456,8 @@
</listitem>
<listitem>
<para>
Support for NixOS module system type <literal>types.optionSet</literal> and
<literal>lib.mkOption</literal> argument <literal>options</literal> is removed.
NixOS module system type <literal>types.optionSet</literal> and
<literal>lib.mkOption</literal> argument <literal>options</literal> are deprecated.
Use <literal>types.submodule</literal> instead.
(<link xlink:href="https://github.com/NixOS/nixpkgs/pull/54637">#54637</link>)
</para>
8 changes: 4 additions & 4 deletions pkgs/development/interpreters/lua-5/build-lua-package.nix
Original file line number Diff line number Diff line change
@@ -3,8 +3,6 @@
, lua
, stdenv
, wrapLua
, unzip
, writeText
# Whether the derivation provides a lua module or not.
, toLuaModule
}:
@@ -117,14 +115,16 @@ builtins.removeAttrs attrs ["disabled" "checkInputs"] // {
cat > ${luarocks_config} <<EOF
${luarocks_content}
EOF
export LUAROCKS_CONFIG=$PWD/${luarocks_config};
export LUAROCKS_CONFIG="$PWD/${luarocks_config}";
''
+ lib.optionalString (knownRockspec != null) ''
# prevents the following type of error:
# Inconsistency between rockspec filename (42fm1b3d7iv6fcbhgm9674as3jh6y2sh-luv-1.22.0-1.rockspec) and its contents (luv-1.22.0-1.rockspec)
rockspecFilename="$TMP/$(stripHash ''${knownRockspec})"
cp ''${knownRockspec} $rockspecFilename
cp ''${knownRockspec} "$rockspecFilename"
''
+ ''
runHook postConfigure
'';

2 changes: 1 addition & 1 deletion pkgs/development/libraries/physics/yoda/default.nix
Original file line number Diff line number Diff line change
@@ -6,7 +6,7 @@ stdenv.mkDerivation rec {

src = fetchurl {
url = "https://www.hepforge.org/archive/yoda/YODA-${version}.tar.bz2";
sha256 = "0fl9y1mh48xkjmqc76rfhvr3vs4v4lzybh06bwxyflzy82ylwi71";
sha256 = "0w9s3qv87hrmpq4dkrxcrl2hn2vcsbvy8ml99w85404wksw1dwrx";
};

pythonPath = []; # python wrapper support
13 changes: 13 additions & 0 deletions pkgs/development/lua-modules/overrides.nix
Original file line number Diff line number Diff line change
@@ -55,4 +55,17 @@ with super;
install -D completions/zsh/_busted $out/share/zsh/site-functions/_busted
'';
});

luuid = super.luuid.override({
buildInputs = [ pkgs.libuuid ];
extraConfig = ''
variables = {
LIBUUID_INCDIR="${pkgs.lib.getDev pkgs.libuuid}/include";
LIBUUID_LIBDIR="${pkgs.lib.getLib pkgs.libuuid}/lib";
}
'';
meta = {
platforms = pkgs.lib.platforms.linux;
};
});
}
10 changes: 9 additions & 1 deletion pkgs/games/super-tux-kart/default.nix
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
{ stdenv, fetchFromGitHub, fetchsvn, cmake, pkgconfig
{ stdenv, fetchFromGitHub, fetchsvn, fetchpatch, cmake, pkgconfig
, openal, freealut, libGLU_combined, libvorbis, libogg, gettext, curl, freetype
, fribidi, libtool, bluez, libjpeg, libpng, zlib, libX11, libXrandr }:

@@ -34,6 +34,14 @@ in stdenv.mkDerivation rec {
curl fribidi bluez libjpeg libpng
];

# https://github.com/supertuxkart/stk-code/issues/3557#issuecomment-440794379
patches = [
(fetchpatch {
url = "https://github.com/supertuxkart/stk-code/commit/3a3953f38c3555e87f3608d0291dbfccf34e9775.patch";
sha256 = "13mr5pwf45g7frpxzlxiyiq39qi3z9spd7l6gi8i3dr3li9wrb1k";
})
];

enableParallelBuilding = true;

cmakeFlags = [
4 changes: 2 additions & 2 deletions pkgs/top-level/lua-packages.nix
Original file line number Diff line number Diff line change
@@ -60,7 +60,7 @@ let

buildLuarocksPackage = with pkgs.lib; makeOverridable( callPackage ../development/interpreters/lua-5/build-lua-package.nix {
inherit toLuaModule;
inherit lua writeText;
inherit lua;
});
in
with self; {
@@ -87,7 +87,7 @@ with self; {
inherit toLuaModule lua-setup-hook;
inherit buildLuarocksPackage buildLuaApplication;
inherit requiredLuaModules luaOlder luaAtLeast
isLua51 isLua52 isLuaJIT lua callPackage;
isLua51 isLua52 isLua53 isLuaJIT lua callPackage;

# wraps programs in $out/bin with valid LUA_PATH/LUA_CPATH
wrapLua = callPackage ../development/interpreters/lua-5/wrap-lua.nix {