generated from Xithrius/rust-binary-project-template
-
-
Notifications
You must be signed in to change notification settings - Fork 34
/
Copy pathflake.nix
27 lines (23 loc) · 724 Bytes
/
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
{
description = "Twitch chat in the terminal.";
inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
outputs = { self, nixpkgs }:
let
system = "x86_64-linux";
pkgs = nixpkgs.legacyPackages.${system};
manifest = (pkgs.lib.importTOML ./Cargo.toml).package;
in {
packages.${system}.default = pkgs.rustPlatform.buildRustPackage {
pname = manifest.name;
version = manifest.version;
buildInputs = [pkgs.openssl.dev];
nativeBuildInputs = [pkgs.pkg-config];
src = pkgs.lib.cleanSource ./.;
cargoLock.lockFile = ./Cargo.lock;
};
apps.${system}.default = {
type = "app";
program = "${self.packages.${system}.default}/bin/twt";
};
};
}