17 src = fetchFromGitHub {
21 hash = "sha256-Meztr/UxLgnbd3YwkSW0vy+D2N4mFg2v+T4nBnYiQBI=";
24 rqbit-webui = buildNpmPackage {
25 pname = "rqbit-webui";
31 sourceRoot = "${src.name}/crates/librqbit/webui";
33 npmDepsHash = "sha256-vib8jpf7Jn1qv0m/dWJ4TbisByczNbtEd8hIM5ll2Q8=";
39 cp -r dist/** $out/dist
45 rustPlatform.buildRustPackage {
46 inherit pname version src;
48 useFetchCargoVendor = true;
49 cargoHash = "sha256-FGcws80cX0I74bVaSV6OLntPFPNanGAFm6CVHDAGbOU=";
51 nativeBuildInputs = lib.optionals stdenv.hostPlatform.isLinux [ pkg-config ];
53 buildInputs = lib.optionals stdenv.hostPlatform.isLinux [ openssl ];
56 mkdir -p crates/librqbit/webui/dist
57 cp -R ${rqbit-webui}/dist/** crates/librqbit/webui/dist
61 # This script fascilitates the build of the webui,
62 # we've already built that
63 rm crates/librqbit/build.rs
68 passthru.webui = rqbit-webui;
70 passthru.updateScript = nix-update-script {
78 description = "Bittorrent client in Rust";
79 homepage = "https://github.com/ikatson/rqbit";
80 changelog = "https://github.com/ikatson/rqbit/releases/tag/v${version}";
81 license = licenses.asl20;
82 maintainers = with maintainers; [
86 mainProgram = "rqbit";