flake-template-hell/templates/dotnet/flake.nix

43 lines
940 B
Nix
Raw Normal View History

2024-12-04 16:58:17 +00:00
{
inputs = {
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
flake-parts.url = "github:hercules-ci/flake-parts";
};
outputs = inputs @ {
self,
nixpkgs,
...
}:
inputs.flake-parts.lib.mkFlake {inherit inputs;} {
systems = ["x86_64-linux"];
flake.overlays.default = final: prev: {
dotnet-application = final.callPackage ./nix/derivation.nix {};
};
perSystem = {
pkgs,
system,
self',
...
}: {
_module.args.pkgs = import nixpkgs {
inherit system;
overlays = [
self.overlays.default
];
};
packages = {
inherit (pkgs) dotnet-application;
default = self'.packages.dotnet-application;
};
devShells.default = pkgs.mkShell {
packages = [
pkgs.dotnetCorePackages.dotnet_9.sdk
];
};
};
};
}