mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-15 06:14:57 +01:00
1862813d11
This is done with the following bash script: ``` #!/usr/bin/env bash process_line() { local filename=${1%:} if [[ $4 =~ \"(.*)\"\; ]]; then local sha256="${BASH_REMATCH[1]}" fi [[ -z $sha256 ]] && return 0 local hash=$(nix hash to-sri --type sha256 $sha256) echo "Processing: $filename" echo " $sha256 => $hash" sed -i "s|cargoSha256 = \"$sha256\"|cargoHash = \"$hash\"|" $filename } # split output by line grep -r 'cargoSha256 = ' . | while IFS= read -r line; do # split them further by space read -r -a parts <<< "$line" process_line "${parts[@]}" done ```
30 lines
1 KiB
Nix
30 lines
1 KiB
Nix
{ lib, fetchFromGitHub, rustPlatform }:
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
pname = "webmetro";
|
|
version = "unstable-20180426";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "Tangent128";
|
|
repo = pname;
|
|
rev = "4f6cc00fe647bd311d00a8a4cb53ab08f20a04f9";
|
|
sha256 = "1n2c7ygs8qsd5zgii6fqqcwg427bsij082bg4ijnzkq5630dx651";
|
|
};
|
|
|
|
cargoHash = "sha256-6LfJ5rI7Y+ziEIMxPpKxOS+VSrKuKohEcqIK7xdKhNg=";
|
|
|
|
meta = with lib; {
|
|
description = "Simple relay server for broadcasting a WebM stream";
|
|
longDescription = ''
|
|
Webmetro is a simple relay server for broadcasting a WebM stream
|
|
from one uploader to many downloaders, via HTTP.
|
|
The initialization segment is remembered, so that viewers can join
|
|
mid-stream. Cluster timestamps are rewritten to be monotonic, so multiple
|
|
(compatibly-encoded) webm files can be chained together without
|
|
clients needing to reconnect.
|
|
'';
|
|
license = with licenses; [ mit ];
|
|
maintainers = with maintainers; [ leenaars ];
|
|
mainProgram = "webmetro";
|
|
};
|
|
}
|