44 lines
1.3 KiB
Nix
44 lines
1.3 KiB
Nix
|
{
|
||
|
description = "rust";
|
||
|
inputs = {
|
||
|
nixpkgs.url = "github:NixOS/nixpkgs/nixos-unstable";
|
||
|
rust-overlay.url = "github:oxalica/rust-overlay";
|
||
|
flake-utils.url = "github:numtide/flake-utils";
|
||
|
};
|
||
|
outputs = { nixpkgs, rust-overlay, flake-utils, ... }:
|
||
|
flake-utils.lib.eachDefaultSystem (system:
|
||
|
let
|
||
|
overlays = [ (import rust-overlay) ];
|
||
|
pkgs = import nixpkgs {
|
||
|
inherit system overlays;
|
||
|
};
|
||
|
bi = with pkgs; [
|
||
|
openssl
|
||
|
pkg-config
|
||
|
rust-bin.nightly.latest.default
|
||
|
];
|
||
|
in
|
||
|
with pkgs;
|
||
|
{
|
||
|
packages.default = rustPlatform.buildRustPackage {
|
||
|
pname = "pluralsync";
|
||
|
version = "1.4.0";
|
||
|
src = ./.;
|
||
|
cargoLock.lockFile = ./Cargo.lock;
|
||
|
checkType = "release";
|
||
|
nativeBuildInputs = [ pkgs.pkg-config ];
|
||
|
buildNoDefaultFeatures = true;
|
||
|
buildFeatures = ["discord" "fedi"];
|
||
|
buildInputs = bi;
|
||
|
};
|
||
|
devShells.default = mkShell {
|
||
|
name = "rust";
|
||
|
buildInputs = bi;
|
||
|
shellHook = ''
|
||
|
|
||
|
'';
|
||
|
};
|
||
|
}
|
||
|
);
|
||
|
}
|