45 lines
1 KiB
Nix
45 lines
1 KiB
Nix
{
|
|
inputs = {
|
|
nixpkgs.url = "github:NixOS/nixpkgs/nixos-24.11";
|
|
utils.url = "github:numtide/flake-utils";
|
|
naersk.url = "github:nix-community/naersk/master";
|
|
};
|
|
|
|
outputs =
|
|
{
|
|
self,
|
|
nixpkgs,
|
|
utils,
|
|
naersk,
|
|
}:
|
|
utils.lib.eachDefaultSystem (
|
|
system:
|
|
let
|
|
pkgs = import nixpkgs { inherit system; };
|
|
naersk-lib = pkgs.callPackage naersk { };
|
|
in
|
|
{
|
|
defaultPackage = naersk-lib.buildPackage ./.;
|
|
devShell =
|
|
with pkgs;
|
|
mkShell.override { stdenv = pkgs.clangStdenv; } {
|
|
nativeBuildInputs = [
|
|
cargo
|
|
rustc
|
|
rustfmt
|
|
rustPackages.clippy
|
|
cargo-binstall
|
|
llvmPackages.bintools
|
|
pkg-config
|
|
];
|
|
buildInputs = [
|
|
webkitgtk_4_1
|
|
gtk3
|
|
xdotool.out
|
|
openssl.dev
|
|
];
|
|
RUST_SRC_PATH = rustPlatform.rustLibSrc;
|
|
};
|
|
}
|
|
);
|
|
}
|