package.nix: migrate devShells

Change-Id: If2e1e8bb1abaf96f230117e0521c48c332db7b10
This commit is contained in:
Qyriad 2024-03-09 00:44:49 -07:00
parent b1faeae4c2
commit 9c374b7ac4

View file

@ -553,36 +553,26 @@
devShells = let devShells = let
makeShell = pkgs: stdenv: makeShell = pkgs: stdenv:
let let
canRunInstalled = stdenv.buildPlatform.canExecute stdenv.hostPlatform; nix = pkgs.callPackage ./package.nix {
inherit stdenv versionSuffix fileset;
boehmgc = pkgs.boehmgc-nix;
busybox-sandbox-shell = pkgs.busybox-sandbox-shell or pkgs.default-busybox-sandbox;
};
in in
with commonDeps { inherit pkgs; }; nix.overrideAttrs (prev: {
stdenv.mkDerivation { nativeBuildInputs = prev.nativeBuildInputs
name = "nix";
outputs = [ "out" "dev" "doc" ];
nativeBuildInputs = nativeBuildDeps
++ lib.optional (stdenv.cc.isClang && !stdenv.buildPlatform.isDarwin) pkgs.buildPackages.bear ++ lib.optional (stdenv.cc.isClang && !stdenv.buildPlatform.isDarwin) pkgs.buildPackages.bear
++ lib.optional ++ lib.optional
(stdenv.cc.isClang && stdenv.hostPlatform == stdenv.buildPlatform) (stdenv.cc.isClang && stdenv.hostPlatform == stdenv.buildPlatform)
pkgs.buildPackages.clang-tools pkgs.buildPackages.clang-tools;
# We want changelog-d in the shell even if the current build doesn't need it src = null;
++ lib.optional (officialRelease || ! buildUnreleasedNotes) changelog-d
;
buildInputs = buildDeps ++ propagatedDeps
++ awsDeps ++ checkDeps ++ internalApiDocsDeps;
configureFlags = configureFlags
++ testConfigureFlags ++ internalApiDocsConfigureFlags
++ lib.optional (!canRunInstalled) "--disable-doc-gen";
enableParallelBuilding = true;
doInstallCheck = false;
doCheck = false;
installFlags = "sysconfdir=$(out)/etc"; installFlags = "sysconfdir=$(out)/etc";
strictDeps = false;
shellHook = shellHook = ''
''
PATH=$prefix/bin:$PATH PATH=$prefix/bin:$PATH
unset PYTHONPATH unset PYTHONPATH
export MANPATH=$out/share/man:$MANPATH export MANPATH=$out/share/man:$MANPATH
@ -590,7 +580,7 @@
# Make bash completion work. # Make bash completion work.
XDG_DATA_DIRS+=:$out/share XDG_DATA_DIRS+=:$out/share
''; '';
}; });
in in
forAllSystems (system: forAllSystems (system:
let let