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