ran: init at 0.1.6

This commit is contained in:
Tom Bereknyei 2021-09-02 00:30:29 -04:00 committed by tomberek
parent 876fb5677c
commit 5f6a5d5c5f
2 changed files with 49 additions and 0 deletions

View File

@ -0,0 +1,47 @@
{ buildGoModule
, fetchFromGitHub
, lib
, runCommand
, ran
, curl
}:
buildGoModule rec {
pname = "ran";
version = "0.1.6";
src = fetchFromGitHub {
owner = "m3ng9i";
repo = "ran";
rev = "v${version}";
hash = "sha256-iMvUvzr/jaTNdgHQFuoJNJnnkx2XHIUUlrPWyTlreEw=";
};
vendorSha256 = "sha256-ObroruWWNilHIclqNvbEaa7vwk+1zMzDKbjlVs7Fito=";
CGO_ENABLED = 0;
ldflags = [
"-X" "main._version_=v${version}"
"-X" "main._branch_=master"
];
passthru.tests = {
simple = runCommand "ran-test" { } ''
echo hello world > index.html
${ran}/bin/ran &
# Allow ran to fully initialize
sleep 1
[ "$(${curl}/bin/curl 127.0.0.1:8080)" == "hello world" ]
kill %1
${ran}/bin/ran --version > $out
'';
};
meta = with lib; {
homepage = "https://github.com/m3ng9i/ran";
description = "Ran is a simple web server for serving static files";
license = licenses.mit;
maintainers = with maintainers; [ tomberek ];
platforms = platforms.unix;
};
}

View File

@ -14368,6 +14368,8 @@ with pkgs;
lua = lua5; lua = lua5;
} // (config.radare or {})); } // (config.radare or {}));
ran = callPackage ../servers/http/ran { };
retry = callPackage ../tools/system/retry { }; retry = callPackage ../tools/system/retry { };
rizin = pkgs.callPackage ../development/tools/analysis/rizin { }; rizin = pkgs.callPackage ../development/tools/analysis/rizin { };