forked from winterqt/nuget2nix
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathflake.nix
35 lines (29 loc) · 1.12 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
{
description = "Generates a Nix expression for `buildDotnetModule`";
inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
inputs.flake-utils.url = "github:numtide/flake-utils";
outputs = { self, nixpkgs, flake-utils }: flake-utils.lib.eachDefaultSystem (system:
let
pkgs = nixpkgs.legacyPackages.${system};
inherit (pkgs) lib stdenv;
in
{
packages.nuget2nix = pkgs.rustPlatform.buildRustPackage {
pname = "nuget2nix";
version = (lib.importTOML ./Cargo.toml).package.version;
src = self;
cargoLock.lockFile = ./Cargo.lock;
buildInputs = lib.optional stdenv.isDarwin pkgs.darwin.apple_sdk.frameworks.Security;
};
defaultPackage = self.packages.${system}.nuget2nix;
apps.nuget2nix = {
type = "app";
program = "${self.packages.${system}.nuget2nix}/bin/nuget2nix";
};
defaultApp = self.apps.${system}.nuget2nix;
devShell = pkgs.mkShell {
nativeBuildInputs = with pkgs; [ rustc cargo clippy ] ++ lib.optionals stdenv.isDarwin [ libiconv darwin.apple_sdk.frameworks.Security ];
};
}
);
}