https://nix-community.github.io/nixpkgs-swh/sources-unstable.json
Raw File
Tip revision: 46fcaf3c8a13f32e2c147fd88f97c4ad2d3b0f27 authored by Stefan Frijters on 01 June 2020, 17:09:11 UTC
openttd: Add XDG support (#89296)
Tip revision: 46fcaf3
kernel.nix
{ lib }:

with lib;
{


  # Keeping these around in case we decide to change this horrible implementation :)
  option = x:
      x // { optional = true; };

  yes      = { tristate    = "y"; };
  no       = { tristate    = "n"; };
  module   = { tristate    = "m"; };
  freeform = x: { freeform = x; };

  /*
    Common patterns/legacy used in common-config/hardened/config.nix
   */
  whenHelpers = version: {
    whenAtLeast = ver: mkIf (versionAtLeast version ver);
    whenOlder   = ver: mkIf (versionOlder version ver);
    # range is (inclusive, exclusive)
    whenBetween = verLow: verHigh: mkIf (versionAtLeast version verLow && versionOlder version verHigh);
  };

}
back to top