Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: NixOS/nixpkgs
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 89517271fa87
Choose a base ref
...
head repository: NixOS/nixpkgs
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: d35710b4f9ac
Choose a head ref
  • 2 commits
  • 2 files changed
  • 2 contributors

Commits on Jan 12, 2018

  1. minio: 20170613 -> 2017-09-29T19-16-56Z

    The test was updated as minio now needs at least 1 GiB of free disk,
    otherwise it won't start.
    
    (cherry picked from commit 1983e6c)
    bachp authored and Mic92 committed Jan 12, 2018
    Copy the full SHA
    2146eed View commit details
  2. minio: 2017-09-29T19-16-56Z -> 2018-01-02T23-07-00Z (#33724)

    Contains security fixes (see: https://blog.minio.io/minio-release-jan-2nd-2018-security-advisory-ef0342a4ddba)
    
    Use buildGoPackage, otherwise we will have the go build toolchain in our runtime closure.
    
    (cherry picked from commit dffe1e5)
    bachp authored and Mic92 committed Jan 12, 2018
    Copy the full SHA
    d35710b View commit details
Showing with 20 additions and 29 deletions.
  1. +3 −1 nixos/tests/minio.nix
  2. +17 −28 pkgs/servers/minio/default.nix
4 changes: 3 additions & 1 deletion nixos/tests/minio.nix
Original file line number Diff line number Diff line change
@@ -12,6 +12,9 @@ import ./make-test.nix ({ pkgs, ...} : {
secretKey = "V7f1CwQqAcwo80UEIJEjc5gVQUSSx5ohQ9GSrr12";
};
environment.systemPackages = [ pkgs.minio-client ];

# Minio requires at least 1GiB of free disk space to run.
virtualisation.diskSize = 4 * 1024;
};
};

@@ -20,7 +23,6 @@ import ./make-test.nix ({ pkgs, ...} : {
startAll;
$machine->waitForUnit("minio.service");
$machine->waitForOpenPort(9000);
$machine->succeed("curl --fail http://localhost:9000/minio/index.html");
# Create a test bucket on the server
$machine->succeed("mc config host add minio http://localhost:9000 BKIKJAA5BMMU2RHO6IBB V7f1CwQqAcwo80UEIJEjc5gVQUSSx5ohQ9GSrr12 S3v4");
45 changes: 17 additions & 28 deletions pkgs/servers/minio/default.nix
Original file line number Diff line number Diff line change
@@ -1,39 +1,28 @@
{ lib, stdenv, fetchurl, go }:
{ stdenv, buildGoPackage, fetchFromGitHub }:

stdenv.mkDerivation rec {
name = "minio-${shortVersion}";
buildGoPackage rec {
name = "minio-${version}";

shortVersion = "20170613";
longVersion = "2017-06-13T19-01-01Z";
version = "2018-01-02T23-07-00Z";

src = fetchurl {
url = "https://github.com/minio/minio/archive/RELEASE.${lib.replaceStrings [":"] ["-"] longVersion}.tar.gz";
sha256 = "1rrlgn0nsvfn0lr9ffihjdb96n4znsvjlz1h7bwvz8nwhbn0lfsf";
src = fetchFromGitHub {
owner = "minio";
repo = "minio";
rev = "RELEASE.${version}";
sha256 = "1bpiy6q9782mxs5f5lzw6c7zx83s2i68rf5f65xa9z7cyl19si74";
};

buildInputs = [ go ];
goPackagePath = "github.com/minio/minio";

unpackPhase = ''
d=$TMPDIR/src/github.com/minio/minio
mkdir -p $d
tar xf $src -C $d --strip-component 1
export GOPATH=$TMPDIR
cd $d
'';
buildFlagsArray = [''-ldflags=
-X github.com/minio/minio/cmd.Version=${version}
''];

buildPhase = ''
mkdir -p $out/bin
go build -o $out/bin/minio \
--ldflags "-X github.com/minio/minio/cmd.Version=${longVersion}"
'';

installPhase = "true";

meta = {
meta = with stdenv.lib; {
homepage = https://www.minio.io/;
description = "An S3-compatible object storage server";
maintainers = [ lib.maintainers.eelco ];
platforms = lib.platforms.x86_64;
license = lib.licenses.asl20;
maintainers = with maintainers; [ eelco bachp ];
platforms = platforms.x86_64 ++ ["aarch64-linux"];
license = licenses.asl20;
};
}