Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Extract package name and version from Cargo.toml #136

Merged
merged 2 commits into from
May 22, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

14 changes: 9 additions & 5 deletions nix/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,14 @@
rustPlatform,
lib,
pkgs,
}:
}: let
cargoToml = builtins.fromTOML (builtins.readFile ../Cargo.toml);
pname = cargoToml.package.name;
version = cargoToml.package.version;
in
rustPlatform.buildRustPackage {
pname = "lan-mouse";
version = "0.7.0";
pname = pname;
version = version;

nativeBuildInputs = with pkgs; [
pkg-config
Expand All @@ -23,7 +27,7 @@ rustPlatform.buildRustPackage {
];

src = builtins.path {
name = "lan-mouse";
name = pname;
path = lib.cleanSource ../.;
};

Expand All @@ -38,7 +42,7 @@ rustPlatform.buildRustPackage {
Lan Mouse is a mouse and keyboard sharing software similar to universal-control on Apple devices. It allows for using multiple pcs with a single set of mouse and keyboard. This is also known as a Software KVM switch.
The primary target is Wayland on Linux but Windows and MacOS and Linux on Xorg have partial support as well (see below for more details).
'';
mainProgram = "lan-mouse";
mainProgram = pname;
platforms = platforms.all;
};
}
Loading