mirror of
https://github.com/NixOS/bundlers.git
synced 2024-09-11 07:05:23 +03:00
Fix default bundler not working with nix 2.8
This allows nix 2.8 and up to use the default bundler. I don't actually know what the pre Nix2.6 bundler API was, I simply tested this by trying bundle hello with the command nix bundle nixpkgs#hello --bundler .# while having nixpkgs#nixVersions.nix_2_{5,6,7,8} in path. This seems to work with the listed nix versions, but there might be some other cases where it doesn't. I'm not knowledgeable enough to test.
This commit is contained in:
parent
e3f787e5d1
commit
e858819e6e
16
flake.nix
16
flake.nix
@ -27,16 +27,12 @@
|
||||
else (parseDrvName (unsafeDiscardStringContext p.name)).name
|
||||
}";
|
||||
in {
|
||||
|
||||
# Backwards compatibility helper for pre Nix2.6 bundler API
|
||||
defaultBundler = {__functor = s: {...}@arg:
|
||||
(if arg?program && arg?system then
|
||||
nix-bundle.bundlers.nix-bundle arg
|
||||
else with builtins; listToAttrs (map (system: {
|
||||
name = system;
|
||||
value = drv: self.bundlers.${system}.toArx drv;
|
||||
}) supportedSystems));
|
||||
};
|
||||
defaultBundler = builtins.listToAttrs (map (system: {
|
||||
name = system;
|
||||
value = drv: self.bundlers.${system}.toArx drv;
|
||||
}) supportedSystems)
|
||||
# Backwards compatibility helper for pre Nix2.6 bundler API
|
||||
// {__functor = s: nix-bundle.bundlers.nix-bundle;};
|
||||
|
||||
bundlers = let n =
|
||||
(forAllSystems (system: {
|
||||
|
Loading…
Reference in New Issue
Block a user