Merge pull request #309050 from lorenzleutgeb/radicle

radicle: reinit at 1.0.0-rc.8
This commit is contained in:
Ivan Mincik 2024-05-10 04:49:03 +00:00 committed by GitHub
commit c669412a55
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
6 changed files with 64 additions and 7069 deletions

File diff suppressed because it is too large Load Diff

View File

@ -1,88 +0,0 @@
{ lib
, stdenv
, fetchFromGitHub
, rustPlatform
, pkg-config
, cmake
, installShellFiles
, asciidoctor
, DarwinTools
, openssl
, libusb1
, AppKit
, git
, openssh
, testers
, radicle-cli
}:
rustPlatform.buildRustPackage rec {
pname = "radicle-cli";
version = "0.6.1";
src = fetchFromGitHub {
owner = "radicle-dev";
repo = pname;
rev = "v${version}";
sha256 = "sha256-LS6zYpMg0LanRL2M8ioGG8Ys07TPT/3hP7geEGehwxg=";
};
cargoLock = {
lockFile = ./Cargo.lock;
outputHashes = {
"automerge-0.0.2" = "sha256-MZ1/rca8ZsEUhd3bhd502PHlBbvqAOtnWFEdp7XWmYE=";
"automerge-0.1.0" = "sha256-dwbmx3W13oZ1O0Uw3/D5Z0ht1BO1PmVVoWc/tLCm0/4=";
"cob-0.1.0" = "sha256-ewPJEx7OSr8X6e5QJ4dh2SbzZ2TDa8G4zBR5euBbABo=";
"libusb1-sys-0.6.2" = "sha256-577ld1xqJkHp2bqALNq5IuZivD8y+VO8vNy9Y+hfq6c=";
"walletconnect-0.1.0" = "sha256-fdgdhotTYBmWbR4r0OMplOwhYq1C7jkuOdhKASjH+Fs=";
};
};
# Otherwise, there are errors due to the `abigen` macro from `ethers`.
auditable = false;
nativeBuildInputs = [
pkg-config
cmake
installShellFiles
asciidoctor
] ++ lib.optionals stdenv.hostPlatform.isDarwin [
DarwinTools
];
buildInputs = [
openssl
] ++ lib.optionals stdenv.hostPlatform.isDarwin [
libusb1
AppKit
];
postInstall = ''
for f in $(find . -name '*.adoc'); do
mf=''${f%.*}
asciidoctor --doctype manpage --backend manpage $f -o $mf
installManPage $mf
done
'';
nativeCheckInputs = [
git
openssh
];
preCheck = ''
eval $(ssh-agent)
'';
passthru.tests = {
version = testers.testVersion { package = radicle-cli; };
};
meta = {
description = "Command-line tooling for Radicle, a decentralized code collaboration network";
homepage = "https://radicle.xyz";
license = lib.licenses.gpl3Plus;
maintainers = with lib.maintainers; [ amesgen ];
platforms = lib.platforms.unix;
mainProgram = "rad";
};
}

View File

@ -1,82 +0,0 @@
{ lib, stdenv, appimageTools, autoPatchelfHook, zlib, fetchurl, undmg, libgcc }:
let
pname = "radicle-upstream";
version = "0.3.0";
srcs = {
x86_64-linux = fetchurl {
url = "https://releases.radicle.xyz/radicle-upstream-${version}.AppImage";
sha256 = "sha256-Y7V89G+nXRtknOukvBN8Q+sNx91YNPDT0p5hrFYe/Sk=";
};
x86_64-darwin = fetchurl {
url = "https://releases.radicle.xyz/radicle-upstream-${version}.dmg";
sha256 = "sha256-EuWGbn6qggi8/9Rci8iaXfuVKE+QXb1BHEYDvotR/q4=";
};
};
src = srcs.${stdenv.hostPlatform.system} or (throw "unsupported system ${stdenv.hostPlatform.system}");
contents = appimageTools.extract { inherit pname version src; };
git-remote-rad = stdenv.mkDerivation rec {
pname = "git-remote-rad";
inherit version;
src = contents;
nativeBuildInputs = [ autoPatchelfHook ];
buildInputs = [ libgcc zlib ];
installPhase = ''
mkdir -p $out/bin/
install -Dm755 ${contents}/resources/git-remote-rad $out/bin/git-remote-rad
'';
};
# FIXME: a dependency of the `proxy` component of radicle-upstream (radicle-macros
# v0.1.0) uses unstable rust features, making a from source build impossible at
# this time. See this PR for discussion: https://github.com/NixOS/nixpkgs/pull/105674
linux = appimageTools.wrapType2 {
inherit pname version src meta;
extraInstallCommands = ''
# this automatically adds the git-remote-rad binary to the users `PATH` so
# they don't need to mess around with shell profiles...
ln -s ${git-remote-rad}/bin/git-remote-rad $out/bin/git-remote-rad
# desktop item
install -m 444 -D ${contents}/${pname}.desktop $out/share/applications/${pname}.desktop
substituteInPlace $out/share/applications/${pname}.desktop \
--replace 'Exec=AppRun' 'Exec=${pname}'
# icon
install -m 444 -D ${contents}/${pname}.png \
$out/share/icons/hicolor/512x512/apps/${pname}.png
'';
};
darwin = stdenv.mkDerivation {
inherit pname version src meta;
nativeBuildInputs = [ undmg ];
sourceRoot = ".";
installPhase = ''
mkdir -p $out/Applications
cp -r *.app $out/Applications
'';
};
meta = with lib; {
description = "A decentralized app for code collaboration";
homepage = "https://radicle.xyz/";
license = licenses.gpl3Plus;
maintainers = with maintainers; [ d-xo ];
platforms = [ "x86_64-linux" "x86_64-darwin" ];
sourceProvenance = with sourceTypes; [ binaryNativeCode ];
broken = stdenv.isLinux; # last successful build 2023-04-11
};
in
if stdenv.isDarwin
then darwin
else linux

