2022-04-29 18:09:48 +00:00
|
|
|
{ buildGo116Module
|
2022-04-29 16:34:08 +00:00
|
|
|
, fetchFromGitHub
|
|
|
|
, git
|
2022-04-29 18:09:48 +00:00
|
|
|
}: buildGo116Module rec {
|
2022-04-29 16:34:08 +00:00
|
|
|
pname = "matrix-media-repo";
|
|
|
|
version = "1.2.12";
|
|
|
|
src = fetchFromGitHub {
|
2022-05-03 18:27:02 +00:00
|
|
|
owner = "turt2live";
|
2022-04-29 16:34:08 +00:00
|
|
|
repo = pname;
|
2022-05-03 18:27:02 +00:00
|
|
|
rev = "v${version}";
|
|
|
|
sha256 = "1j6y7alr60mmj5h014qmpz9a5qjv8cm61andwdacb0dqjjbvsm0z";
|
2022-04-29 16:34:08 +00:00
|
|
|
};
|
2022-04-29 18:09:48 +00:00
|
|
|
proxyVendor = true;
|
2022-05-03 18:27:02 +00:00
|
|
|
vendorSha256 = "sha256-gb2inc/XlPAplVYQXmR77b3/5GsEZDg5v7D/FbZRQ7w=";
|
2022-04-29 16:34:08 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
git
|
|
|
|
];
|
|
|
|
buildPhase = ''
|
|
|
|
GOBIN=$PWD/bin go install -v ./cmd/compile_assets
|
|
|
|
$PWD/bin/compile_assets
|
|
|
|
GOBIN=$PWD/bin go install -ldflags "-X github.com/turt2live/matrix-media-repo/common/version.GitCommit=$(git rev-list -1 HEAD) -X github.com/turt2live/matrix-media-repo/common/version.Version=$(git describe --tags)" -v ./cmd/...
|
|
|
|
'';
|
|
|
|
installPhase = ''
|
|
|
|
mkdir $out
|
|
|
|
cp -rv bin $out
|
|
|
|
'';
|
|
|
|
}
|