forked from tadeokondrak/wineusbdm
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathflake.nix
More file actions
70 lines (61 loc) · 1.64 KB
/
flake.nix
File metadata and controls
70 lines (61 loc) · 1.64 KB
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
{
description = "wineusbdm";
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable";
usbdm-flake = {
url = "github:ryand56/usbdm-nix";
inputs.nixpkgs.follows = "nixpkgs";
};
};
outputs =
{
self,
nixpkgs,
usbdm-flake,
}:
let
systems = [
"x86_64-linux"
"i686-linux"
];
overlay = final: prev: {
wineusbdm = final.pkgsi686Linux.callPackage ./default.nix {
usbdm = usbdm-flake.packages.i686-linux.usbdm;
};
spidermonkey_140 =
if final.stdenv.hostPlatform.system == "i686-linux" then
prev.spidermonkey_140.overrideAttrs (oa: {
env.NIX_CFLAGS_COMPILE = "-Wno-error=format -Wno-error=format-security";
})
else prev.spidermonkey_140;
};
forAllSystems = f: nixpkgs.lib.genAttrs systems (system: f system);
nixpkgsFor = forAllSystems (
system:
import nixpkgs {
inherit system;
overlays = [ self.overlay ];
config.allowUnfree = true;
}
);
in
{
inherit overlay;
defaultPackage = forAllSystems (system: nixpkgsFor.${system}.wineusbdm);
formatter = forAllSystems (system: nixpkgsFor.${system}.nixfmt-rfc-style);
packages = forAllSystems (system: {
inherit (nixpkgsFor.${system}) wineusbdm;
});
checks.i686-linux = {
inherit (nixpkgsFor.i686-linux) wineusbdm;
};
nixosModules =
let
default = import ./nixos-module.nix self;
in
{
inherit default;
wineusbdm = default;
};
};
}