cargo-mobile2: refactor
this shouldn't create any rebuilds
This commit is contained in:
@@ -8,16 +8,14 @@
|
||||
makeWrapper,
|
||||
}:
|
||||
|
||||
let
|
||||
rustPlatform.buildRustPackage (finalAttrs: {
|
||||
pname = "cargo-mobile2";
|
||||
version = "0.22.2";
|
||||
in
|
||||
rustPlatform.buildRustPackage {
|
||||
inherit pname version;
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "tauri-apps";
|
||||
repo = "cargo-mobile2";
|
||||
rev = "cargo-mobile2-v${version}";
|
||||
rev = "cargo-mobile2-v${finalAttrs.version}";
|
||||
hash = "sha256-pSp7w823Jjjg0PEnCc7jVLBbOgvR7JAjtD8OK5voC0A=";
|
||||
};
|
||||
|
||||
@@ -27,12 +25,6 @@ rustPlatform.buildRustPackage {
|
||||
|
||||
cargoHash = "sha256-aci1QF/O2J6Yix4UkxPCVW+c+xoqm7AvdhlkF7y1GqA=";
|
||||
|
||||
preBuild = ''
|
||||
mkdir -p $out/share/
|
||||
# during the install process tauri-mobile puts templates and commit information in CARGO_HOME
|
||||
export CARGO_HOME=$out/share/
|
||||
'';
|
||||
|
||||
buildInputs = [ openssl ];
|
||||
nativeBuildInputs = [
|
||||
pkg-config
|
||||
@@ -40,6 +32,12 @@ rustPlatform.buildRustPackage {
|
||||
makeWrapper
|
||||
];
|
||||
|
||||
preBuild = ''
|
||||
mkdir -p $out/share/
|
||||
# during the install process tauri-mobile puts templates and commit information in CARGO_HOME
|
||||
export CARGO_HOME=$out/share/
|
||||
'';
|
||||
|
||||
preFixup = ''
|
||||
for bin in $out/bin/cargo-*; do
|
||||
wrapProgram $bin \
|
||||
@@ -56,4 +54,4 @@ rustPlatform.buildRustPackage {
|
||||
];
|
||||
maintainers = with lib.maintainers; [ happysalada ];
|
||||
};
|
||||
}
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user