mirror of
https://github.com/hasura/graphql-engine.git
synced 2024-11-04 14:41:41 +03:00
Upgrade nixpkgs.
There are two major changes: 1. [`msodbcsql18` is now in nixpkgs.](https://github.com/NixOS/nixpkgs/pull/197607) 2. [The Cabal patch for cycles on aarch64+darwin is now in nixpkgs.](https://github.com/NixOS/nixpkgs/pull/247723) PR-URL: https://github.com/hasura/graphql-engine-mono/pull/10355 GitOrigin-RevId: a6ff3cd69eb51d0fa98577038658785db0e84672
This commit is contained in:
parent
da8a98472f
commit
156d71423f
12
flake.lock
12
flake.lock
@ -5,11 +5,11 @@
|
||||
"systems": "systems"
|
||||
},
|
||||
"locked": {
|
||||
"lastModified": 1689068808,
|
||||
"narHash": "sha256-6ixXo3wt24N/melDWjq70UuHQLxGV8jZvooRanIHXw0=",
|
||||
"lastModified": 1694529238,
|
||||
"narHash": "sha256-zsNZZGTGnMOf9YpHKJqMSsa0dXbfmxeoJ7xHlrt+xmY=",
|
||||
"owner": "numtide",
|
||||
"repo": "flake-utils",
|
||||
"rev": "919d646de7be200f3bf08cb76ae1f09402b6f9b4",
|
||||
"rev": "ff7b65b44d01cf9ba6a71320833626af21126384",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
@ -20,11 +20,11 @@
|
||||
},
|
||||
"nixpkgs": {
|
||||
"locked": {
|
||||
"lastModified": 1691076334,
|
||||
"narHash": "sha256-c431cY0bDr6IosR6dtrVeZ4mblF/NpqQybjBMDsngn8=",
|
||||
"lastModified": 1696330627,
|
||||
"narHash": "sha256-o0WGId7Vuhl+5KeNgh343Orex0YUMVCopf1LWr+kI/k=",
|
||||
"owner": "NixOS",
|
||||
"repo": "nixpkgs",
|
||||
"rev": "626827822f4a370e0f30b496037c7a95950f1ddf",
|
||||
"rev": "7b6b919f3a707c566b8592106bb7ce070721b137",
|
||||
"type": "github"
|
||||
},
|
||||
"original": {
|
||||
|
@ -1,56 +0,0 @@
|
||||
# Copied from nixpkgs/pkgs/development/libraries/unixODBCDrivers/default.nix and modified heavily.
|
||||
{ fetchurl, stdenv, lib, libiconv, unixODBC, fixDarwinDylibNames }:
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "msodbcsql${versionMajor}";
|
||||
version = "${versionMajor}.${versionMinor}.${versionAdditional}";
|
||||
|
||||
versionMajor = "18";
|
||||
versionMinor = "2";
|
||||
versionAdditional = "1.1";
|
||||
|
||||
src =
|
||||
if stdenv.targetPlatform.isAarch64
|
||||
then
|
||||
fetchurl
|
||||
{
|
||||
url = "https://download.microsoft.com/download/0/9/7/0976a30f-1710-4754-9445-bead058dd0c8/${pname}-${version}-arm64.tar.gz";
|
||||
sha256 = "0q892l90vj6dvk20dvl84a84b28sh2l4a1kyrnxg4lxj5qm3kjbd";
|
||||
}
|
||||
else
|
||||
fetchurl
|
||||
{
|
||||
url = "https://download.microsoft.com/download/0/9/7/0976a30f-1710-4754-9445-bead058dd0c8/${pname}-${version}-amd64.tar.gz";
|
||||
sha256 = "07s2rbkf1n2b0wkzqbx657k0n2y9xl9k5fahr0vwb45xhz2i5ibs";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [
|
||||
# Fix up the names encoded into the dylib, and make them absolute.
|
||||
fixDarwinDylibNames
|
||||
];
|
||||
|
||||
installPhase = ''
|
||||
mkdir -p $out
|
||||
tar xf $src --strip-components=1 -C $out
|
||||
'';
|
||||
|
||||
# Replace the hard-coded paths in the dylib with nixpkgs equivalents.
|
||||
fixupPhase = ''
|
||||
${stdenv.cc.bintools.targetPrefix}install_name_tool \
|
||||
-change /usr/lib/libiconv.2.dylib ${libiconv}/lib/libiconv.2.dylib \
|
||||
-change /opt/homebrew/lib/libodbcinst.2.dylib ${unixODBC}/lib/libodbcinst.2.dylib \
|
||||
$out/lib/libmsodbcsql.${versionMajor}.dylib
|
||||
'';
|
||||
|
||||
passthru = {
|
||||
fancyName = "ODBC Driver ${versionMajor} for SQL Server";
|
||||
driver = "lib/libmsodbcsql.${versionMajor}.dylib";
|
||||
};
|
||||
|
||||
meta = with lib; {
|
||||
description = "ODBC Driver ${versionMajor} for SQL Server";
|
||||
homepage = "https://docs.microsoft.com/en-us/sql/connect/odbc/linux-mac/installing-the-microsoft-odbc-driver-for-sql-server?view=sql-server-2017";
|
||||
sourceProvenance = with sourceTypes; [ binaryNativeCode ];
|
||||
platforms = platforms.darwin;
|
||||
license = licenses.unfree;
|
||||
};
|
||||
}
|
@ -1,54 +0,0 @@
|
||||
# Copied from nixpkgs/pkgs/development/libraries/unixODBCDrivers/default.nix and modified.
|
||||
{ fetchurl, stdenv, unixODBC, dpkg, lib, openssl, libkrb5, libuuid, patchelf }:
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "msodbcsql${versionMajor}";
|
||||
version = "${versionMajor}.${versionMinor}.${versionAdditional}-1";
|
||||
|
||||
versionMajor = "18";
|
||||
versionMinor = "2";
|
||||
versionAdditional = "1.1";
|
||||
|
||||
src =
|
||||
if stdenv.targetPlatform.isAarch64
|
||||
then
|
||||
fetchurl
|
||||
{
|
||||
url = "https://packages.microsoft.com/debian/11/prod/pool/main/m/${pname}/${pname}_${version}_arm64.deb";
|
||||
sha256 = "0j8zn0s7289nkygqvyl1jmgpbgax64q6x9646xbhfg0j14pjf737";
|
||||
}
|
||||
else
|
||||
fetchurl
|
||||
{
|
||||
url = "https://packages.microsoft.com/debian/11/prod/pool/main/m/${pname}/${pname}_${version}_amd64.deb";
|
||||
sha256 = "0rl2v1cfj2spykhb7nwq0hqxl8izlbzcrx8z4r0xrb12ajb1lz31";
|
||||
};
|
||||
|
||||
nativeBuildInputs = [ dpkg patchelf ];
|
||||
|
||||
unpackPhase = "dpkg -x $src ./";
|
||||
buildPhase = "";
|
||||
|
||||
installPhase = ''
|
||||
mkdir -p $out
|
||||
mkdir -p $out/lib
|
||||
cp -r opt/microsoft/msodbcsql${versionMajor}/lib64 opt/microsoft/msodbcsql${versionMajor}/share $out/
|
||||
'';
|
||||
|
||||
postFixup = ''
|
||||
patchelf --set-rpath ${lib.makeLibraryPath [ unixODBC openssl libkrb5 libuuid stdenv.cc.cc ]} \
|
||||
$out/lib/libmsodbcsql-${versionMajor}.${versionMinor}.so.${versionAdditional}
|
||||
'';
|
||||
|
||||
passthru = {
|
||||
fancyName = "ODBC Driver ${versionMajor} for SQL Server";
|
||||
driver = "lib/libmsodbcsql-${versionMajor}.${versionMinor}.so.${versionAdditional}";
|
||||
};
|
||||
|
||||
meta = with lib; {
|
||||
description = "ODBC Driver ${versionMajor} for SQL Server";
|
||||
homepage = "https://docs.microsoft.com/en-us/sql/connect/odbc/linux-mac/installing-the-microsoft-odbc-driver-for-sql-server?view=sql-server-2017";
|
||||
sourceProvenance = with sourceTypes; [ binaryNativeCode ];
|
||||
platforms = platforms.linux;
|
||||
license = licenses.unfree;
|
||||
};
|
||||
}
|
@ -6,13 +6,12 @@ import nixpkgs {
|
||||
config = {
|
||||
allowUnfree = true;
|
||||
permittedInsecurePackages = [
|
||||
"nodejs-16.20.1" # until we upgrade our node.js version in .nvmrc
|
||||
"nodejs-16.20.2" # until we upgrade our node.js version in .nvmrc
|
||||
];
|
||||
};
|
||||
overlays = [
|
||||
(import ./overlays/ghc.nix { inherit nixpkgs; })
|
||||
(import ./overlays/ormolu.nix)
|
||||
(import ./overlays/msodbcsql18.nix)
|
||||
(import ./overlays/graphql-parser.nix)
|
||||
(import ./overlays/resource-pool.nix)
|
||||
(import ./overlays/dc-api.nix)
|
||||
|
@ -14,11 +14,6 @@ let
|
||||
# Without this, we get the following error on macOS:
|
||||
# ghc: loadArchive: Neither an archive, nor a fat archive: `/path/to/clang++'
|
||||
./ghc-9.4-macOS-loadArchive-fix.patch
|
||||
# On macOS + aarch64, there's an issue where the `bin` output depends on
|
||||
# the `out` output, and vice versa. This patch fixes the problem.
|
||||
# For some reason we don't apply it for GHC 9.4 in nixpkgs, even though
|
||||
# it's needed.
|
||||
"${nixpkgs}/pkgs/development/compilers/ghc/Cabal-3.6-paths-fix-cycle-aarch64-darwin.patch"
|
||||
] else [ ];
|
||||
in
|
||||
{
|
||||
|
@ -1,8 +0,0 @@
|
||||
self: super: {
|
||||
unixODBCDrivers = super.unixODBCDrivers // {
|
||||
msodbcsql18 =
|
||||
if super.stdenv.targetPlatform.isDarwin
|
||||
then super.callPackage ../msodbcsql18-darwin.nix { }
|
||||
else super.callPackage ../msodbcsql18-linux.nix { };
|
||||
};
|
||||
}
|
Loading…
Reference in New Issue
Block a user