mirror of
https://github.com/NixOS/nixpkgs.git
synced 2026-09-30 03:39:59 +00:00
rustfs: 1.0.0-rc.6 -> 1.0.0 (#566359)
This commit is contained in:
@@ -53,17 +53,20 @@ in
|
||||
);
|
||||
};
|
||||
|
||||
environment.systemPackages = with pkgs; [ minio-client ];
|
||||
environment.systemPackages = with pkgs; [ rustfs-cli ];
|
||||
};
|
||||
|
||||
testScript = /* python */ ''
|
||||
machine.wait_for_unit("rustfs.service")
|
||||
|
||||
machine.succeed("mc alias set rustfs http://localhost:9000 ${accessKey} ${secretKey} --api s3v4")
|
||||
machine.succeed("mc mb rustfs/test-bucket")
|
||||
machine.succeed("rc alias set rustfs http://localhost:9000 ${accessKey} ${secretKey}")
|
||||
machine.succeed("rc bucket create rustfs/test-bucket")
|
||||
machine.succeed("${rustfsPythonScript}")
|
||||
assert "test-bucket" in machine.succeed("mc ls rustfs")
|
||||
assert "Test from Python" in machine.succeed("mc cat rustfs/test-bucket/test.txt")
|
||||
machine.succeed("mc rb --force rustfs/test-bucket")
|
||||
assert "test-bucket" in machine.succeed("rc bucket list rustfs")
|
||||
assert "Test from Python" in machine.succeed("rc object show rustfs/test-bucket/test.txt")
|
||||
machine.succeed("rc object remove rustfs/test-bucket/test.txt")
|
||||
assert "test.txt" not in machine.succeed("rc bucket list rustfs/test-bucket")
|
||||
machine.succeed("rc bucket remove rustfs/test-bucket")
|
||||
assert "test-bucket" not in machine.succeed("rc bucket list rustfs")
|
||||
'';
|
||||
}
|
||||
|
||||
@@ -9,7 +9,6 @@
|
||||
rustPlatform,
|
||||
protobuf,
|
||||
cacert,
|
||||
tzdata,
|
||||
nix-update,
|
||||
nixosTests,
|
||||
writeShellApplication,
|
||||
@@ -20,7 +19,7 @@ let
|
||||
|
||||
console = stdenv.mkDerivation (finalAttrs: {
|
||||
pname = "rustfs-console";
|
||||
version = "0.1.26";
|
||||
version = "0.1.28";
|
||||
__structuredAttrs = true;
|
||||
__darwinAllowLocalNetworking = true;
|
||||
|
||||
@@ -28,7 +27,7 @@ let
|
||||
owner = "rustfs";
|
||||
repo = "console";
|
||||
tag = "v${finalAttrs.version}";
|
||||
hash = "sha256-1X7ZcprtVXybV58mdrqbvERNHfs8Y/3klGDPObhUt9o=";
|
||||
hash = "sha256-hrA1BQ4tfLS65oKSBXrEjRv2cr3rkLv6W7FRlXANcHQ=";
|
||||
};
|
||||
|
||||
pnpmDeps = fetchPnpmDeps {
|
||||
@@ -57,14 +56,14 @@ let
|
||||
in
|
||||
rustPlatform.buildRustPackage (finalAttrs: {
|
||||
pname = "rustfs";
|
||||
version = "1.0.0-rc.6";
|
||||
version = "1.0.0";
|
||||
__structuredAttrs = true;
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "rustfs";
|
||||
repo = "rustfs";
|
||||
tag = finalAttrs.version;
|
||||
hash = "sha256-+ZcLd6WlT5X48u4LHYQVw+QgaVotpEN4JLKy8N86ejM=";
|
||||
hash = "sha256-8+kzzbM5jv0C9cNoqmOP4do8v1tiYn5sxBJyLxPsaNE=";
|
||||
};
|
||||
|
||||
postPatch = ''
|
||||
@@ -72,7 +71,7 @@ rustPlatform.buildRustPackage (finalAttrs: {
|
||||
cp -rL ${finalAttrs.console} ./rustfs/static
|
||||
'';
|
||||
|
||||
cargoHash = "sha256-0VMunv3UYMEwf6msTSbL/Eo1vRBLfo9zNixPkc0+kcU=";
|
||||
cargoHash = "sha256-cjx2bbs1ny2S6stNbA2W/Bceb2Not2PHS66wbAvjqzs=";
|
||||
|
||||
nativeBuildInputs = [
|
||||
protobuf
|
||||
@@ -81,28 +80,13 @@ rustPlatform.buildRustPackage (finalAttrs: {
|
||||
|
||||
inherit console;
|
||||
|
||||
env = {
|
||||
RUSTFLAGS = "--cfg tokio_unstable";
|
||||
# reqwest loads CA certs even if not used during tests
|
||||
SSL_CERT_FILE = "${cacert}/etc/ssl/certs/ca-bundle.crt";
|
||||
# jiff needs a time zone database to resolve zones like UTC during tests
|
||||
TZDIR = "${tzdata}/share/zoneinfo";
|
||||
};
|
||||
env.RUSTFLAGS = "--cfg tokio_unstable";
|
||||
|
||||
# Only build the main rustfs binary
|
||||
cargoBuildFlags = "-p rustfs";
|
||||
|
||||
useNextest = true;
|
||||
# Use debug mode to reduce test compilation time.
|
||||
checkType = "debug";
|
||||
cargoTestFlags = [
|
||||
"--package"
|
||||
"rustfs"
|
||||
"--no-fail-fast"
|
||||
|
||||
"--filterset"
|
||||
"not (test(connect::) or binary(connect_*) or test(=version::tests::test_is_head_newer_than_tag_requires_strict_descendant))"
|
||||
];
|
||||
# they are to intensive on the resource usage, we are just relying on nixos vm test
|
||||
doCheck = false;
|
||||
|
||||
passthru = {
|
||||
tests = {
|
||||
@@ -113,8 +97,8 @@ rustPlatform.buildRustPackage (finalAttrs: {
|
||||
name = "rustfs-update-script";
|
||||
runtimeInputs = [ nix-update ];
|
||||
text = ''
|
||||
nix-update rustfs --version=unstable
|
||||
nix-update rustfs.console --version=unstable
|
||||
nix-update rustfs
|
||||
nix-update rustfs.console
|
||||
'';
|
||||
});
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user