forked from tadeokondrak/wineusbdm
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathflake.nix
79 lines (70 loc) · 2 KB
/
flake.nix
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
{
description = "wineusbdm";
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-24.05";
nixpkgs-unstable.url = "github:nixos/nixpkgs/nixpkgs-unstable";
usbdm-flake = {
url = "github:ryand56/usbdm-nix";
inputs.nixpkgs.follows = "nixpkgs";
};
};
outputs =
{
self,
nixpkgs,
nixpkgs-unstable,
usbdm-flake,
}:
let
systems = [
"x86_64-linux"
"i686-linux"
];
overlay = final: prev: {
haskellPackages = prev.haskell.packages.ghc924Binary.override (old: {
overrides = final.lib.composeExtensions (old.overrides or (_: _: { })) (
hself: hsuper: {
unordered-containers = hself.callHackage "unordered-containers" "0.2.19.1" { };
}
);
});
wineusbdm = final.pkgsi686Linux.callPackage ./default.nix {
usbdm = usbdm-flake.packages.i686-linux.usbdm;
};
};
forAllSystems = f: nixpkgs.lib.genAttrs systems (system: f system);
forAllSystemsUnstable = f: nixpkgs-unstable.lib.genAttrs systems (system: f system);
nixpkgsFor = forAllSystems (
system:
import nixpkgs {
inherit system;
overlays = [ self.overlay ];
config.allowUnfree = true;
}
);
nixpkgsForUnstable = forAllSystemsUnstable (
system:
import nixpkgs-unstable {
inherit system;
overlays = [ self.overlay ];
config.allowUnfree = true;
}
);
in
{
inherit overlay;
defaultPackage = forAllSystems (system: nixpkgsFor.${system}.wineusbdm);
formatter = forAllSystemsUnstable (system: nixpkgsForUnstable.${system}.nixfmt-rfc-style);
packages = forAllSystems (system: {
inherit (nixpkgsFor.${system}) wineusbdm;
});
nixosModules =
let
default = import ./nixos-module.nix self;
in
{
inherit default;
wineusbdm = default;
};
};
}