Skip to content

Commit 2c82d98

Browse files
committed
feat(bundlers)!: Export deb, rpm and AppImage bundlers
- All logic is contained in a new `./bundlers/default.nix` module - Add a `bundlers` `perSystem` output - Export `deb` and `rpm` bundlers from our fork of `juliosueiras-nix/nix-utils` (used by `NixOS/bundlers`, which we originally used) - Export the `AppImage` bundler from `ralismark/nix-appimage`
1 parent 6b5a645 commit 2c82d98

File tree

3 files changed

+56
-61
lines changed

3 files changed

+56
-61
lines changed

bundlers/default.nix

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
{
2+
lib,
3+
flake-parts-lib,
4+
inputs,
5+
...
6+
}:
7+
{
8+
imports = [
9+
(flake-parts-lib.mkTransposedPerSystemModule {
10+
name = "bundlers";
11+
option = lib.mkOption {
12+
type = lib.types.lazyAttrsOf (lib.types.functionTo lib.types.package);
13+
default = { };
14+
};
15+
file = ./flake.nix;
16+
})
17+
];
18+
19+
perSystem =
20+
{
21+
pkgs,
22+
inputs',
23+
config,
24+
...
25+
}:
26+
{
27+
bundlers = {
28+
inherit (inputs'.nix-bundlers.bundlers)
29+
toDeb
30+
toRpm
31+
;
32+
toAppimage = inputs'.nix-appimage.bundlers.default;
33+
};
34+
};
35+
}

flake.lock

Lines changed: 16 additions & 56 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

flake.nix

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -230,12 +230,11 @@
230230
};
231231

232232
nix-bundlers = {
233-
url = "github:NixOS/bundlers";
233+
url = "github:juliosueiras-nix/nix-utils";
234234
inputs.nixpkgs.follows = "nixpkgs";
235-
# TODO: re-add when CI's `nix` starts supporting transitive overrides
236-
# inputs.nix-utils.inputs.nixpkgs.follows = "nixpkgs";
237-
# inputs.nix-utils.inputs.flake-utils.follows = "flake-utils";
238-
# inputs.nix-bundle.inputs.utils.follows = "flake-utils";
235+
inputs.systems.follows = "systems";
236+
inputs.flake-parts.follows = "flake-parts";
237+
inputs.flake-utils.follows = "flake-utils";
239238
};
240239

241240
nix-appimage = {
@@ -263,6 +262,7 @@
263262
./modules
264263
./packages
265264
./shells
265+
./bundlers
266266
];
267267
systems = [
268268
"x86_64-linux"

0 commit comments

Comments
 (0)