58 lines
1.1 KiB
Nix
58 lines
1.1 KiB
Nix
{
|
|
inputs = {
|
|
nixpkgs.url = "github:nixos/nixpkgs/nixos-unstable";
|
|
|
|
fenix = {
|
|
url = "github:nix-community/fenix";
|
|
inputs.nixpkgs.follows = "nixpkgs";
|
|
};
|
|
};
|
|
|
|
outputs =
|
|
{
|
|
self,
|
|
nixpkgs,
|
|
fenix,
|
|
}:
|
|
let
|
|
pkgs = nixpkgs.legacyPackages.x86_64-linux;
|
|
rustPkgs = fenix.packages.x86_64-linux.default;
|
|
|
|
rustPlatform = pkgs.makeRustPlatform {
|
|
inherit (rustPkgs)
|
|
cargo
|
|
rustc
|
|
;
|
|
};
|
|
|
|
nativeBuildInputs = with pkgs; [
|
|
pkg-config
|
|
m4
|
|
];
|
|
buildInputs = [ pkgs.gmp ];
|
|
in
|
|
with pkgs;
|
|
{
|
|
packages.x86_64-linux.default = rustPlatform.buildRustPackage {
|
|
name = "dollcode-cli";
|
|
|
|
src = ./.;
|
|
|
|
cargoLock.lockFile = ./Cargo.lock;
|
|
|
|
buildNoDefaultFeatures = true;
|
|
buildFeatures = [ "cli" ];
|
|
|
|
inherit nativeBuildInputs buildInputs;
|
|
};
|
|
|
|
devShells.x86_64-linux.default = mkShell {
|
|
packages = with rustPkgs; [
|
|
cargo
|
|
clippy
|
|
rustc
|
|
];
|
|
inherit nativeBuildInputs buildInputs;
|
|
};
|
|
};
|
|
}
|