From d7ac88762db111a7962c4e14b5f4e37ab85ccac7 Mon Sep 17 00:00:00 2001 From: Alejandro Soto Date: Sun, 24 Aug 2025 18:55:06 -0600 Subject: tree-wide: reformat using alejandra after enabling trivionomicon --- pkgs/mssql-tools.nix | 67 +++++++++++++++++++++++++++------------------------- 1 file changed, 35 insertions(+), 32 deletions(-) (limited to 'pkgs/mssql-tools.nix') diff --git a/pkgs/mssql-tools.nix b/pkgs/mssql-tools.nix index 9213c16..ecf2b37 100644 --- a/pkgs/mssql-tools.nix +++ b/pkgs/mssql-tools.nix @@ -1,52 +1,55 @@ # Basado en derivación para skypeforlinux en nixpkgs # Ver environment.unixODBCDrivers - -{ lib, stdenv, fetchurl, dpkg, glibc, unixODBC }: -let +{ + lib, + stdenv, + fetchurl, + dpkg, + glibc, + unixODBC, +}: let version = "17.9.1.1-1"; ubuntuRelease = "21.10"; in -stdenv.mkDerivation { - pname = "mssql-tools"; - inherit version; + stdenv.mkDerivation { + pname = "mssql-tools"; + inherit version; - system = "x86_64-linux"; + system = "x86_64-linux"; - src = - if stdenv.hostPlatform.system == "x86_64-linux" then - fetchurl + src = + if stdenv.hostPlatform.system == "x86_64-linux" + then + fetchurl { url = "https://packages.microsoft.com/ubuntu/${ubuntuRelease}/prod/pool/main/m/mssql-tools/mssql-tools_${version}_amd64.deb"; sha256 = "0ya9643assr80yh6g0nd3i6iw819frhbb1m421khwplk9iq793kk"; } - else - throw "mssql-tools is not supported on ${stdenv.hostPlatform.system}"; + else throw "mssql-tools is not supported on ${stdenv.hostPlatform.system}"; - buildInputs = [ dpkg ]; - dontUnpack = true; - outputs = [ "out" "doc" ]; + buildInputs = [dpkg]; + dontUnpack = true; + outputs = ["out" "doc"]; - installPhase = '' - mkdir -p $out - dpkg -x $src $out - mv $out/opt/mssql-tools/{bin,share} $out - mv $out/usr/share/doc/mssql-tools $doc - rm -r $out/opt $out/usr - ''; + installPhase = '' + mkdir -p $out + dpkg -x $src $out + mv $out/opt/mssql-tools/{bin,share} $out + mv $out/usr/share/doc/mssql-tools $doc + rm -r $out/opt $out/usr + ''; - postFixup = - let - rpath = lib.makeLibraryPath [ glibc stdenv.cc.cc unixODBC ]; - in - '' + postFixup = let + rpath = lib.makeLibraryPath [glibc stdenv.cc.cc unixODBC]; + in '' for file in $(find $out/bin -type f); do patchelf --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" "$file" patchelf --set-rpath ${rpath} $file done ''; - meta = with lib; { - license = licenses.unfree; - platforms = [ "x86_64-linux" ]; - }; -} + meta = with lib; { + license = licenses.unfree; + platforms = ["x86_64-linux"]; + }; + } -- cgit v1.2.3