Files
anyrun/nix/plugins/default.nix
NotAShelf 59e0bf6e57 nix: cleanup (#75)
* dev: typo in cache job name

* nix: cleanup
2023-08-07 23:11:31 +03:00

53 lines
966 B
Nix

{
lib,
glib,
makeWrapper,
rustPlatform,
atk,
gtk3,
gtk-layer-shell,
pkg-config,
librsvg,
inputs,
name,
lockFile,
...
}: let
cargoToml = builtins.fromTOML (builtins.readFile ../../plugins/${name}/Cargo.toml);
in
rustPlatform.buildRustPackage {
pname = cargoToml.package.name;
version = cargoToml.package.version;
src = "${inputs.self}";
cargoLock = {
inherit lockFile;
};
buildInputs = [
glib
atk
gtk3
librsvg
gtk-layer-shell
];
nativeBuildInputs = [
pkg-config
makeWrapper
];
doCheck = true;
CARGO_BUILD_INCREMENTAL = "false";
RUST_BACKTRACE = "full";
copyLibs = true;
cargoBuildFlags = ["-p ${name}"];
buildAndTestSubdir = "plugins/${name}";
meta = with lib; {
description = "The ${name} plugin for Anyrun";
homepage = "https://github.com/Kirottu/anyrun";
license = with licenses; [gpl3];
};
}