Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bundle distributable shells #9

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 12 additions & 1 deletion flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
bundlers = let n =
(forAllSystems (system: {
# Backwards compatibility helper for pre Nix2.6 bundler API
toArx = drv: (nix-bundle.bundlers.nix-bundle ({
toArx = drv: (nix-bundle.bundlers.nix-bundle ({
program = if drv?program then drv.program else (program drv);
inherit system;
})) // (if drv?program then {} else {name=
Expand All @@ -54,6 +54,17 @@
contents = [ drv ];
});

toShell = drv:
let
shelldrv = with nixpkgs.legacyPackages.${system}; writeShellApplication {
name = drv.name + "-shell";
runtimeInputs = drv.buildInputs ++ drv.propagatedBuildInput ++ [ coreutils bash.out ];
text = "bash";
};
in self.bundlers.${system}.toArx shelldrv;



toBuildDerivation = drv:
(import ./report/default.nix {
inherit drv;
Expand Down