nix-bundle
nix-bundle copied to clipboard
Bundle non-nixpkgs attributes
How hard would it be to specify what nix file to use and which attribute to package outside nixpkgs?
cc @matthewbauer
I haven't experimented too much with this but I think it's possible right now if a little bit hacky. Because it treats 'target' as an expression you can just pass in a Nix import like this:
nix-bundle '(import ./file.nix).attr'
See here for how it works:
https://github.com/matthewbauer/nix-bundle/blob/master/nix-bundle.sh#L45
{ pkgs, daedalus, nix-bundle }:
let
bundle = import "${nix-bundle}/share/nix-bundle" { nixpkgs = pkgs; };
foo = bundle.nix-bootstrap {
target = "${daedalus}";
run = "/bin/daedalus";
};
in foo
this is how i had solved it