Merge remote-tracking branch 'origin/master' into staging-next
Conflicts: pkgs/applications/graphics/emulsion/default.nix pkgs/development/tools/misc/texlab/default.nix pkgs/development/tools/rust/bindgen/default.nix pkgs/development/tools/rust/cargo-udeps/default.nix pkgs/misc/emulators/ruffle/default.nix pkgs/tools/misc/code-minimap/default.nix
This commit is contained in:
@@ -12,7 +12,7 @@
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "codeql";
|
||||
version = "2.5.3";
|
||||
version = "2.5.4";
|
||||
|
||||
dontConfigure = true;
|
||||
dontBuild = true;
|
||||
@@ -20,7 +20,7 @@ stdenv.mkDerivation rec {
|
||||
|
||||
src = fetchzip {
|
||||
url = "https://github.com/github/codeql-cli-binaries/releases/download/v${version}/codeql.zip";
|
||||
sha256 = "sha256-+bVbl6cuWrG+75AN5a1SUI8AXJq8ThnOpITPf6S2uEI=";
|
||||
sha256 = "sha256-UYiyF0Ij6zWjJUs7GZtUVTZbFQmN21/O/64X4JV5+O4=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [
|
||||
|
||||
@@ -1,85 +1,22 @@
|
||||
{ buildBazelPackage
|
||||
, cacert
|
||||
{ buildGoModule
|
||||
, fetchFromGitHub
|
||||
, git
|
||||
, go
|
||||
, lib
|
||||
, stdenv
|
||||
}:
|
||||
|
||||
buildBazelPackage rec {
|
||||
buildGoModule rec {
|
||||
pname = "bazel-remote";
|
||||
version = "1.0.0";
|
||||
version = "2.0.1";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "buchgr";
|
||||
repo = "bazel-remote";
|
||||
repo = pname;
|
||||
rev = "v${version}";
|
||||
sha256 = "1fpdw139d5q1377qnqbgkahmdr4mdaa17d2m10wkyvyvijwm4r2m";
|
||||
sha256 = "193amcx4nk7mr51jcawym46gizqmfkvksjxm64pf7s3wraf00v01";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ go git ];
|
||||
vendorSha256 = "1sxv9mya8plkn3hpjgfpzgwlh4m3cbhpywqv86brj2h9i4ad0gl5";
|
||||
|
||||
bazelTarget = "//:bazel-remote";
|
||||
|
||||
removeRulesCC = false;
|
||||
|
||||
# this is to work around `test -f` failing when called by gazelle
|
||||
# https://github.com/bazelbuild/bazel-gazelle/blob/v0.19.1/internal/go_repository.bzl#L135
|
||||
patches = [ ./disable_build_file_generation.patch ];
|
||||
|
||||
fetchAttrs = {
|
||||
preBuild = ''
|
||||
patchShebangs .
|
||||
|
||||
# tell rules_go to use the Go binary found in the PATH
|
||||
sed -e 's:go_register_toolchains():go_register_toolchains(go_version = "host"):g' -i WORKSPACE
|
||||
|
||||
# tell rules_go to invoke GIT with custom CAINFO path
|
||||
export GIT_SSL_CAINFO="${cacert}/etc/ssl/certs/ca-bundle.crt"
|
||||
|
||||
# force gazelle to use the nix go cache rather than its own
|
||||
# export GO_REPOSITORY_USE_HOST_CACHE=1
|
||||
'';
|
||||
|
||||
preInstall = ''
|
||||
# Remove the go_sdk (it's just a copy of the go derivation) and all
|
||||
# references to it from the marker files. Bazel does not need to download
|
||||
# this sdk because we have patched the WORKSPACE file to point to the one
|
||||
# currently present in PATH. Without removing the go_sdk from the marker
|
||||
# file, the hash of it will change anytime the Go derivation changes and
|
||||
# that would lead to impurities in the marker files which would result in
|
||||
# a different sha256 for the fetch phase.
|
||||
rm -rf $bazelOut/external/{go_sdk,\@go_sdk.marker}
|
||||
sed -e '/^FILE:@go_sdk.*/d' -i $bazelOut/external/\@*.marker
|
||||
|
||||
# Remove the gazelle repository cache as it contains built binaries
|
||||
chmod -R u+w $bazelOut/external/bazel_gazelle_go_repository_cache
|
||||
rm -rf $bazelOut/external/{bazel_gazelle_go_repository_cache,\@bazel_gazelle_go_repository_cache.marker}
|
||||
sed -e '/^FILE:@bazel_gazelle_go_repository_cache.*/d' -i $bazelOut/external/\@*.marker
|
||||
|
||||
# Remove the gazelle tools, they contain go binaries that are built
|
||||
# non-deterministically. As long as the gazelle version matches the tools
|
||||
# should be equivalent.
|
||||
rm -rf $bazelOut/external/{bazel_gazelle_go_repository_tools,\@bazel_gazelle_go_repository_tools.marker}
|
||||
sed -e '/^FILE:@bazel_gazelle_go_repository_tools.*/d' -i $bazelOut/external/\@*.marker
|
||||
'';
|
||||
|
||||
sha256 = "1vijh3nl30n8k6xlx6in92pzs70x15akbqiqalk8apgvphvdz8vy";
|
||||
};
|
||||
|
||||
buildAttrs = {
|
||||
preBuild = ''
|
||||
patchShebangs .
|
||||
|
||||
# tell rules_go to use the Go binary found in the PATH
|
||||
sed -e 's:go_register_toolchains():go_register_toolchains(go_version = "host"):g' -i WORKSPACE
|
||||
'';
|
||||
|
||||
installPhase = ''
|
||||
install -Dm755 bazel-bin/*_pure_stripped/bazel-remote $out/bin/bazel-remote
|
||||
'';
|
||||
};
|
||||
doCheck = false;
|
||||
|
||||
meta = with lib; {
|
||||
homepage = "https://github.com/buchgr/bazel-remote";
|
||||
@@ -87,6 +24,5 @@ buildBazelPackage rec {
|
||||
license = licenses.asl20;
|
||||
maintainers = [ maintainers.uri-canva ];
|
||||
platforms = platforms.darwin ++ platforms.linux;
|
||||
broken = stdenv.isDarwin;
|
||||
};
|
||||
}
|
||||
|
||||
@@ -3,17 +3,17 @@
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "leiningen";
|
||||
version = "2.9.5";
|
||||
version = "2.9.6";
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://raw.github.com/technomancy/leiningen/${version}/bin/lein-pkg";
|
||||
sha256 = "12kv3286a2vkm3qpm2msiks87mkspxddgl7bwiacdias9dfda09n";
|
||||
sha256 = "0a8lq0yalar8szw155cxa8kywnk6yvakwi3xmxm1ahivn7i5hjq9";
|
||||
};
|
||||
|
||||
jarsrc = fetchurl {
|
||||
# NOTE: This is actually a .jar, Github has issues
|
||||
url = "https://github.com/technomancy/leiningen/releases/download/${version}/${pname}-${version}-standalone.zip";
|
||||
sha256 = "1shyvg1471sc3bv4h3ax51626xw8a8w05f43bny6gmp8pyc0qjfz";
|
||||
sha256 = "1f3hb57rqp9qkh5n2wf65dvxraf21y15s3g643f2fhzc7vvl7ia1";
|
||||
};
|
||||
|
||||
JARNAME = "${pname}-${version}-standalone.jar";
|
||||
|
||||
@@ -19,8 +19,6 @@ let
|
||||
sha256 = "1pcy5m79g0l9l3d8lkbx6cq1w87z1g3sa6wwvgbgraj2v3wkyy5g";
|
||||
};
|
||||
|
||||
bootstrapper = ./rebar3-nix-bootstrap;
|
||||
|
||||
buildInputs = [ erlang ];
|
||||
|
||||
postPatch = ''
|
||||
@@ -106,7 +104,7 @@ let
|
||||
}));
|
||||
in stdenv.mkDerivation {
|
||||
pname = "rebar3-with-plugins";
|
||||
inherit (rebar3) version bootstrapper;
|
||||
inherit (rebar3) version;
|
||||
nativeBuildInputs = [ erlang makeWrapper ];
|
||||
unpackPhase = "true";
|
||||
|
||||
|
||||
@@ -1,228 +0,0 @@
|
||||
#!/usr/bin/env escript
|
||||
%% -*- erlang-indent-level: 4;indent-tabs-mode: nil -*-
|
||||
%%! -smp enable
|
||||
%%% ---------------------------------------------------------------------------
|
||||
%%% @doc
|
||||
%%% The purpose of this command is to prepare a rebar3 project so that
|
||||
%%% rebar3 understands that the dependencies are all already
|
||||
%%% installed. If you want a hygienic build on nix then you must run
|
||||
%%% this command before running rebar3. I suggest that you add a
|
||||
%%% `Makefile` to your project and have the bootstrap command be a
|
||||
%%% dependency of the build commands. See the nix documentation for
|
||||
%%% more information.
|
||||
%%%
|
||||
%%% This command designed to have as few dependencies as possible so
|
||||
%%% that it can be a dependency of root level packages like rebar3. To
|
||||
%%% that end it does many things in a fairly simplistic way. That is
|
||||
%%% by design.
|
||||
%%%
|
||||
%%% ### Assumptions
|
||||
%%%
|
||||
%%% This command makes the following assumptions:
|
||||
%%%
|
||||
%%% * It is run in a nix-shell or nix-build environment
|
||||
%%% * that all dependencies have been added to the ERL_LIBS
|
||||
%%% Environment Variable
|
||||
|
||||
-record(data, {version
|
||||
, debug_info = false
|
||||
, erl_libs
|
||||
, root
|
||||
, name}).
|
||||
|
||||
-define(HEX_REGISTRY_PATH, ".cache/rebar3/hex/default/registry").
|
||||
|
||||
main(Args) ->
|
||||
{ok, ArgData} = parse_args(Args),
|
||||
{ok, RequiredData} = gather_required_data_from_the_environment(ArgData),
|
||||
do_the_bootstrap(RequiredData).
|
||||
|
||||
-spec do_the_bootstrap(#data{}) -> ok.
|
||||
do_the_bootstrap(RequiredData) ->
|
||||
ok = bootstrap_configs(RequiredData),
|
||||
ok = bootstrap_libs(RequiredData).
|
||||
|
||||
%% @doc
|
||||
%% Argument parsing is super simple only because we want to keep the
|
||||
%% dependencies minimal. For now there can be one entry on the
|
||||
%% command line: "debug-info"
|
||||
-spec parse_args([string()]) -> #data{}.
|
||||
parse_args(Args0) ->
|
||||
PossibleArgs = sets:from_list(["debug-info"]),
|
||||
Args1 = sets:from_list(Args0),
|
||||
Result = sets:subtract(Args1, PossibleArgs),
|
||||
case sets:to_list(Result) of
|
||||
[] ->
|
||||
{ok, #data{debug_info = sets:is_element("debug-info", Args1)}};
|
||||
UnknownArgs ->
|
||||
io:format("Unexpected command line arguments passed in: ~p~n",
|
||||
[UnknownArgs]),
|
||||
erlang:halt(120)
|
||||
end.
|
||||
|
||||
|
||||
-spec bootstrap_configs(#data{}) -> ok.
|
||||
bootstrap_configs(RequiredData)->
|
||||
io:format("Boostrapping app and rebar configurations~n"),
|
||||
ok = if_single_app_project_update_app_src_version(RequiredData),
|
||||
ok = if_debug_info_add(RequiredData).
|
||||
|
||||
-spec bootstrap_libs(#data{}) -> ok.
|
||||
bootstrap_libs(#data{erl_libs = ErlLibs}) ->
|
||||
io:format("Bootstrapping dependent libraries~n"),
|
||||
Target = "_build/default/lib/",
|
||||
Paths = string:tokens(ErlLibs, ":"),
|
||||
CopiableFiles =
|
||||
lists:foldl(fun(Path, Acc) ->
|
||||
gather_directory_contents(Path) ++ Acc
|
||||
end, [], Paths),
|
||||
lists:foreach(fun (Path) ->
|
||||
ok = link_app(Path, Target)
|
||||
end, CopiableFiles).
|
||||
|
||||
-spec gather_dependency(string()) -> [{string(), string()}].
|
||||
gather_dependency(Path) ->
|
||||
FullLibrary = filename:join(Path, "lib/erlang/lib/"),
|
||||
case filelib:is_dir(FullLibrary) of
|
||||
true ->
|
||||
gather_directory_contents(FullLibrary);
|
||||
false ->
|
||||
[raw_hex(Path)]
|
||||
end.
|
||||
|
||||
-spec raw_hex(string()) -> {string(), string()}.
|
||||
raw_hex(Path) ->
|
||||
[_, Name] = re:split(Path, "-hex-source-"),
|
||||
{Path, erlang:binary_to_list(Name)}.
|
||||
|
||||
-spec gather_directory_contents(string()) -> [{string(), string()}].
|
||||
gather_directory_contents(Path) ->
|
||||
{ok, Names} = file:list_dir(Path),
|
||||
lists:map(fun(AppName) ->
|
||||
{filename:join(Path, AppName), fixup_app_name(AppName)}
|
||||
end, Names).
|
||||
|
||||
%% @doc
|
||||
%% Makes a symlink from the directory pointed at by Path to a
|
||||
%% directory of the same name in Target. So if we had a Path of
|
||||
%% {`foo/bar/baz/bash`, `baz`} and a Target of `faz/foo/foos`, the symlink
|
||||
%% would be `faz/foo/foos/baz`.
|
||||
-spec link_app({string(), string()}, string()) -> ok.
|
||||
link_app({Path, TargetFile}, TargetDir) ->
|
||||
Target = filename:join(TargetDir, TargetFile),
|
||||
make_symlink(Path, Target).
|
||||
|
||||
-spec make_symlink(string(), string()) -> ok.
|
||||
make_symlink(Path, TargetFile) ->
|
||||
file:delete(TargetFile),
|
||||
ok = filelib:ensure_dir(TargetFile),
|
||||
io:format("Making symlink from ~s to ~s~n", [Path, TargetFile]),
|
||||
ok = file:make_symlink(Path, TargetFile).
|
||||
|
||||
%% @doc
|
||||
%% This takes an app name in the standard OTP <name>-<version> format
|
||||
%% and returns just the app name. Why? Because rebar doesn't
|
||||
%% respect OTP conventions in some cases.
|
||||
-spec fixup_app_name(string()) -> string().
|
||||
fixup_app_name(FileName) ->
|
||||
case string:tokens(FileName, "-") of
|
||||
[Name] -> Name;
|
||||
[Name, _Version] -> Name;
|
||||
[Name, _Version, _Tag] -> Name
|
||||
end.
|
||||
|
||||
-spec gather_required_data_from_the_environment(#data{}) -> {ok, #data{}}.
|
||||
gather_required_data_from_the_environment(ArgData) ->
|
||||
{ok, ArgData#data{ version = guard_env("version")
|
||||
, erl_libs = get_env("ERL_LIBS", [])
|
||||
, root = code:root_dir()
|
||||
, name = guard_env("name")
|
||||
}}.
|
||||
|
||||
-spec nix2bool(any()) -> boolean().
|
||||
nix2bool("1") ->
|
||||
true;
|
||||
nix2bool("") ->
|
||||
false.
|
||||
|
||||
get_env(Name) ->
|
||||
os:getenv(Name).
|
||||
get_env(Name, Def) ->
|
||||
case get_env(Name) of
|
||||
false -> Def;
|
||||
Val -> Val
|
||||
end.
|
||||
|
||||
-spec guard_env(string()) -> string().
|
||||
guard_env(Name) ->
|
||||
case get_env(Name) of
|
||||
false ->
|
||||
stderr("Expected Environment variable ~s! Are you sure you are "
|
||||
"running in a Nix environment? Either a nix-build, "
|
||||
"nix-shell, etc?~n", [Name]),
|
||||
erlang:halt(1);
|
||||
Variable ->
|
||||
Variable
|
||||
end.
|
||||
|
||||
%% @doc
|
||||
%% If debug info is set we need to add debug info to the list of compile options
|
||||
%%
|
||||
-spec if_debug_info_add(#data{}) -> ok.
|
||||
if_debug_info_add(#data{debug_info = true}) ->
|
||||
ConfigTerms = add_debug_info(read_rebar_config()),
|
||||
Text = lists:map(fun(Term) -> io_lib:format("~tp.~n", [Term]) end,
|
||||
ConfigTerms),
|
||||
file:write_file("rebar.config", Text);
|
||||
if_debug_info_add(_) ->
|
||||
ok.
|
||||
|
||||
-spec add_debug_info([term()]) -> [term()].
|
||||
add_debug_info(Config) ->
|
||||
ExistingOpts = case lists:keysearch(erl_opts, 1, Config) of
|
||||
{value, {erl_opts, ExistingOptsList}} -> ExistingOptsList;
|
||||
_ -> []
|
||||
end,
|
||||
case lists:member(debug_info, ExistingOpts) of
|
||||
true ->
|
||||
Config;
|
||||
false ->
|
||||
lists:keystore(erl_opts, 1, Config,
|
||||
{erl_opts, [debug_info | ExistingOpts]})
|
||||
end.
|
||||
|
||||
-spec read_rebar_config() -> [term()].
|
||||
read_rebar_config() ->
|
||||
case file:consult("rebar.config") of
|
||||
{ok, Terms} ->
|
||||
Terms;
|
||||
_ ->
|
||||
stderr("Unable to read rebar config!", []),
|
||||
erlang:halt(1)
|
||||
end.
|
||||
|
||||
|
||||
-spec if_single_app_project_update_app_src_version(#data{}) -> ok.
|
||||
if_single_app_project_update_app_src_version(#data{name = Name,
|
||||
version = Version}) ->
|
||||
SrcFile = filename:join("src",
|
||||
lists:concat([Name, ".app.src"])),
|
||||
|
||||
case filelib:is_file(SrcFile) of
|
||||
true ->
|
||||
update_app_src_with_version(SrcFile, Version);
|
||||
false ->
|
||||
ok
|
||||
end.
|
||||
|
||||
-spec update_app_src_with_version(string(), string()) -> ok.
|
||||
update_app_src_with_version(SrcFile, Version) ->
|
||||
{ok, [{application, Name, Details}]} = file:consult(SrcFile),
|
||||
NewDetails = lists:keyreplace(vsn, 1, Details, {vsn, Version}),
|
||||
ok = file:write_file(SrcFile, io_lib:fwrite("~p.\n", [{application, Name, NewDetails}])).
|
||||
|
||||
%% @doc
|
||||
%% Write the result of the format string out to stderr.
|
||||
-spec stderr(string(), [term()]) -> ok.
|
||||
stderr(FormatStr, Args) ->
|
||||
io:put_chars(standard_error, io_lib:format(FormatStr, Args)).
|
||||
@@ -4,37 +4,41 @@ let
|
||||
fuse = if stdenv.isDarwin then macfuse-stubs else fuse3;
|
||||
in stdenv.mkDerivation rec {
|
||||
pname = "tup";
|
||||
version = "0.7.10";
|
||||
version = "0.7.11";
|
||||
outputs = [ "bin" "man" "out" ];
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "gittup";
|
||||
repo = "tup";
|
||||
rev = "v${version}";
|
||||
sha256 = "1qd07h4wi0743l7z2vybfvhwp61g2p2pc5qhl40672ryl24nvd1d";
|
||||
hash = "sha256-Q2Y5ErcfhLChi9Wezn8+7eNXYX2UXW1fBOqEclmgzOo=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ pkg-config ];
|
||||
buildInputs = [ fuse pcre ];
|
||||
|
||||
configurePhase = ''
|
||||
sed -i 's/`git describe`/v${version}/g' src/tup/link.sh
|
||||
sed -i 's/pcre-confg/pkg-config pcre/g' Tupfile Tuprules.tup
|
||||
substituteInPlace src/tup/link.sh --replace '`git describe' '`echo ${version}'
|
||||
substituteInPlace Tuprules.tup --replace 'pcre-config' 'pkg-config libpcre'
|
||||
'';
|
||||
|
||||
# Regular tup builds require fusermount to have suid, which nix cannot
|
||||
# currently provide in a build environment, so we bootstrap and use 'tup
|
||||
# generate' instead
|
||||
buildPhase = ''
|
||||
runHook preBuild
|
||||
./build.sh
|
||||
./build/tup init
|
||||
./build/tup generate script.sh
|
||||
./script.sh
|
||||
runHook postBuild
|
||||
'';
|
||||
|
||||
installPhase = ''
|
||||
runHook preInstall
|
||||
install -D tup -t $bin/bin/
|
||||
install -D tup.1 -t $man/share/man/man1/
|
||||
runHook postInstall
|
||||
'';
|
||||
|
||||
setupHook = ./setup-hook.sh;
|
||||
|
||||
@@ -10,11 +10,11 @@ in
|
||||
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "liquibase";
|
||||
version = "4.3.4";
|
||||
version = "4.3.5";
|
||||
|
||||
src = fetchurl {
|
||||
url = "https://github.com/liquibase/liquibase/releases/download/v${version}/${pname}-${version}.tar.gz";
|
||||
sha256 = "sha256-tWk4AW2F1v+5C7Gj9I6c4JVfaQDXEVMdPoaKafa7OgE=";
|
||||
sha256 = "sha256-XOYq+p76XFt7j4oxMClZox5wsaXuV5ovcB6kZJhMBlU=";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ makeWrapper ];
|
||||
|
||||
@@ -95,21 +95,21 @@ rec {
|
||||
headers = "1kfgww8wha86yw75k5yfq4mxvjlxgf1jmmzxy0p3hyr000kw26pk";
|
||||
};
|
||||
|
||||
electron_11 = mkElectron "11.4.5" {
|
||||
x86_64-linux = "6019703cbd37787ba4f0953cb82415c3fac47c8dba3a3af925b00636792d0f89";
|
||||
x86_64-darwin = "0f28a1fb4fb6e05f3b602c7e5d8646084344257ba9db977fead9229111a8f599";
|
||||
i686-linux = "886a348e1e984b5ea3e4090168fff4ae9f262b1a158e49ff62c544add6d98bec";
|
||||
armv7l-linux = "009eeae8463a6e5ad8cdefd4ec645f38604881f7cbbcdd5e5dabb6955ef5d002";
|
||||
aarch64-linux = "3cc0f9abb03cd9b9de42a749b38748485d85ba511b205ce8de3e56a903c62211";
|
||||
headers = "10a0nf40crjq14p15g8s3ncj1w0dq1kqhfsm3aq5dppj2gx0k8dn";
|
||||
electron_11 = mkElectron "11.4.6" {
|
||||
x86_64-linux = "03932a0b3328a00e7ed49947c70143b7b3455a3c1976defab2f74127cdae43e9";
|
||||
x86_64-darwin = "47de03b17ab20213c95d5817af3d7db2b942908989649202efdcd1d566dd24c3";
|
||||
i686-linux = "b76e69ad4b654384b4f1647f0cb362e78c1d99be7b814d7d32abc22294639ace";
|
||||
armv7l-linux = "cc4be8e0c348bc8db5002cf6c63c1d02fcb594f1f8bfc358168738c930098857";
|
||||
aarch64-linux = "75665dd5b2b9938bb4572344d459db65f46c5f7c637a32946c5a822cc23a77dc";
|
||||
headers = "0ip1wxgflifs86vk4xpz1555xa7yjy64ygqgd5a2g723148m52rk";
|
||||
};
|
||||
|
||||
electron_12 = mkElectron "12.0.6" {
|
||||
x86_64-linux = "3c632a25ed6502de00d089ee493475b89dd24c2a85ffa00130a5f06001898f27";
|
||||
x86_64-darwin = "416348dad569d64d34396be6590ca15761dce91b77aab8219112464d55d00575";
|
||||
i686-linux = "2182f2a7e0564b615db3ef99204df8fd3dbd8b0da2fa2eccc960885d9360f018";
|
||||
armv7l-linux = "9482309c023a9c367a9403ad750d44a87d68510179fb767707c161672dcd6ffb";
|
||||
aarch64-linux = "3033c5dbfbdb5226f6dc528333d237fcb500c2301b1a547ba8a89e54ebc111ab";
|
||||
headers = "1la0bfigy2vq7jxrcddj4z5i2xk3cj974ymy0nmbhfnjbwqr7hg2";
|
||||
electron_12 = mkElectron "12.0.7" {
|
||||
x86_64-linux = "335b77b35361fac4e2df1b7e8de5cf055e0a1a2065759cb2dd4508e8a77949fa";
|
||||
x86_64-darwin = "c3238c9962c5ad0f9de23c9314f07e03410d096d7e9f9d91016dab2856606a9e";
|
||||
i686-linux = "16023d86b88c7fccafd491c020d064caa2138d6a3493664739714555f72e5b06";
|
||||
armv7l-linux = "53cc1250ff62f2353d8dd37552cbd7bdcaaa756106faee8b809303bed00e040a";
|
||||
aarch64-linux = "3eddc0c507a43cce4e714bfe509d99218b5ab99f4660dd173aac2a895576dc71";
|
||||
headers = "1ji9aj7qr4b27m5kprsgsrl21rjphz5bbnmn6q0n2x84l429nyfb";
|
||||
};
|
||||
}
|
||||
|
||||
@@ -2,16 +2,16 @@
|
||||
|
||||
buildGoModule rec {
|
||||
pname = "golangci-lint";
|
||||
version = "1.40.0";
|
||||
version = "1.40.1";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "golangci";
|
||||
repo = "golangci-lint";
|
||||
rev = "v${version}";
|
||||
sha256 = "sha256-/AKDwX4W9MCPXNy2izSGTugLV8DVX4A2djZla8bqDCs=";
|
||||
sha256 = "sha256-5OtXfDPpdwVMnI5Pttr+XQPgJXI7YexPtBhIDeS1CXk=";
|
||||
};
|
||||
|
||||
vendorSha256 = "sha256-HkVt0Nkq7+gvn5VNeROAmuhlCFGYx2niWb1NwJfLtRc=";
|
||||
vendorSha256 = "sha256-8SPUOQ88RkU0dkyNccf+POKitXHlCRaxrIugV91gDZQ=";
|
||||
|
||||
doCheck = false;
|
||||
|
||||
|
||||
@@ -8,16 +8,18 @@
|
||||
|
||||
rustPlatform.buildRustPackage rec {
|
||||
pname = "texlab";
|
||||
version = "2.2.2";
|
||||
version = "3.0.0";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "latex-lsp";
|
||||
repo = pname;
|
||||
rev = "v${version}";
|
||||
sha256 = "06x7j4ppgw24xbsnyj1icaksngqbvq6mk8wfcqikzmvmifjspx9m";
|
||||
hash = "sha256-jOxneMqeyvMQWKPNha59H6qWSFmx+Z71SU2+M5VWMsA=";
|
||||
};
|
||||
|
||||
cargoSha256 = "0mikz7lyf0csn4v1wzmcdaid3g8zm9a4mmr5f7l2s7rrlqz3jibn";
|
||||
cargoHash = "sha256-H6czxSTw93RNTaN0OJyv0RfwmGAiFkpDgUtXHCD+jrY=";
|
||||
|
||||
outputs = [ "out" "man" ];
|
||||
|
||||
nativeBuildInputs = [ installShellFiles ];
|
||||
|
||||
@@ -25,7 +27,14 @@ rustPlatform.buildRustPackage rec {
|
||||
|
||||
postInstall = ''
|
||||
installManPage texlab.1
|
||||
'';
|
||||
|
||||
# Remove generated dylib of html2md dependency. TexLab statically
|
||||
# links to the generated rlib and doesn't reference the dylib. I
|
||||
# couldn't find any way to prevent building this by passing cargo flags.
|
||||
# See https://gitlab.com/Kanedias/html2md/-/blob/0.2.10/Cargo.toml#L20
|
||||
rm "$out/lib/libhtml2md.so"
|
||||
rmdir "$out/lib"
|
||||
'';
|
||||
|
||||
meta = with lib; {
|
||||
description = "An implementation of the Language Server Protocol for LaTeX";
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{ lib, stdenv
|
||||
, fetchurl
|
||||
, mono6
|
||||
, mono
|
||||
, msbuild
|
||||
, dotnet-sdk
|
||||
, makeWrapper
|
||||
@@ -35,7 +35,7 @@ stdenv.mkDerivation rec {
|
||||
chmod -R u+w $out/src
|
||||
mv $out/src/.msbuild/Current/{bin,Bin}
|
||||
|
||||
makeWrapper ${mono6}/bin/mono $out/bin/omnisharp \
|
||||
makeWrapper ${mono}/bin/mono $out/bin/omnisharp \
|
||||
--add-flags "$out/src/OmniSharp.exe"
|
||||
'';
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
{ fetchFromGitHub, installShellFiles, lib, rustPlatform }:
|
||||
{ fetchFromGitHub, installShellFiles, lib, stdenv, rustPlatform, Security }:
|
||||
|
||||
rustPlatform.buildRustPackage rec {
|
||||
pname = "pactorio";
|
||||
@@ -14,6 +14,7 @@ rustPlatform.buildRustPackage rec {
|
||||
cargoSha256 = "1rac2s36j88vm231aji8d0ndfbaa2gzxwsrxrvsi0zp9cqisc6rh";
|
||||
|
||||
nativeBuildInputs = [ installShellFiles ];
|
||||
buildInputs = lib.optional stdenv.isDarwin Security;
|
||||
|
||||
preFixup = ''
|
||||
completions=($releaseDir/build/pactorio-*/out/completions)
|
||||
|
||||
@@ -2,13 +2,13 @@
|
||||
|
||||
buildGoPackage rec {
|
||||
pname = "protoc-gen-twirp";
|
||||
version = "7.2.0";
|
||||
version = "8.0.0";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "twitchtv";
|
||||
repo = "twirp";
|
||||
rev = "v${version}";
|
||||
sha256 = "sha256-W7t36F1St0YLPowHaZSboVNnvX7E2Lg5tPWeyeUSabA=";
|
||||
sha256 = "sha256-lwozRwH96nh4Zlf6ggOF+FuUEfxkN38wxygg5HXw/M0=";
|
||||
};
|
||||
|
||||
goPackagePath = "github.com/twitchtv/twirp";
|
||||
|
||||
@@ -16,7 +16,7 @@ rustPlatform.buildRustPackage rec {
|
||||
sha256 = "sha256-0d8+Rkb4h1DoFUQ7u2/kPR/fUUz0YvI+hNT4iXL3mxY=";
|
||||
};
|
||||
|
||||
cargoSha256 = "sha256-nI0Jr5vNldvo6K9GhnUXi1Lcruy6zKCDEimFTmHVwGQ=";
|
||||
cargoSha256 = "0r60smhlx1992a1s1k5sxjpdqllb2xsqcimgx3ldp5fdkfphk3cw";
|
||||
|
||||
#for substituteAll
|
||||
libclang = llvmPackages.libclang.lib;
|
||||
|
||||
@@ -2,16 +2,16 @@
|
||||
|
||||
rustPlatform.buildRustPackage rec {
|
||||
pname = "cargo-udeps";
|
||||
version = "0.1.20";
|
||||
version = "0.1.21";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "est31";
|
||||
repo = pname;
|
||||
rev = "v${version}";
|
||||
sha256 = "sha256-1gAkc8x9rl80xkFWR2iKYOjkHplWUPWQZDbE8U5gkOM=";
|
||||
sha256 = "sha256-Voei7j3WRDu70NkcJvjqPJ4ikOUupOhvFNEHHRyF6/Q=";
|
||||
};
|
||||
|
||||
cargoSha256 = "sha256-M1UkfzNcBv00Ctl5zRNn6CMizunGC3EM8zsA6PgOaLw=";
|
||||
cargoSha256 = "sha256-zMya7bEehNKIfwQtJ252sflg06P4Ra8/lgBjn4UUqRg=";
|
||||
|
||||
nativeBuildInputs = [ pkg-config ];
|
||||
|
||||
|
||||
@@ -1,4 +1,5 @@
|
||||
{ lib, rustPlatform, fetchFromGitHub, pkg-config, libusb1 }:
|
||||
{ lib, stdenv, rustPlatform, fetchFromGitHub, pkg-config, libusb1
|
||||
, libiconv, AppKit, IOKit }:
|
||||
|
||||
rustPlatform.buildRustPackage rec {
|
||||
pname = "probe-run";
|
||||
@@ -14,7 +15,8 @@ rustPlatform.buildRustPackage rec {
|
||||
cargoSha256 = "HmDKfb8F6sGnaX64FR3No2GbBYm4bVopbjs8d35WiZQ=";
|
||||
|
||||
nativeBuildInputs = [ pkg-config ];
|
||||
buildInputs = [ libusb1 ];
|
||||
buildInputs = [ libusb1 ]
|
||||
++ lib.optionals stdenv.isDarwin [ libiconv AppKit IOKit ];
|
||||
|
||||
meta = with lib; {
|
||||
description = "Run embedded programs just like native ones.";
|
||||
|
||||
@@ -6,14 +6,14 @@
|
||||
|
||||
rustPlatform.buildRustPackage rec {
|
||||
pname = "rust-analyzer-unwrapped";
|
||||
version = "2021-05-10";
|
||||
cargoSha256 = "sha256-PUecBFdYIJFZa5IwwNnuXOkuxtyrzWhxy3C+2jv/hvU=";
|
||||
version = "2021-05-17";
|
||||
cargoSha256 = "sha256-uSBukInJ3FEMmMpG9DN3XeXm+hzUFqCrZORb4NIEJhw=";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "rust-analyzer";
|
||||
repo = "rust-analyzer";
|
||||
rev = version;
|
||||
sha256 = "sha256-oz6FqRMEUUTS4X2XhpWjp2JIgl1A6wQv2OU8auwUoVM=";
|
||||
sha256 = "sha256-BsabpY4LArfsDPAMsggxKu1+OQZmqRe//+a5uBcuFps=";
|
||||
};
|
||||
|
||||
patches = [
|
||||
|
||||
+61
@@ -0,0 +1,61 @@
|
||||
diff --git a/src/main.rs b/src/main.rs
|
||||
index 3cb6896..7f070e0 100644
|
||||
--- a/src/main.rs
|
||||
+++ b/src/main.rs
|
||||
@@ -275,7 +275,9 @@ fn install_single_toolchain(
|
||||
|
||||
// install
|
||||
if maybe_dry_client.is_some() {
|
||||
- rename(&toolchain.dest, toolchain_path)?;
|
||||
+ rename(&toolchain.dest, toolchain_path.clone())?;
|
||||
+ nix_patchelf(toolchain_path)
|
||||
+ .expect("failed to patch toolchain for NixOS");
|
||||
eprintln!(
|
||||
"toolchain `{}` is successfully installed!",
|
||||
toolchain.dest.display()
|
||||
@@ -291,6 +293,45 @@ fn install_single_toolchain(
|
||||
Ok(())
|
||||
}
|
||||
|
||||
+fn nix_patchelf(mut toolchain_path: PathBuf) -> Result<(), Error> {
|
||||
+ toolchain_path.push("bin");
|
||||
+
|
||||
+ for entry in toolchain_path.read_dir()? {
|
||||
+ let entry = entry?;
|
||||
+ if !entry.file_type()?.is_file() {
|
||||
+ continue;
|
||||
+ }
|
||||
+
|
||||
+ eprintln!("info: you seem to be running NixOS. Attempting to patch {}",
|
||||
+ entry.path().to_str().unwrap());
|
||||
+ let _ = ::std::process::Command::new("@patchelf@/bin/patchelf")
|
||||
+ .arg("--set-interpreter")
|
||||
+ .arg("@dynamicLinker@")
|
||||
+ .arg(entry.path())
|
||||
+ .output();
|
||||
+ }
|
||||
+
|
||||
+ toolchain_path.pop();
|
||||
+ toolchain_path.push("lib");
|
||||
+
|
||||
+ for entry in toolchain_path.read_dir()? {
|
||||
+ let entry = entry?;
|
||||
+ if !entry.file_type()?.is_file() {
|
||||
+ continue;
|
||||
+ }
|
||||
+
|
||||
+ eprintln!("info: you seem to be running NixOS. Attempting to patch {}",
|
||||
+ entry.path().to_str().unwrap());
|
||||
+ let _ = ::std::process::Command::new("@patchelf@/bin/patchelf")
|
||||
+ .arg("--set-rpath")
|
||||
+ .arg("@libPath@")
|
||||
+ .arg(entry.path())
|
||||
+ .output();
|
||||
+ }
|
||||
+
|
||||
+ Ok(())
|
||||
+}
|
||||
+
|
||||
fn fetch_master_commit(client: &Client, github_token: Option<&str>) -> Result<String, Error> {
|
||||
eprintln!("fetching master commit hash... ");
|
||||
fetch_master_commit_via_git()
|
||||
@@ -0,0 +1,56 @@
|
||||
{ stdenv
|
||||
, lib
|
||||
, fetchFromGitHub
|
||||
, rustPlatform
|
||||
, pkg-config
|
||||
, openssl
|
||||
, runCommand
|
||||
, patchelf
|
||||
, zlib
|
||||
, Security
|
||||
}:
|
||||
|
||||
rustPlatform.buildRustPackage rec {
|
||||
pname = "rustup-toolchain-install-master";
|
||||
version = "1.7.3";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "kennytm";
|
||||
repo = pname;
|
||||
rev = "v${version}";
|
||||
hash = "sha256-J25ER/g8Kylw/oTIEl4Gl8i1xmhR+4JM5M5EHpl1ras=";
|
||||
};
|
||||
|
||||
patches =
|
||||
let
|
||||
patchelfPatch = runCommand "0001-dynamically-patchelf-binaries.patch" {
|
||||
CC = stdenv.cc;
|
||||
patchelf = patchelf;
|
||||
libPath = "$ORIGIN/../lib:${lib.makeLibraryPath [ zlib ]}";
|
||||
}
|
||||
''
|
||||
export dynamicLinker=$(cat $CC/nix-support/dynamic-linker)
|
||||
substitute ${./0001-dynamically-patchelf-binaries.patch} $out \
|
||||
--subst-var patchelf \
|
||||
--subst-var dynamicLinker \
|
||||
--subst-var libPath
|
||||
'';
|
||||
in
|
||||
lib.optionals stdenv.isLinux [ patchelfPatch ];
|
||||
|
||||
nativeBuildInputs = [ pkg-config ];
|
||||
buildInputs = [
|
||||
openssl
|
||||
] ++ lib.optionals stdenv.isDarwin [
|
||||
Security
|
||||
];
|
||||
|
||||
cargoSha256 = "n7t8Ap9hdhrjmtKjfdyozf26J7yhu57pedm19CunLF4=";
|
||||
|
||||
meta = with lib; {
|
||||
description = "Install a rustc master toolchain usable from rustup";
|
||||
homepage = "https://github.com/kennytm/rustup-toolchain-install-master";
|
||||
license = licenses.mit;
|
||||
maintainers = with maintainers; [ davidtwco ];
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user