ratman: 0.3.1 -> 0.4.0 (#179814)
This commit is contained in:
parent
7c1c1cca3b
commit
8b00147f1d
|
@ -1,22 +1,30 @@
|
||||||
{ lib
|
{ lib
|
||||||
, fetchurl
|
, fetchFromGitLab
|
||||||
, installShellFiles
|
, installShellFiles
|
||||||
, libsodium
|
, libsodium
|
||||||
, pkg-config
|
, pkg-config
|
||||||
, protobuf
|
, protobuf
|
||||||
, rustPlatform
|
, rustPlatform
|
||||||
|
, fetchYarnDeps
|
||||||
|
, fixup_yarn_lock
|
||||||
|
, stdenv
|
||||||
|
, yarn
|
||||||
|
, nodejs
|
||||||
}:
|
}:
|
||||||
|
|
||||||
rustPlatform.buildRustPackage rec {
|
rustPlatform.buildRustPackage rec {
|
||||||
pname = "ratman";
|
pname = "ratman";
|
||||||
version = "0.3.1";
|
version = "0.4.0";
|
||||||
|
|
||||||
src = fetchurl {
|
src = fetchFromGitLab {
|
||||||
url = "https://git.irde.st/we/irdest/-/archive/${pname}-${version}/irdest-${pname}-${version}.tar.gz";
|
domain = "git.irde.st";
|
||||||
sha256 = "0x1wvhsmf7m55j9hmirkz75qivsg33xab1sil6nbv8fby428fpq6";
|
owner = "we";
|
||||||
|
repo = "irdest";
|
||||||
|
rev = "${pname}-${version}";
|
||||||
|
sha256 = "sha256-ZZ7idZ67xvQFmQJqIFU/l77YU+yDQOqNthX5NR/l4k8=";
|
||||||
};
|
};
|
||||||
|
|
||||||
cargoSha256 = "1dkfyy1z34qaavyd3f20hrrrb3kjsdfkyzd535xlds9wivgchmd0";
|
cargoSha256 = "Nsux0QblBtzlhLEgfKYvkQrOz8+oVd2pqT3CL8TnQEc=";
|
||||||
|
|
||||||
nativeBuildInputs = [ protobuf pkg-config installShellFiles ];
|
nativeBuildInputs = [ protobuf pkg-config installShellFiles ];
|
||||||
|
|
||||||
|
@ -31,6 +39,50 @@ rustPlatform.buildRustPackage rec {
|
||||||
|
|
||||||
SODIUM_USE_PKG_CONFIG = 1;
|
SODIUM_USE_PKG_CONFIG = 1;
|
||||||
|
|
||||||
|
dashboard = stdenv.mkDerivation rec {
|
||||||
|
pname = "ratman-dashboard";
|
||||||
|
inherit version src;
|
||||||
|
sourceRoot = "source/ratman/dashboard";
|
||||||
|
|
||||||
|
yarnDeps = fetchYarnDeps {
|
||||||
|
yarnLock = src + "/ratman/dashboard/yarn.lock";
|
||||||
|
sha256 = "sha256-pWjKL41r/bTvWv+5qCgCFVL9+o64BiV2/ISdLeKEOqE=";
|
||||||
|
};
|
||||||
|
|
||||||
|
nativeBuildInputs = [ yarn nodejs ];
|
||||||
|
|
||||||
|
outputs = [ "out" "dist" ];
|
||||||
|
|
||||||
|
buildPhase = ''
|
||||||
|
# Yarn writes temporary files to $HOME. Copied from mkYarnModules.
|
||||||
|
export HOME=$NIX_BUILD_TOP/yarn_home
|
||||||
|
|
||||||
|
# Make yarn install packages from our offline cache, not the registry
|
||||||
|
yarn config --offline set yarn-offline-mirror ${yarnDeps}
|
||||||
|
|
||||||
|
# Fixup "resolved"-entries in yarn.lock to match our offline cache
|
||||||
|
${fixup_yarn_lock}/bin/fixup_yarn_lock yarn.lock
|
||||||
|
|
||||||
|
yarn install --offline --frozen-lockfile --ignore-scripts --no-progress --non-interactive
|
||||||
|
|
||||||
|
patchShebangs node_modules/
|
||||||
|
|
||||||
|
# Build into `./dist/`, suppress formatting.
|
||||||
|
yarn --offline build | cat
|
||||||
|
'';
|
||||||
|
|
||||||
|
installPhase = ''
|
||||||
|
cp -R . $out
|
||||||
|
|
||||||
|
mv $out/dist $dist
|
||||||
|
ln -s $dist $out/dist
|
||||||
|
'';
|
||||||
|
};
|
||||||
|
|
||||||
|
prePatch = ''
|
||||||
|
cp -r ${dashboard.dist} ratman/dashboard/dist
|
||||||
|
'';
|
||||||
|
|
||||||
meta = with lib; {
|
meta = with lib; {
|
||||||
description = "A modular decentralised peer-to-peer packet router and associated tools";
|
description = "A modular decentralised peer-to-peer packet router and associated tools";
|
||||||
homepage = "https://git.irde.st/we/irdest";
|
homepage = "https://git.irde.st/we/irdest";
|
||||||
|
|
Loading…
Reference in a new issue