Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)

Merge pull request #224859 from Yarny0/tsm-client

tsm-client: use `libxcrypt-legacy`, drop `openssl_1_1`, use `concatLines` in module

authored by ajs124 and committed by GitHub f7245e9e 412a5ee6

+13 -15
+3 -3
nixos/modules/programs/tsm-client.nix
··· 6 6 inherit (lib.attrsets) attrNames filterAttrs hasAttr mapAttrs mapAttrsToList optionalAttrs; 7 7 inherit (lib.modules) mkDefault mkIf; 8 8 inherit (lib.options) literalExpression mkEnableOption mkOption; 9 - inherit (lib.strings) concatStringsSep optionalString toLower; 9 + inherit (lib.strings) concatLines optionalString toLower; 10 10 inherit (lib.types) addCheck attrsOf lines nonEmptyStr nullOr package path port str strMatching submodule; 11 11 12 12 # Checks if given list of strings contains unique ··· 164 164 mkLine = k: v: k + optionalString (v!="") " ${v}"; 165 165 lines = mapAttrsToList mkLine attrset; 166 166 in 167 - concatStringsSep "\n" lines; 167 + concatLines lines; 168 168 config.stanza = '' 169 169 server ${config.name} 170 170 ${config.text} ··· 263 263 264 264 ${optionalString (cfg.defaultServername!=null) "defaultserver ${cfg.defaultServername}"} 265 265 266 - ${concatStringsSep "\n" (mapAttrsToList (k: v: v.stanza) cfg.servers)} 266 + ${concatLines (mapAttrsToList (k: v: v.stanza) cfg.servers)} 267 267 ''; 268 268 269 269 in
+8 -5
pkgs/tools/backup/tsm-client/default.nix
··· 5 5 , fetchurl 6 6 , autoPatchelfHook 7 7 , rpmextract 8 - , libxcrypt 9 - , openssl 8 + , libxcrypt-legacy 10 9 , zlib 11 10 , lvm2 # LVM image backup and restore functions (optional) 12 11 , acl # EXT2/EXT3/XFS ACL support (optional) ··· 117 116 rpmextract 118 117 ]; 119 118 buildInputs = [ 120 - libxcrypt 121 - openssl 119 + libxcrypt-legacy 122 120 stdenv.cc.cc 123 121 zlib 124 122 ]; ··· 146 144 runHook postInstall 147 145 ''; 148 146 149 - # Fix relative symlinks after `/usr` was moved up one level 147 + # fix relative symlinks after `/usr` was moved up one level, 148 + # fix absolute symlinks pointing to `/opt` 150 149 preFixup = '' 151 150 for link in $out/lib{,64}/* $out/bin/* 152 151 do ··· 157 156 exit 1 158 157 fi 159 158 ln --symbolic --force --no-target-directory "$out/$(cut -b 7- <<< "$target")" "$link" 159 + done 160 + for link in $(find $out -type l -lname '/opt/*') 161 + do 162 + ln --symbolic --force --no-target-directory "$out$(readlink "$link")" "$link" 160 163 done 161 164 ''; 162 165 };
+2 -7
pkgs/top-level/all-packages.nix
··· 7044 7044 7045 7045 timeline = callPackage ../applications/office/timeline { }; 7046 7046 7047 - tsm-client = callPackage ../tools/backup/tsm-client { 7048 - openssl = openssl_1_1; 7049 - }; 7050 - tsm-client-withGui = callPackage ../tools/backup/tsm-client { 7051 - openssl = openssl_1_1; 7052 - enableGui = true; 7053 - }; 7047 + tsm-client = callPackage ../tools/backup/tsm-client { }; 7048 + tsm-client-withGui = callPackage ../tools/backup/tsm-client { enableGui = true; }; 7054 7049 7055 7050 tracker = callPackage ../development/libraries/tracker { }; 7056 7051