-
Notifications
You must be signed in to change notification settings - Fork 0
/
flake.nix
37 lines (33 loc) · 1.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
{
description = "A very basic .NET flake";
inputs = { nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable"; };
outputs = { self, nixpkgs }:
let
system = "x86_64-linux";
pkgs = nixpkgs.legacyPackages.${system};
dotnetPkgs = with pkgs;
(with dotnetCorePackages; combinePackages [ sdk_7_0 ]);
deps = with pkgs; [ clang zlib zlib.dev icu pkg-config ];
in {
apps.${system}.fetch-deps = {
type = "app";
program = "${self.packages.${system}.default.passthru.fetch-deps}";
};
packages.${system}.default = with pkgs;
buildDotnetModule {
pname = "SentSplit.cs";
version = "0.0.1";
src = ./.;
nugetDeps = ./deps.nix;
dotnet-sdk = dotnetCorePackages.sdk_7_0;
dotnet-runtime = dotnetCorePackages.runtime_7_0;
buildInputs = deps;
nativeBuildInputs = [ ] ++ deps;
selfContainedBuild = true;
DOTNET_ROOT = "${dotnetPkgs}";
LOCALE_ARCHIVE = "${glibcLocales}/lib/locale/locale-archive";
NIX_LD_LIBRARY_PATH = lib.makeLibraryPath ([ stdenv.cc.cc ] ++ deps);
NIX_LD = "${stdenv.cc.libc_bin}/bin/ld.so";
};
};
}