mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-10-30 14:11:21 +00:00
treewide: switch `builtins.fromJSON(builtins.readFile ./file.json)
` to lib.importJSON ./file.json
This commit is contained in:
parent
c463cb880c
commit
8547db919a
@ -13,10 +13,10 @@ let
|
||||
# Use upstream config files passed through spa-json-dump as the base
|
||||
# Patched here as necessary for them to work with this module
|
||||
defaults = {
|
||||
alsa-monitor = (builtins.fromJSON (builtins.readFile ./media-session/alsa-monitor.conf.json));
|
||||
bluez-monitor = (builtins.fromJSON (builtins.readFile ./media-session/bluez-monitor.conf.json));
|
||||
media-session = (builtins.fromJSON (builtins.readFile ./media-session/media-session.conf.json));
|
||||
v4l2-monitor = (builtins.fromJSON (builtins.readFile ./media-session/v4l2-monitor.conf.json));
|
||||
alsa-monitor = lib.importJSON ./media-session/alsa-monitor.conf.json;
|
||||
bluez-monitor = lib.importJSON ./media-session/bluez-monitor.conf.json;
|
||||
media-session = lib.importJSON ./media-session/media-session.conf.json;
|
||||
v4l2-monitor = lib.importJSON ./media-session/v4l2-monitor.conf.json;
|
||||
};
|
||||
|
||||
configs = {
|
||||
|
@ -22,11 +22,11 @@ let
|
||||
# Use upstream config files passed through spa-json-dump as the base
|
||||
# Patched here as necessary for them to work with this module
|
||||
defaults = {
|
||||
client = builtins.fromJSON (builtins.readFile ./daemon/client.conf.json);
|
||||
client-rt = builtins.fromJSON (builtins.readFile ./daemon/client-rt.conf.json);
|
||||
jack = builtins.fromJSON (builtins.readFile ./daemon/jack.conf.json);
|
||||
pipewire = builtins.fromJSON (builtins.readFile ./daemon/pipewire.conf.json);
|
||||
pipewire-pulse = builtins.fromJSON (builtins.readFile ./daemon/pipewire-pulse.conf.json);
|
||||
client = lib.importJSON ./daemon/client.conf.json;
|
||||
client-rt = lib.importJSON ./daemon/client-rt.conf.json;
|
||||
jack = lib.importJSON ./daemon/jack.conf.json;
|
||||
pipewire = lib.importJSON ./daemon/pipewire.conf.json;
|
||||
pipewire-pulse = lib.importJSON ./daemon/pipewire-pulse.conf.json;
|
||||
};
|
||||
|
||||
configs = {
|
||||
|
@ -33,7 +33,7 @@ let
|
||||
fi
|
||||
'';
|
||||
|
||||
streamingConfig = builtins.fromJSON (builtins.readFile ./streaming.json);
|
||||
streamingConfig = lib.importJSON ./streaming.json;
|
||||
logConfig = {
|
||||
appenders.stdout.type = "stdout";
|
||||
categories = {
|
||||
|
@ -61,7 +61,7 @@ in
|
||||
|
||||
ipAllow = mkOption {
|
||||
type = types.nullOr yaml.type;
|
||||
default = builtins.fromJSON (builtins.readFile ./ip_allow.json);
|
||||
default = lib.importJSON ./ip_allow.json;
|
||||
defaultText = literalDocBook "upstream defaults";
|
||||
example = literalExpression ''
|
||||
{
|
||||
@ -84,7 +84,7 @@ in
|
||||
|
||||
logging = mkOption {
|
||||
type = types.nullOr yaml.type;
|
||||
default = builtins.fromJSON (builtins.readFile ./logging.json);
|
||||
default = lib.importJSON ./logging.json;
|
||||
defaultText = literalDocBook "upstream defaults";
|
||||
example = { };
|
||||
description = ''
|
||||
|
@ -58,9 +58,9 @@ let
|
||||
[ ./hardware-configuration.nix
|
||||
<nixpkgs/nixos/modules/testing/test-instrumentation.nix>
|
||||
];
|
||||
} // (builtins.fromJSON (builtins.readFile ${
|
||||
} // pkgs.lib.importJSON ${
|
||||
pkgs.writeText "simpleConfig.json" (builtins.toJSON simpleConfig)
|
||||
})))
|
||||
})
|
||||
'';
|
||||
in {
|
||||
name = "os-prober";
|
||||
|
@ -34,7 +34,7 @@ let
|
||||
inherit (spec) owner rev sha256;
|
||||
}
|
||||
)
|
||||
(builtins.fromJSON (builtins.readFile ./deps.json));
|
||||
(lib.importJSON ./deps.json);
|
||||
in
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "cudatext";
|
||||
|
@ -33,7 +33,7 @@ let
|
||||
|
||||
deprecations = lib.mapAttrs (old: info:
|
||||
throw "${old} was renamed to ${info.new} on ${info.date}. Please update to ${info.new}."
|
||||
) (builtins.fromJSON (builtins.readFile ./deprecated.json));
|
||||
) (lib.importJSON ./deprecated.json);
|
||||
|
||||
in
|
||||
mapAliases ({
|
||||
|
@ -16,7 +16,7 @@
|
||||
}:
|
||||
|
||||
let
|
||||
pinData = (builtins.fromJSON (builtins.readFile ./pin.json));
|
||||
pinData = lib.importJSON ./pin.json;
|
||||
executableName = "element-desktop";
|
||||
electron_exec = if stdenv.isDarwin then "${electron}/Applications/Electron.app/Contents/MacOS/Electron" else "${electron}/bin/electron";
|
||||
in
|
||||
|
@ -1,7 +1,7 @@
|
||||
{ lib, stdenv, fetchurl, writeText, jq, conf ? {} }:
|
||||
|
||||
let
|
||||
pinData = (builtins.fromJSON (builtins.readFile ./pin.json));
|
||||
pinData = lib.importJSON ./pin.json;
|
||||
noPhoningHome = {
|
||||
disable_guests = true; # disable automatic guest account registration at matrix.org
|
||||
piwik = false; # disable analytics
|
||||
|
@ -2,7 +2,7 @@
|
||||
, fixup_yarn_lock, yarn, pkg-config, libsecret, xcbuild, Security, AppKit, fetchYarnDeps }:
|
||||
|
||||
let
|
||||
pinData = (builtins.fromJSON (builtins.readFile ./pin.json));
|
||||
pinData = lib.importJSON ./pin.json;
|
||||
|
||||
in stdenv.mkDerivation rec {
|
||||
pname = "keytar";
|
||||
|
@ -1,7 +1,7 @@
|
||||
{ lib, stdenv, rustPlatform, fetchFromGitHub, callPackage, sqlcipher, nodejs-14_x, python3, yarn, fixup_yarn_lock, CoreServices, fetchYarnDeps }:
|
||||
|
||||
let
|
||||
pinData = (builtins.fromJSON (builtins.readFile ./pin.json));
|
||||
pinData = lib.importJSON ./pin.json;
|
||||
|
||||
in rustPlatform.buildRustPackage rec {
|
||||
pname = "seshat-node";
|
||||
|
@ -8,7 +8,7 @@
|
||||
}:
|
||||
|
||||
let
|
||||
pinData = builtins.fromJSON (builtins.readFile ./pin.json);
|
||||
pinData = lib.importJSON ./pin.json;
|
||||
noPhoningHome = {
|
||||
disable_guests = true; # disable automatic guest account registration at matrix.org
|
||||
};
|
||||
|
@ -5,7 +5,7 @@
|
||||
}:
|
||||
|
||||
let
|
||||
data = (builtins.fromJSON (builtins.readFile ./data.json));
|
||||
data = lib.importJSON ./data.json;
|
||||
|
||||
version = data.version;
|
||||
src = fetchFromGitLab {
|
||||
|
@ -1,6 +1,6 @@
|
||||
{ lib, fetchFromGitLab, git, buildGoModule }:
|
||||
let
|
||||
data = (builtins.fromJSON (builtins.readFile ../data.json));
|
||||
data = lib.importJSON ../data.json;
|
||||
in
|
||||
buildGoModule rec {
|
||||
pname = "gitlab-workhorse";
|
||||
|
@ -1,5 +1,7 @@
|
||||
{ lib }:
|
||||
|
||||
let
|
||||
sources = builtins.fromJSON (builtins.readFile ./sources.json);
|
||||
sources = lib.importJSON ./sources.json;
|
||||
in
|
||||
{
|
||||
jdk-hotspot = import ./jdk-darwin-base.nix { sourcePerArch = sources.openjdk11.mac.jdk.hotspot; };
|
||||
|
@ -1,5 +1,7 @@
|
||||
{ lib }:
|
||||
|
||||
let
|
||||
sources = builtins.fromJSON (builtins.readFile ./sources.json);
|
||||
sources = lib.importJSON ./sources.json;
|
||||
in
|
||||
{
|
||||
jdk-hotspot = import ./jdk-linux-base.nix { sourcePerArch = sources.openjdk11.linux.jdk.hotspot; };
|
||||
|
@ -1,5 +1,7 @@
|
||||
{ lib }:
|
||||
|
||||
let
|
||||
sources = builtins.fromJSON (builtins.readFile ./sources.json);
|
||||
sources = lib.importJSON ./sources.json;
|
||||
in
|
||||
{
|
||||
jdk-hotspot = import ./jdk-darwin-base.nix { sourcePerArch = sources.openjdk13.mac.jdk.hotspot; knownVulnerabilities = ["Support ended"]; };
|
||||
|
@ -1,5 +1,7 @@
|
||||
{ lib }:
|
||||
|
||||
let
|
||||
sources = builtins.fromJSON (builtins.readFile ./sources.json);
|
||||
sources = lib.importJSON ./sources.json;
|
||||
in
|
||||
{
|
||||
jdk-hotspot = import ./jdk-linux-base.nix { sourcePerArch = sources.openjdk13.linux.jdk.hotspot; knownVulnerabilities = ["Support ended"]; };
|
||||
|
@ -1,5 +1,7 @@
|
||||
{ lib }:
|
||||
|
||||
let
|
||||
sources = builtins.fromJSON (builtins.readFile ./sources.json);
|
||||
sources = lib.importJSON ./sources.json;
|
||||
in
|
||||
{
|
||||
jdk-hotspot = import ./jdk-darwin-base.nix { sourcePerArch = sources.openjdk14.mac.jdk.hotspot; knownVulnerabilities = ["Support ended"]; };
|
||||
|
@ -1,5 +1,7 @@
|
||||
{ lib }:
|
||||
|
||||
let
|
||||
sources = builtins.fromJSON (builtins.readFile ./sources.json);
|
||||
sources = lib.importJSON ./sources.json;
|
||||
in
|
||||
{
|
||||
jdk-hotspot = import ./jdk-linux-base.nix { sourcePerArch = sources.openjdk14.linux.jdk.hotspot; knownVulnerabilities = ["Support ended"]; };
|
||||
|
@ -1,5 +1,7 @@
|
||||
{ lib }:
|
||||
|
||||
let
|
||||
sources = builtins.fromJSON (builtins.readFile ./sources.json);
|
||||
sources = lib.importJSON ./sources.json;
|
||||
in
|
||||
{
|
||||
jdk-hotspot = import ./jdk-darwin-base.nix { sourcePerArch = sources.openjdk15.mac.jdk.hotspot; };
|
||||
|
@ -1,5 +1,7 @@
|
||||
{ lib }:
|
||||
|
||||
let
|
||||
sources = builtins.fromJSON (builtins.readFile ./sources.json);
|
||||
sources = lib.importJSON ./sources.json;
|
||||
in
|
||||
{
|
||||
jdk-hotspot = import ./jdk-linux-base.nix { sourcePerArch = sources.openjdk15.linux.jdk.hotspot; };
|
||||
|
@ -1,5 +1,7 @@
|
||||
{ lib }:
|
||||
|
||||
let
|
||||
sources = builtins.fromJSON (builtins.readFile ./sources.json);
|
||||
sources = lib.importJSON ./sources.json;
|
||||
in
|
||||
{
|
||||
jdk-hotspot = import ./jdk-darwin-base.nix { sourcePerArch = sources.openjdk16.mac.jdk.hotspot; };
|
||||
|
@ -1,5 +1,7 @@
|
||||
{ lib }:
|
||||
|
||||
let
|
||||
sources = builtins.fromJSON (builtins.readFile ./sources.json);
|
||||
sources = lib.importJSON ./sources.json;
|
||||
in
|
||||
{
|
||||
jdk-hotspot = import ./jdk-linux-base.nix { sourcePerArch = sources.openjdk16.linux.jdk.hotspot; };
|
||||
|
@ -1,5 +1,7 @@
|
||||
{ lib }:
|
||||
|
||||
let
|
||||
sources = builtins.fromJSON (builtins.readFile ./sources.json);
|
||||
sources = lib.importJSON ./sources.json;
|
||||
in
|
||||
{
|
||||
jdk-hotspot = import ./jdk-darwin-base.nix { sourcePerArch = sources.openjdk8.mac.jdk.hotspot; };
|
||||
|
@ -1,5 +1,7 @@
|
||||
{ lib }:
|
||||
|
||||
let
|
||||
sources = builtins.fromJSON (builtins.readFile ./sources.json);
|
||||
sources = lib.importJSON ./sources.json;
|
||||
in
|
||||
{
|
||||
jdk-hotspot = import ./jdk-linux-base.nix { sourcePerArch = sources.openjdk8.linux.jdk.hotspot; };
|
||||
|
@ -3,7 +3,7 @@
|
||||
, callPackage
|
||||
, fetchgit
|
||||
, ghcjsSrcJson ? null
|
||||
, ghcjsSrc ? fetchgit (builtins.fromJSON (builtins.readFile ghcjsSrcJson))
|
||||
, ghcjsSrc ? fetchgit lib.importJSON ghcjsSrcJson
|
||||
, bootPkgs
|
||||
, stage0
|
||||
, haskellLib
|
||||
|
@ -5,7 +5,7 @@
|
||||
}:
|
||||
|
||||
let
|
||||
release = builtins.fromJSON (builtins.readFile ./release-info/LanguageMachines-frog.json);
|
||||
release = lib.importJSON ./release-info/LanguageMachines-frog.json;
|
||||
in
|
||||
|
||||
stdenv.mkDerivation {
|
||||
|
@ -3,7 +3,7 @@
|
||||
}:
|
||||
|
||||
let
|
||||
release = builtins.fromJSON (builtins.readFile ./release-info/LanguageMachines-frogdata.json);
|
||||
release = lib.importJSON ./release-info/LanguageMachines-frogdata.json;
|
||||
in
|
||||
|
||||
stdenv.mkDerivation {
|
||||
|
@ -4,7 +4,7 @@
|
||||
, languageMachines }:
|
||||
|
||||
let
|
||||
release = builtins.fromJSON (builtins.readFile ./release-info/LanguageMachines-libfolia.json);
|
||||
release = lib.importJSON ./release-info/LanguageMachines-libfolia.json;
|
||||
in
|
||||
|
||||
stdenv.mkDerivation {
|
||||
|
@ -5,7 +5,7 @@
|
||||
}:
|
||||
|
||||
let
|
||||
release = builtins.fromJSON (builtins.readFile ./release-info/LanguageMachines-mbt.json);
|
||||
release = lib.importJSON ./release-info/LanguageMachines-mbt.json;
|
||||
in
|
||||
|
||||
stdenv.mkDerivation {
|
||||
|
@ -3,7 +3,7 @@
|
||||
, libxml2, zlib, bzip2, libtar }:
|
||||
|
||||
let
|
||||
release = builtins.fromJSON (builtins.readFile ./release-info/LanguageMachines-ticcutils.json);
|
||||
release = lib.importJSON ./release-info/LanguageMachines-ticcutils.json;
|
||||
in
|
||||
|
||||
stdenv.mkDerivation {
|
||||
|
@ -5,7 +5,7 @@
|
||||
}:
|
||||
|
||||
let
|
||||
release = builtins.fromJSON (builtins.readFile ./release-info/LanguageMachines-timbl.json);
|
||||
release = lib.importJSON ./release-info/LanguageMachines-timbl.json;
|
||||
in
|
||||
|
||||
stdenv.mkDerivation {
|
||||
|
@ -5,7 +5,7 @@
|
||||
}:
|
||||
|
||||
let
|
||||
release = builtins.fromJSON (builtins.readFile ./release-info/LanguageMachines-timblserver.json);
|
||||
release = lib.importJSON ./release-info/LanguageMachines-timblserver.json;
|
||||
in
|
||||
|
||||
stdenv.mkDerivation {
|
||||
|
@ -5,7 +5,7 @@
|
||||
}:
|
||||
|
||||
let
|
||||
release = builtins.fromJSON (builtins.readFile ./release-info/LanguageMachines-ucto.json);
|
||||
release = lib.importJSON ./release-info/LanguageMachines-ucto.json;
|
||||
in
|
||||
|
||||
stdenv.mkDerivation {
|
||||
|
@ -3,7 +3,7 @@
|
||||
}:
|
||||
|
||||
let
|
||||
release = builtins.fromJSON (builtins.readFile ./release-info/LanguageMachines-uctodata.json);
|
||||
release = lib.importJSON ./release-info/LanguageMachines-uctodata.json;
|
||||
in
|
||||
|
||||
stdenv.mkDerivation {
|
||||
|
@ -64,9 +64,9 @@ let
|
||||
addons = repoXmls.addons or [];
|
||||
};
|
||||
in
|
||||
builtins.fromJSON (builtins.readFile "${mkRepoJson repoXmlSpec}")
|
||||
lib.importJSON "${mkRepoJson repoXmlSpec}"
|
||||
else
|
||||
builtins.fromJSON (builtins.readFile repoJson);
|
||||
lib.importJSON repoJson;
|
||||
|
||||
# Converts all 'archives' keys in a repo spec to fetchurl calls.
|
||||
fetchArchives = attrSet:
|
||||
|
@ -37,7 +37,7 @@ let
|
||||
srcDeps = lib.attrsets.attrValues srcDepsSet;
|
||||
srcDepsSet =
|
||||
let
|
||||
srcs = (builtins.fromJSON (builtins.readFile ./src-deps.json));
|
||||
srcs = lib.importJSON ./src-deps.json;
|
||||
toFetchurl = d: lib.attrsets.nameValuePair d.name (fetchurl {
|
||||
urls = d.urls;
|
||||
sha256 = d.sha256;
|
||||
|
@ -37,7 +37,7 @@ let
|
||||
srcDeps = lib.attrsets.attrValues srcDepsSet;
|
||||
srcDepsSet =
|
||||
let
|
||||
srcs = (builtins.fromJSON (builtins.readFile ./src-deps.json));
|
||||
srcs = lib.importJSON ./src-deps.json;
|
||||
toFetchurl = d: lib.attrsets.nameValuePair d.name (fetchurl {
|
||||
urls = d.urls;
|
||||
sha256 = d.sha256;
|
||||
|
@ -37,7 +37,7 @@ let
|
||||
srcDeps = lib.attrsets.attrValues srcDepsSet;
|
||||
srcDepsSet =
|
||||
let
|
||||
srcs = (builtins.fromJSON (builtins.readFile ./src-deps.json));
|
||||
srcs = lib.importJSON ./src-deps.json;
|
||||
toFetchurl = d: lib.attrsets.nameValuePair d.name (fetchurl {
|
||||
urls = d.urls;
|
||||
sha256 = d.sha256;
|
||||
|
@ -40,7 +40,7 @@ let
|
||||
srcDeps = lib.attrsets.attrValues srcDepsSet;
|
||||
srcDepsSet =
|
||||
let
|
||||
srcs = (builtins.fromJSON (builtins.readFile ./src-deps.json));
|
||||
srcs = lib.importJSON ./src-deps.json;
|
||||
toFetchurl = d: lib.attrsets.nameValuePair d.name (fetchurl {
|
||||
urls = d.urls;
|
||||
sha256 = d.sha256;
|
||||
|
@ -51,7 +51,7 @@ let
|
||||
mkdir $out
|
||||
'' + (lib.concatStrings (lib.mapAttrsToList
|
||||
(name: grammar: "ln -s ${fetchGrammar grammar} $out/${name}\n")
|
||||
(import ./grammars))));
|
||||
(import ./grammars { inherit lib; }))));
|
||||
|
||||
builtGrammars =
|
||||
let
|
||||
|
@ -1,49 +1,51 @@
|
||||
{ lib }:
|
||||
|
||||
{
|
||||
tree-sitter-agda = (builtins.fromJSON (builtins.readFile ./tree-sitter-agda.json));
|
||||
tree-sitter-bash = (builtins.fromJSON (builtins.readFile ./tree-sitter-bash.json));
|
||||
tree-sitter-c = (builtins.fromJSON (builtins.readFile ./tree-sitter-c.json));
|
||||
tree-sitter-c-sharp = (builtins.fromJSON (builtins.readFile ./tree-sitter-c-sharp.json));
|
||||
tree-sitter-clojure = (builtins.fromJSON (builtins.readFile ./tree-sitter-clojure.json));
|
||||
tree-sitter-comment = (builtins.fromJSON (builtins.readFile ./tree-sitter-comment.json));
|
||||
tree-sitter-cpp = (builtins.fromJSON (builtins.readFile ./tree-sitter-cpp.json));
|
||||
tree-sitter-css = (builtins.fromJSON (builtins.readFile ./tree-sitter-css.json));
|
||||
tree-sitter-dart = (builtins.fromJSON (builtins.readFile ./tree-sitter-dart.json));
|
||||
tree-sitter-dot = (builtins.fromJSON (builtins.readFile ./tree-sitter-dot.json));
|
||||
tree-sitter-elisp = (builtins.fromJSON (builtins.readFile ./tree-sitter-elisp.json));
|
||||
tree-sitter-embedded-template = (builtins.fromJSON (builtins.readFile ./tree-sitter-embedded-template.json));
|
||||
tree-sitter-fennel = (builtins.fromJSON (builtins.readFile ./tree-sitter-fennel.json));
|
||||
tree-sitter-fish = (builtins.fromJSON (builtins.readFile ./tree-sitter-fish.json));
|
||||
tree-sitter-fluent = (builtins.fromJSON (builtins.readFile ./tree-sitter-fluent.json));
|
||||
tree-sitter-go = (builtins.fromJSON (builtins.readFile ./tree-sitter-go.json));
|
||||
tree-sitter-haskell = (builtins.fromJSON (builtins.readFile ./tree-sitter-haskell.json));
|
||||
tree-sitter-html = (builtins.fromJSON (builtins.readFile ./tree-sitter-html.json));
|
||||
tree-sitter-java = (builtins.fromJSON (builtins.readFile ./tree-sitter-java.json));
|
||||
tree-sitter-javascript = (builtins.fromJSON (builtins.readFile ./tree-sitter-javascript.json));
|
||||
tree-sitter-jsdoc = (builtins.fromJSON (builtins.readFile ./tree-sitter-jsdoc.json));
|
||||
tree-sitter-json = (builtins.fromJSON (builtins.readFile ./tree-sitter-json.json));
|
||||
tree-sitter-julia = (builtins.fromJSON (builtins.readFile ./tree-sitter-julia.json));
|
||||
tree-sitter-latex = (builtins.fromJSON (builtins.readFile ./tree-sitter-latex.json));
|
||||
tree-sitter-lua = (builtins.fromJSON (builtins.readFile ./tree-sitter-lua.json));
|
||||
tree-sitter-make = (builtins.fromJSON (builtins.readFile ./tree-sitter-make.json));
|
||||
tree-sitter-markdown = (builtins.fromJSON (builtins.readFile ./tree-sitter-markdown.json));
|
||||
tree-sitter-nix = (builtins.fromJSON (builtins.readFile ./tree-sitter-nix.json));
|
||||
tree-sitter-norg = (builtins.fromJSON (builtins.readFile ./tree-sitter-norg.json));
|
||||
tree-sitter-ocaml = (builtins.fromJSON (builtins.readFile ./tree-sitter-ocaml.json));
|
||||
tree-sitter-php = (builtins.fromJSON (builtins.readFile ./tree-sitter-php.json));
|
||||
tree-sitter-python = (builtins.fromJSON (builtins.readFile ./tree-sitter-python.json));
|
||||
tree-sitter-ql = (builtins.fromJSON (builtins.readFile ./tree-sitter-ql.json));
|
||||
tree-sitter-regex = (builtins.fromJSON (builtins.readFile ./tree-sitter-regex.json));
|
||||
tree-sitter-rst = (builtins.fromJSON (builtins.readFile ./tree-sitter-rst.json));
|
||||
tree-sitter-ruby = (builtins.fromJSON (builtins.readFile ./tree-sitter-ruby.json));
|
||||
tree-sitter-rust = (builtins.fromJSON (builtins.readFile ./tree-sitter-rust.json));
|
||||
tree-sitter-scala = (builtins.fromJSON (builtins.readFile ./tree-sitter-scala.json));
|
||||
tree-sitter-svelte = (builtins.fromJSON (builtins.readFile ./tree-sitter-svelte.json));
|
||||
tree-sitter-swift = (builtins.fromJSON (builtins.readFile ./tree-sitter-swift.json));
|
||||
tree-sitter-toml = (builtins.fromJSON (builtins.readFile ./tree-sitter-toml.json));
|
||||
tree-sitter-tsq = (builtins.fromJSON (builtins.readFile ./tree-sitter-tsq.json));
|
||||
tree-sitter-typescript = (builtins.fromJSON (builtins.readFile ./tree-sitter-typescript.json));
|
||||
tree-sitter-verilog = (builtins.fromJSON (builtins.readFile ./tree-sitter-verilog.json));
|
||||
tree-sitter-vim = (builtins.fromJSON (builtins.readFile ./tree-sitter-vim.json));
|
||||
tree-sitter-yaml = (builtins.fromJSON (builtins.readFile ./tree-sitter-yaml.json));
|
||||
tree-sitter-zig = (builtins.fromJSON (builtins.readFile ./tree-sitter-zig.json));
|
||||
tree-sitter-agda = lib.importJSON ./tree-sitter-agda.json;
|
||||
tree-sitter-bash = lib.importJSON ./tree-sitter-bash.json;
|
||||
tree-sitter-c = lib.importJSON ./tree-sitter-c.json;
|
||||
tree-sitter-c-sharp = lib.importJSON ./tree-sitter-c-sharp.json;
|
||||
tree-sitter-clojure = lib.importJSON ./tree-sitter-clojure.json;
|
||||
tree-sitter-comment = lib.importJSON ./tree-sitter-comment.json;
|
||||
tree-sitter-cpp = lib.importJSON ./tree-sitter-cpp.json;
|
||||
tree-sitter-css = lib.importJSON ./tree-sitter-css.json;
|
||||
tree-sitter-dart = lib.importJSON ./tree-sitter-dart.json;
|
||||
tree-sitter-dot = lib.importJSON ./tree-sitter-dot.json;
|
||||
tree-sitter-elisp = lib.importJSON ./tree-sitter-elisp.json;
|
||||
tree-sitter-embedded-template = lib.importJSON ./tree-sitter-embedded-template.json;
|
||||
tree-sitter-fennel = lib.importJSON ./tree-sitter-fennel.json;
|
||||
tree-sitter-fish = lib.importJSON ./tree-sitter-fish.json;
|
||||
tree-sitter-fluent = lib.importJSON ./tree-sitter-fluent.json;
|
||||
tree-sitter-go = lib.importJSON ./tree-sitter-go.json;
|
||||
tree-sitter-haskell = lib.importJSON ./tree-sitter-haskell.json;
|
||||
tree-sitter-html = lib.importJSON ./tree-sitter-html.json;
|
||||
tree-sitter-java = lib.importJSON ./tree-sitter-java.json;
|
||||
tree-sitter-javascript = lib.importJSON ./tree-sitter-javascript.json;
|
||||
tree-sitter-jsdoc = lib.importJSON ./tree-sitter-jsdoc.json;
|
||||
tree-sitter-json = lib.importJSON ./tree-sitter-json.json;
|
||||
tree-sitter-julia = lib.importJSON ./tree-sitter-julia.json;
|
||||
tree-sitter-latex = lib.importJSON ./tree-sitter-latex.json;
|
||||
tree-sitter-lua = lib.importJSON ./tree-sitter-lua.json;
|
||||
tree-sitter-make = lib.importJSON ./tree-sitter-make.json;
|
||||
tree-sitter-markdown = lib.importJSON ./tree-sitter-markdown.json;
|
||||
tree-sitter-nix = lib.importJSON ./tree-sitter-nix.json;
|
||||
tree-sitter-norg = lib.importJSON ./tree-sitter-norg.json;
|
||||
tree-sitter-ocaml = lib.importJSON ./tree-sitter-ocaml.json;
|
||||
tree-sitter-php = lib.importJSON ./tree-sitter-php.json;
|
||||
tree-sitter-python = lib.importJSON ./tree-sitter-python.json;
|
||||
tree-sitter-ql = lib.importJSON ./tree-sitter-ql.json;
|
||||
tree-sitter-regex = lib.importJSON ./tree-sitter-regex.json;
|
||||
tree-sitter-rst = lib.importJSON ./tree-sitter-rst.json;
|
||||
tree-sitter-ruby = lib.importJSON ./tree-sitter-ruby.json;
|
||||
tree-sitter-rust = lib.importJSON ./tree-sitter-rust.json;
|
||||
tree-sitter-scala = lib.importJSON ./tree-sitter-scala.json;
|
||||
tree-sitter-svelte = lib.importJSON ./tree-sitter-svelte.json;
|
||||
tree-sitter-swift = lib.importJSON ./tree-sitter-swift.json;
|
||||
tree-sitter-toml = lib.importJSON ./tree-sitter-toml.json;
|
||||
tree-sitter-tsq = lib.importJSON ./tree-sitter-tsq.json;
|
||||
tree-sitter-typescript = lib.importJSON ./tree-sitter-typescript.json;
|
||||
tree-sitter-verilog = lib.importJSON ./tree-sitter-verilog.json;
|
||||
tree-sitter-vim = lib.importJSON ./tree-sitter-vim.json;
|
||||
tree-sitter-yaml = lib.importJSON ./tree-sitter-yaml.json;
|
||||
tree-sitter-zig = lib.importJSON ./tree-sitter-zig.json;
|
||||
}
|
||||
|
@ -261,7 +261,7 @@ let
|
||||
${foreachSh allGrammars
|
||||
({name, ...}: ''
|
||||
# indentation hack
|
||||
printf " %s = (builtins.fromJSON (builtins.readFile ./%s.json));\n" "${name}" "${name}"'')}
|
||||
printf " %s = lib.importJSON ./%s.json;\n" "${name}" "${name}"'')}
|
||||
echo "}" ) \
|
||||
> "$outputDir/default.nix"
|
||||
'';
|
||||
|
@ -6,7 +6,7 @@ in
|
||||
preRebuild = ''
|
||||
export ESBUILD_BINARY_PATH="${pkgs.esbuild_netlify}/bin/esbuild"
|
||||
'';
|
||||
src = fetchFromGitHub (builtins.fromJSON (builtins.readFile ./netlify-cli.json));
|
||||
src = fetchFromGitHub (lib.importJSON ./netlify-cli.json);
|
||||
bypassCache = true;
|
||||
reconstructLock = true;
|
||||
passthru.tests.test = callPackage ./test.nix { };
|
||||
|
@ -2,7 +2,7 @@
|
||||
set -eu -o pipefail
|
||||
cd "$( dirname "${BASH_SOURCE[0]}" )"
|
||||
rm -f ./node-env.nix
|
||||
src="$(nix-build --expr '(import ../../../.. {}).fetchFromGitHub (builtins.fromJSON (builtins.readFile ./netlify-cli.json))')"
|
||||
src="$(nix-build --expr '(import ../../../.. {}).fetchFromGitHub (lib.importJSON ./netlify-cli.json)')"
|
||||
echo $src
|
||||
node2nix \
|
||||
--input $src/package.json \
|
||||
|
@ -95,7 +95,7 @@ let
|
||||
(lib.attrNames self.df-hashes));
|
||||
|
||||
self = rec {
|
||||
df-hashes = builtins.fromJSON (builtins.readFile ./game.json);
|
||||
df-hashes = lib.importJSON ./game.json;
|
||||
|
||||
# Aliases for the latest Dwarf Fortress and the selected Therapist install
|
||||
dwarf-fortress = getAttr (versionToName latestVersion) df-games;
|
||||
|
@ -32,7 +32,7 @@ let
|
||||
|
||||
deprecations = lib.mapAttrs (old: info:
|
||||
throw "${old} was renamed to ${info.new} on ${info.date}. Please update to ${info.new}."
|
||||
) (builtins.fromJSON (builtins.readFile ./deprecated.json));
|
||||
) (lib.importJSON ./deprecated.json);
|
||||
|
||||
in
|
||||
mapAliases (with prev; {
|
||||
|
@ -13,7 +13,7 @@
|
||||
let
|
||||
# Get as close as possible as the `package.json` required version.
|
||||
# This is what drives omnisharp.
|
||||
rtDepsSrcsFromJson = builtins.fromJSON (builtins.readFile ./rt-deps-bin-srcs.json);
|
||||
rtDepsSrcsFromJson = lib.importJSON ./rt-deps-bin-srcs.json;
|
||||
|
||||
rtDepsBinSrcs = builtins.mapAttrs (k: v:
|
||||
let
|
||||
|
@ -53,7 +53,7 @@
|
||||
extra = src.extra;
|
||||
inherit version sha256;
|
||||
};
|
||||
patches = builtins.fromJSON (builtins.readFile ./hardened/patches.json);
|
||||
patches = lib.importJSON ./hardened/patches.json;
|
||||
in lib.mapAttrs mkPatch patches;
|
||||
|
||||
# https://bugzilla.kernel.org/show_bug.cgi?id=197591#c6
|
||||
|
@ -97,7 +97,7 @@ let
|
||||
"externals_cache/pjproject-2.10.tar.bz2" = pjproject_2_10;
|
||||
"addons/mp3" = mp3-202;
|
||||
};
|
||||
}) (builtins.fromJSON (builtins.readFile ./versions.json));
|
||||
}) (lib.importJSON ./versions.json);
|
||||
|
||||
in {
|
||||
# Supported releases (as of 2020-10-26).
|
||||
|
@ -13,7 +13,7 @@
|
||||
}:
|
||||
|
||||
let
|
||||
pinData = (builtins.fromJSON (builtins.readFile ./pin.json));
|
||||
pinData = lib.importJSON ./pin.json;
|
||||
|
||||
# we need a different version than the one already available in nixpkgs
|
||||
esbuild-hedgedoc = buildGoModule rec {
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
with lib;
|
||||
|
||||
let versions = builtins.fromJSON (builtins.readFile ./versions.json);
|
||||
let versions = lib.importJSON ./versions.json;
|
||||
arch = if stdenv.isi686 then "386"
|
||||
else if stdenv.isx86_64 then "amd64"
|
||||
else if stdenv.isAarch32 then "arm"
|
||||
|
@ -6,7 +6,7 @@
|
||||
}:
|
||||
|
||||
let
|
||||
all_data = builtins.fromJSON (builtins.readFile ./data.json);
|
||||
all_data = lib.importJSON ./data.json;
|
||||
system_map = {
|
||||
# i686-linux = "i386"; Uncomment if enpass 6 becomes available on i386
|
||||
x86_64-linux = "amd64";
|
||||
|
@ -12,7 +12,7 @@ let
|
||||
# parse the version from package.json
|
||||
version =
|
||||
let
|
||||
packageJson = builtins.fromJSON (builtins.readFile ./package.json);
|
||||
packageJson = lib.importJSON ./package.json;
|
||||
splits = builtins.split "^.*#v(.*)$" (builtins.getAttr "onlykey" (builtins.head packageJson));
|
||||
matches = builtins.elemAt splits 1;
|
||||
elem = builtins.head matches;
|
||||
|
@ -1,7 +1,7 @@
|
||||
{ lib, buildGoModule, fetchFromGitHub }:
|
||||
|
||||
let
|
||||
srcInfo = builtins.fromJSON (builtins.readFile ./src.json);
|
||||
srcInfo = lib.importJSON ./src.json;
|
||||
in
|
||||
|
||||
buildGoModule rec {
|
||||
|
@ -11159,8 +11159,8 @@ with pkgs;
|
||||
jdk = jdk8; # TODO: remove override https://github.com/NixOS/nixpkgs/pull/89731
|
||||
};
|
||||
|
||||
adoptopenjdk-bin-16-packages-linux = import ../development/compilers/adoptopenjdk-bin/jdk16-linux.nix;
|
||||
adoptopenjdk-bin-16-packages-darwin = import ../development/compilers/adoptopenjdk-bin/jdk16-darwin.nix;
|
||||
adoptopenjdk-bin-16-packages-linux = import ../development/compilers/adoptopenjdk-bin/jdk16-linux.nix { inherit lib; };
|
||||
adoptopenjdk-bin-16-packages-darwin = import ../development/compilers/adoptopenjdk-bin/jdk16-darwin.nix { inherit lib; };
|
||||
|
||||
adoptopenjdk-hotspot-bin-16 = if stdenv.isLinux
|
||||
then callPackage adoptopenjdk-bin-16-packages-linux.jdk-hotspot {}
|
||||
@ -11177,8 +11177,8 @@ with pkgs;
|
||||
then callPackage adoptopenjdk-bin-16-packages-linux.jre-openj9 {}
|
||||
else callPackage adoptopenjdk-bin-16-packages-darwin.jre-openj9 {};
|
||||
|
||||
adoptopenjdk-bin-15-packages-linux = import ../development/compilers/adoptopenjdk-bin/jdk15-linux.nix;
|
||||
adoptopenjdk-bin-15-packages-darwin = import ../development/compilers/adoptopenjdk-bin/jdk15-darwin.nix;
|
||||
adoptopenjdk-bin-15-packages-linux = import ../development/compilers/adoptopenjdk-bin/jdk15-linux.nix { inherit lib; };
|
||||
adoptopenjdk-bin-15-packages-darwin = import ../development/compilers/adoptopenjdk-bin/jdk15-darwin.nix { inherit lib; };
|
||||
|
||||
adoptopenjdk-hotspot-bin-15 = if stdenv.isLinux
|
||||
then callPackage adoptopenjdk-bin-15-packages-linux.jdk-hotspot {}
|
||||
@ -11195,8 +11195,8 @@ with pkgs;
|
||||
then callPackage adoptopenjdk-bin-15-packages-linux.jre-openj9 {}
|
||||
else callPackage adoptopenjdk-bin-15-packages-darwin.jre-openj9 {};
|
||||
|
||||
adoptopenjdk-bin-14-packages-linux = import ../development/compilers/adoptopenjdk-bin/jdk14-linux.nix;
|
||||
adoptopenjdk-bin-14-packages-darwin = import ../development/compilers/adoptopenjdk-bin/jdk14-darwin.nix;
|
||||
adoptopenjdk-bin-14-packages-linux = import ../development/compilers/adoptopenjdk-bin/jdk14-linux.nix { inherit lib; };
|
||||
adoptopenjdk-bin-14-packages-darwin = import ../development/compilers/adoptopenjdk-bin/jdk14-darwin.nix { inherit lib; };
|
||||
|
||||
adoptopenjdk-hotspot-bin-14 = if stdenv.isLinux
|
||||
then callPackage adoptopenjdk-bin-14-packages-linux.jdk-hotspot {}
|
||||
@ -11213,8 +11213,8 @@ with pkgs;
|
||||
then callPackage adoptopenjdk-bin-14-packages-linux.jre-openj9 {}
|
||||
else callPackage adoptopenjdk-bin-14-packages-darwin.jre-openj9 {};
|
||||
|
||||
adoptopenjdk-bin-13-packages-linux = import ../development/compilers/adoptopenjdk-bin/jdk13-linux.nix;
|
||||
adoptopenjdk-bin-13-packages-darwin = import ../development/compilers/adoptopenjdk-bin/jdk13-darwin.nix;
|
||||
adoptopenjdk-bin-13-packages-linux = import ../development/compilers/adoptopenjdk-bin/jdk13-linux.nix { inherit lib; };
|
||||
adoptopenjdk-bin-13-packages-darwin = import ../development/compilers/adoptopenjdk-bin/jdk13-darwin.nix { inherit lib; };
|
||||
|
||||
adoptopenjdk-hotspot-bin-13 = if stdenv.isLinux
|
||||
then callPackage adoptopenjdk-bin-13-packages-linux.jdk-hotspot {}
|
||||
@ -11231,8 +11231,8 @@ with pkgs;
|
||||
then callPackage adoptopenjdk-bin-13-packages-linux.jre-openj9 {}
|
||||
else callPackage adoptopenjdk-bin-13-packages-darwin.jre-openj9 {};
|
||||
|
||||
adoptopenjdk-bin-11-packages-linux = import ../development/compilers/adoptopenjdk-bin/jdk11-linux.nix;
|
||||
adoptopenjdk-bin-11-packages-darwin = import ../development/compilers/adoptopenjdk-bin/jdk11-darwin.nix;
|
||||
adoptopenjdk-bin-11-packages-linux = import ../development/compilers/adoptopenjdk-bin/jdk11-linux.nix { inherit lib; };
|
||||
adoptopenjdk-bin-11-packages-darwin = import ../development/compilers/adoptopenjdk-bin/jdk11-darwin.nix { inherit lib; };
|
||||
|
||||
adoptopenjdk-hotspot-bin-11 = if stdenv.isLinux
|
||||
then callPackage adoptopenjdk-bin-11-packages-linux.jdk-hotspot {}
|
||||
@ -11249,8 +11249,8 @@ with pkgs;
|
||||
then callPackage adoptopenjdk-bin-11-packages-linux.jre-openj9 {}
|
||||
else callPackage adoptopenjdk-bin-11-packages-darwin.jre-openj9 {};
|
||||
|
||||
adoptopenjdk-bin-8-packages-linux = import ../development/compilers/adoptopenjdk-bin/jdk8-linux.nix;
|
||||
adoptopenjdk-bin-8-packages-darwin = import ../development/compilers/adoptopenjdk-bin/jdk8-darwin.nix;
|
||||
adoptopenjdk-bin-8-packages-linux = import ../development/compilers/adoptopenjdk-bin/jdk8-linux.nix { inherit lib; };
|
||||
adoptopenjdk-bin-8-packages-darwin = import ../development/compilers/adoptopenjdk-bin/jdk8-darwin.nix { inherit lib; };
|
||||
|
||||
adoptopenjdk-hotspot-bin-8 = if stdenv.isLinux
|
||||
then callPackage adoptopenjdk-bin-8-packages-linux.jdk-hotspot {}
|
||||
|
Loading…
Reference in New Issue
Block a user