Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
at devShellTools-shell 64 lines 1.2 kB view raw
1{ 2 lib, 3 wrapGAppsHook3, 4 glib, 5 stdenv, 6 xorg, 7 wingpanel, 8 wingpanelIndicators, 9 switchboard-with-plugs, 10 indicators ? null, 11 # Only useful to disable for development testing. 12 useDefaultIndicators ? true, 13}: 14 15let 16 selectedIndicators = 17 if indicators == null then 18 wingpanelIndicators 19 else 20 indicators ++ (lib.optionals useDefaultIndicators wingpanelIndicators); 21in 22stdenv.mkDerivation { 23 pname = "${wingpanel.pname}-with-indicators"; 24 inherit (wingpanel) version; 25 26 src = null; 27 28 paths = [ 29 wingpanel 30 ] 31 ++ selectedIndicators; 32 33 passAsFile = [ "paths" ]; 34 35 nativeBuildInputs = [ 36 glib 37 wrapGAppsHook3 38 ]; 39 40 buildInputs = lib.forEach selectedIndicators (x: x.buildInputs) ++ selectedIndicators; 41 42 dontUnpack = true; 43 dontConfigure = true; 44 dontBuild = true; 45 46 preferLocalBuild = true; 47 allowSubstitutes = false; 48 49 installPhase = '' 50 mkdir -p $out 51 for i in $(cat $pathsPath); do 52 ${xorg.lndir}/bin/lndir -silent $i $out 53 done 54 ''; 55 56 preFixup = '' 57 gappsWrapperArgs+=( 58 --set WINGPANEL_INDICATORS_PATH "$out/lib/wingpanel" 59 --set SWITCHBOARD_PLUGS_PATH "${switchboard-with-plugs}/lib/switchboard-3" 60 ) 61 ''; 62 63 inherit (wingpanel) meta; 64}