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
47
flake.nix
47
flake.nix
|
|
@ -33,24 +33,6 @@
|
||||||
wayland
|
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 =
|
crate =
|
||||||
let
|
let
|
||||||
desktopItem = pkgs.makeDesktopItem {
|
desktopItem = pkgs.makeDesktopItem {
|
||||||
|
|
@ -59,30 +41,35 @@
|
||||||
exec = name;
|
exec = name;
|
||||||
};
|
};
|
||||||
in
|
in
|
||||||
pkgs.rustPlatform.buildRustPackage (
|
pkgs.rustPlatform.buildRustPackage rec {
|
||||||
commonArgs
|
|
||||||
// {
|
|
||||||
inherit name;
|
inherit name;
|
||||||
cargoLock.lockFile = "${commonArgs.src}/Cargo.lock";
|
|
||||||
|
|
||||||
nativeBuildInputs = commonArgs.nativeBuildInputs ++ [
|
src = lib.sourceFilesBySuffices ./. [
|
||||||
pkgs.autoPatchelfHook
|
"Cargo.toml"
|
||||||
|
"Cargo.lock"
|
||||||
|
".rs"
|
||||||
];
|
];
|
||||||
|
cargoLock.lockFile = "${src}/Cargo.lock";
|
||||||
|
|
||||||
buildInputs = commonArgs.buildInputs ++ [
|
nativeBuildInputs = with pkgs; [
|
||||||
pkgs.libgcc
|
autoPatchelfHook
|
||||||
|
];
|
||||||
|
buildInputs = with pkgs; [
|
||||||
|
libgcc
|
||||||
];
|
];
|
||||||
|
|
||||||
runtimeDependencies = dlDeps;
|
runtimeDependencies = dlDeps;
|
||||||
|
|
||||||
doCheck = false;
|
|
||||||
|
|
||||||
postFixup = ''
|
postFixup = ''
|
||||||
mkdir -p "$out/share/applications"
|
mkdir -p "$out/share/applications"
|
||||||
ln -s "${desktopItem}"/share/applications/* "$out/share/applications/"
|
ln -s "${desktopItem}"/share/applications/* "$out/share/applications/"
|
||||||
'';
|
'';
|
||||||
}
|
|
||||||
);
|
doCheck = false;
|
||||||
|
|
||||||
|
strictDeps = true;
|
||||||
|
__structuredAttrs = true;
|
||||||
|
};
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
packages.default = crate;
|
packages.default = crate;
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue