refactor(flightcore): consume source from nvfetcher generated.nix (#14)
cache / build (push) Has been cancelled
cache / build (push) Has been cancelled
Reviewed-on: #14 Co-authored-by: Nikkuss <Scuggo@pm.me> Co-committed-by: Nikkuss <Scuggo@pm.me>
This commit was merged in pull request #14.
This commit is contained in:
@@ -13,61 +13,58 @@
|
|||||||
pkg-config,
|
pkg-config,
|
||||||
webkitgtk_4_1,
|
webkitgtk_4_1,
|
||||||
wrapGAppsHook4,
|
wrapGAppsHook4,
|
||||||
fetchFromGitHub,
|
callPackage,
|
||||||
}:
|
}: let
|
||||||
rustPlatform.buildRustPackage (finalAttrs: {
|
sources = callPackage ../../../../_sources/generated.nix {};
|
||||||
pname = "flightcore";
|
in
|
||||||
version = "3.2.0";
|
rustPlatform.buildRustPackage (finalAttrs: {
|
||||||
src = fetchFromGitHub {
|
pname = "flightcore";
|
||||||
owner = "R2NorthstarTools";
|
version = lib.removePrefix "v" sources.flightcore.version;
|
||||||
repo = "FlightCore";
|
inherit (sources.flightcore) src;
|
||||||
rev = "v${finalAttrs.version}";
|
patches = [./cargo-lock.patch];
|
||||||
sha256 = "sha256-MFnW9cXFzqmdtC31r8cRcihV3NjGAC6+2/DnNVMheCI=";
|
cargoDeps = rustPlatform.fetchCargoVendor {
|
||||||
};
|
src = finalAttrs.src;
|
||||||
patches = [./cargo-lock.patch];
|
sourceRoot = "${finalAttrs.src.name}/${finalAttrs.cargoRoot}";
|
||||||
cargoDeps = rustPlatform.fetchCargoVendor {
|
hash = "sha256-Jh0DAX4fGy2Z1+hpq+bkU/VYy2JAL2u+neUIsQ2QXBU=";
|
||||||
src = finalAttrs.src;
|
patchFlags = "-p2";
|
||||||
sourceRoot = "${finalAttrs.src.name}/${finalAttrs.cargoRoot}";
|
inherit (finalAttrs) patches;
|
||||||
hash = "sha256-Jh0DAX4fGy2Z1+hpq+bkU/VYy2JAL2u+neUIsQ2QXBU=";
|
};
|
||||||
patchFlags = "-p2";
|
postPatch = ''
|
||||||
inherit (finalAttrs) patches;
|
jq '.bundle.createUpdaterArtifacts = false' src-tauri/tauri.conf.json | sponge src-tauri/tauri.conf.json
|
||||||
};
|
'';
|
||||||
postPatch = ''
|
npmDeps = fetchNpmDeps {
|
||||||
jq '.bundle.createUpdaterArtifacts = false' src-tauri/tauri.conf.json | sponge src-tauri/tauri.conf.json
|
name = "${finalAttrs.pname}-${finalAttrs.version}-npm-deps";
|
||||||
'';
|
src = "${finalAttrs.src}/src-vue";
|
||||||
npmDeps = fetchNpmDeps {
|
hash = "sha256-QhUPkCBK1kcAF7gByFxlg8Ca9PLF3evCl0QYEPP/Q2c=";
|
||||||
name = "${finalAttrs.pname}-${finalAttrs.version}-npm-deps";
|
};
|
||||||
src = "${finalAttrs.src}/src-vue";
|
|
||||||
hash = "sha256-QhUPkCBK1kcAF7gByFxlg8Ca9PLF3evCl0QYEPP/Q2c=";
|
|
||||||
};
|
|
||||||
|
|
||||||
nativeBuildInputs =
|
nativeBuildInputs =
|
||||||
[
|
[
|
||||||
cargo-tauri.hook
|
cargo-tauri.hook
|
||||||
|
|
||||||
nodejs
|
nodejs
|
||||||
npmHooks.npmConfigHook
|
npmHooks.npmConfigHook
|
||||||
|
|
||||||
pkg-config
|
pkg-config
|
||||||
|
|
||||||
jq
|
jq
|
||||||
moreutils
|
moreutils
|
||||||
]
|
]
|
||||||
++ lib.optionals stdenv.hostPlatform.isLinux [wrapGAppsHook4];
|
++ lib.optionals stdenv.hostPlatform.isLinux [wrapGAppsHook4];
|
||||||
|
|
||||||
buildInputs = lib.optionals stdenv.hostPlatform.isLinux [
|
buildInputs = lib.optionals stdenv.hostPlatform.isLinux [
|
||||||
glib-networking
|
glib-networking
|
||||||
openssl
|
openssl
|
||||||
webkitgtk_4_1
|
webkitgtk_4_1
|
||||||
];
|
];
|
||||||
|
|
||||||
cargoRoot = "src-tauri";
|
cargoRoot = "src-tauri";
|
||||||
npmRoot = "src-vue";
|
npmRoot = "src-vue";
|
||||||
|
|
||||||
buildAndTestSubdir = finalAttrs.cargoRoot;
|
buildAndTestSubdir = finalAttrs.cargoRoot;
|
||||||
|
|
||||||
meta = {
|
meta = {
|
||||||
platforms = ["x86_64-linux"];
|
platforms = ["x86_64-linux"];
|
||||||
description = "FlightCore A Northstar installer, updater, and mod-manager";
|
description = "FlightCore A Northstar installer, updater, and mod-manager";
|
||||||
};
|
};
|
||||||
})
|
})
|
||||||
|
|||||||
Reference in New Issue
Block a user