View File

@ -0,0 +1,62 @@
{ lib
, stdenv
, fetchgit
, asciidoctor
, git
, installShellFiles
, rustPlatform
, testers
, radicle-node
, darwin
}: rustPlatform.buildRustPackage rec {
pname = "radicle-node";
version = "1.0.0-rc.8";
env.RADICLE_VERSION = version;
src = fetchgit {
url = "https://seed.radicle.xyz/z3gqcJUoA1n9HaHKufZs5FCSGazv5.git";
rev = "refs/namespaces/z6MksFqXN3Yhqk8pTJdUGLwATkRfQvwZXPqR2qMEhbS9wzpT/refs/tags/v${version}";
hash = "sha256-F2n7ui0EgXK8fT76M14RVhXXGeRYub+VpH+puDUJ1pQ=";
};
cargoHash = "sha256-+QthR5M3qAxC42TPnR5iylfpuWnsSmg68SuCbhmkCvw=";
nativeBuildInputs = [ asciidoctor installShellFiles ];
nativeCheckInputs = [ git ];
buildInputs = lib.optionals stdenv.buildPlatform.isDarwin [
darwin.apple_sdk.frameworks.Security
];
doCheck = with stdenv.hostPlatform; isx86_64 && isLinux;
preCheck = ''
export PATH=$PATH:$PWD/target/${stdenv.hostPlatform.rust.rustcTargetSpec}/release
'';
checkFlags = [
"--skip=service::message::tests::test_node_announcement_validate"
"--skip=tests::test_announcement_relay"
"--skip=tests::e2e"
];
postInstall = ''
for page in $(find -name '*.adoc'); do
asciidoctor -d manpage -b manpage $page
installManPage ''${page::-5}
done
'';
passthru.tests.version = testers.testVersion { package = radicle-node; };
meta = {
description = "Radicle node and CLI for decentralized code collaboration";
longDescription = ''
Radicle is an open source, peer-to-peer code collaboration stack built on Git.
Unlike centralized code hosting platforms, there is no single entity controlling the network.
Repositories are replicated across peers in a decentralized manner, and users are in full control of their data and workflow.
'';
homepage = "https://radicle.xyz";
license = with lib.licenses; [ asl20 mit ];
platforms = lib.platforms.unix;
maintainers = with lib.maintainers; [ amesgen lorenzleutgeb ];
mainProgram = "rad";
};
}

View File

@ -1080,6 +1080,8 @@ mapAliases ({
### R ###
radare2-cutter = cutter; # Added 2021-03-30
radicle-cli = throw "'radicle-cli' was removed in favor of 'radicle-node'"; # Added 2024-05-04
radicle-upstream = throw "'radicle-upstream' was sunset, see <https://community.radworks.org/t/2962>"; # Added 2024-05-04
railway-travel = diebahn; # Added 2024-04-01
rambox-pro = rambox; # Added 2022-12-12
rarian = throw "rarian has been removed as unused"; # Added 2023-07-05

View File

@ -2560,13 +2560,6 @@ with pkgs;
qgit = qt5.callPackage ../applications/version-management/qgit { };
radicle-cli = callPackage ../applications/version-management/radicle-cli {
inherit (darwin) DarwinTools;
inherit (darwin.apple_sdk.frameworks) AppKit;
};
radicle-upstream = callPackage ../applications/version-management/radicle-upstream { };
rs-git-fsmonitor = callPackage ../applications/version-management/rs-git-fsmonitor { };
scmpuff = callPackage ../applications/version-management/scmpuff { };