-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathflake.nix
More file actions
57 lines (52 loc) · 1.37 KB
/
flake.nix
File metadata and controls
57 lines (52 loc) · 1.37 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
{
description = "A multi-purpose Discord bot made using Discord.Net.";
inputs = {
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
# imports nixpkgs which is bad for performance
# uses lib, fetchurl, dotnetCorePackages, zip
nuget-packageslock2nix = {
url = "github:mdarocha/nuget-packageslock2nix/main";
inputs.nixpkgs.follows = "nixpkgs";
};
};
outputs =
inputs:
with inputs;
let
supportedSystems = [
"x86_64-linux"
"aarch64-linux"
];
withPkgs =
f:
nixpkgs.lib.genAttrs supportedSystems (
system:
f (
import nixpkgs {
inherit system;
overlays = [ self.outputs.overlays.default ];
}
)
);
in
{
nixosModules.default = import ./nix/module.nix self.outputs.overlays.default;
overlays.default = final: prev: {
moe-dotnet = prev.callPackage ./nix/package.nix {
inherit nuget-packageslock2nix;
version = builtins.substring 0 8 self.lastModifiedDate or "dirty";
};
};
packages = withPkgs (pkgs: {
default = pkgs.moe-dotnet;
});
devShells = withPkgs (pkgs: {
default = pkgs.mkShell {
packages = with pkgs; [
dotnet-sdk_10
omnisharp-roslyn
];
};
});
};
}