mysql80: use finalAttrs

This commit is contained in:
Aaron Jheng 2023-09-23 23:32:56 +08:00
parent 0a320a73b6
commit 1d600455cf
No known key found for this signature in database
GPG key ID: F6A547A869D050A3

View file

@ -1,15 +1,14 @@
{ lib, stdenv, fetchurl, bison, cmake, pkg-config
, boost, icu, libedit, libevent, lz4, ncurses, openssl, protobuf, re2, readline, zlib, zstd, libfido2
, numactl, perl, cctools, CoreServices, developer_cmds, libtirpc, rpcsvc-proto, curl, DarwinTools, nixosTests
, numactl, cctools, CoreServices, developer_cmds, libtirpc, rpcsvc-proto, curl, DarwinTools, nixosTests
}:
let
self = stdenv.mkDerivation rec {
stdenv.mkDerivation (finalAttrs: {
pname = "mysql";
version = "8.0.34";
src = fetchurl {
url = "https://dev.mysql.com/get/Downloads/MySQL-${self.mysqlVersion}/${pname}-${version}.tar.gz";
url = "https://dev.mysql.com/get/Downloads/MySQL-${lib.versions.majorMinor finalAttrs.version}/mysql-${finalAttrs.version}.tar.gz";
hash = "sha256-5l0Do8QmGLX7+ZBCrtMyCUAumyeqYsfIdD/9R4jY2x0=";
};
@ -63,10 +62,10 @@ self = stdenv.mkDerivation rec {
'';
passthru = {
client = self;
connector-c = self;
server = self;
mysqlVersion = "8.0";
client = finalAttrs.finalPackage;
connector-c = finalAttrs.finalPackage;
server = finalAttrs.finalPackage;
mysqlVersion = lib.versions.majorMinor finalAttrs.version;
tests = nixosTests.mysql.mysql80;
};
@ -77,4 +76,4 @@ self = stdenv.mkDerivation rec {
maintainers = with maintainers; [ orivej ];
platforms = platforms.unix;
};
}; in self
})