This repository has been archived on 2024-09-29. You can view files and clone it, but cannot push or open issues or pull requests.
altoku/flake.nix

44 lines
1 KiB
Nix
Raw Normal View History

2024-05-28 10:37:10 +01:00
{
description = "Rust development environment for altoku";
inputs = {
utils.url = "github:numtide/flake-utils";
nixpkgs-unstable.url = "github:nixos/nixpkgs/nixos-unstable";
};
outputs = {
self,
nixpkgs-unstable,
utils,
...
}:
utils.lib.eachDefaultSystem
(
system: let
pkgs = import nixpkgs-unstable { inherit system; };
in rec
{
# Executed by `nix build`
packages.default = pkgs.rustPlatform.buildRustPackage {
pname = "altoku";
version = "0.1.0";
src = ./.;
cargoLock.lockFile = ./Cargo.lock;
};
# Executed by `nix run`
apps.default = utils.lib.mkApp {drv = packages.default;};
# Used by `nix develop`
devShells.default = pkgs.mkShell rec {
shellHook = ''export LD_LIBRARY_PATH="$LD_LIBRARY_PATH:${pkgs.lib.makeLibraryPath [
pkgs.openssl_3_3
]}"'';
buildInputs = with pkgs; [
openssl_3_3 pkg-config
];
};
}
);
}