Merge pull request #80610 from xavierzwirtz/azuredatastudio

azuredatastudio: init at 1.17.1
This commit is contained in:
Timo Kaufmann 2020-05-25 14:15:31 +00:00 committed by GitHub
commit 9da092d147
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 117 additions and 0 deletions

View File

@ -0,0 +1,115 @@
{ stdenv
, lib
, fetchurl
, makeWrapper
, libuuid
, libunwind
, icu
, openssl
, zlib
, curl
, at-spi2-core
, at-spi2-atk
, gnutar
, atomEnv
, kerberos
}:
# from justinwoo/azuredatastudio-nix
# https://github.com/justinwoo/azuredatastudio-nix/blob/537c48aa3981cd1a82d5d6e508ab7e7393b3d7c8/default.nix
stdenv.mkDerivation rec {
pname = "azuredatastudio";
version = "1.17.1";
src = fetchurl {
url = "https://azuredatastudiobuilds.blob.core.windows.net/releases/${version}/azuredatastudio-linux-${version}.tar.gz";
sha256 = "0px9n9vyjvyddca4x7d0zindd0dim7350vkjg5dd0506fm8dc38k";
};
nativeBuildInputs = [
makeWrapper
];
buildInputs = [
libuuid
at-spi2-core
at-spi2-atk
];
phases = "unpackPhase fixupPhase";
# change this to azuredatastudio-insiders for insiders releases
edition = "azuredatastudio";
targetPath = "$out/${edition}";
unpackPhase = ''
mkdir -p ${targetPath}
${gnutar}/bin/tar xf $src --strip 1 -C ${targetPath}
'';
sqltoolsserviceRpath = stdenv.lib.makeLibraryPath [
stdenv.cc.cc
libunwind
libuuid
icu
openssl
zlib
curl
];
# this will most likely need to be updated when azuredatastudio's version changes
sqltoolsservicePath = "${targetPath}/resources/app/extensions/mssql/sqltoolsservice/Linux/2.0.0-release.56";
rpath = stdenv.lib.concatStringsSep ":" [
atomEnv.libPath
(
stdenv.lib.makeLibraryPath [
libuuid
at-spi2-core
at-spi2-atk
stdenv.cc.cc.lib
kerberos
]
)
targetPath
sqltoolsserviceRpath
];
fixupPhase = ''
fix_sqltoolsservice()
{
mv ${sqltoolsservicePath}/$1 ${sqltoolsservicePath}/$1_old
patchelf \
--set-interpreter "${stdenv.cc.bintools.dynamicLinker}" \
${sqltoolsservicePath}/$1_old
makeWrapper \
${sqltoolsservicePath}/$1_old \
${sqltoolsservicePath}/$1 \
--set LD_LIBRARY_PATH ${sqltoolsserviceRpath}
}
fix_sqltoolsservice MicrosoftSqlToolsServiceLayer
fix_sqltoolsservice MicrosoftSqlToolsCredentials
fix_sqltoolsservice SqlToolsResourceProviderService
patchelf \
--set-interpreter "${stdenv.cc.bintools.dynamicLinker}" \
${targetPath}/${edition}
mkdir -p $out/bin
makeWrapper \
${targetPath}/bin/${edition} \
$out/bin/azuredatastudio \
--set LD_LIBRARY_PATH ${rpath}
'';
meta = {
maintainers = with stdenv.lib.maintainers; [ xavierzwirtz ];
description = "A data management tool that enables working with SQL Server, Azure SQL DB and SQL DW";
homepage = "https://docs.microsoft.com/en-us/sql/azure-data-studio/download-azure-data-studio";
license = lib.licenses.unfreeRedistributable;
};
}

View File

@ -16004,6 +16004,8 @@ in
mssql_jdbc = callPackage ../servers/sql/mssql/jdbc { }; mssql_jdbc = callPackage ../servers/sql/mssql/jdbc { };
azuredatastudio = callPackage ../applications/misc/azuredatastudio { };
miniflux = callPackage ../servers/miniflux { }; miniflux = callPackage ../servers/miniflux { };
nagios = callPackage ../servers/monitoring/nagios { }; nagios = callPackage ../servers/monitoring/nagios { };