iced-template: remove commonArgs
these are mostly useful for crane, and were only acting as unnecessary complexity here
This commit is contained in:
parent
4d21ca0e6f
commit
9b308d6b54
1 changed files with 29 additions and 42 deletions
61
flake.nix
61
flake.nix
|
|
@ -33,24 +33,6 @@
|
|||
wayland
|
||||
];
|
||||
|
||||
commonArgs = {
|
||||
# all that's needed for artifacts and checks
|
||||
nativeBuildInputs = with pkgs; [
|
||||
# pkg-config
|
||||
];
|
||||
buildInputs = with pkgs; [
|
||||
];
|
||||
|
||||
strictDeps = true;
|
||||
__structuredAttrs = true;
|
||||
|
||||
src = lib.sourceFilesBySuffices ./. [
|
||||
"Cargo.toml"
|
||||
"Cargo.lock"
|
||||
".rs"
|
||||
];
|
||||
};
|
||||
|
||||
crate =
|
||||
let
|
||||
desktopItem = pkgs.makeDesktopItem {
|
||||
|
|
@ -59,30 +41,35 @@
|
|||
exec = name;
|
||||
};
|
||||
in
|
||||
pkgs.rustPlatform.buildRustPackage (
|
||||
commonArgs
|
||||
// {
|
||||
inherit name;
|
||||
cargoLock.lockFile = "${commonArgs.src}/Cargo.lock";
|
||||
pkgs.rustPlatform.buildRustPackage rec {
|
||||
inherit name;
|
||||
|
||||
nativeBuildInputs = commonArgs.nativeBuildInputs ++ [
|
||||
pkgs.autoPatchelfHook
|
||||
];
|
||||
src = lib.sourceFilesBySuffices ./. [
|
||||
"Cargo.toml"
|
||||
"Cargo.lock"
|
||||
".rs"
|
||||
];
|
||||
cargoLock.lockFile = "${src}/Cargo.lock";
|
||||
|
||||
buildInputs = commonArgs.buildInputs ++ [
|
||||
pkgs.libgcc
|
||||
];
|
||||
nativeBuildInputs = with pkgs; [
|
||||
autoPatchelfHook
|
||||
];
|
||||
buildInputs = with pkgs; [
|
||||
libgcc
|
||||
];
|
||||
|
||||
runtimeDependencies = dlDeps;
|
||||
runtimeDependencies = dlDeps;
|
||||
|
||||
doCheck = false;
|
||||
postFixup = ''
|
||||
mkdir -p "$out/share/applications"
|
||||
ln -s "${desktopItem}"/share/applications/* "$out/share/applications/"
|
||||
'';
|
||||
|
||||
postFixup = ''
|
||||
mkdir -p "$out/share/applications"
|
||||
ln -s "${desktopItem}"/share/applications/* "$out/share/applications/"
|
||||
'';
|
||||
}
|
||||
);
|
||||
doCheck = false;
|
||||
|
||||
strictDeps = true;
|
||||
__structuredAttrs = true;
|
||||
};
|
||||
in
|
||||
{
|
||||
packages.default = crate;
|
||||
|
|
|
|||
Loading…
Reference in a new issue