nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix
at devShellTools-shell 33 lines 1.1 kB view raw
1lib: prev: 2 3let 4 # Removing recurseForDerivation prevents derivations of aliased attribute 5 # set to appear while listing all the packages available. 6 removeRecurseForDerivations = 7 alias: 8 if alias.recurseForDerivations or false then 9 lib.removeAttrs alias [ "recurseForDerivations" ] 10 else 11 alias; 12 13 # Disabling distribution prevents top-level aliases for non-recursed package 14 # sets from building on Hydra. 15 removeDistribute = alias: if lib.isDerivation alias then lib.dontDistribute alias else alias; 16 17 # Make sure that we are not shadowing something from 18 # writers. 19 checkInPkgs = 20 n: alias: if builtins.hasAttr n prev then throw "Alias ${n} is still in writers" else alias; 21 22 mapAliases = 23 aliases: 24 lib.mapAttrs ( 25 n: alias: removeDistribute (removeRecurseForDerivations (checkInPkgs n alias)) 26 ) aliases; 27 28in 29mapAliases ({ 30 # Cleanup before 22.05, Added 2021-12-11 31 writePython2 = "Python 2 is EOL and the use of writers.writePython2 is deprecated."; 32 writePython2Bin = "Python 2 is EOL and the use of writers.writePython2Bin is deprecated."; 33})