Decentralized Nix flake tools
Rev. | 45fd3471320256435a9fcb78db2ddf1581d2a5ef |
---|---|
大小 | 1,996 字节 |
时间 | 2024-03-31 10:08:13 |
作者 | Corbin |
Log Message | Package gittorrent?
It doesn't work. I'm wondering whether I should invest effort into this;
|
{
description = "Decentralized Nix flake utilities";
inputs.flake-utils.url = "github:numtide/flake-utils";
outputs = { self, nixpkgs, flake-utils }:
flake-utils.lib.eachDefaultSystem (system:
let
pkgs = import nixpkgs { inherit system; };
gitstr = pkgs.buildGoModule rec {
pname = "gitstr";
version = "0.0.7";
src = pkgs.fetchFromGitHub {
owner = "fiatjaf";
repo = pname;
rev = "v${version}";
hash = "sha256-djgyQqNwxtYbAzzQi+BLPrLafptQ/9218VQRwRkeJaA=";
};
vendorHash = "sha256-RRt8qnW0lUzuGbyHfbxg7mxDvGwBHjpZMahyguyjfHg=";
meta = {
description = "Send and receive git patches over Nostr, using NIP-34";
homepage = https://github.com/fiatjaf/gitstr;
license = pkgs.lib.licenses.mit;
};
};
gittorrent = pkgs.buildNpmPackage rec {
pname = "gittorrent";
version = "2015";
src = pkgs.fetchFromGitHub {
owner = "cjb";
repo = "GitTorrent";
rev = "7b25402100059692b7161f05a8a23e872bf1f3dc";
hash = "sha256-sS4Lk4W5u0Mny8wxe/0AtOtA9Z4mZEyHnLg40Y7PvU8=";
};
npmDepsHash = "sha256-ekxdoJ3sHY0Mxcbz2nyC9pqc+uZTAWZ1VVEqhn+JviI=";
makeCacheWritable = true;
dontNpmBuild = true;
postPatch = ''
cp ${./patches/gittorrent/package-lock.json} package-lock.json
cp ${./patches/gittorrent/package.json} package.json
'';
meta = {
description = "A decentralization of GitHub using BitTorrent and Bitcoin";
homepage = http://blog.printf.net/articles/2015/05/29/announcing-gittorrent-a-decentralized-github/;
license = pkgs.lib.licenses.mit;
};
};
in
{
packages = rec {
inherit gitstr gittorrent;
default = pkgs.hello;
};
}
);
}